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
54a455602af46c7d561bd87a31e19f32ff3b5f64
diff --git a/sentry_sdk/integrations/wsgi.py b/sentry_sdk/integrations/wsgi.py index <HASH>..<HASH> 100644 --- a/sentry_sdk/integrations/wsgi.py +++ b/sentry_sdk/integrations/wsgi.py @@ -87,7 +87,7 @@ class SentryWsgiMiddleware(object): scope.add_event_processor(_make_wsgi_event_processor(environ)) span = Span.continue_from_environ(environ) - span.transaction = environ.get("PATH_INFO") or "unknown http request" + span.transaction = "generic WSGI request" with hub.span(span): try: diff --git a/tests/integrations/wsgi/test_wsgi.py b/tests/integrations/wsgi/test_wsgi.py index <HASH>..<HASH> 100644 --- a/tests/integrations/wsgi/test_wsgi.py +++ b/tests/integrations/wsgi/test_wsgi.py @@ -45,6 +45,8 @@ def test_basic(sentry_init, crashing_app, capture_events): event, = events + assert event["transaction"] == "generic WSGI request" + assert event["request"] == { "env": {"SERVER_NAME": "localhost", "SERVER_PORT": "80"}, "headers": {"Content-Length": "0", "Content-Type": "", "Host": "localhost"},
fix: Remove WSGI transaction logic (#<I>)
getsentry_sentry-python
train
py,py
09059fb491b4158a25981eb5598262b43a18c6ae
diff --git a/lib/fetch/index.js b/lib/fetch/index.js index <HASH>..<HASH> 100644 --- a/lib/fetch/index.js +++ b/lib/fetch/index.js @@ -434,13 +434,13 @@ function fetching ({ // 3. Append `Accept`/value to request’s header list. request.headersList.append('accept', value) + } - // 12. If request’s header list does not contain `Accept-Language`, then - // user agents should append `Accept-Language`/an appropriate value to - // request’s header list. - if (!request.headersList.has('accept-language')) { - request.headersList.append('accept-language', '*') - } + // 12. If request’s header list does not contain `Accept-Language`, then + // user agents should append `Accept-Language`/an appropriate value to + // request’s header list. + if (!request.headersList.has('accept-language')) { + request.headersList.append('accept-language', '*') } // 13. If request’s priority is null, then use request’s initiator and
fix: fetch move out step from cond
mcollina_undici
train
js
863e4fdffa1931f49a83e93d6d5a53b07a05495d
diff --git a/ui/src/components/select/QSelect.js b/ui/src/components/select/QSelect.js index <HASH>..<HASH> 100755 --- a/ui/src/components/select/QSelect.js +++ b/ui/src/components/select/QSelect.js @@ -1439,6 +1439,7 @@ export default createComponent({ floatingLabel: computed(() => (props.hideSelected !== true && hasValue.value === true) + || typeof inputValue.value === 'number' || inputValue.value.length > 0 || fieldValueIsFilled(props.displayValue) ),
fix(QField): fix detection of floating label when value is number #<I> (#<I>)
quasarframework_quasar
train
js
2b104b44bc6f6ae9d6f11cc6d90558f5c1d67407
diff --git a/packages/@vue/cli-service-global/lib/globalConfigPlugin.js b/packages/@vue/cli-service-global/lib/globalConfigPlugin.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-service-global/lib/globalConfigPlugin.js +++ b/packages/@vue/cli-service-global/lib/globalConfigPlugin.js @@ -107,7 +107,10 @@ module.exports = function createConfigPlugin (context, entry, asLib) { extends: [ 'plugin:vue/essential', 'eslint:recommended' - ] + ], + parserOptions: { + parser: 'babel-eslint' + } } }))
fix(cli-service-global): fix eslint-loader config (close #<I>) (#<I>) By including the parserOptions as we do when we create an actual eslint config for normal projects, we get ESnext support for eslint during `vue serve`
vuejs_vue-cli
train
js
aaa9a3152bf1aa9098167f9c013581439b484df6
diff --git a/lib/util/index.js b/lib/util/index.js index <HASH>..<HASH> 100644 --- a/lib/util/index.js +++ b/lib/util/index.js @@ -843,7 +843,7 @@ function readRuleList(rule, callback, isJson) { } var len = rule.list && rule.list.length; var isBin = protoMgr.isBinProtocol(rule.name); - var readFile = fm[(isBin || isJson) ? 'readFile' : 'readFileText']; + var readFile = fm[(isBin && !isJson) ? 'readFile' : 'readFileText']; if (!len) { return readRuleValue(rule, readFile, isJson ? function(value) { callback(parseJSON(value));
feat: support matching multiple rules with the same name
avwo_whistle
train
js
4a0b3cf83e5cac104f706d5fc448b69f556c5d38
diff --git a/lib/workers/repository/finalise/index.js b/lib/workers/repository/finalise/index.js index <HASH>..<HASH> 100644 --- a/lib/workers/repository/finalise/index.js +++ b/lib/workers/repository/finalise/index.js @@ -13,5 +13,4 @@ async function finaliseRepo(config, branchList) { await platform.ensureIssueClosing( 'Action Required: Fix Renovate Configuration' ); - platform.cleanRepo(); } diff --git a/lib/workers/repository/index.js b/lib/workers/repository/index.js index <HASH>..<HASH> 100644 --- a/lib/workers/repository/index.js +++ b/lib/workers/repository/index.js @@ -26,6 +26,7 @@ async function renovateRepository(repoConfig) { } catch (err) /* istanbul ignore next */ { return processResult(config, await handleError(config, err)); } finally { + platform.cleanRepo(); logger.info('Finished repository'); } }
fix: move cleanRepo to finally
renovatebot_renovate
train
js,js
a3eea923fce3bcfc1f9e9edd2874e0b77f51de0f
diff --git a/src/chip/chips.js b/src/chip/chips.js index <HASH>..<HASH> 100644 --- a/src/chip/chips.js +++ b/src/chip/chips.js @@ -8,7 +8,7 @@ import {fireEvent} from '../common/events'; @customAttribute('md-chips') @inject(Element) export class MdChips { - @bindable() autocompleteData = {}; + @bindable() autocompleteOptions = {}; @bindable({ defaultBindingMode: bindingMode.twoWay }) data = []; @bindable() placeholder = ''; @bindable() secondaryPlaceholder = ''; @@ -24,7 +24,7 @@ export class MdChips { attached() { let options = { - autocompleteData: this.autocompleteData, + autocompleteOptions: this.autocompleteOptions, data: this.data, placeholder: this.placeholder, secondaryPlaceholder: this.secondaryPlaceholder
feat(md-chips): Fixed broken autocomplete binding The binding for using autocomplete in Chips has changed: <URL>
aurelia-ui-toolkits_aurelia-materialize-bridge
train
js
c8c1345d45756208dfe8a727211d97a9c2646576
diff --git a/src/Tabs/Tabs.js b/src/Tabs/Tabs.js index <HASH>..<HASH> 100644 --- a/src/Tabs/Tabs.js +++ b/src/Tabs/Tabs.js @@ -9,7 +9,7 @@ const styles = theme => ({ tabs: { extend: isolateMixin, display: 'inline-flex', - fontFamily: theme.fontFamily, + fontFamily: theme.tabs.fontFamily, paddingLeft: theme.tabs.sidePadding, paddingRight: theme.tabs.sidePadding }, diff --git a/src/theme/create-theme.js b/src/theme/create-theme.js index <HASH>..<HASH> 100644 --- a/src/theme/create-theme.js +++ b/src/theme/create-theme.js @@ -1139,6 +1139,7 @@ export default function createTheme(config) { sidePadding: 10, borderWidth: 2, animationDuration: 200, + fontFamily: fontFamilies.Roboto, colors: { default: { text: colors.dark,
feat(Tabs): added fontFamily for tabs
rambler-digital-solutions_rambler-ui
train
js,js
b6c195daba1906759f40dfb430832cbcdcc1cd73
diff --git a/java-automl/synth.py b/java-automl/synth.py index <HASH>..<HASH> 100644 --- a/java-automl/synth.py +++ b/java-automl/synth.py @@ -18,6 +18,8 @@ import synthtool as s import synthtool.gcp as gcp import synthtool.languages.java as java +AUTOSYNTH_MULTIPLE_COMMITS = True + gapic = gcp.GAPICGenerator() service = 'automl' @@ -30,4 +32,4 @@ for version in versions: bazel_target=f'//google/cloud/{service}/{version}:google-cloud-{service}-{version}-java', ) -java.common_templates() \ No newline at end of file +java.common_templates()
chore: enable context aware commits (#<I>)
googleapis_google-cloud-java
train
py
852e14fbb85cc8e6ac5522d5eaeb1e61623f505d
diff --git a/lib/core/sdam/server_description.js b/lib/core/sdam/server_description.js index <HASH>..<HASH> 100644 --- a/lib/core/sdam/server_description.js +++ b/lib/core/sdam/server_description.js @@ -19,6 +19,13 @@ const WRITABLE_SERVER_TYPES = new Set([ ServerType.Mongos ]); +const DATA_BEARING_SERVER_TYPES = new Set([ + ServerType.RSPrimary, + ServerType.RSSecondary, + ServerType.Mongos, + ServerType.Standalone +]); + const ISMASTER_FIELDS = [ 'minWireVersion', 'maxWireVersion', @@ -100,6 +107,13 @@ class ServerDescription { } /** + * @return {Boolean} Is this server data bearing + */ + get isDataBearing() { + return DATA_BEARING_SERVER_TYPES.has(this.type); + } + + /** * @return {Boolean} Is this server available for writes */ get isWritable() {
feat: add concept of `data-bearing` type to `ServerDescription`
mongodb_node-mongodb-native
train
js
89ddcfe50591f02c5b06d8ec354483ca2247b3fd
diff --git a/lib/user.js b/lib/user.js index <HASH>..<HASH> 100755 --- a/lib/user.js +++ b/lib/user.js @@ -95,17 +95,27 @@ var user = { options.limit = params.limit ? params.limit : 0 options.sort = params.sort ? params.sort : 0 + if(match.movieType == null) + delete match.movieType + + //get a search string if(match.search) { + //require helper that will pre-work the string (S01E02 => season/episode) var search = require('./search')(match.search) - delete match.search + delete match.search //we don't want this anymore for(var i in search) { for(var j in match) { - search[i][j] = match[j] + if(j !== 'movieType') { + search[i][j] = match[j] + } else if(i == 'movies') { + search[i][j] = match[j] + } } } } + debug('Files query', match, options) var population = {
fix(search): MovieType should only apply on movies if not null
ezseed_database
train
js
bc37915379d5b58b319c43d3d154993febcc063d
diff --git a/test/relay_lazy.js b/test/relay_lazy.js index <HASH>..<HASH> 100644 --- a/test/relay_lazy.js +++ b/test/relay_lazy.js @@ -315,7 +315,7 @@ allocCluster.test('relay request times out', { 'expected timeout error'); assert.notOk(res, 'expected no response'); - setTimeout(finish, 10); + setTimeout(finish, 100); } function finish() {
test: bump timeout delay to be bigger for travis
uber_tchannel-node
train
js
72868493273dfd07100418a4c6339bc291c3bd75
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,7 +32,8 @@ node_modules_bin_dir = os.path.join(project_dir, 'node_modules', '.bin') # ReadTheDocs build image, which supports Node.js out of the box. This is # specified in the readthedocs.yml in the root of the project. if IS_READTHEDOCS: - subprocess.check_call('npm install', cwd=project_dir, shell=True) + subprocess.check_call('npm install --no-optional', + cwd=project_dir, shell=True) # Load package.json data with open(os.path.join(project_dir, 'package.json')) as f:
chore: don't install optional deps on RTD
apiaryio_dredd
train
py
6337f055c95e8a13bfa49e508bcf3949ddc4de5f
diff --git a/watson_developer_cloud/watson_service.py b/watson_developer_cloud/watson_service.py index <HASH>..<HASH> 100755 --- a/watson_developer_cloud/watson_service.py +++ b/watson_developer_cloud/watson_service.py @@ -319,7 +319,7 @@ class WatsonService(object): credential_file_path = file_path if credential_file_path is not None: - with open(credential_file_path, 'rb') as fp: + with open(credential_file_path, 'r') as fp: for line in fp: key_val = line.strip().split(separator) if len(key_val) == 2:
chore(credential): Update file to be opened as a text
watson-developer-cloud_python-sdk
train
py
72b90fda9690eb4b8dee850e33fc8d05f4642b9b
diff --git a/classes/ValidFormBuilder/ValidForm.php b/classes/ValidFormBuilder/ValidForm.php index <HASH>..<HASH> 100644 --- a/classes/ValidFormBuilder/ValidForm.php +++ b/classes/ValidFormBuilder/ValidForm.php @@ -287,6 +287,12 @@ class ValidForm extends ClassDynamic const VFORM_COMPARISON_CONTAINS = "contains"; /** + * Check if the value does not contain this string (case insensitive) + * @var string + */ + const VFORM_COMPARISON_DOES_NOT_CONTAIN = "doesnotcontain"; + + /** * Check if the value **starts** with this string * @var string */ diff --git a/js/validform.js b/js/validform.js index <HASH>..<HASH> 100644 --- a/js/validform.js +++ b/js/validform.js @@ -978,6 +978,11 @@ ValidFormComparison.prototype.check = function () { blnReturn = true; } break; + case "doesnotcontain": + if (strValue.toString().toLowerCase().indexOf(self.value.toString().toLowerCase()) === -1) { + blnReturn = true; + } + break; case "startswith": if (strValue.indexOf(self.value) === 0) { blnReturn = true;
feat(conditions): add 'does not contain' condition
validformbuilder_validformbuilder
train
php,js
c7e5bcb05c33f6c05161a7e684b5ec7bae6fbe19
diff --git a/src/components/ComposedModal/ComposedModal.js b/src/components/ComposedModal/ComposedModal.js index <HASH>..<HASH> 100644 --- a/src/components/ComposedModal/ComposedModal.js +++ b/src/components/ComposedModal/ComposedModal.js @@ -209,6 +209,7 @@ export class ModalFooter extends Component { primaryButtonDisabled: PropTypes.bool, onRequestClose: PropTypes.func, onRequestSubmit: PropTypes.func, + closeModal: PropTypes.func, children: PropTypes.node, }; @@ -230,6 +231,7 @@ export class ModalFooter extends Component { secondaryButtonText, primaryButtonText, primaryButtonDisabled, + closeModal, // eslint-disable-line onRequestClose, // eslint-disable-line onRequestSubmit, // eslint-disable-line children,
fix: react warning in ComposedModal component, resolves #<I> (#<I>)
carbon-design-system_carbon-components-react
train
js
d64e2a62771cbb2f32c35f30b721359d8fdba7ed
diff --git a/src/Models/Universe/UniverseName.php b/src/Models/Universe/UniverseName.php index <HASH>..<HASH> 100644 --- a/src/Models/Universe/UniverseName.php +++ b/src/Models/Universe/UniverseName.php @@ -23,6 +23,7 @@ namespace Seat\Eveapi\Models\Universe; use Illuminate\Database\Eloquent\Model; +use Seat\Eveapi\Models\Character\CharacterAffiliation; /** * Class UniverseName. @@ -45,4 +46,13 @@ class UniverseName extends Model */ protected $primaryKey = 'entity_id'; + /** + * @return \Illuminate\Database\Eloquent\Relations\HasOne + */ + public function affiliation() + { + return $this->hasOne(CharacterAffiliation::class, 'character_id', 'entity_id') + ->withDefault(); + } + }
feat(relationship): link universe name and affiliation
eveseat_eveapi
train
php
78082288d40bfe8f0befa19bc5a7cab49374fff9
diff --git a/src/test/java/com/aparapi/runtime/Issue55Test.java b/src/test/java/com/aparapi/runtime/Issue55Test.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/aparapi/runtime/Issue55Test.java +++ b/src/test/java/com/aparapi/runtime/Issue55Test.java @@ -35,6 +35,9 @@ public class Issue55Test { public void setUp() { testKernel = new Kernel() { + /** + * This kernel does nothing. + */ @Override public void run() { } @@ -53,7 +56,7 @@ public class Issue55Test { } @Test - public void testUseJTP_ONLY() { + public void testUseJtpOnly() { KernelManager.setKernelManager(KernelManagers.JTP_ONLY); Device device = KernelManager.instance().getDefaultPreferences().getPreferredDevice(testKernel); @@ -62,7 +65,7 @@ public class Issue55Test { } @Test - public void testUseSEQUENTIAL_ONLY() { + public void testUseSequentialOnly() { KernelManager.setKernelManager(KernelManagers.SEQUENTIAL_ONLY); Device device = KernelManager.instance().getDefaultPreferences().getPreferredDevice(testKernel);
refactor: Cleanup code to make Codacy happy
Syncleus_aparapi
train
java
6eaa3336adcea2154fe379d4d376bd06c1f27002
diff --git a/react/AccordionItem/AccordionItem.js b/react/AccordionItem/AccordionItem.js index <HASH>..<HASH> 100644 --- a/react/AccordionItem/AccordionItem.js +++ b/react/AccordionItem/AccordionItem.js @@ -26,7 +26,6 @@ function AccordionItem({ const [isOpen, setIsOpen] = useState(open); const buttonClasses = classnames(className, styles.title); - const isAnimating = currentHeight === CLOSED_HEIGHT && isOpen; const expanderClasses = classnames(styles.expander, { [styles.expanderOpen]: isAnimating
feat(AccordionItem): Add AccordionItem (#<I>)
seek-oss_seek-style-guide
train
js
c199094a3de13eec35b0f4493bcf9670c0c11466
diff --git a/src/cobra/util/process_pool.py b/src/cobra/util/process_pool.py index <HASH>..<HASH> 100644 --- a/src/cobra/util/process_pool.py +++ b/src/cobra/util/process_pool.py @@ -79,8 +79,9 @@ class ProcessPool: exc_tb: Optional[TracebackType], ) -> Optional[bool]: """Clean up resources when leaving a context.""" + result = self._pool.__exit__(exc_type, exc_val, exc_tb) self._clean_up() - return self._pool.__exit__(exc_type, exc_val, exc_tb) + return result def close(self) -> None: """ @@ -90,8 +91,10 @@ class ProcessPool: been completed, the worker processes will exit. """ - self._clean_up() - self._pool.close() + try: + self._pool.close() + finally: + self._clean_up() def _clean_up(self) -> None: """Remove the dump file if it exists."""
fix: delay clean up to avoid access error
opencobra_cobrapy
train
py
c4da9ed9e61550b186c067c991e77f3fc03aa5da
diff --git a/src/reporter.js b/src/reporter.js index <HASH>..<HASH> 100644 --- a/src/reporter.js +++ b/src/reporter.js @@ -1,4 +1,3 @@ -var selectedSpinner = 0; var chalk = require('chalk'); var readline = require('readline'); var _ = require('underscore'); @@ -10,6 +9,7 @@ var spinners = [ '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏', '┤┘┴└├┌┬┐' ]; +var selectedSpinner = 1; var index; var currentPending; var log = {
fix(reporter): use supported spinner for windows
damonjs_damon
train
js
f77b0bf535b83d354ed99c030ec12b219eeb1620
diff --git a/lib/plugins/load-plugin.js b/lib/plugins/load-plugin.js index <HASH>..<HASH> 100644 --- a/lib/plugins/load-plugin.js +++ b/lib/plugins/load-plugin.js @@ -176,7 +176,7 @@ var addParserApi = function(req, conn, state, reqId) { curState = req.curReceiveState; prevState = req.prevReceiveState; } - if (curState || curState != prevState) { + if (curState || prevState) { req.emit(eventName, curState, prevState); } };
refactor: auto emit state change
avwo_whistle
train
js
eac3bfb0447a0001863369cc2e5f0d1743c21b55
diff --git a/src/core/services/interimElement/interimElement.js b/src/core/services/interimElement/interimElement.js index <HASH>..<HASH> 100644 --- a/src/core/services/interimElement/interimElement.js +++ b/src/core/services/interimElement/interimElement.js @@ -724,6 +724,11 @@ function InterimElementProvider() { if (options.$destroy) { // For $destroy, onRemove should be synchronous resolve(element); + + if (!options.preserveScope && options.scope ) { + // scope destroy should still be be done after the current digest is done + action.then( function() { options.scope.$destroy(); }); + } } else { // Wait until transition-out is done action.then(function () {
fix(interimElement): added missing scope dispose to fix memory leak (#<I>)
angular_material
train
js
6884f5350d275031e0131b88202127724598fe90
diff --git a/docs/src/app/components/containers/components/DatePicker.js b/docs/src/app/components/containers/components/DatePicker.js index <HASH>..<HASH> 100644 --- a/docs/src/app/components/containers/components/DatePicker.js +++ b/docs/src/app/components/containers/components/DatePicker.js @@ -101,7 +101,7 @@ export default class DatePicker extends React.Component { <div className="pe-input-group pe-input-icon"> <div className="pe-input" style={divStyle1}> <Onclickout onClickOut={this.handleOnClickOutside}> - <input ref="input" type="text" id="i2" maxLength="10" + <input ref="input" type="text" id="i2" placeholder={(moment.localeData(this.props.locale)._longDateFormat.L).toLowerCase()} onClick={this.handleOnClick} value={this.state.value} onChange={this.handleInputChange}
fix: DatePicker Remove maxLength DatePicker remove maxLength inorder to work with iPhone
Pearson-Higher-Ed_compounds
train
js
6ada1cd2755b2bed25bec3a334b3fcc181d1b162
diff --git a/tabula/file_util.py b/tabula/file_util.py index <HASH>..<HASH> 100644 --- a/tabula/file_util.py +++ b/tabula/file_util.py @@ -52,8 +52,9 @@ def localize_file(path_or_buffer, user_agent=None, suffix=".pdf"): fname, ext = os.path.splitext(filename) filename = "{}{}".format(fname[:MAX_FILE_SIZE], ext) if ext != suffix: - filename = os.path.join(gettempdir(), "{}{}".format(uuid.uuid4(), suffix)) + filename = "{}{}".format(uuid.uuid4(), suffix) + filename = os.path.join(gettempdir(), filename) with open(filename, "wb") as f: shutil.copyfileobj(req, f) diff --git a/tests/test_util.py b/tests/test_util.py index <HASH>..<HASH> 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -73,7 +73,7 @@ class TestUtil(unittest.TestCase): fname, _ = tabula.file_util.localize_file(uri) mock_urlopen.assert_called_with(uri) - self.assertEqual(fname, "123456789012345678901234567890.pdf") + self.assertTrue(fname.endswith("123456789012345678901234567890.pdf")) self.addCleanup(os.remove, fname)
chore: ensure to use tempdir for localize_file
chezou_tabula-py
train
py,py
75126deff3bbd2374001aef6fd6ec2fad586545e
diff --git a/consent/manager_memory.go b/consent/manager_memory.go index <HASH>..<HASH> 100644 --- a/consent/manager_memory.go +++ b/consent/manager_memory.go @@ -412,11 +412,14 @@ func (m *MemoryManager) GetLoginRequest(ctx context.Context, challenge string) ( return nil, errors.WithStack(x.ErrNotFound) } + m.m["handledAuthRequests"].Lock() for _, h := range m.handledAuthRequests { if h.Challenge == c.Challenge { c.WasHandled = h.WasUsed } } + m.m["handledAuthRequests"].Unlock() + c.Client.ClientID = c.Client.GetID() return &c, nil }
fix(consent): Fix concurrent write and read on map (#<I>) Closes #<I>
ory_hydra
train
go
33594984545bd05f6387150bcaf89ecae5630a9c
diff --git a/src/Module.php b/src/Module.php index <HASH>..<HASH> 100644 --- a/src/Module.php +++ b/src/Module.php @@ -92,6 +92,14 @@ class Module implements public function getConsoleUsage(Console $console) { return [ + // queue commands + 'queue mongo <name>' => 'Starts the worker process for the queue <name>', + 'This process is needed to execute waiting jobs in the queue. It is recommend to run this process', + 'in a process management tool capable of automatic restarting, such as supervisor', + '', + 'queue mongo --list <name>' => 'List enqueued jobs from the queue <name>', + ['--limit=INT', 'Limit the result'], + '', 'purge [--no-check] [--options=] <entity> [<id>]' => 'Purge entities', 'This command will load entities to be purged, checks the dependency of each and removes all entities completely from the', 'database. However, called with no <entity> and options it will output a list of all available entity loaders and its options.',
docs: Add console usage for the queue commands.
yawik_core
train
php
eff3f6c90428ddd2d988c9b686d92488c6430b77
diff --git a/reflect.go b/reflect.go index <HASH>..<HASH> 100644 --- a/reflect.go +++ b/reflect.go @@ -267,6 +267,9 @@ func (r *Reflector) reflectStructFields(st *Type, definitions Definitions, t ref if t.Kind() == reflect.Ptr { t = t.Elem() } + if t.Kind() != reflect.Struct { + return + } for i := 0; i < t.NumField(); i++ { f := t.Field(i) // anonymous and exported type should be processed recursively diff --git a/reflect_test.go b/reflect_test.go index <HASH>..<HASH> 100644 --- a/reflect_test.go +++ b/reflect_test.go @@ -31,6 +31,8 @@ type SomeBaseType struct { someUnexportedUntaggedBaseProperty bool } +type MapType map[string]interface{} + type nonExported struct { PublicNonExported int privateNonExported int @@ -48,6 +50,7 @@ const ( type TestUser struct { SomeBaseType nonExported + MapType ID int `json:"id" jsonschema:"required"` Name string `json:"name" jsonschema:"required,minLength=1,maxLength=20,pattern=.*,description=this is a property,title=the name,example=joe,example=lucy,default=alex"`
fix: ignore anonymous fields if not of type struct
alecthomas_jsonschema
train
go,go
0d89cbf2627512412ae0bfc89f01966db2499526
diff --git a/docs/lists.stories.js b/docs/lists.stories.js index <HASH>..<HASH> 100644 --- a/docs/lists.stories.js +++ b/docs/lists.stories.js @@ -10,7 +10,11 @@ stories.add('list', () => { const selectedClass = radios('type', { default: 'is-disc', 'is-circle': 'is-circle', - 'is-square': 'is-square', }, 'is-disc'); - return `<ul class="nes-list ${selectedClass}"> <li>Test</li> </ul>`; + return `<ul class="nes-list ${selectedClass}"> + <li>Good morning.</li> + <li>Thou hast had a good night's sleep, I hope.</li> + <li>Thou hast had a good afternoon</li> + <li>Good night.</li> + </ul>`; });
docs(storybook): updating storybook updating storybook to implement the two final lists #<I>
nostalgic-css_NES.css
train
js
09050aee62fd5f8bcf656cfb1e74c5fb4479e385
diff --git a/superset/examples/country_map.py b/superset/examples/country_map.py index <HASH>..<HASH> 100644 --- a/superset/examples/country_map.py +++ b/superset/examples/country_map.py @@ -100,6 +100,7 @@ def load_country_map_data(only_metadata: bool = False, force: bool = False) -> N "optionName": "metric_112342", }, "row_limit": 500000, + "select_country": "france", } print("Creating a slice")
fix: select country in examples chart (#<I>)
apache_incubator-superset
train
py
df68ce4bc5da71f9cbc763e356d777a6cbb4f6c6
diff --git a/packages/application-shell/src/test-utils/test-utils.js b/packages/application-shell/src/test-utils/test-utils.js index <HASH>..<HASH> 100644 --- a/packages/application-shell/src/test-utils/test-utils.js +++ b/packages/application-shell/src/test-utils/test-utils.js @@ -169,7 +169,8 @@ const denormalizeActionRights = actionRights => { name: actionRightKey, value: actionRights[actionRightGroup][actionRightKey], }, - ] + ], + [] ), ], []
fix(app-shell): denormalization of action rights (#<I>)
commercetools_merchant-center-application-kit
train
js
569e572de918b9182edf203f15fbd1d233d9e83c
diff --git a/packages/soya-next-cli/src/index.js b/packages/soya-next-cli/src/index.js index <HASH>..<HASH> 100644 --- a/packages/soya-next-cli/src/index.js +++ b/packages/soya-next-cli/src/index.js @@ -39,11 +39,11 @@ const dependencies = [ "react-dom@16.8.6", "react-redux@5.0.7", "redux@4.0.0", - "soya-next@0.8.0", - "soya-next-server@0.8.0" + "soya-next@0.8.4", + "soya-next-server@0.8.4" ]; -const devDependencies = ["soya-next-scripts@0.8.0"]; +const devDependencies = ["soya-next-scripts@0.8.4"]; const install = (cmd, dependencies, { dev = false, exact = true } = {}) => { const args = [];
fix: bump cli script to install <I> packages (#<I>)
traveloka_soya-next
train
js
dc85088564e62111b76981e730d9676ec4fe1014
diff --git a/lib/hooks.js b/lib/hooks.js index <HASH>..<HASH> 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -28,7 +28,7 @@ exports.getHooksFromPlugins = function (env_config, type, name, args) { exports.run = function (env_config, type, name, args) { log.verbose('hooks', 'Running %s hook %s', type, name) - var hooks = exports.getHooksFromPlugins(type, name, args) + var hooks = exports.getHooksFromPlugins(env_config, type, name, args) hooks.forEach(function (hook) { hook() })
fix(hooks): pass env_config to `getHooksFromPlugins` method
hoodiehq_hoodie-server
train
js
417875b9f643bec470ab74702afc9ac05368b408
diff --git a/common/oatbox/filesystem/FileSystemHandler.php b/common/oatbox/filesystem/FileSystemHandler.php index <HASH>..<HASH> 100644 --- a/common/oatbox/filesystem/FileSystemHandler.php +++ b/common/oatbox/filesystem/FileSystemHandler.php @@ -32,7 +32,7 @@ abstract class FileSystemHandler implements ServiceLocatorAwareInterface { use ServiceLocatorAwareTrait; - protected const UNSERIALIZABLE_PROPERTIES = ['fileSystem', 'serviceLocator']; + private const UNSERIALIZABLE_PROPERTIES = ['fileSystem', 'serviceLocator']; /** * @var mixed
fix: change accessibility of `UNSERIALIZABLE_PROPERTIES` const
oat-sa_generis
train
php
c141add67b079970329b27fe839c52faff53c877
diff --git a/test/environments.js b/test/environments.js index <HASH>..<HASH> 100644 --- a/test/environments.js +++ b/test/environments.js @@ -121,12 +121,6 @@ class ShardedEnvironment extends EnvironmentBase { { replSet: 'rs1' } - ), - shardingManager.addShard( - [genMongosConfig(31010), genMongosConfig(31011), genMongosConfig(31012, { arbiter: true })], - { - replSet: 'rs2' - } ) ]);
test: remove second shard from sharded test runner
mongodb-js_mongodb-core
train
js
b8719271cb34f285660cf81c37f5facc0db58157
diff --git a/dev/test/cypress/integration/web-extend.spec.js b/dev/test/cypress/integration/web-extend.spec.js index <HASH>..<HASH> 100644 --- a/dev/test/cypress/integration/web-extend.spec.js +++ b/dev/test/cypress/integration/web-extend.spec.js @@ -84,7 +84,7 @@ const searchForBag = () => { store: { merchantId } }); - cy.visit(`index.php/default/catalogsearch/result/?q=${searchTerm}`); + cy.visit(`/index.php/default/catalogsearch/result/?q=${searchTerm}`); }; const viewGearCategory = () => { @@ -120,9 +120,9 @@ const viewAndAddFirstItemToCart = () => { .click(); cy.get('#product-addtocart-button').click(); - cy.get('.counter.qty').contains('1'); + cy.get('.counter-number').should('contain','1'); cy.get('#product-addtocart-button').click(); - cy.get('.counter.qty').contains('2'); + cy.get('.counter-number').should('contain','2'); }; const buyItem = () => {
fix(test): use should where applicable, fix visit CDPIP-OPS
emartech_magento2-extension
train
js
cb05aa11993a2fff790e1391cf206062a8f2a262
diff --git a/lib/epubmaker/epubcommon.rb b/lib/epubmaker/epubcommon.rb index <HASH>..<HASH> 100644 --- a/lib/epubmaker/epubcommon.rb +++ b/lib/epubmaker/epubcommon.rb @@ -486,15 +486,7 @@ EOT end def legacy_cover_and_title_file(loadfile, writefile) - @title = config['booktitle'] - s = '' - File.open(loadfile) do |f| - f.each_line do |l| - s << l - end - end - - File.write(writefile, s) + FileUtils.cp(loadfile, writefile) end def join_with_separator(value, sep)
refactor: just copy a file
kmuto_review
train
rb
d61ad292ccb9bc20142566320934d22add9ad98e
diff --git a/karma/browserstack-chrome.conf.js b/karma/browserstack-chrome.conf.js index <HASH>..<HASH> 100644 --- a/karma/browserstack-chrome.conf.js +++ b/karma/browserstack-chrome.conf.js @@ -42,9 +42,9 @@ module.exports = function (config) { 'chrome-19.0', 'chrome-18.0', 'chrome-17.0', - 'chrome-16.0', - 'chrome-15.0', - 'chrome-14.0' + 'chrome-16.0' + // 'chrome-15.0' // browserstack runner is showing choose search engine screen + // 'chrome-14.0' // browserstack reporting version is invalid ]; config.set(base); }
chore(build): disable faulty browserstack runners
JamieMason_Jasmine-Matchers
train
js
d8208237f2d5ad79abde5d21b5b9bd8bf5b31204
diff --git a/lib/git.js b/lib/git.js index <HASH>..<HASH> 100644 --- a/lib/git.js +++ b/lib/git.js @@ -108,7 +108,7 @@ async function deleteTag(origin, tagName) { debug('delete local tag', shell); // Delete the tag remotely - shell = await execa('git', ['push', '-d', origin, tagName], {reject: false}); + shell = await execa('git', ['push', '--delete', origin, tagName], {reject: false}); debug('delete remote tag', shell); }
fix: use long option to delete tag in git push
semantic-release_semantic-release
train
js
7fad7b25ebb0f5277cf7e2007629c767803c480f
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -45,11 +45,11 @@ internals.convert = joiObject => { } if (meta._mongoose) { - for (const key of Object.keys(meta._mongoose)) { + for (const [key, value] of Object.entries(meta._mongoose)) { // Check for _objectId if ( key === "type" && - meta._mongoose[key] === "ObjectId" + value === "ObjectId" ) { output.type = internals.mongoose.Schema.Types.ObjectId; @@ -70,7 +70,7 @@ internals.convert = joiObject => { originalJoiObject ); } else { - output[key] = meta._mongoose[key]; + output[key] = value; } } }
refactor: get the values using Object.entries() instead of Object.keys() as index
yoitsro_joigoose
train
js
3c1d9b793b6b7356b0c76c5b1e07a096b2a0a7ba
diff --git a/HISTORY.md b/HISTORY.md index <HASH>..<HASH> 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -14,6 +14,7 @@ unreleased - Add extensions to HEIC image types - Add new mime types - Add `text/mdx` with extension `.mdx` + * perf: prevent internal `throw` on invalid type 1.6.16 / 2018-02-16 =================== diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -254,6 +254,10 @@ function normalizeType (value) { */ function tryNormalizeType (value) { + if (typeof value !== 'string') { + return null + } + try { return normalizeType(value) } catch (err) { diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -179,7 +179,7 @@ describe('typeis.hasBody(req)', function () { function createRequest (type) { return { headers: { - 'content-type': type || '', + 'content-type': type || undefined, 'transfer-encoding': 'chunked' } }
perf: prevent internal throw on invalid type closes #<I>
jshttp_type-is
train
md,js,js
2002afed679c635ee01f12bec8c5b551ca9b6d14
diff --git a/test/examples/webpack.test.js b/test/examples/webpack.test.js index <HASH>..<HASH> 100644 --- a/test/examples/webpack.test.js +++ b/test/examples/webpack.test.js @@ -65,7 +65,13 @@ describe('webpack app', function() { var body = JSON.parse(server.requests[0].requestBody); expect(body.access_token).to.eql('POST_CLIENT_ITEM_TOKEN'); - expect(body.data.body.trace.exception.message).to.eql('webpack test error'); + + // This has become necessary because Travis switched their Chrome stable + // version _down_ from 76 to 62, which handles this test case differently. + var version = parseInt(window.navigator.userAgent.match(new RegExp('^.*HeadlessChrome/([0-9]*).*$'))[1]); + var message = version > 62 ? 'webpack test error' : 'Script error.'; + + expect(body.data.body.trace.exception.message).to.eql(message); done(); });
test: accommodate travis chrome at <I>
rollbar_rollbar.js
train
js
52e04c4f4eddc1bf13de1a8d507fcdbb1787fd77
diff --git a/lib/prepare.js b/lib/prepare.js index <HASH>..<HASH> 100644 --- a/lib/prepare.js +++ b/lib/prepare.js @@ -230,7 +230,7 @@ async function genRoutesFile ({ siteData: { pages }, sourceDir, pageFiles }) { function genRoute ({ path: pagePath }, index) { const file = pageFiles[index] const filePath = path.resolve(sourceDir, file) - const code = ` + let code = ` { path: ${JSON.stringify(pagePath)}, component: Theme, @@ -241,6 +241,14 @@ async function genRoutesFile ({ siteData: { pages }, sourceDir, pageFiles }) { }) } }` + + if (/\/$/.test(pagePath)) { + code += `,{ + path: ${JSON.stringify(pagePath + 'index.html')}, + redirect: ${JSON.stringify(pagePath)} + }` + } + return code }
fix: redirect */index.html to */ (close #<I>)
vuejs_vuepress
train
js
430588b219e5fba44c11ec0716fca6db88b5663a
diff --git a/src/createMixin.js b/src/createMixin.js index <HASH>..<HASH> 100644 --- a/src/createMixin.js +++ b/src/createMixin.js @@ -17,9 +17,7 @@ export default GlobalEmitter => ({ return true; }, deleteProperty: (target, key) => { - GlobalEmitter.removeListener(key, this.$options.sockets[key], this); - // eslint-disable-next-line no-param-reassign - delete target[key]; + GlobalEmitter.removeListener(key, target[key], this); return true; }, }); @@ -30,8 +28,9 @@ export default GlobalEmitter => ({ Object.keys(sockets).forEach((key) => { if (!hasProxy) { GlobalEmitter.removeListener(key, sockets[key], this); + } else { + delete this.$options.sockets[key]; } - delete this.$options.sockets[key]; }); }, });
fix(mixin): `sockets` props should be preserved Fixes: #<I>
probil_vue-socket.io-extended
train
js
101786916eac2fae3acc4c7bd5bea11fc1955a1f
diff --git a/src/Command/CommandInterface.php b/src/Command/CommandInterface.php index <HASH>..<HASH> 100644 --- a/src/Command/CommandInterface.php +++ b/src/Command/CommandInterface.php @@ -4,4 +4,6 @@ namespace EMS\CommonBundle\Command; interface CommandInterface { + public const EXECUTE_SUCCESS = 0; + public const EXECUTE_ERROR = 1; }
feat: add consts execute results (#<I>) (#<I>)
ems-project_EMSCommonBundle
train
php
a2a35330169a8c7b9abbcfcbdacb91a0b995fcab
diff --git a/src/components/VSelect/VSelect.js b/src/components/VSelect/VSelect.js index <HASH>..<HASH> 100644 --- a/src/components/VSelect/VSelect.js +++ b/src/components/VSelect/VSelect.js @@ -266,7 +266,7 @@ export default { }, isBooted () { this.$nextTick(() => { - if (this.content instanceof EventTarget) { + if (this.content && this.content.addEventListener) { this.content.addEventListener('scroll', this.onScroll, false) } })
fix(VSelect): check for addEventListener in isBooted watcher Turns out IE<I> doesn't know what an EventTarget is Fixes #<I> Regression from #<I>
vuetifyjs_vuetify
train
js
3633d3395574fc87d734e31e40f4b19eaa3045c3
diff --git a/lib/log.js b/lib/log.js index <HASH>..<HASH> 100644 --- a/lib/log.js +++ b/lib/log.js @@ -292,8 +292,9 @@ log.emitLog = function (m) { var disp = log.disp[m.level] != null ? log.disp[m.level] : m.level this.clearProgress() m.message.split(/\r?\n/).forEach(function (line) { - if (this.heading) { - this.write(this.heading, this.headingStyle) + var heading = this.heading + if (heading) { + this.write(heading, this.headingStyle) this.write(' ') } this.write(disp, log.style[m.level])
fix: evaluate this.heading only once Some implementations define this w/ a getter which changes each time it's accessed Credit: @Gcaufy <URL>
npm_npmlog
train
js
157852eedb33f876a715b4362174bfd5f45804df
diff --git a/src/geshi.php b/src/geshi.php index <HASH>..<HASH> 100644 --- a/src/geshi.php +++ b/src/geshi.php @@ -2829,6 +2829,8 @@ class GeSHi { GeSHi::hsc(strtoupper($word)), '<DOT>'), $this->language_data['URLS'][$k] ) . '">'; + } else { + return $keyword; } // HTML fix. Again, dirty hackage... if (!($this->language == 'html4strict' && ('&gt;' == $keyword || '&lt;' == $keyword))) {
fix: this could produce wrong markup with the conditional below
GeSHi_geshi-1.0
train
php
c969cd3b7a704e7b3b4a0f888512d9e190ef93bc
diff --git a/quasar/src/components/pagination/QPagination.js b/quasar/src/components/pagination/QPagination.js index <HASH>..<HASH> 100644 --- a/quasar/src/components/pagination/QPagination.js +++ b/quasar/src/components/pagination/QPagination.js @@ -3,6 +3,7 @@ import Vue from 'vue' import QBtn from '../btn/QBtn.js' import QInput from '../input/QInput.js' +import { stop } from '../../utils/event.js' import { between } from '../../utils/format.js' export default Vue.extend({ @@ -196,7 +197,7 @@ export default Vue.extend({ })) } - if (this.input) { + if (this.input === true) { contentMiddle.push(h(QInput, { staticClass: 'inline', style: { @@ -340,7 +341,12 @@ export default Vue.extend({ }, [ contentStart, - h('div', { staticClass: 'row justify-center' }, [ + h('div', { + staticClass: 'row justify-center', + on: this.input === true + ? { input: stop } + : {} + }, [ contentMiddle ]),
fix(QPagination): [v1] QPagination - Error while entering page number #<I>
quasarframework_quasar
train
js
c7592395da803983936d2551ffb57b7ae491fda9
diff --git a/src/scale/Interval.js b/src/scale/Interval.js index <HASH>..<HASH> 100644 --- a/src/scale/Interval.js +++ b/src/scale/Interval.js @@ -101,7 +101,7 @@ var IntervalScale = Scale.extend({ if (extent[0] < niceTickExtent[0]) { if (expandToNicedExtent) { - ticks.push(roundNumber(niceTickExtent[0] - interval)); + ticks.push(roundNumber(niceTickExtent[0] - interval, intervalPrecision)); } else { ticks.push(extent[0]); @@ -127,7 +127,7 @@ var IntervalScale = Scale.extend({ var lastNiceTick = ticks.length ? ticks[ticks.length - 1] : niceTickExtent[1]; if (extent[1] > lastNiceTick) { if (expandToNicedExtent) { - ticks.push(lastNiceTick + interval); + ticks.push(roundNumber(lastNiceTick + interval, intervalPrecision)); } else { ticks.push(extent[1]);
fix(interval): optimize number rounding on minor ticks.
apache_incubator-echarts
train
js
b2541e8c03e088f1c9ce056b2262fca485c964da
diff --git a/src/fields/ColourSwatches.php b/src/fields/ColourSwatches.php index <HASH>..<HASH> 100644 --- a/src/fields/ColourSwatches.php +++ b/src/fields/ColourSwatches.php @@ -286,8 +286,6 @@ class ColourSwatches extends Field implements PreviewableFieldInterface, Sortabl */ public function getTableAttributeHtml(mixed $value, ElementInterface $element): string { - // our preview no data value - $color = ''; $style = "background-color: transparent"; // if we have data if (!empty($value)) { @@ -298,7 +296,7 @@ class ColourSwatches extends Field implements PreviewableFieldInterface, Sortabl // if we have more than one colour if (is_array($value->color)) { foreach ($value->color as $color) { - $gradients[] = $color->color; + $gradients[] = $color['color']; } // set a fallback if we only have one colour $style = "background-color:$gradients[0]";
fix(tableattributes): fixed array read
Rias500_craft-colour-swatches
train
php
44b0f15a61778d9a0c85cf29c5cfc577ea4594e2
diff --git a/pkg/api/org_invite.go b/pkg/api/org_invite.go index <HASH>..<HASH> 100644 --- a/pkg/api/org_invite.go +++ b/pkg/api/org_invite.go @@ -60,9 +60,7 @@ func AddOrgInvite(c *m.ReqContext, inviteDto dtos.AddInviteForm) Response { } // send invite email - c.Logger.Error("sending?") if inviteDto.SendEmail && util.IsEmail(inviteDto.LoginOrEmail) { - c.Logger.Error("yes sending?") emailCmd := m.SendEmailCommand{ To: []string{inviteDto.LoginOrEmail}, Template: "new_user_invite.html",
fix: removed log calls used while troubleshooting
grafana_grafana
train
go
b38011d4e2ecd52dc527026591dc0d56a4efe9fd
diff --git a/rqalpha/data/data_source.py b/rqalpha/data/data_source.py index <HASH>..<HASH> 100644 --- a/rqalpha/data/data_source.py +++ b/rqalpha/data/data_source.py @@ -88,8 +88,9 @@ class LocalDataSource: if v.type == 'CS' and any(c in v.concept_names.split('|') for c in concepts)] def get_trading_dates(self, start_date, end_date): - left, right = self._trading_dates.searchsorted(start_date), self._trading_dates.searchsorted(end_date) - return self._trading_dates[left:right + 1] + left = self._trading_dates.searchsorted(start_date) + right = self._trading_dates.searchsorted(end_date, side='right') + return self._trading_dates[left:right] def get_yield_curve(self, start_date, end_date): duration = (end_date - start_date).days
fix: trading dates should include end_date
ricequant_rqalpha
train
py
198b093559895c02d25191c7c7ca662e7045c5ea
diff --git a/src/transform/__specs__/object.spec.js b/src/transform/__specs__/object.spec.js index <HASH>..<HASH> 100644 --- a/src/transform/__specs__/object.spec.js +++ b/src/transform/__specs__/object.spec.js @@ -42,4 +42,13 @@ describe('transform/object', function () { expect(function () { object.toJSON(safeObj) }).not.toThrow(); }); }); + + describe('toString', function () { + it('should not throw when stringify undefined value', function () { + var error = new Error(); + delete error.stack; + + expect(function () { object.toStringFactory()([error]) }).not.toThrow(); + }); + }); }); diff --git a/src/transform/object.js b/src/transform/object.js index <HASH>..<HASH> 100644 --- a/src/transform/object.js +++ b/src/transform/object.js @@ -125,7 +125,12 @@ function toStringFactory(depth) { return undefined; } - return JSON.parse(JSON.stringify(item, createSerializer(), ' ')); + var str = JSON.stringify(item, createSerializer(), ' '); + if (str === undefined) { + return undefined; + } + + return JSON.parse(str); }); if (util.formatWithOptions) {
fix: Make sure we don't pass undefined to JSON.parse (#<I>) * Make sure we don't pass undefined to JSON.parse * Update object.spec.js
megahertz_electron-log
train
js,js
341f8a41f3616697d039595465dae2bf90b7f9ff
diff --git a/src/bots/plugins/get.js b/src/bots/plugins/get.js index <HASH>..<HASH> 100644 --- a/src/bots/plugins/get.js +++ b/src/bots/plugins/get.js @@ -16,8 +16,8 @@ function splitAccessors (variable) { //This RegExp is a combination of the two RegExp above //Make sure that each component follows the correct bracket notation - //[a-zA-Z_$][0-9a-zA-Z_$]* is to make sure that the captured variable has a valid variable name - var validationRegexp = /^[a-zA-Z_$][0-9a-zA-Z_$]*(\['[a-zA-Z_$][0-9a-zA-Z_$]*'\]|\["[a-zA-Z_$][0-9a-zA-Z_$]*"\])*$/; + //[0-9a-zA-Z_$]+ is to make sure that the captured variable has a valid variable name or key value + var validationRegexp = /^[a-zA-Z_$][0-9a-zA-Z_$]*(\['[0-9a-zA-Z_$]+'\]|\["[0-9a-zA-Z_$]+"\])*$/; var components = variable.split('.'); for (var n = 0; n < components.length; n++) {
fix(plugins-get): modify Regexp to accept a number passed as a string as a key value
damonjs_damon
train
js
710e1d776b9a85ead2b6262e3b37eb4971c74f65
diff --git a/src/sticky.js b/src/sticky.js index <HASH>..<HASH> 100644 --- a/src/sticky.js +++ b/src/sticky.js @@ -95,6 +95,7 @@ angular.module("ct.ui.router.extras.sticky").config( var internalStates = core.internalStates; var inherit = core.inherit; var inheritParams = core.inheritParams; + var forEach = core.forEach; var map = core.map; var filterObj = core.filterObj; diff --git a/src/stickyProvider.js b/src/stickyProvider.js index <HASH>..<HASH> 100644 --- a/src/stickyProvider.js +++ b/src/stickyProvider.js @@ -8,6 +8,7 @@ function $StickyStateProvider($stateProvider, uirextras_coreProvider) { var inheritParams = core.inheritParams; var objectKeys = core.objectKeys; var protoKeys = core.protoKeys; + var forEach = core.forEach; var map = core.map; // Holds all the states which are inactivated. Inactivated states can be either sticky states, or descendants of sticky states.
fix(sticky): Fixed non-strict references to 'forEach'
christopherthielen_ui-router-extras
train
js,js
340c0dfffcbd2627b3c919270411e11b1aea926e
diff --git a/src/lib/tutorial.js b/src/lib/tutorial.js index <HASH>..<HASH> 100644 --- a/src/lib/tutorial.js +++ b/src/lib/tutorial.js @@ -83,7 +83,7 @@ export function display (t) { .start() const clickZone = '.introjs-disableInteraction, .introjs-overlay, .introjs-tooltiptext, .introjs-tooltipbuttons' const clickAction = (e) => { - if (e.srcElement.tagName !== 'A') { + if (e.target.tagName !== 'A') { e.stopPropagation() tutorial.nextStep() }
fix: use a standard way to detect event target element
cozy_cozy-home
train
js
07aa65b5de1abe13b12acf5f604b1ac7b01c451b
diff --git a/src/components/PicklistOption/index.js b/src/components/PicklistOption/index.js index <HASH>..<HASH> 100644 --- a/src/components/PicklistOption/index.js +++ b/src/components/PicklistOption/index.js @@ -28,7 +28,7 @@ class Option extends Component { } componentDidUpdate(prevProps) { - const { currentValueName } = this.props; + const { currentValueName, name } = this.props; const { currentValueName: prevCurrentValueName } = prevProps; if (prevCurrentValueName !== currentValueName) { if (prevCurrentValueName === name && currentValueName !== name) {
fix: fix arrow navigation bug when option is selected (#<I>)
90milesbridge_react-rainbow
train
js
ad6c480fdfc3fdd609610e6837668cdd4fb04a1f
diff --git a/packages/site/src/ui/side-nav.js b/packages/site/src/ui/side-nav.js index <HASH>..<HASH> 100644 --- a/packages/site/src/ui/side-nav.js +++ b/packages/site/src/ui/side-nav.js @@ -38,8 +38,8 @@ const InternalLinks = props => <style jsx>{` .links { border-left: 3px solid ${core.colors.gray01}; - margin-left: 2px; - padding: ${core.layout.spacingXSmall}; + margin: ${core.layout.spacingSmall} 0 ${core.layout.spacingSmall} 2px; + padding: 0 0 0 14px; overflow: hidden; } .link {
refactor(site): internal sub nav realign
pluralsight_design-system
train
js
ccdf7d3bad55ba1643349ac3658bb88344863477
diff --git a/source/core/normalize.js b/source/core/normalize.js index <HASH>..<HASH> 100644 --- a/source/core/normalize.js +++ b/source/core/normalize.js @@ -1,10 +1,15 @@ /* eslint-disable no-restricted-syntax */ import ownProperty from 'describe-type/source/has/ownProperty.js'; +import as from 'describe-type/source/as/as.any.js'; import object from 'describe-type/source/is/object.js'; import deletePropertyAt from '../@/deletePropertyAt.js'; +import dotStrategyDefault from './strategies/dotDefault.js'; import write from './write.js'; export default function normalize(hash, strategy, recursive) { + hash = as(Object, hash, {}); + strategy = as(Function, strategy, dotStrategyDefault); + recursive = as(Boolean, recursive, true); for (const key in hash) { if (ownProperty(hash, key)) { if (recursive && object(hash[key])) {
chore: recursive option to normalize
adriancmiranda_dotcfg
train
js
b06cc81e071cec8525fb4b75768a28feceaa8703
diff --git a/packages/website/next.config.js b/packages/website/next.config.js index <HASH>..<HASH> 100644 --- a/packages/website/next.config.js +++ b/packages/website/next.config.js @@ -1,5 +1,6 @@ // @ts-check const transpileModules = require("next-transpile-modules"); +const React = require("react"); const PagesWebpackPlugin = require("../../scripts/pages/pages-webpack-plugin"); const pages = require("./pages.config"); @@ -8,7 +9,7 @@ const withTranspileModules = transpileModules(["ariakit"]); /** @type {import("next").NextConfig} */ const nextConfig = { experimental: { - reactRoot: true, + reactRoot: /^(16|17)/.test(React.version) ? false : true, }, typescript: { ignoreBuildErrors: true,
chore: Use experimental reactRoot on Nextjs only on React <I>
reakit_reakit
train
js
e0ad9935c145493b5cb6048f1aeab9018edd363a
diff --git a/superset/views/core.py b/superset/views/core.py index <HASH>..<HASH> 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -1584,6 +1584,7 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods session.commit() return json_success(json.dumps({"published": dash.published})) + @event_logger.log_this @has_access @expose("/dashboard/<dashboard_id_or_slug>/") def dashboard( # pylint: disable=too-many-locals
chore: add logging for "dashboard" action (#<I>)
apache_incubator-superset
train
py
c4c94f9543039fc47efd8e96dce900074c6be473
diff --git a/test/tests/functional/extend_cursor_tests.js b/test/tests/functional/extend_cursor_tests.js index <HASH>..<HASH> 100644 --- a/test/tests/functional/extend_cursor_tests.js +++ b/test/tests/functional/extend_cursor_tests.js @@ -71,8 +71,6 @@ describe('Extend cursor tests', function() { query: {} }); - console.log(cursor); - // Force a single // Logger.setLevel('debug'); // Set the batch size
test(cursor): remove console.log that was accidentally left in
mongodb-js_mongodb-core
train
js
3095839f7e52447f04ec09c49154ade523955c49
diff --git a/src/View/extensions.js b/src/View/extensions.js index <HASH>..<HASH> 100644 --- a/src/View/extensions.js +++ b/src/View/extensions.js @@ -49,7 +49,7 @@ function ViewsYield () { var index = keys[0] var method = injections[index] - co(function *() { + co(function * () { return yield method }) .then(function (response) {
fix(linting): fix linting error inside view extensions file
adonisjs_adonis-framework
train
js
d14a092591a3a60467834a7162f69d38b4dc9f88
diff --git a/samples/system-test/topics.test.js b/samples/system-test/topics.test.js index <HASH>..<HASH> 100644 --- a/samples/system-test/topics.test.js +++ b/samples/system-test/topics.test.js @@ -155,7 +155,7 @@ describe('topics', () => { }); it('should publish with specific batch settings', async () => { - const waitTime = 1000; + const waitTime = 5000; const [subscription] = await pubsub .topic(topicNameOne) .subscription(subscriptionNameThree) @@ -169,10 +169,11 @@ describe('topics', () => { const receivedMessage = await _pullOneMessage(subscription); const publishTime = Date.parse(receivedMessage.publishTime); + // publishTime contains whole seconds (ends with 000), + // so we allow the difference to be up to 1 second less + // than we expect. const actualWait = publishTime - startTime; - // setTimeout isn't so reliable to publish messages EXACTLY at 1000ms, - // so we should consider anything above 900 as passing. - const expectedWait = waitTime - 100; + const expectedWait = waitTime - 1000; assert.strictEqual(receivedMessage.data.toString(), expectedMessage.data); assert(actualWait >= expectedWait);
test: fix publishTime issues (#<I>)
googleapis_nodejs-pubsub
train
js
63fb3319f731c862ad6899d1d3d57d9419789f89
diff --git a/packages/cli-config/src/load.js b/packages/cli-config/src/load.js index <HASH>..<HASH> 100644 --- a/packages/cli-config/src/load.js +++ b/packages/cli-config/src/load.js @@ -44,7 +44,7 @@ function loadPreset(descriptor, loader) { if (loaderError) { return { - loaderError, + error: loaderError, name, }; }
fix(cli-config): rename loaderError to error in return
carbon-design-system_toolkit
train
js
9cd57666d91e92771452e1642fe71da381a1d9e4
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ requirements = [ 'pytest-deadfixtures', 'pycodestyle>=2.0.0,<2.4.0', 'bandit', - 'elib_run==2018.9.9.1', + 'elib_run', ] test_requirements = []
fix: dev: remove constraints on elib_run (#<I>)
etcher-be_epab
train
py
0a979149c64ab6ecefee4db82466e170dda9bb11
diff --git a/v1/brokers/redis/redis.go b/v1/brokers/redis/redis.go index <HASH>..<HASH> 100644 --- a/v1/brokers/redis/redis.go +++ b/v1/brokers/redis/redis.go @@ -224,7 +224,7 @@ func (b *Broker) GetPendingTasks(queue string) ([]*tasks.Signature, error) { if queue == "" { queue = b.GetConfig().DefaultQueue } - dataBytes, err := conn.Do("LRANGE", queue, 0, 10) + dataBytes, err := conn.Do("LRANGE", queue, 0, -1) if err != nil { return nil, err }
fix(redis-broker): get all pending tasks Fetch the full list instead of just the first <I> From <URL>
RichardKnop_machinery
train
go
bd4034d2f1a30aad7f4d1dad33bdfe2a00e9d8c6
diff --git a/gulp/util.js b/gulp/util.js index <HASH>..<HASH> 100644 --- a/gulp/util.js +++ b/gulp/util.js @@ -130,7 +130,7 @@ function buildModule(module, opts) { function buildMin() { return lazypipe() - .pipe(gulpif, /.css$/, cleanCSS(), + .pipe(gulpif, /.css$/, minifyCss(), uglify({ preserveComments: 'some' }) .on('error', function(e) { console.log('\x07',e.message);
fix: undo change to unknown symbol for prod build (#<I>)
angular_material
train
js
1f2c730d88fda880945ca5525bf74c81a0f17768
diff --git a/src/components/Modal/Modal.js b/src/components/Modal/Modal.js index <HASH>..<HASH> 100644 --- a/src/components/Modal/Modal.js +++ b/src/components/Modal/Modal.js @@ -13,6 +13,7 @@ export default class Modal extends Component { id: PropTypes.string, modalHeading: PropTypes.string, modalLabel: PropTypes.string, + modalAriaLabel: PropTypes.string, secondaryButtonText: PropTypes.string, primaryButtonText: PropTypes.string, open: PropTypes.bool, @@ -51,6 +52,7 @@ export default class Modal extends Component { const { modalHeading, modalLabel, + modalAriaLabel, passiveModal, secondaryButtonText, primaryButtonText, @@ -95,7 +97,8 @@ export default class Modal extends Component { this.innerModal = modal; }} role="dialog" - className="bx--modal-container"> + className="bx--modal-container" + ariaLabel={modalAriaLabel}> <div className="bx--modal-header"> {passiveModal && modalButton} {modalLabel && (
fix(Modal): added optional ariaLabel prop, resolves #<I> (#<I>) * fix(Modal): added optional ariaLable prop * chore(Modal): specifying prop
carbon-design-system_carbon-components-react
train
js
a8bdb041ce59e41c5f3f212b36333a494c0e082f
diff --git a/packages/soya-next-scripts/plugins/withPage.js b/packages/soya-next-scripts/plugins/withPage.js index <HASH>..<HASH> 100644 --- a/packages/soya-next-scripts/plugins/withPage.js +++ b/packages/soya-next-scripts/plugins/withPage.js @@ -1,6 +1,6 @@ -const { extname, join, normalize, relative } = require("path"); +const { extname, join, normalize } = require("path"); -module.exports = page => (config, { buildId, dir }) => { +module.exports = page => (config, { buildId }) => { const entry = config.entry; config.entry = async () => { const entries = await entry(); @@ -11,9 +11,7 @@ module.exports = page => (config, { buildId, dir }) => { const [pageEntry] = entries[name]; const ext = extname(pageEntry); if (normalize(pageEntry) !== join("pages", page + ext)) { - entries[name] = [ - relative(dir, require.resolve(join("..", "pages", page))) - ]; + entries[name] = [join("soya-next-scripts", "pages", page)]; } return entries; };
fix(scripts): custom app and document entry path
traveloka_soya-next
train
js
8e976d12f645088069eb0e61643a856d53e85eb5
diff --git a/src/Bugsnag.js b/src/Bugsnag.js index <HASH>..<HASH> 100644 --- a/src/Bugsnag.js +++ b/src/Bugsnag.js @@ -133,8 +133,8 @@ export class Client { * `autoCaptureSessions` if you call this method. * * You should call this at the appropriate time in your application when you wish to start a - * session. Any subsequent errors which occur in your application will still be reported to - * Bugsnag but will not count towards your application's + * session. Any subsequent errors which occur in your application will be reported to + * Bugsnag and will count towards your application's * [stability score](https://docs.bugsnag.com/product/releases/releases-dashboard/#stability-score). * This will start a new session even if there is already an existing * session; you should call `resumeSession()` if you only want to start a session @@ -179,7 +179,7 @@ export class Client { * * You should call this at the appropriate time in your application when you wish to resume * a previously started session. Any subsequent errors which occur in your application will - * still be reported to Bugsnag but will not count towards your application's + * be reported to Bugsnag and will count towards your application's * [stability score](https://docs.bugsnag.com/product/releases/releases-dashboard/#stability-score). * * @see `startSession()`
docs: fix typo in stopSession/resumeSession docs
bugsnag_bugsnag-react-native
train
js
932cc9904c5c4011f3bd968db7a598d6c55eafa3
diff --git a/angular-pouchdb.js b/angular-pouchdb.js index <HASH>..<HASH> 100644 --- a/angular-pouchdb.js +++ b/angular-pouchdb.js @@ -24,7 +24,7 @@ angular.module('pouchdb', []) from: 'eventEmitter' } }) - .service('pouchDecorators', function($q) { + .service('pouchDBDecorators', function($q) { this.qify = function(fn) { return function() { return $q.when(fn.apply(this, arguments)); @@ -59,7 +59,7 @@ angular.module('pouchdb', []) .provider('pouchDB', function(POUCHDB_METHODS) { var self = this; self.methods = POUCHDB_METHODS; - self.$get = function($window, pouchDecorators) { + self.$get = function($window, pouchDBDecorators) { function wrapMethods(db, methods, parent) { for (var method in methods) { var wrapFunction = methods[method]; @@ -68,7 +68,7 @@ angular.module('pouchdb', []) return wrapMethods(db, wrapFunction, method); } - wrapFunction = pouchDecorators[wrapFunction]; + wrapFunction = pouchDBDecorators[wrapFunction]; if (!parent) { db[method] = wrapFunction(db[method]);
refactor: rename pouch[DB]Decorators ... for consistency
angular-pouchdb_angular-pouchdb
train
js
7c51f55f5b8af6f853560ba5d757c65b1068a7ab
diff --git a/lib/utils/processBackendNotificationRequest.js b/lib/utils/processBackendNotificationRequest.js index <HASH>..<HASH> 100644 --- a/lib/utils/processBackendNotificationRequest.js +++ b/lib/utils/processBackendNotificationRequest.js @@ -8,21 +8,5 @@ module.exports = (notifications) => { const notification = processBackendNotificationRequest(notifications); if (!notification) return; - const messageLines = notification.message.split('\n'); - - const prefix = 'Serverless: '; - const borderLength = - Math.min( - prefix.length + messageLines.reduce((maxLength, line) => Math.max(maxLength, line.length), 0), - process.stdout.columns - ) || 10; - const followingLinesPrefix = ' '.repeat(prefix.length); - for (let i = 1; i < messageLines.length; ++i) { - messageLines[i] = followingLinesPrefix + messageLines[i]; - } - process.stdout.write( - `\n${'*'.repeat(borderLength)}\n${prefix}${chalk.yellow(messageLines.join('\n'))}\n${'*'.repeat( - borderLength - )}\n\n` - ); + process.stdout.write(`\n${chalk.gray(notification.message)}\n`); };
refactor(CLI): Change formatting of notifications (#<I>)
serverless_serverless
train
js
470f21e02cac3d2b8897547f9c94a86628e3bddd
diff --git a/source/rafcon/gui/utils/notification_overview.py b/source/rafcon/gui/utils/notification_overview.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/utils/notification_overview.py +++ b/source/rafcon/gui/utils/notification_overview.py @@ -129,6 +129,8 @@ class NotificationOverview(dict): if origin_type == "signal": if isinstance(self.origin.arg, ActionSignalMsg): return self.origin.arg.action + if isinstance(self.origin.arg, MetaSignalMsg): + return self.origin.arg.origin def get_affected_model(self): return self.origin.model @@ -138,6 +140,8 @@ class NotificationOverview(dict): if origin_type == "signal": if isinstance(self.origin.arg, ActionSignalMsg): return self.origin.arg.action_parent_m.core_element + if isinstance(self.origin.arg, MetaSignalMsg): + return self.origin.model.core_element return self.origin.instance def get_affected_property(self):
fix(notifications): handle MetaSignalMsg
DLR-RM_RAFCON
train
py
4dc6a5a3ac58bb02e7522dbf61f5e617c2ee4ece
diff --git a/webapps/grunt/config/localescompile.js b/webapps/grunt/config/localescompile.js index <HASH>..<HASH> 100644 --- a/webapps/grunt/config/localescompile.js +++ b/webapps/grunt/config/localescompile.js @@ -9,7 +9,7 @@ module.exports = function(config, localesConfig, pathConfig) { }, src: [ '<%= pkg.gruntConfig.commonsUiDir %>/resources/locales/*.json', - '<%= pkg.gruntConfig.commonsUiDir %>/lib/*/locales/*.json', + '<%= pkg.gruntConfig.commonsUiDir %>/lib/**/locales/*.json', pathConfig.sourceDir + '/scripts/**/locales/*.json' ] };
fix(grunt): include common-ui locales correctly related to CAM-<I>
camunda_camunda-bpm-platform
train
js
0c9e630892e34d628fec985ba6d2bf8fe9163d8b
diff --git a/src/methods/read.js b/src/methods/read.js index <HASH>..<HASH> 100644 --- a/src/methods/read.js +++ b/src/methods/read.js @@ -20,6 +20,12 @@ function fetchAll({model, req, res}) { .status(200) .body = documents.map(document => document.get({plain: true})) }) + .then(() => { + return model.count() + }) + .then(count => { + res.meta = Object.assign({}, res.meta, {count}) + }) } function fetchOne({model, idParam, idField, req, res}) {
feat: add `count` metadata A list of documents includes a `count` meta property in order to get information about how many documents are there in total.
netiam_contrib-rest
train
js
11919553baa505d808d8db72679e2df155ffe397
diff --git a/eth_account/hdaccount/mnemonic.py b/eth_account/hdaccount/mnemonic.py index <HASH>..<HASH> 100644 --- a/eth_account/hdaccount/mnemonic.py +++ b/eth_account/hdaccount/mnemonic.py @@ -67,7 +67,8 @@ def get_wordlist(language): class Mnemonic: - def __init__(self, language): + def __init__(self, raw_language="english"): + language = raw_language.lower().replace(' ', '_') if language not in Mnemonic.list_languages(): raise ValidationError( f'Invalid language choice "{language}", must be one of {Mnemonic.list_langauges()}'
feat: Allow language to be capitalized or have spaces (for Chinese)
ethereum_eth-account
train
py
d47f46619862f4a2d1fa1013868da0334e3e9518
diff --git a/server/server.go b/server/server.go index <HASH>..<HASH> 100644 --- a/server/server.go +++ b/server/server.go @@ -316,7 +316,7 @@ func (a *ArgoCDServer) Run(ctx context.Context, port int, metricsPort int) { var httpsL net.Listener if !a.useTLS() { httpL = tcpm.Match(cmux.HTTP1Fast()) - grpcL = tcpm.Match(cmux.HTTP2HeaderField("content-type", "application/grpc")) + grpcL = tcpm.MatchWithWriters(cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc")) } else { // We first match on HTTP 1.1 methods. httpL = tcpm.Match(cmux.HTTP1Fast()) @@ -334,7 +334,7 @@ func (a *ArgoCDServer) Run(ctx context.Context, port int, metricsPort int) { // Now, we build another mux recursively to match HTTPS and gRPC. tlsm = cmux.New(tlsl) httpsL = tlsm.Match(cmux.HTTP1Fast()) - grpcL = tlsm.Match(cmux.Any()) + grpcL = tlsm.MatchWithWriters(cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc")) } // Start the muxed listeners for our servers
fix: Allow gRPC connections from gRPC versions ><I>.x (#<I>) * fix: Allow gRPC connections from gRPC versions ><I>.x
argoproj_argo-cd
train
go
6008430c7db30b96825fa486c1346195bf0e58d0
diff --git a/anyconfig/backend/xml.py b/anyconfig/backend/xml.py index <HASH>..<HASH> 100644 --- a/anyconfig/backend/xml.py +++ b/anyconfig/backend/xml.py @@ -161,7 +161,7 @@ def _dicts_have_unique_keys(dics): return len(set(key_itr)) == sum(len(d) for d in dics) -def _sum_dicts(dics, to_container=dict): +def _merge_dicts(dics, to_container=dict): """ :param dics: [<dict/-like object must not have same keys each other>] :param to_container: callble to make a container object @@ -190,7 +190,7 @@ def _process_children(elem, dic, subdic, children, to_container=dict, # .. note:: Another special case can omit extra <children> node. sdics = [subdic] + subdics if _dicts_have_unique_keys(sdics): - dic[elem.tag] = _sum_dicts(sdics, to_container) + dic[elem.tag] = _merge_dicts(sdics, to_container) elif not subdic: # No attrs nor text and only these children. dic[elem.tag] = subdics else:
refactor: rename of a function, s/_sum_dicts/_merge_dicts/g
ssato_python-anyconfig
train
py
15a647ad20717ee71742eb6c75432f405a2510a3
diff --git a/test/rules/security/mark-callable-contracts.js b/test/rules/security/mark-callable-contracts.js index <HASH>..<HASH> 100644 --- a/test/rules/security/mark-callable-contracts.js +++ b/test/rules/security/mark-callable-contracts.js @@ -72,6 +72,22 @@ describe('Linter - mark-callable-contracts', () => { assert.equal(report.warningCount, 0) }) + it('should not return error for an event defined after function', () => { + const code = contractWith(` + function b() public { + emit UpdatedToken(); + } + + event UpdatedToken(); + `) + + const report = linter.processStr(code, { + rules: { 'mark-callable-contracts': 'warn' } + }) + + assert.equal(report.warningCount, 0) + }) + it('should not return error for constant', () => { const code = contractWith(` uint8 private constant TOKEN_DECIMALS = 15;
test: no mark-callable-contracts for an event defined after a function
protofire_solhint
train
js
9adf00b8a1c69e0323001bde9f225960c7ba655a
diff --git a/src/image-preview/ImagePreview.js b/src/image-preview/ImagePreview.js index <HASH>..<HASH> 100644 --- a/src/image-preview/ImagePreview.js +++ b/src/image-preview/ImagePreview.js @@ -104,12 +104,11 @@ export default createComponent({ watch: { value() { - this.resetScale(); - this.active = this.startPosition; + this.setActive(this.startPosition); }, startPosition(active) { - this.active = active; + this.setActive(active); } }, @@ -233,10 +232,13 @@ export default createComponent({ } }, - onSwipeChange(active) { + setActive(active) { this.resetScale(); - this.active = active; - this.$emit('change', active); + + if (active !== this.active) { + this.active = active; + this.$emit('change', active); + } }, resetScale() { @@ -275,7 +277,7 @@ export default createComponent({ indicatorColor="white" initialSwipe={this.startPosition} showIndicators={this.showIndicators} - onChange={this.onSwipeChange} + onChange={this.setActive} > {images.map((image, index) => { const props = {
fix(ImagePreview): should emit change event when reset to start position (#<I>)
youzan_vant
train
js
d343363ba36849e0e1daed6fcfc30dab507a1f48
diff --git a/src/components/virtualRepeat/virtual-repeater.js b/src/components/virtualRepeat/virtual-repeater.js index <HASH>..<HASH> 100644 --- a/src/components/virtualRepeat/virtual-repeater.js +++ b/src/components/virtualRepeat/virtual-repeater.js @@ -223,10 +223,14 @@ VirtualRepeatContainerController.prototype.updateSize = function() { // If the original size is already determined, we can skip the update. if (this.originalSize) return; - this.size = this.isHorizontal() + var size = this.isHorizontal() ? this.$element[0].clientWidth : this.$element[0].clientHeight; + if (size) { + this.setSize_(size); + } + // Recheck the scroll position after updating the size. This resolves // problems that can result if the scroll position was measured while the // element was display: none or detached from the document.
fix(autocomplete): updateSize incorrectly sets the size to zero (#<I>) this can break the ability to show the dropdown on focus Fixes #<I>
angular_material
train
js
f6ee3e3186480d08745ee0aecedbcbc921b4b250
diff --git a/python/src/nnabla/utils/data_source.py b/python/src/nnabla/utils/data_source.py index <HASH>..<HASH> 100644 --- a/python/src/nnabla/utils/data_source.py +++ b/python/src/nnabla/utils/data_source.py @@ -320,8 +320,9 @@ class DataSourceWithFileCache(DataSource): while self._position < self._data_source._size: if single_or_rankzero(): - progress('Create cache', self._position * - 1.0 / self._data_source._size) + if self._position % int(self._data_source._size/20+1) == 0: + progress('Create cache', self._position * + 1.0 / self._data_source._size) self._store_data_to_cache_buffer(self._position) self._position += 1
feat: reduce create_cache log for s3
sony_nnabla
train
py
d259e83d5a98179184cb6d4f6a14a7416270cbd6
diff --git a/spec/operators/scan-spec.js b/spec/operators/scan-spec.js index <HASH>..<HASH> 100644 --- a/spec/operators/scan-spec.js +++ b/spec/operators/scan-spec.js @@ -21,6 +21,21 @@ describe('Observable.prototype.scan()', function () { expectObservable(source).toBe(expected, values); }); + it('should scan without seed', function () { + var e1 = hot('--a--^--b--c--d--|'); + var expected = '---x--y--z--|'; + + var values = { + x: 'b', + y: 'bc', + z: 'bcd' + }; + + var source = e1.scan(function (acc, x) { return acc + x; }); + + expectObservable(source).toBe(expected, values); + }); + it('should handle errors', function () { var e1 = hot('--a--^--b--c--d--#'); var expected = '---u--v--w--#'; @@ -103,4 +118,4 @@ describe('Observable.prototype.scan()', function () { expectObservable(source, sub).toBe(expected, values); }); -}); \ No newline at end of file +});
test(scan): expand test coverage for scan operator
ReactiveX_rxjs
train
js
be93ef6af7d072e8b942e9e15a8b2b0abb7cbb6c
diff --git a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/CryptoRuntime.java b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/CryptoRuntime.java index <HASH>..<HASH> 100644 --- a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/CryptoRuntime.java +++ b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/CryptoRuntime.java @@ -6,11 +6,6 @@ package im.actor.runtime; import com.google.j2objc.annotations.ObjectiveCName; -import im.actor.runtime.crypto.AesCipher; -import im.actor.runtime.crypto.CryptoKeyPair; -import im.actor.runtime.crypto.RsaCipher; -import im.actor.runtime.crypto.RsaEncryptCipher; - /** * Provider for Cryptography support */
fix(runtime): Fixing incorrect imports
actorapp_actor-platform
train
java
0348e5dd15cc43c843c1d3eb9a182bdfac4f5633
diff --git a/code/Model/Submission/SubmittedForm.php b/code/Model/Submission/SubmittedForm.php index <HASH>..<HASH> 100755 --- a/code/Model/Submission/SubmittedForm.php +++ b/code/Model/Submission/SubmittedForm.php @@ -132,10 +132,10 @@ class SubmittedForm extends DataObject } if ($this->Parent()) { - return $this->Parent()->canCreate(); + return $this->Parent()->canCreate($member); } - return parent::canCreate(); + return parent::canCreate($member); } /**
fix(submitted-form): Pass member to parent calls
silverstripe_silverstripe-userforms
train
php
2afa6c066e31b2e9ea1c46884e2b9bf1388f22d1
diff --git a/ui/src/directives/GoBack.js b/ui/src/directives/GoBack.js index <HASH>..<HASH> 100644 --- a/ui/src/directives/GoBack.js +++ b/ui/src/directives/GoBack.js @@ -13,7 +13,11 @@ export default { } else { ctx.goBack = () => { - vnode.context.$router.replace(ctx.value) + if (ctx.single){ + vnode.context.$router.go(-1) + } else { + vnode.context.$router.replace(ctx.value) + } } } ctx.goBackKey = ev => {
fix(GoBack): Fixes the single modification (#<I>) * fix(GoBack): Fixes the single modification Fixed the single modification not working on the browser correctly with named paths. * (fix) removed import * (fix) JS Standard * (fix) Standard JS * fix for go an push * Changed to replace.
quasarframework_quasar
train
js
72c2510c6839b000d9670cff176cf4abcfbe5340
diff --git a/test/compiler-test.js b/test/compiler-test.js index <HASH>..<HASH> 100644 --- a/test/compiler-test.js +++ b/test/compiler-test.js @@ -173,6 +173,11 @@ tests = { n: { type: 'object' } + }, + 'multi\nline': { + 'multi\nline': { + type: 'object' + } } } diff --git a/test/index-test.js b/test/index-test.js index <HASH>..<HASH> 100644 --- a/test/index-test.js +++ b/test/index-test.js @@ -222,6 +222,21 @@ tests = [{ '\\': 120, some: 'visible' } +}, { + m: 'multi\nline(a)', + o: { + multi: 130, + line: 131, + 'multi\nline': { + a: 135, + b: 134 + } + }, + e: { + 'multi\nline': { + a: 135 + } + } }] describe('json-mask', function () {
test: add tests for multiline json key
nemtsov_json-mask
train
js,js
35cc905551d43bbe6786006f7ec7d0aa0c74d306
diff --git a/src/Parser/ParamParser.js b/src/Parser/ParamParser.js index <HASH>..<HASH> 100644 --- a/src/Parser/ParamParser.js +++ b/src/Parser/ParamParser.js @@ -321,7 +321,16 @@ export default class ParamParser { if (right.type === 'ObjectExpression') { const typeMap = {}; for (const prop of right.properties) { - typeMap[prop.key.name] = typeof prop.value.value; + switch (prop.type) { + case 'ObjectProperty': + typeMap[prop.key.name] = typeof prop.value.value; + break; + case 'ObjectMethod': + typeMap[prop.key.name] = 'function'; + break; + default: + typeMap[prop.key.name] = '*'; + } } const types = [];
fix(guess): crash when ObjectMethod
esdoc_esdoc
train
js
62df37a815ed00b110ffe1cecf2ecb2ac78da14d
diff --git a/test/filters/truncate.test.js b/test/filters/truncate.test.js index <HASH>..<HASH> 100644 --- a/test/filters/truncate.test.js +++ b/test/filters/truncate.test.js @@ -10,5 +10,5 @@ it('adds a $morphTruncate method to the Vue prototype', () => { it('should truncate a string with elipses', () => { const localVue = createLocalVue(); localVue.use(truncate); - expect(localVue.prototype.$morphTruncate('Leave out all the rest', 11)).toEqual('Leave out a...'); + expect(localVue.prototype.$morphTruncate('Leave out all the rest', 11)).toEqual('Leave out a…'); });
test: change ... with ellipsis
jofftiquez_vue-morphling
train
js
322571dbd0e2b70fd0545fbecdf0ba492629439a
diff --git a/src/RelyingParty.js b/src/RelyingParty.js index <HASH>..<HASH> 100644 --- a/src/RelyingParty.js +++ b/src/RelyingParty.js @@ -197,37 +197,6 @@ class RelyingParty extends JSONDocument { } /** - * Authenticate - * - * @description - * Initiates OpenID Connect implicit authentication flow by, directing the - * User-Agent to the issuer's authorize endpoint, either by changing the - * window location or by opening a popup window. - * - * @param {Object} options - * @returns Promise - */ - authenticate (options) { - let request = new AuthenticationRequest(this) - return request.submit(options) - } - - /** - * Authenticate URI - * - * @description - * Constructs a URI that can be employed in a hyperlink to initiate an - * authentication flow with the configured OpenID Connect provider (issuer).. - * - * @param {Object} options - * @returns string - */ - authenticateUri (options) { - let request = new AuthenticationRequest(this) - return request.uri(options) - } - - /** * createRequest */ createRequest (options, session) {
refactor(RelyingParty): remove deprecated authenticate methods
anvilresearch_oidc-rp
train
js
8f273d12fc1387ed3f4aee40f626037cccce0518
diff --git a/test/k8sT/Updates.go b/test/k8sT/Updates.go index <HASH>..<HASH> 100644 --- a/test/k8sT/Updates.go +++ b/test/k8sT/Updates.go @@ -117,9 +117,6 @@ func InstallAndValidateCiliumUpgrades(kubectl *helpers.Kubectl, oldVersion, newV kubectl.Delete(l7Policy) kubectl.Delete(demoPath) - // make sure that Kubedns is deleted correctly - _ = kubectl.Delete(helpers.DNSDeployment()) - kubectl.DeleteETCDOperator() ExpectAllPodsTerminated(kubectl) @@ -133,6 +130,10 @@ func InstallAndValidateCiliumUpgrades(kubectl *helpers.Kubectl, oldVersion, newV err = kubectl.WaitForCiliumInitContainerToFinish() ExpectWithOffset(1, err).To(BeNil(), "Cilium %q was not able to be clean up environment", newVersion) + if res := kubectl.Delete(helpers.DNSDeployment()); !res.WasSuccessful() { + log.Warningf("Unable to delete CoreDNS deployment: %s", res.OutputPrettyPrint()) + } + _ = kubectl.DeleteResource( "ds", fmt.Sprintf("-n %s cilium", helpers.KubeSystemNamespace)) }
test: Delete CoreDNS deployment after upgrade/downgrade test The call to CiliumInstall() will deploy CoreDNS again but then not remove it. Remove it properly at the end of the test.
cilium_cilium
train
go
40dfc6e5eabf80dc87a2213fc3657cd2199d6f23
diff --git a/src/main.js b/src/main.js index <HASH>..<HASH> 100644 --- a/src/main.js +++ b/src/main.js @@ -46,10 +46,10 @@ class ScopedComponent extends Component { : []; } - getCurrentScope(currentPart) { + getCurrentScope() { return [ ...(this.context.kScope ? this.context.kScope.scope : []), - ...(currentPart ? currentPart : this.getCurrentScopePart()), + ...this.getCurrentScopePart(), ]; }
feat(ScopedComponent): remove overriding of currentPart of the scope from getCurrentScope
krzysztofpniak_k-logic
train
js
74f9879cd2e9b542efab82b0dd1a4984caf8fab0
diff --git a/deis/__init__.py b/deis/__init__.py index <HASH>..<HASH> 100644 --- a/deis/__init__.py +++ b/deis/__init__.py @@ -6,4 +6,4 @@ the api, provider, cm, and web Django apps. from __future__ import absolute_import -__version__ = '0.15.0+git' +__version__ = '0.15.1'
chore(release): update version to <I>
deis_controller-sdk-go
train
py
eae46ad0a705f430cbf5dd374bfd512cffc75e7d
diff --git a/lib/util/index.js b/lib/util/index.js index <HASH>..<HASH> 100644 --- a/lib/util/index.js +++ b/lib/util/index.js @@ -589,6 +589,9 @@ function parseLinesJSON(text) { text.split(/\r\n|\n|\r/g).forEach(function(line) { if (line = line.trim()) { var index = line.indexOf(': '); + if (index === -1) { + index = line.indexOf(':'); + } var name, value; if (index != -1) { name = line.substring(0, index).trim();
refactor: Parse json from text
avwo_whistle
train
js
0d51b4252d1b73241b928c4add7e18c408695f6a
diff --git a/packages/cozy-konnector-libs/src/libs/BaseKonnector.js b/packages/cozy-konnector-libs/src/libs/BaseKonnector.js index <HASH>..<HASH> 100644 --- a/packages/cozy-konnector-libs/src/libs/BaseKonnector.js +++ b/packages/cozy-konnector-libs/src/libs/BaseKonnector.js @@ -250,12 +250,7 @@ class BaseKonnector { if (params.type === 'email') state += '.EMAIL' if (params.type === 'sms') state += '.SMS' log('info', `Setting ${state} state into the current account`) - await this.updateAccountAttributes({ state }) - - // init code to null in the account - await this.updateAccountAttributes({ - twofa_code: null - }) + await this.updateAccountAttributes({ state, twofa_code: null }) while (Date.now() < params.timeout && !account.twofa_code) { await sleep(params.heartBeat) @@ -265,6 +260,7 @@ class BaseKonnector { if (account.twofa_code) { await this.updateAccountAttributes({ + state: null, twofa_code: null }) return account.twofa_code
fix: properly update account state before and after 2FA
konnectors_libs
train
js
869dd37ea147de257442fc600b62039bca4d7863
diff --git a/src/cli/cms/operations/abify.js b/src/cli/cms/operations/abify.js index <HASH>..<HASH> 100644 --- a/src/cli/cms/operations/abify.js +++ b/src/cli/cms/operations/abify.js @@ -17,9 +17,9 @@ export function abify(json, template = null) { } cmsData.source.getDataList(template, json).then(() => { - var html = new Page(template, json) + var page = new Page(template, json) - resolve(html) + resolve(page.html) }) })
fix: abify should return only the abified html
abecms_abecms
train
js
97b45cd60825db07a6b39e6bb478a446313b0554
diff --git a/lib/verify.js b/lib/verify.js index <HASH>..<HASH> 100644 --- a/lib/verify.js +++ b/lib/verify.js @@ -59,9 +59,9 @@ module.exports = async (pluginConfig, context) => { errors.push(getError('EGLNOPERMISSION', {repoId})); } } catch (error) { - if (error.response.statusCode === 401) { + if (error.response && error.response.statusCode === 401) { errors.push(getError('EINVALIDGLTOKEN', {repoId})); - } else if (error.response.statusCode === 404) { + } else if (error.response && error.response.statusCode === 404) { errors.push(getError('EMISSINGREPO', {repoId})); } else { throw error;
fix: handle errors that don't have a `response` (#<I>)
semantic-release_gitlab
train
js
21358a908f850233c2802d6720dcec1970e8f3ce
diff --git a/packages/site/src/ui/doc.js b/packages/site/src/ui/doc.js index <HASH>..<HASH> 100644 --- a/packages/site/src/ui/doc.js +++ b/packages/site/src/ui/doc.js @@ -25,7 +25,7 @@ export default class Doc extends React.Component { document.querySelectorAll('.markdown pre code').forEach(node => CodeMirror(el => node.parentNode.replaceChild(el, node), { mode: 'javascript', - theme: 'monokai-sublime', + theme: 'ps-codemirror', readOnly: true, value: node.innerText.trim() })
fix(site): color the doc code blocks
pluralsight_design-system
train
js