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
6fe3ef6dcab44da8081b343a3469ed0e0c452157
diff --git a/src/Zephyrus/Database/Core/DatabaseConnector.php b/src/Zephyrus/Database/Core/DatabaseConnector.php index <HASH>..<HASH> 100644 --- a/src/Zephyrus/Database/Core/DatabaseConnector.php +++ b/src/Zephyrus/Database/Core/DatabaseConnector.php @@ -4,7 +4,7 @@ use PDO; class DatabaseConnector extends PDO { - private static array $savepointEnabled = ["pgsql", "mysql", "sqlite"]; + private static array $savepointEnabled = ["pgsql", "mysql", "mariadb", "sqlite", "sqlite2"]; private int $currentTransactionLevel = 0;
refactor: add more supported savepoint DBMS
dadajuice_zephyrus
train
php
ac36b8dea586fb03b52e683cfc0daeb4d6797b73
diff --git a/packages/ra-ui-materialui/src/layout/Loading.js b/packages/ra-ui-materialui/src/layout/Loading.js index <HASH>..<HASH> 100644 --- a/packages/ra-ui-materialui/src/layout/Loading.js +++ b/packages/ra-ui-materialui/src/layout/Loading.js @@ -14,7 +14,7 @@ const useStyles = makeStyles( [theme.breakpoints.up('md')]: { height: '100%', }, - [theme.breakpoints.down('sm')]: { + [theme.breakpoints.down('lg')]: { height: '100vh', marginTop: '-3em', },
fix: default app loading is not not center vertically - <I>
marmelab_react-admin
train
js
4286d89bfbca7cd30e34077355dc346ed63a4209
diff --git a/lib/core/src/server/preview/custom-webpack-preset.js b/lib/core/src/server/preview/custom-webpack-preset.js index <HASH>..<HASH> 100644 --- a/lib/core/src/server/preview/custom-webpack-preset.js +++ b/lib/core/src/server/preview/custom-webpack-preset.js @@ -11,7 +11,14 @@ async function createFinalDefaultConfig(presets, config, options) { } export async function webpack(config, options) { - const { configDir, configType, presets } = options; + const { configDir, configType, presets, webpackConfig } = options; + + // through standalone webpackConfig option + if (webpackConfig) { + const finalDefaultConfig = await createFinalDefaultConfig(presets, config, options); + return webpackConfig(finalDefaultConfig); + } + // Check whether user has a custom webpack config file and // return the (extended) base configuration if it's not available.
feat: support custom webpack option for standalone storybook
storybooks_storybook
train
js
db7f0528c20bc01c6b820000611b509c3ce67b7d
diff --git a/querydsl-jpa/src/main/java/com/querydsl/jpa/sql/AbstractJPASQLQuery.java b/querydsl-jpa/src/main/java/com/querydsl/jpa/sql/AbstractJPASQLQuery.java index <HASH>..<HASH> 100644 --- a/querydsl-jpa/src/main/java/com/querydsl/jpa/sql/AbstractJPASQLQuery.java +++ b/querydsl-jpa/src/main/java/com/querydsl/jpa/sql/AbstractJPASQLQuery.java @@ -158,7 +158,7 @@ public abstract class AbstractJPASQLQuery<T, Q extends AbstractJPASQLQuery<T, Q> JPAUtil.setConstants(query, serializer.getConstantToAllLabels(), queryMixin.getMetadata().getParams()); this.projection = null; // necessary when query is reused - if (projection instanceof FactoryExpression) { + if (!forCount && projection instanceof FactoryExpression) { if (!queryHandler.transform(query, (FactoryExpression<?>) projection)) { this.projection = (FactoryExpression<?>) projection; }
fix: added `forCount` conditional statement for skip transform logic when countQuery
querydsl_querydsl
train
java
29f7565a11817f05f8a1cd9b29d6bd7969bb4872
diff --git a/replica/src/Replica.js b/replica/src/Replica.js index <HASH>..<HASH> 100644 --- a/replica/src/Replica.js +++ b/replica/src/Replica.js @@ -458,7 +458,7 @@ Replica.prototype.onUpstreamHandshake = function (hs_op, op_stream) { // Add a connection to other replica, either upstream or downstream. Replica.prototype.addStreamDown = function (stream) { - var op_stream = new OpStream (stream, undefined, { + var op_stream = new OpStream (stream, { authorize: this.options.authorize // needs the stream }); var self = this;
fix(replica): correct OpStream signature
gritzko_swarm
train
js
a24dd3dbb9ec68d1d82ed3d887c7290ea028d2f2
diff --git a/schedula/utils/sol.py b/schedula/utils/sol.py index <HASH>..<HASH> 100644 --- a/schedula/utils/sol.py +++ b/schedula/utils/sol.py @@ -55,7 +55,7 @@ class Solution(Base, collections.OrderedDict): self._set_inputs(inputs, inputs_dist) # Set wildcards. - self._set_wildcards(*((self.inputs, outputs) if wildcard else ())) + self._set_wildcards(*((inputs, outputs) if wildcard else ())) # Initialize workflow params. self._init_workflow()
fix(sol): Remove defaults when setting wildcards.
vinci1it2000_schedula
train
py
a55a5eab5b652ae5ca3531f657d3cfb4f3b09638
diff --git a/src/_support/Helper/Traits/AbstractTrait.php b/src/_support/Helper/Traits/AbstractTrait.php index <HASH>..<HASH> 100644 --- a/src/_support/Helper/Traits/AbstractTrait.php +++ b/src/_support/Helper/Traits/AbstractTrait.php @@ -19,5 +19,5 @@ trait AbstractTrait * * @throws ModuleException */ - abstract protected function getModule($name); + abstract protected function getModule(string $name); }
feat: update to <I> RC3
bytic_Codeception
train
php
eb30c2721809d0ea72edd86f5f992d6f660ac33d
diff --git a/packages/critters/src/index.js b/packages/critters/src/index.js index <HASH>..<HASH> 100644 --- a/packages/critters/src/index.js +++ b/packages/critters/src/index.js @@ -244,7 +244,7 @@ export default class Critters { } // Ignore remote stylesheets - if (/^https:\/\//.test(normalizedPath) || href.startsWith('//')) { + if (/^https?:\/\//.test(normalizedPath) || href.startsWith('//')) { return undefined; }
fix: skip processing of HTTP remote stylesheets (#<I>) In #<I> we introduced skipping processing of remote stylesheets however during a rebase a commit that changed the RegExp to handle http protocols (<URL>) has been lost. This change fixes the RegExp to match against `http://` protocols.
GoogleChromeLabs_critters
train
js
294dbeef1bcc0c73516df36ddf46aa2f0332ca25
diff --git a/app-vite/lib/helpers/banner-global.js b/app-vite/lib/helpers/banner-global.js index <HASH>..<HASH> 100644 --- a/app-vite/lib/helpers/banner-global.js +++ b/app-vite/lib/helpers/banner-global.js @@ -3,7 +3,7 @@ const { green, gray, underline } = require('kolorist') const getPackageJson = require('./get-package-json') const quasarVersion = getPackageJson('quasar').version const cliAppVersion = require('../../package.json').version -const viteVersion = getPackageJson('vite').version +const viteVersion = require('vite/package.json').version function getPackager (argv, cmd) { if (argv.ide || (argv.mode === 'capacitor' && cmd === 'dev')) {
fix(app-vite): Correctly resolve Vite version (#<I>) getPackageJson() is a helper for resolving host packages, but we should resolve Vite as part of this project to avoid some problems.
quasarframework_quasar
train
js
3e46b05db926524f175369647d6c4e2638ad51f4
diff --git a/packages/retail-ui/.styleguide/helpers.js b/packages/retail-ui/.styleguide/helpers.js index <HASH>..<HASH> 100644 --- a/packages/retail-ui/.styleguide/helpers.js +++ b/packages/retail-ui/.styleguide/helpers.js @@ -29,7 +29,7 @@ const getCommonSections = () => { const getVersionsSection = () => { const { npmVersions, npmTags } = getPackageInfo(); - const excludeVersions = ['0.8.8']; + const excludeVersions = ['0.8.8', '0.18.16', '0.18.17', '0.42.2']; const stableVersions = npmVersions .reverse() .filter(version => !version.includes('-'))
chore: exclude test versions from styleguide
skbkontur_retail-ui
train
js
90d71cf02c2b9b1263dea04b7f6d03dd14a544ff
diff --git a/clients/packages/admin-client/src/mobilizations/components/mobilization-basics-form.js b/clients/packages/admin-client/src/mobilizations/components/mobilization-basics-form.js index <HASH>..<HASH> 100644 --- a/clients/packages/admin-client/src/mobilizations/components/mobilization-basics-form.js +++ b/clients/packages/admin-client/src/mobilizations/components/mobilization-basics-form.js @@ -1,3 +1,9 @@ +// Select Tema Principal, seleciona esta com a cor branca +// +// Adicionar subthemas e theme no fetch de mobilizações + + + import React from 'react'; import classnames from 'classnames'; import { connect } from 'react-redux'; @@ -26,7 +32,7 @@ import MainThemeField from './MainThemeField'; const FETCH_SUBTHEMES_QUERY = gql` query { - subthemes { + subthemes (order_by: { label: asc }) { id label theme {
fix(admin): order themes by alphabetic
nossas_bonde-client
train
js
688317e2414f6bf2debeb57379e2a0a435f282f4
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -145,3 +145,21 @@ test('options.digest with sha512 default', function (t) { t.ok(err, 'throws error for different write / read digest');; }); }); +test('put with _deleted: true', function (t) { + t.plan(1); + var dbName = 'twelve'; + var db = new PouchDB(dbName, {db: memdown}); + db.crypto('password') + var doc = {_id: 'baz', foo: 'bar'} + db.put(doc).then(function (result) { + doc._rev = result.rev + doc._deleted = true + return db.put(doc) + }).then(function () { + return db.get('baz') + }).then(function () { + t.error('should not find doc after delete'); + }).catch(function (err) { + t.equal(err.status, 404, 'cannot find doc after delete') + }) +})
test: put with `_deleted: true`
calvinmetcalf_crypto-pouch
train
js
f44ceba98c7586eb933abb20d079cd94f6435c6c
diff --git a/tests/system/Filters/FiltersTest.php b/tests/system/Filters/FiltersTest.php index <HASH>..<HASH> 100644 --- a/tests/system/Filters/FiltersTest.php +++ b/tests/system/Filters/FiltersTest.php @@ -13,8 +13,10 @@ namespace CodeIgniter\Filters; use CodeIgniter\Config\Services; use CodeIgniter\Filters\Exceptions\FilterException; +use CodeIgniter\HTTP\CLIRequest; use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\Test\CIUnitTestCase; +use CodeIgniter\Test\Mock\MockAppConfig; require_once __DIR__ . '/fixtures/GoogleMe.php'; require_once __DIR__ . '/fixtures/GoogleYou.php'; @@ -60,7 +62,8 @@ final class FiltersTest extends CIUnitTestCase 'cli' => ['foo'], ], ]; - $filters = new Filters((object) $config, $this->request, $this->response); + $request = new CLIRequest(new MockAppConfig()); + $filters = new Filters((object) $config, $request, $this->response); $expected = [ 'before' => ['foo'],
test: fix test CLIRequest should be used when CLI testing
codeigniter4_CodeIgniter4
train
php
8f38d81b96886fb27ed112501c11d63eb07edf88
diff --git a/test/networks.spec.js b/test/networks.spec.js index <HASH>..<HASH> 100644 --- a/test/networks.spec.js +++ b/test/networks.spec.js @@ -28,7 +28,7 @@ describe('networks', () => { networkKeys.length.should.be.greaterThan(0) networkKeys.forEach(k => { const path = range(3).map(() => random(5,10)).map(randStr).join('/') - keyFor(`http://${k}.com${path}`).should.eql(k) + keyFor(`http://${k}.com/${path}`).should.eql(k) }) }) @@ -36,7 +36,7 @@ describe('networks', () => { networkKeys.length.should.be.greaterThan(0) networkKeys.forEach(k => { const path = range(3).map(() => random(5,10)).map(randStr).join('.') - keyFor(`http://${k}.com${path}`).should.eql(k) + keyFor(`http://${k}.com/${path}`).should.eql(k) }) })
fix: prepend slash to test
jaketrent_react-social-icons
train
js
14e218124b331f1285b85a3e021fdeedc6d9d2e0
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 @@ -317,14 +317,11 @@ class AvSelect extends AvBaseInput { ...provided, width: '90%', }), - singleValue: (provided, state) => { - if (state.isDisabled) { - return { - ...provided, - color: '#495057', - }; - } - return { ...provided }; + singleValue: provided => { + return { + ...provided, + color: '#495057', + }; }, control: (provided, state) => { if (state.isDisabled) {
refactor(reactstrap-validation-select): match singleValue color to availity/form components
Availity_availity-react
train
js
002b2bc30b00c411a0c597c75f825dd89471e41a
diff --git a/benchmarks/index.js b/benchmarks/index.js index <HASH>..<HASH> 100644 --- a/benchmarks/index.js +++ b/benchmarks/index.js @@ -76,7 +76,7 @@ suite defer: true, fn: deferred => { Promise.all(Array.from(Array(parallelRequests)).map(() => new Promise((resolve) => { - http.get(httpOptions, (res) => { + http.get(httpNoAgent, (res) => { res .pipe(new Writable({ write (chunk, encoding, callback) {
test: change `http - no agent` benchmark to use the correct options (#<I>)
mcollina_undici
train
js
18d71d5c3dbe848c92a0463711ca9becdd4ec76b
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 @@ sys.path.insert(0, pdir) sys.path.append(op.abspath('extensions')) # Mock all dependencies -install_requires = ["h5py", "lmfit", "numpy", "scipy", "scipy.ndimage", +install_requires = ["h5py", "lmfit", "nrefocus", "numpy", + "scipy", "scipy.ndimage", "skimage", "skimage.restoration"] for mod_name in install_requires:
docs: fix build on rtd
RI-imaging_qpimage
train
py
ebc5079e8811849d43c9a9cdba4778e54b986ce6
diff --git a/source/rafcon/gui/models/abstract_state.py b/source/rafcon/gui/models/abstract_state.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/models/abstract_state.py +++ b/source/rafcon/gui/models/abstract_state.py @@ -360,11 +360,20 @@ class AbstractStateModel(MetaModel, Hashable): def _load_outcome_models(self): raise NotImplementedError + def operation_finished(self, notification_info): + if not "after" in notification_info: + return False + notification_info = notification_info if notification_info["method_name"] is not "state_change" \ + else notification_info["kwargs"] + return not isinstance(notification_info["result"], Exception) + + def child_model_changed(self, notification_info): + return self.state != notification_info['instance'] + @ModelMT.observe("state", after=True, before=True) def model_changed(self, model, prop_name, info): """This method notifies parent state about changes made to the state """ - # Notify the parent state about the change (this causes a recursive call up to the root state) if self.parent is not None: self.parent.model_changed(model, prop_name, info)
feat(abstract_state): new helper methods to analyse notification info
DLR-RM_RAFCON
train
py
ec95ebc9583eb4c934b2220ed6f3b83a74e21ccf
diff --git a/test/plugins/statusbar.spec.js b/test/plugins/statusbar.spec.js index <HASH>..<HASH> 100644 --- a/test/plugins/statusbar.spec.js +++ b/test/plugins/statusbar.spec.js @@ -13,8 +13,7 @@ describe('Service: $cordovaStatusbar', function () { 'backgroundColorByName', 'backgroundColorByHexString', 'hide', - 'show', - 'isVisible' + 'show' ]; beforeEach(module('ngCordova.plugins.statusbar')); @@ -70,7 +69,7 @@ describe('Service: $cordovaStatusbar', function () { expect(window.StatusBar.backgroundColorByHexString).toHaveBeenCalledWith('#000'); }); - angular.forEach(['show', 'hide', 'isVisible'], function (fnName) { + angular.forEach(['show', 'hide'], function (fnName) { it('should call window\'s StatusBar.' + fnName + ' method', function () { $cordovaStatusbar[fnName](); expect(window.StatusBar[fnName]).toHaveBeenCalled();
fix(tests): statusbar
ionic-team_ng-cordova
train
js
290b4d0dbf6db5dd8f57f9ba6d35c2aa8a8477b6
diff --git a/system/Test/bootstrap.php b/system/Test/bootstrap.php index <HASH>..<HASH> 100644 --- a/system/Test/bootstrap.php +++ b/system/Test/bootstrap.php @@ -84,20 +84,6 @@ if (! class_exists('CodeIgniter\Services', false)) { // Initialize and register the loader with the SPL autoloader stack. Services::autoloader()->initialize(new Autoload(), new Modules())->register(); -// Now load Composer's if it's available -if (is_file(COMPOSER_PATH)) { - /* - * The path to the vendor directory. - * - * We do not want to enforce this, so set the constant if Composer was used. - */ - if (! defined('VENDORPATH')) { - define('VENDORPATH', realpath(ROOTPATH . 'vendor') . DIRECTORY_SEPARATOR); - } - - require_once COMPOSER_PATH; -} - // Load environment settings from .env files into $_SERVER and $_ENV require_once SYSTEMPATH . 'Config/DotEnv.php';
refactor: COMPOSER_PATH and VENDORPATH are defined above
codeigniter4_CodeIgniter4
train
php
b95aa9f3d144d3d783c022ac25b8879a36112655
diff --git a/test/lib/outer-shelljs/index.js b/test/lib/outer-shelljs/index.js index <HASH>..<HASH> 100644 --- a/test/lib/outer-shelljs/index.js +++ b/test/lib/outer-shelljs/index.js @@ -9,8 +9,8 @@ chai.use(require('sinon-chai')); var outerShelljs = require('../../..'); -require('sinon-doublist').sinonDoublist('mocha'); -var sinonDoublistFs = require('sinon-doublist-fs').sinonDoublistFs; +require('sinon-doublist')('mocha'); +var sinonDoublistFs = require('sinon-doublist-fs'); describe('OuterShelljs', function() { beforeEach(function() {
chore(test): Update sinon-doublist* usage
codeactual_outer-shelljs
train
js
06fc2d3b8fe1037d7b78ccb01a26e7c644655fb3
diff --git a/config/styleguide.config.js b/config/styleguide.config.js index <HASH>..<HASH> 100644 --- a/config/styleguide.config.js +++ b/config/styleguide.config.js @@ -3,7 +3,7 @@ const { version } = require('../package.json') const styleguidistEnv = process.env.STYLEGUIDIST_ENV || 'dev' // dev, staging, production -const enabledInStaging = ['Input', 'Lists'] +const enabledInStaging = ['Input', 'Lists', 'Icon'] /* eslint-disable no-unused-vars */ const toggleByEnv = (component, newComponentPath, oldComponentPath) => {
docs(icon): Set toggle to show in staging
telus_tds-core
train
js
963c149857d7fbe9b38c90954d6f7fad56438e53
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -386,7 +386,10 @@ exports.extend = function(newConf) { Object.keys(pluginHost).forEach(function(name) { var host = pluginHost[name]; if (typeof host === 'string' && (host = host.trim())) { - config.pluginHostMap[host.toLowerCase()] = name; + host = host.toLowerCase().split('|'); + host.forEach(function(h) { + config.pluginHostMap[h] = name; + }); } }); }
feat: support set multiple domain for plugin
avwo_whistle
train
js
12f02b4e42a7143cee0b03f62db62584ac4a4dd2
diff --git a/lib/pact/consumer_contract/consumer_contract_writer.rb b/lib/pact/consumer_contract/consumer_contract_writer.rb index <HASH>..<HASH> 100644 --- a/lib/pact/consumer_contract/consumer_contract_writer.rb +++ b/lib/pact/consumer_contract/consumer_contract_writer.rb @@ -57,6 +57,7 @@ module Pact logger.info log_message FileUtils.mkdir_p File.dirname(pactfile_path) Filelock pactfile_path do | file | + file.truncate 0 file.write pact_json end end
fix: avoid corrupting pact file when writing to it Truncate before writing
pact-foundation_pact-mock_service
train
rb
28e273cc9b446b360fdfd4763f6d3b08822ab916
diff --git a/src/Controller/AdminApi/GroupsController.php b/src/Controller/AdminApi/GroupsController.php index <HASH>..<HASH> 100644 --- a/src/Controller/AdminApi/GroupsController.php +++ b/src/Controller/AdminApi/GroupsController.php @@ -33,6 +33,11 @@ class GroupsController extends BaseController ]); } + public function updateAction(Req $req) + { + + } + protected function beforeUpdateFind(Req $req) { return V::key('name', '名称')->check($req);
refactor: response => res
miaoxing_admin
train
php
4aa1f2e94c1204ff5772f8ea59070a7bc57c5755
diff --git a/lib/utils.js b/lib/utils.js index <HASH>..<HASH> 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -10,5 +10,5 @@ export function isNode () { } export function getNodeVersion () { - return process.versions.node ? `v${process.versions.node}` : process.version + return process.versions && process.versions.node ? `v${process.versions.node}` : process.version }
fix(getNodeVersion): Safety check before accessing process.versions(#<I>) Fixes #<I> (partially)
contentful_contentful-sdk-core
train
js
a7e643f77ffb25acff4747dc2fb0f8229b076391
diff --git a/test/util/server/server.go b/test/util/server/server.go index <HASH>..<HASH> 100644 --- a/test/util/server/server.go +++ b/test/util/server/server.go @@ -450,10 +450,11 @@ func WaitForServiceAccounts(clientset kclientset.Interface, namespace string, ac serviceAccounts := clientset.Core().ServiceAccounts(namespace) return wait.Poll(time.Second, ServiceAccountWaitTimeout, func() (bool, error) { for _, account := range accounts { - if sa, err := serviceAccounts.Get(account, metav1.GetOptions{}); err != nil { - if !serviceAccountSecretsExist(clientset, namespace, sa) { - continue - } + sa, err := serviceAccounts.Get(account, metav1.GetOptions{}) + if err != nil { + return false, nil + } + if !serviceAccountSecretsExist(clientset, namespace, sa) { return false, nil } }
fix: wait logic in WaitForServiceAccounts
openshift_origin
train
go
0e47d5fc636658bb98216db89172956ae56e0fe5
diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/toolbar/ChatToolbarFragment.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/toolbar/ChatToolbarFragment.java index <HASH>..<HASH> 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/toolbar/ChatToolbarFragment.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/toolbar/ChatToolbarFragment.java @@ -261,7 +261,7 @@ public class ChatToolbarFragment extends BaseFragment { } else if (peer.getPeerType() == PeerType.GROUP) { GroupVM groupVM = groups().get(peer.getPeerId()); - if (groupVM.getGroupType() == GroupType.GROUP) { + if (groupVM.getGroupType() == GroupType.GROUP && groupVM.isMember().get() && groupVM.getIsCanCall().get()) { callsEnabled = groupVM.getMembersCount().get() <= MAX_USERS_FOR_CALLS; videoCallsEnabled = false; } else {
fix(android): handle call permission for groups
actorapp_actor-platform
train
java
e98deb85d68c2b9e1543a5609de819189dff60fd
diff --git a/packages/cozy-scripts/config/webpack.config.services.js b/packages/cozy-scripts/config/webpack.config.services.js index <HASH>..<HASH> 100644 --- a/packages/cozy-scripts/config/webpack.config.services.js +++ b/packages/cozy-scripts/config/webpack.config.services.js @@ -4,7 +4,7 @@ const path = require('path') const fs = require('fs-extra') const webpack = require('webpack') const paths = require('../utils/paths') -const { target, isDebugMode } = require('./webpack.vars') +const { target, environment } = require('./webpack.vars') const servicesFolder = paths.appServicesFolder const servicesPaths = fs.readdirSync(servicesFolder) @@ -44,7 +44,7 @@ const config = { exclude: /node_modules/, options: { extends: ['cozy-app'], - emitWarning: isDebugMode + emitWarning: environment === 'production' } }, {
fix: emit warning on development env 🎤
CPatchane_create-cozy-app
train
js
d9ad6387ea3250d754c1ad3b3075d9f6b77eb026
diff --git a/components/table/index.js b/components/table/index.js index <HASH>..<HASH> 100644 --- a/components/table/index.js +++ b/components/table/index.js @@ -341,7 +341,9 @@ export default class Table extends Intact { let instance = this; if (data) { instance = new Table({...this.get(), data}); + instance._initMountedQueue(); instance.init(null, this.vNode); + instance._triggerMountedQueue(); } // in webpack 1, it doesn't support dynamic import
fix(Table): can not export when custom data and table has sticky header, close #<I>
ksc-fe_kpc
train
js
83e1ffc7aea2117da97797bd9b7f669e2fa9a228
diff --git a/test/MemoryFileSystem.js b/test/MemoryFileSystem.js index <HASH>..<HASH> 100644 --- a/test/MemoryFileSystem.js +++ b/test/MemoryFileSystem.js @@ -348,6 +348,8 @@ describe("join", function() { fs.join("C:", "a/b").should.be.eql("C:\\a\\b"); fs.join("C:\\", "a/b").should.be.eql("C:\\a\\b"); fs.join("C:\\", "a\\b").should.be.eql("C:\\a\\b"); + fs.join("C:/a/b", "./../c/d").should.be.eql("C:\\a\\c\\d"); + fs.join("C:\\a\\b", "./../c/d").should.be.eql("C:\\a\\c\\d"); }); it("should join paths (weird cases)", function() { var fs = new MemoryFileSystem();
test: add test for joining paths with different DS (fixes #<I>)
webpack_memory-fs
train
js
9b224489513a49ab89ea207de62f4c44dcaeba6b
diff --git a/test/unit/model/Specification/MediaClassSpecificationTest.php b/test/unit/model/Specification/MediaClassSpecificationTest.php index <HASH>..<HASH> 100644 --- a/test/unit/model/Specification/MediaClassSpecificationTest.php +++ b/test/unit/model/Specification/MediaClassSpecificationTest.php @@ -60,10 +60,17 @@ class MediaClassSpecificationTest extends TestCase */ public function testIsSatisfiedBy( bool $expected, + bool $equals, bool $isSubclass ): void { $this->testedClass - ->expects($this->once()) + ->expects($this->atMost(1)) + ->method('equals') + ->with($this->rootClass) + ->willReturn($equals); + + $this->testedClass + ->expects($this->atMost(1)) ->method('isSubclassOf') ->with($this->rootClass) ->willReturn($isSubclass); @@ -79,10 +86,17 @@ class MediaClassSpecificationTest extends TestCase return [ 'Subclass of MEDIA_ROOT' => [ 'expected' => true, + 'equals' => false, 'isSubclass' => true, ], 'Not a subclass of MEDIA_ROOT' => [ 'expected' => false, + 'equals' => false, + 'isSubclass' => false, + ], + 'Same class as MEDIA_ROOT' => [ + 'expected' => true, + 'equals' => true, 'isSubclass' => false, ], ];
test: Update tests for MediaClassSpecification
oat-sa_extension-tao-mediamanager
train
php
69f77c01da1de45dda978d445a25dd875bfbc994
diff --git a/lib/workers/branch/commit.js b/lib/workers/branch/commit.js index <HASH>..<HASH> 100644 --- a/lib/workers/branch/commit.js +++ b/lib/workers/branch/commit.js @@ -16,7 +16,9 @@ async function commitFilesToBranch(config) { splitMessage[0] = splitMessage[0].toLowerCase(); let semanticPrefix = config.semanticCommitType; if (config.semanticCommitScope) { - semanticPrefix += `(${config.semanticCommitScope})`; + semanticPrefix += `(${handlebars.compile(config.semanticCommitScope)( + config + )})`; } commitMessage = `${semanticPrefix}: ${splitMessage.join('\n')}`; }
fix(semanticCommitScope): compile with handlebars Compile the semanticCommitScope with handlebars to ensure any substitutions such as {{depName}} are correctly parsed and replaced. Closes #<I>
renovatebot_renovate
train
js
bce9a8af1b90dcfcf607e87e61bedfdf7eae3001
diff --git a/src/structures/User.js b/src/structures/User.js index <HASH>..<HASH> 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -53,6 +53,13 @@ class User extends Base { if (typeof data.avatar !== 'undefined') this.avatar = data.avatar; /** + * The locale of the user's client (ISO 639-1) + * @type {?string} + * @name User#locale + */ + if (data.locale) this.locale = data.locale; + + /** * The ID of the last message sent by the user, if one was sent * @type {?Snowflake} */
feat(User): add locale property (#<I>)
discordjs_discord.js
train
js
f640deb104f32c1d789d75379805cd4c4fb81d67
diff --git a/internal/pipe/aur/aur.go b/internal/pipe/aur/aur.go index <HASH>..<HASH> 100644 --- a/internal/pipe/aur/aur.go +++ b/internal/pipe/aur/aur.go @@ -361,7 +361,7 @@ func doPublish(ctx *context.Context, pkgs []*artifact.Artifact) error { return err } - key, err = keyPath(key) + key, err = keyPath(strings.TrimSpace(key)) if err != nil { return err }
fix: trim spaces from aur private key (#<I>) I had this issue on a repo, and it seems at least one more person had it too: ssh/git complaining that the key is invalid. My guess is that gh secret set from a file is now appending a new line - as it worked with the exact same key before, for me at least. anyway, if thats it, this pr should fix it. closes <URL>
goreleaser_goreleaser
train
go
f68a8a5dc0ead77e497f279d1404bacd860fbe17
diff --git a/src/js/core/sticky.js b/src/js/core/sticky.js index <HASH>..<HASH> 100644 --- a/src/js/core/sticky.js +++ b/src/js/core/sticky.js @@ -163,6 +163,9 @@ export default { attr(placeholder, 'hidden', ''); } + // ensure active/inactive classes are applied + this.isActive = this.isActive; + }, events: ['load', 'resize']
fix: ensure active/inactive classes are applied
uikit_uikit
train
js
188ddc419a6f14e5cbb7b1c1600b255efc1cf070
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -17,6 +17,14 @@ var Universe = function () { self._discoveredHubs = hubs self.emit('discoveredHubs', hubs) }) + + self._discover.on('online', function (hub) { + self.emit('hubOnline', hub) + }) + + self._discover.on('offline', function (hub) { + self.emit('hubOffline', hub) + }) self._discover.start() EventEmitter.call(self)
feat(events): Emit hubOnline and hubOffline events When harmonyhubjs-discover emits an online or offline event for a hub, orchestra-jsapi do reemit them now as hubOnline and hubOffline events. The regarding hub object gets sent along with the event.
swissmanu_orchestra-jsapi
train
js
87c132b7882594c7dd469816eb54ba925687417e
diff --git a/attributedict/tests/helper.py b/attributedict/tests/helper.py index <HASH>..<HASH> 100644 --- a/attributedict/tests/helper.py +++ b/attributedict/tests/helper.py @@ -118,9 +118,8 @@ def deepdiff(a, b, exclude_types = None): return DeepDiff(a, b, ignore_order = True, report_repetition = True, exclude_types = exclude_types) def pretty(data): - result = json.dumps(data, default = lambda x: repr(x), indent = 4, sort_keys = True) - result = result.encode('utf-8', 'ignore') - result = highlight(result, lexers.JsonLexer(), formatters.TerminalFormatter()) + result = pprint.pformat(data, indent = 4, depth = None) + result = highlight(result, lexers.PythonLexer(), formatters.TerminalFormatter()) return result
test: use pretty print prettifier instead
grimen_python-attributedict
train
py
9b4bb4003d60cc0482601c511e3c01e689cf8aa3
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -118,9 +118,20 @@ export class DefaultLoader extends Loader { PLATFORM.Loader = DefaultLoader; if (!PLATFORM.global.System || !PLATFORM.global.System.import) { - if (PLATFORM.global.requirejs && requirejs.s && requirejs.s.contexts && requirejs.s.contexts._ && requirejs.s.contexts._.defined) { + if (PLATFORM.global.requirejs) { + let defined; + // Support for requirejs/requirejs + if (typeof PLATFORM.global.requirejs.s === 'object') { + defined = PLATFORM.global.requirejs.s.contexts._.defined; + } + // Support for requirejs/alameda + else if (typeof PLATFORM.global.requirejs.contexts === 'object') { + defined = PLATFORM.global.requirejs.contexts._.defined; + } + else { + throw new Error('Unknown AMD loader'); + } PLATFORM.eachModule = function(callback) { - let defined = requirejs.s.contexts._.defined; for (let key in defined) { try { if (callback(key, defined[key])) return;
feat(loader): Added support for alameda amd loader
aurelia_loader-default
train
js
c4c5df9f1f608230cd12370650605fce3ab1ea20
diff --git a/lib/ditty/services/authentication.rb b/lib/ditty/services/authentication.rb index <HASH>..<HASH> 100644 --- a/lib/ditty/services/authentication.rb +++ b/lib/ditty/services/authentication.rb @@ -5,6 +5,7 @@ require 'ditty/services/logger' require 'omniauth' OmniAuth.config.logger = Ditty::Services::Logger.instance +OmniAuth.config.path_prefix = "#{Ditty::Application.map_path}/auth" OmniAuth.config.on_failure = proc { |env| OmniAuth::FailureEndpoint.new(env).redirect_to_failure } @@ -45,8 +46,6 @@ module Ditty arguments: [ { fields: [:username], - path_prefix: '/_proxes/auth', - callback_path: '/_proxes/auth/identity/callback', model: Ditty::Identity, on_login: Ditty::Auth, on_registration: Ditty::Auth,
fix: Correct omniauth path prefixes
EagerELK_ditty
train
rb
069ff24fd1f4fa601f3f86a090645f7a523eb689
diff --git a/test/core/test_capture.js b/test/core/test_capture.js index <HASH>..<HASH> 100644 --- a/test/core/test_capture.js +++ b/test/core/test_capture.js @@ -29,7 +29,6 @@ test('Capture - headers', (t) => { }); - test('Capture - JSON', (t) => { const fn = path.resolve(__dirname, './scripts/captures.json'); const script = require(fn); @@ -50,6 +49,7 @@ test('Capture - JSON', (t) => { t.assert(cond, 'There should be a 200 for every 201'); if (!cond) { + console.log(report); console.log('200: %s; 201: %s', c200, c201); } t.end(); @@ -100,7 +100,6 @@ test('Capture before test - JSON', (t) => { let expectedAmountRequests = script.config.phases[0].duration * script.config.phases[0].arrivalRate; t.assert(c200 === expectedAmountRequests, 'There should be ' + expectedAmountRequests + ' responses with status code 200; got ' + c200); - t.assert(report.matches === expectedAmountRequests, 'All responses match expectation value'); let c201 = report.codes[201]; t.assert(c201 === undefined, 'There should be no 201 response codes');
fix(test): Matches are deprecated in their current form
artilleryio_artillery
train
js
00556697e9da2498dc9fc0baab99769bdf90a0a8
diff --git a/src/Kunstmaan/FormBundle/AdminList/FormSubmissionAdminListConfigurator.php b/src/Kunstmaan/FormBundle/AdminList/FormSubmissionAdminListConfigurator.php index <HASH>..<HASH> 100644 --- a/src/Kunstmaan/FormBundle/AdminList/FormSubmissionAdminListConfigurator.php +++ b/src/Kunstmaan/FormBundle/AdminList/FormSubmissionAdminListConfigurator.php @@ -41,7 +41,7 @@ class FormSubmissionAdminListConfigurator extends AbstractDoctrineORMAdminListCo { $builder = $this->getFilterBuilder(); $builder->add('created', new DateFilterType("created"), "Date") - ->add('lang', new BooleanFilterType("lang"), "Language") + ->add('lang', new StringFilterType("lang"), "Language") ->add('ipAddress', new StringFilterType("ipAddress"), "IP Address"); }
fix: language is no boolean
Kunstmaan_KunstmaanBundlesCMS
train
php
7c18d708f2450811cc0e62998efb4a677811d2f2
diff --git a/Dispatcher/Action/ActionDispatcher.php b/Dispatcher/Action/ActionDispatcher.php index <HASH>..<HASH> 100644 --- a/Dispatcher/Action/ActionDispatcher.php +++ b/Dispatcher/Action/ActionDispatcher.php @@ -34,11 +34,17 @@ class ActionDispatcher implements ActionDispatcherInterface $success = false; } catch (\Throwable $e) { + $trace = ""; + foreach ($e->getTrace() as $item) { + $trace .= "\n" . $item["file"] . ":" . $item["line"]; + } + $this->logger->critical("\n" . " An error has been catched while dispatching action " . $action->getName() . "\n" . " Action parameters were : " . json_encode($action->getProperties()) . "\n" . " Error message is '" . $e->getMessage() . "'\n" . " It occured on file " . $e->getFile() . " at line " . $e->getLine() . "\n" . + " Trace is : $trace\n" . " Action will be requeued" . "\n" . "=====================================================================================" );
feat(debug): add debug backtrace when an Exception occured on ActionDispatcher
wizbii_pipeline
train
php
42b3c84b6e24e5cb0f8c273ee26677ad733aad57
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 @@ -1289,7 +1289,7 @@ function getResponseBody(options, callback) { callbackHandler(new Error('Timeout')); }; var timer = setTimeout(timeoutHandler, REQUEST_TIMEOUT); - options.agent = config.httpAgent; + options.agent = false; var client = http.get(options, function(res) { res.on('error', callbackHandler); res.setEncoding('utf8');
refactor: Remove the connection pool that requested the plugin
avwo_whistle
train
js
0cd424062ed578ee5c6d603721811ce854acea2e
diff --git a/lib/filter.js b/lib/filter.js index <HASH>..<HASH> 100644 --- a/lib/filter.js +++ b/lib/filter.js @@ -15,13 +15,19 @@ class HumanizePipe { if (!number) return '0'; if (number > -1 && number < 1) return this._stringify(number, precision); - var suffixIndex = Math.floor(Math.log(Math.abs(number)) / Math.log(1000)); - var value = number / Math.pow(1000, suffixIndex); + let suffixIndex = this._suffixIndex(number); + let value = number / Math.pow(1000, suffixIndex); return this._stringify(value, precision) + SUFFIXES[suffixIndex]; } + _suffixIndex(number) { + return Math.floor(Math.log(Math.abs(number)) / Math.log(1000)); + } + + + _stringify(num, precision) { return round(num, precision).toString(); }
refactor(filter): extract suffixIndex method
emartech_humanize
train
js
e886f4eddd8ffd446ae90c731cfc082adb20c1ac
diff --git a/src/helpers.js b/src/helpers.js index <HASH>..<HASH> 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -66,17 +66,6 @@ export function isValidWhere (where) { return [false] } -export function getConflictString (conflict) { - switch (conflict.toLowerCase()) { - case 'fail': return ' or fail ' - case 'abort': return ' or abort ' - case 'ignore': return ' or ignore ' - case 'replace': return ' or replace ' - case 'rollback': return ' or rollback ' - default: return ' ' - } -} - export function runQuery (instance, query, needResponse) { if (util.isFunction(instance.verbose)) { instance.verbose(query.toString())
refactor(helpers): removed unused function `getConflictString()`
citycide_trilogy
train
js
02890d8d9cef9c6deb68973a05d6ef4074924fd8
diff --git a/packages/reactstrap-validation-select/src/AvSelect.js b/packages/reactstrap-validation-select/src/AvSelect.js index <HASH>..<HASH> 100644 --- a/packages/reactstrap-validation-select/src/AvSelect.js +++ b/packages/reactstrap-validation-select/src/AvSelect.js @@ -339,8 +339,8 @@ class AvSelect extends AvBaseInput { boxShadow: 0, colors: { ...theme.colors, - primary25: '#85a8dc', - primary: 'rgb(50 98 175)', + primary25: '#b8d4fb', + primary: '#85a8fc', }, })} options={!attributes.loadOptions ? [...options, ...newOptions] : undefined}
fix(reactstrap-validation-select): added new colors to help with contrast on error
Availity_availity-react
train
js
f80fe70fc735ab73008de7d7602c586e9f92e253
diff --git a/src/Leevel/Database/Ddd/Relation/ManyMany.php b/src/Leevel/Database/Ddd/Relation/ManyMany.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Database/Ddd/Relation/ManyMany.php +++ b/src/Leevel/Database/Ddd/Relation/ManyMany.php @@ -56,14 +56,14 @@ class ManyMany extends Relation * * @var bool */ - protected $middleOnlySoftDeleted = false; + protected bool $middleOnlySoftDeleted = false; /** * 中间表包含软删除的数据. * * @var bool */ - protected $middleWithSoftDeleted = false; + protected bool $middleWithSoftDeleted = false; /** * 中间表查询字段.
refactor(ddd): code poem
hunzhiwange_framework
train
php
112a3e404391781b32f1f8faa7b06992c0f68546
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 @@ -373,7 +373,10 @@ function InterimElementProvider() { return reason; }); - return interim.deferred.promise; + // Since Angular 1.6.7, promises will be logged to $exceptionHandler when the promise + // is not handling the rejection. We create a pseudo catch handler, which will prevent the + // promise from being logged to the $exceptionHandler. + return interim.deferred.promise.catch(angular.noop); } /*
fix(interimElement): prevent unhandled rejection error in $exceptionHandler. Since Angular <I>, promises will be logged to $exceptionHandler when the promise is not handling the rejection. We create a pseudo catch handler, which will prevent the promise from being logged to the $exceptionHandler. See <URL>
angular_material
train
js
4f3547c9fea80c0f91b4f88b77ad14e3af2e2a4e
diff --git a/lib/locators.js b/lib/locators.js index <HASH>..<HASH> 100644 --- a/lib/locators.js +++ b/lib/locators.js @@ -78,12 +78,12 @@ ProtractorBy.prototype.addLocator = function(name, script) { }; /** - * Find an element by binding. Does a partial match, so any elements bound to - * variables containing the input string will be returned. + * Find an element by text binding. Does a partial match, so any elements bound + * to variables containing the input string will be returned. * - * Note: For AngularJS version 1.2, the interpolation brackets, usually {{}}, - * are allowed in the binding description string. For Angular version 1.3, they - * are not allowed, and no elements will be found if they are used. + * Note: For AngularJS version 1.2, the interpolation brackets, (usually {{}}), + * are optionally allowed in the binding description string. For Angular version + * 1.3+, they are not allowed, and no elements will be found if they are used. * * @view * <span>{{person.name}}</span>
docs(locators): clarify by.binding description Closes #<I>
angular_protractor
train
js
3b968e7dde37f906cd67683ba90197b64df54e31
diff --git a/internal/service/ec2/launch_template.go b/internal/service/ec2/launch_template.go index <HASH>..<HASH> 100644 --- a/internal/service/ec2/launch_template.go +++ b/internal/service/ec2/launch_template.go @@ -531,7 +531,7 @@ func ResourceLaunchTemplate() *schema.Resource { Optional: true, Elem: &schema.Schema{ Type: schema.TypeString, - ValidateFunc: validation.IsIPv4Address, + ValidateFunc: verify.ValidIPv4CIDRNetworkAddress, }, }, "ipv4_prefix_count": { @@ -543,7 +543,7 @@ func ResourceLaunchTemplate() *schema.Resource { Optional: true, Elem: &schema.Schema{ Type: schema.TypeString, - ValidateFunc: validation.IsIPv6Address, + ValidateFunc: verify.ValidIPv6CIDRNetworkAddress, }, }, "ipv6_prefix_count": {
fix: validation function should check for CIDR range
terraform-providers_terraform-provider-aws
train
go
daab48adfbaf52f03cf76268d5395cbcf5649e73
diff --git a/src/platforms/mp/compiler/codegen/compile-to-template.js b/src/platforms/mp/compiler/codegen/compile-to-template.js index <HASH>..<HASH> 100644 --- a/src/platforms/mp/compiler/codegen/compile-to-template.js +++ b/src/platforms/mp/compiler/codegen/compile-to-template.js @@ -220,7 +220,7 @@ export class TemplateGenerator { return null } - if (!ifHolder && ast[0].ifConditions) { + if (ast.length === 1 && !ifHolder && ast[0].ifConditions) { ifHolder = this.genIfHolderForSlotSnippets(ast[0].ifConditions) }
fix: lost other ele in slot snippet
kaola-fed_megalo
train
js
64a758310a82faaa5557a936759703962c94aad5
diff --git a/src/Leevel/Database/Ddd/Entity.php b/src/Leevel/Database/Ddd/Entity.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Database/Ddd/Entity.php +++ b/src/Leevel/Database/Ddd/Entity.php @@ -1005,14 +1005,19 @@ abstract class Entity implements IArray, IJson, JsonSerializable, ArrayAccess return $this->softDelete(); } - $this->flush = function ($condition) { + $condition = $this->idCondition(false); + if ($this->condition) { + $condition = array_merge($this->condition, $condition); + } + + $this->flush = function (array $condition) { $this->handleEvent(static::BEFORE_DELETE_EVENT, $condition); $num = static::meta()->delete($condition); $this->handleEvent(static::AFTER_DELETE_EVENT); return $num; }; - $this->flushData = [$this->idCondition(false)]; + $this->flushData = [$condition]; return $this; } @@ -2030,7 +2035,7 @@ abstract class Entity implements IArray, IJson, JsonSerializable, ArrayAccess } if ($this->condition) { - $condition = array_merge($condition, $this->condition); + $condition = array_merge($this->condition, $condition); } $hasVersion = $this->parseVersionData($condition, $saveData);
refactor(ddd): add condition() for entity delete
hunzhiwange_framework
train
php
851f380eb10d23ffd08e8b845aed4039abbcd03b
diff --git a/packages/discord.js/src/util/Util.js b/packages/discord.js/src/util/Util.js index <HASH>..<HASH> 100644 --- a/packages/discord.js/src/util/Util.js +++ b/packages/discord.js/src/util/Util.js @@ -189,7 +189,7 @@ class Util extends null { * @returns {string} */ static escapeInlineCode(text) { - return text.replace(/(?<=^|[^`])`(?=[^`]|$)/g, '\\`'); + return text.replaceAll('`', '\\`'); } /**
fix(Util): escapeInlineCode properly (#<I>)
discordjs_discord.js
train
js
ffa44ff1c1b609d8fad812026ac1eb7e4aa49772
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -55,6 +55,17 @@ test('should handle results correctly', function (done) { }) }) +test('should get buffer result as third argument in callback', function (done) { + var stream = spawn('echo', ['foo bar baz qux']) + captureSpawn(stream, function (err, res, buf) { + test.ifError(err) + test.strictEqual(res, 'foo bar baz qux\n') + test.strictEqual(isBuffer(buf), true) + test.strictEqual(buf.toString(), 'foo bar baz qux\n') + done() + }) +}) + test('should get empty string result if `stdio: inherit`', function (done) { var stream = spawn('echo', ['hello world foo'], {stdio: 'inherit'}) captureSpawn(stream, function (err, res) { @@ -74,3 +85,4 @@ test('should handle errors when `stdio: inherit`', function (done) { done() }) }) +
test: should have access to success result buffer
tunnckoCore_capture-spawn
train
js
19226b2c3f91ecef8c25509c11ce185e5121a95d
diff --git a/lib/dashboard/public/elements/ncg-sound-cue.js b/lib/dashboard/public/elements/ncg-sound-cue.js index <HASH>..<HASH> 100644 --- a/lib/dashboard/public/elements/ncg-sound-cue.js +++ b/lib/dashboard/public/elements/ncg-sound-cue.js @@ -70,16 +70,18 @@ } // Add options for each uploaded sound file. - soundFiles.forEach(function (f, index) { - var option = document.createElement('option'); - option.value = f.base; - option.innerText = f.base; - option.replicantIndex = index; - if (this.file && f.base === this.file.base) { - option.setAttribute('selected', true); - } - this.$.select.add(option); - }.bind(this)); + if(soundFiles instanceof Array) { + soundFiles.forEach(function (f, index) { + var option = document.createElement('option'); + option.value = f.base; + option.innerText = f.base; + option.replicantIndex = index; + if (this.file && f.base === this.file.base) { + option.setAttribute('selected', true); + } + this.$.select.add(option); + }.bind(this)); + } }, _retargetFile() {
fix(sounds): fix error when soundFiles is null during option generation for Mixer panel
nodecg_nodecg
train
js
c6764e22b9afdee0d81f4767bb9d972ff586de7c
diff --git a/packages/@vuepress/core/lib/plugin-api/override/EnhanceAppFilesOption.js b/packages/@vuepress/core/lib/plugin-api/override/EnhanceAppFilesOption.js index <HASH>..<HASH> 100644 --- a/packages/@vuepress/core/lib/plugin-api/override/EnhanceAppFilesOption.js +++ b/packages/@vuepress/core/lib/plugin-api/override/EnhanceAppFilesOption.js @@ -66,7 +66,7 @@ module.exports = class EnhanceAppFilesOption extends AsyncOption { ) } } else { - logger.debug( + logger.developer( chalk.gray(`[${pluginName}] `) + `${chalk.cyan(enhanceAppFile)} Not Found.` )
chore: falling-off a debug log
vuejs_vuepress
train
js
fcaae03b2b85ee4d724690077fee2c17e2b904d7
diff --git a/natural-compare.js b/natural-compare.js index <HASH>..<HASH> 100644 --- a/natural-compare.js +++ b/natural-compare.js @@ -61,7 +61,7 @@ function naturalCompare(a, b, opts) { } var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length - if (difference) { + if (difference !== 0) { return difference; } @@ -94,12 +94,12 @@ function naturalCompare(a, b, opts) { ++bIndex; } - if (aIndex >= lengthA && bIndex < lengthB && lengthA >= lengthB) { - return -1; + if (aIndex < lengthA) { // `b` is a substring of `a` + return 1; } - if (bIndex >= lengthB && aIndex < lengthA && lengthB >= lengthA) { - return 1; + if (bIndex < lengthB) { // `a` is a substring of `b` + return -1; } return lengthA - lengthB;
refactor: Simplify if statements that handle leading zeros
nwoltman_string-natural-compare
train
js
87de827af634f169c565326a216da045176dfc8f
diff --git a/src/React/Widgets/GitTreeWidget/index.js b/src/React/Widgets/GitTreeWidget/index.js index <HASH>..<HASH> 100644 --- a/src/React/Widgets/GitTreeWidget/index.js +++ b/src/React/Widgets/GitTreeWidget/index.js @@ -86,7 +86,7 @@ function extractBranchesAndForks(model, leaf) { } // Do we really have a new branch? - if (branch.to !== branch.y) { + if (typeof branch.to !== 'undefined' && branch.to !== branch.y) { branches.push(branch); }
fix(Widgets): Guard against undefined 'to' property A single node with without a 'to' property was being treated as a branch, which was then causing a NAN error when rendering a SVG path.
Kitware_paraviewweb
train
js
47323d7200e32b6b2dce09fd407f0ec57e3fc66d
diff --git a/ui/src/components/tree/QTree.js b/ui/src/components/tree/QTree.js index <HASH>..<HASH> 100644 --- a/ui/src/components/tree/QTree.js +++ b/ui/src/components/tree/QTree.js @@ -159,7 +159,7 @@ export default defineComponent({ parent, isParent, isLeaf, - localLazy, + lazy: localLazy, disabled: node.disabled, link: node.disabled !== true && (selectable === true || (expandable === true && (isParent === true || localLazy === true))), children: [], @@ -329,7 +329,7 @@ export default defineComponent({ lazy.value[ key ] = 'loaded' node[ props.childrenKey ] = Array.isArray(children) === true ? children : [] nextTick(() => { - const localMeta = m.value[ key ] + const localMeta = meta.value[ key ] if (localMeta && localMeta.isParent === true) { localSetExpanded(key, true) }
fix(QTree): fix lazy-loading #<I> (#<I>)
quasarframework_quasar
train
js
41c0dd44eb53c8048c40e9ab5be5530d6330fb81
diff --git a/src/util/BitField.js b/src/util/BitField.js index <HASH>..<HASH> 100644 --- a/src/util/BitField.js +++ b/src/util/BitField.js @@ -146,7 +146,7 @@ class BitField { if (typeof bit === 'number' && bit >= 0) return bit; if (bit instanceof BitField) return bit.bitfield; if (Array.isArray(bit)) return bit.map(p => this.resolve(p)).reduce((prev, p) => prev | p, 0); - if (typeof bit === 'string') return this.FLAGS[bit]; + if (typeof bit === 'string' && typeof this.FLAGS[bit] !== 'undefined') return this.FLAGS[bit]; throw new RangeError('BITFIELD_INVALID'); } }
fix(BitField): throw when resolving invalid string constant Checked to see if the permission actually exists.
discordjs_discord.js
train
js
07c3831e429ec9e19decae7b699e4282c143ace0
diff --git a/lib/webpack.config.default.js b/lib/webpack.config.default.js index <HASH>..<HASH> 100644 --- a/lib/webpack.config.default.js +++ b/lib/webpack.config.default.js @@ -88,6 +88,19 @@ module.exports = function (options) { path.join(cwd, 'node_modules') ] }, - plugins: [] + plugins: [], + + stats: { + colors: true, // `webpack --colors` 等同于 + hash: true, // 增加编译的哈希值 + version: false, // webpack版本信息 + timings: true, // 增加时间信息 + assets: true, // 增加资源信息 + chunks: true, // 增加包信息(设置为 `false` 能允许较少的冗长输出) + modules: true, // 增加内置的模块信息 + errorDetails: true, // 增加错误的详细信息(就像解析日志一样) + warnings: true, // 增加提示 + publicPath: true // 增加 publicPath 的信息 + } } };
refactor: support print state log from webpack config
zuzucheFE_guido
train
js
2d2bb422b86ae14ef99db81568426ec95b565fb9
diff --git a/jobs/github-event/marketplace_purchase/cancelled.js b/jobs/github-event/marketplace_purchase/cancelled.js index <HASH>..<HASH> 100644 --- a/jobs/github-event/marketplace_purchase/cancelled.js +++ b/jobs/github-event/marketplace_purchase/cancelled.js @@ -1,11 +1,24 @@ +const Log = require('gk-log') + const dbs = require('../../../lib/dbs') const upsert = require('../../../lib/upsert') module.exports = async function ({ marketplace_purchase }) { - const { payments } = await dbs() + const { payments, logs } = await dbs() + const log = Log({ + logsDb: logs, + accountId: marketplace_purchase.account.id, + repoSlug: null, + context: 'marketplace-purchase-cancelled' + }) + log.info('started', { marketplace_purchase }) const accountId = String(marketplace_purchase.account.id) - await upsert(payments, accountId, { - plan: 'free' - }) + try { + await upsert(payments, accountId, { plan: 'free' }) + log.success('database: paymentDoc was updated', { plan: 'free' }) + } catch (error) { + log.error('error', { error }) + throw error + } }
feat(marketplace-purchase-cancelled): add logging
greenkeeperio_greenkeeper
train
js
9676e2a6b1592bc4a7f4aaa9bd39b2c9501c795e
diff --git a/utils/fastclick/fastclick.js b/utils/fastclick/fastclick.js index <HASH>..<HASH> 100644 --- a/utils/fastclick/fastclick.js +++ b/utils/fastclick/fastclick.js @@ -313,7 +313,7 @@ /** - * @param {EventTarget} targetElement + * @param {EventTarget} eventTarget * @returns {Element|EventTarget} */ FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
chore(utils): fix JSDoc comment mismatch (#<I>)
quasarframework_quasar
train
js
df58d6a4568d68505ad71c38d3c2168ffe37c19b
diff --git a/src/Daemon/Service.php b/src/Daemon/Service.php index <HASH>..<HASH> 100644 --- a/src/Daemon/Service.php +++ b/src/Daemon/Service.php @@ -68,6 +68,7 @@ class Service } // @codeCoverageIgnoreEnd + defined('PHWOOLCON_SERVICE_MODE') or define('PHWOOLCON_SERVICE_MODE', true); foreach ($_SERVER as $k => $v) { substr($k, 0, 10) == 'PHWOOLCON_' and $this->environmentVariables[$k] = $v; }
feat(service): add constant PHWOOLCON_SERVICE_MODE if service mode is on
phwoolcon_phwoolcon
train
php
b44b7ffd1e2c36879523d3b2ef1ad040d66865b7
diff --git a/src/notebook/epics/github-publish.js b/src/notebook/epics/github-publish.js index <HASH>..<HASH> 100644 --- a/src/notebook/epics/github-publish.js +++ b/src/notebook/epics/github-publish.js @@ -166,6 +166,6 @@ export function handleGistAction(action) { */ export const publishEpic = (action$, store) => action$.ofType(PUBLISH_USER_GIST, PUBLISH_ANONYMOUS_GIST) - .switchMap((action) => handleGistAction(action)) + .mergeMap((action) => handleGistAction(action)) .catch(handleGistError) .retry(1); 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 @@ -30,6 +30,7 @@ import { publishEpic } from '../../../src/notebook/epics/github-publish'; + describe('handleGistAction', () => { it('returns an observable from User Action', () => { const publishUserAction = { type: 'PUBLISH_USER_GIST' }
chore(publish): Revert to mergemap
nteract_nteract
train
js,js
ea35340e3cd0a6cbbc4acb86a366cf1ee83ac961
diff --git a/lib/thinking_sphinx/railtie.rb b/lib/thinking_sphinx/railtie.rb index <HASH>..<HASH> 100644 --- a/lib/thinking_sphinx/railtie.rb +++ b/lib/thinking_sphinx/railtie.rb @@ -5,12 +5,12 @@ class ThinkingSphinx::Railtie < Rails::Railtie ThinkingSphinx::Configuration.reset end - initializer 'thinking_sphinx.initialisation' do - ActiveSupport.on_load(:active_record) do - require 'thinking_sphinx/active_record' - ActiveRecord::Base.include ThinkingSphinx::ActiveRecord::Base - end + config.after_initialize do + require 'thinking_sphinx/active_record' + ActiveRecord::Base.include ThinkingSphinx::ActiveRecord::Base + end + initializer 'thinking_sphinx.initialisation' do if ActiveSupport::VERSION::MAJOR > 5 if Rails.application.config.autoloader == :zeitwerk ActiveSupport::Dependencies.autoload_paths.delete(
fix: load ActiveRecord component after Rails init This isn't quite as neat as ea8bc<I>ef<I>ae<I>e<I>fa<I>c<I>a8 (as I like the idea of waiting until ActiveRecord is loaded by Rails itself), but it seems Rake tasks don't always load ActiveRecord, and so we end up in a situation where indices are being loaded without TS's ActiveRecord components being available (see <URL>
pat_thinking-sphinx
train
rb
c45cfcb622365bf9b288f52fa2e56874e3354a41
diff --git a/system/HTTP/ContentSecurityPolicy.php b/system/HTTP/ContentSecurityPolicy.php index <HASH>..<HASH> 100644 --- a/system/HTTP/ContentSecurityPolicy.php +++ b/system/HTTP/ContentSecurityPolicy.php @@ -651,21 +651,25 @@ class ContentSecurityPolicy // Replace style placeholders with nonces $body = preg_replace_callback('/{csp-style-nonce}/', function () { - $nonce = bin2hex(random_bytes(12)); - - $this->styleSrc[] = 'nonce-' . $nonce; + $nonce = $this->getStyleNonce(); return "nonce=\"{$nonce}\""; - }, $body); + }, $body, -1, $count); + + if ($count > 0) { + $this->styleSrc[] = 'nonce-' . $this->styleNonce; + } // Replace script placeholders with nonces $body = preg_replace_callback('/{csp-script-nonce}/', function () { - $nonce = bin2hex(random_bytes(12)); - - $this->scriptSrc[] = 'nonce-' . $nonce; + $nonce = $this->getScriptNonce(); return "nonce=\"{$nonce}\""; - }, $body); + }, $body, -1, $count); + + if ($count > 0) { + $this->scriptSrc[] = 'nonce-' . $this->scriptNonce; + } $response->setBody($body); }
refactor: output only one nonce Outputting multiple nonces do not improve security. One is enough.
codeigniter4_CodeIgniter4
train
php
e3c8cfd6e683017c6963f37fa905060ed6f548be
diff --git a/lago/sdk.py b/lago/sdk.py index <HASH>..<HASH> 100644 --- a/lago/sdk.py +++ b/lago/sdk.py @@ -39,8 +39,9 @@ def init(config, workdir=None, **kwargs): class SDK(object): """ The SDK can be initialized in 2 ways: - 1. (Preferred) - by calling :func:`sdk.init`. - 2. By passing already created workdir and prefix objects. + + 1. (Preferred) - by calling :func:`sdk.init`. + 2. By passing already created workdir and prefix objects. """ def __init__(self, workdir, prefix):
docs: minor docstring/sphinx formatting fix
lago-project_lago
train
py
eeb46e8304433fc5d17f2168e7d81e5eaa01cd39
diff --git a/packages/brightcove-video/brightcove-video.stories.js b/packages/brightcove-video/brightcove-video.stories.js index <HASH>..<HASH> 100644 --- a/packages/brightcove-video/brightcove-video.stories.js +++ b/packages/brightcove-video/brightcove-video.stories.js @@ -121,7 +121,7 @@ storiesOf("BrightcoveVideo", module) width={320} height={200} policyKey={policyKey} - poster={{ uri: "http://i.imgur.com/Pb5osPZ.jpg" }} + poster={{ uri: posterImageURI }} videoId="1532562858001" accountId={accountId} />
fix: storybook brightcove-video poster image uri (#<I>)
newsuk_times-components
train
js
8ed6c43f8195bc2a1d0dc016fe7554e8415472d3
diff --git a/webpack.config.js b/webpack.config.js index <HASH>..<HASH> 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,9 +1,10 @@ var webpack = require('webpack') +var path = require('path') module.exports = { context: __dirname, entry: './browser', output: { - path: __dirname + '/browser-dist', + path: path.join(__dirname, '/browser-dist'), filename: 'contentful.js', library: 'contentful' },
fix: Fix webpack config path usage
contentful_contentful.js
train
js
a1423ea53f67ddaa05bece5763e9d241708f8fef
diff --git a/packages/my-joy-beta/src/containers/create-instance/networks.js b/packages/my-joy-beta/src/containers/create-instance/networks.js index <HASH>..<HASH> 100644 --- a/packages/my-joy-beta/src/containers/create-instance/networks.js +++ b/packages/my-joy-beta/src/containers/create-instance/networks.js @@ -152,8 +152,7 @@ export default compose( ), id }; - }) - .sort((_, b) => b.selected); + }); return { proceeded: get(values, 'create-instance-networks-proceeded', false),
fix(my-joy-beta): don't sort networks by selected
yldio_joyent-portal
train
js
18ee4f77be15cc1a6bb8b612d0caabb5ab113258
diff --git a/src/components/DisplayInput.js b/src/components/DisplayInput.js index <HASH>..<HASH> 100644 --- a/src/components/DisplayInput.js +++ b/src/components/DisplayInput.js @@ -107,6 +107,7 @@ class DisplayInput extends React.Component { {...rest} aria-disabled={disabled} aria-labelledby={this.props.label ? this._labelId : null} + disabled={disabled} id={this._inputId} key='input' onChange={disabled ? null : onChange}
feat: added disabled to Display Input component (#<I>)
mxenabled_mx-react-components
train
js
660c7be7931581ecac9bc5df30e58554aa1eef30
diff --git a/src/WsServer.js b/src/WsServer.js index <HASH>..<HASH> 100644 --- a/src/WsServer.js +++ b/src/WsServer.js @@ -88,7 +88,7 @@ export default class WsServer { close (cb) { if (this.server !== null) { - console.log('Server has stopped successfully') + log.info('Server has stopped successfully') this.server.close(cb) this.peers.complete() }
chore(log): change remaining console.log into log.info Closes #<I>
coast-team_sigver
train
js
a6f7b7a74853251b8627002f5da43b2179931c6c
diff --git a/client/store.js b/client/store.js index <HASH>..<HASH> 100644 --- a/client/store.js +++ b/client/store.js @@ -36,6 +36,15 @@ networkInterface.use([ } ]) +networkInterface.useAfter([{ + applyAfterware ({ response }, next) { + if (response.status === 401) { + logout() + } + next() + } +}]) + export const client = (options = {}) => new ApolloClient({ ssrMode: true,
fix(graphql): redirect to login on unauthorized
nossas_bonde-client
train
js
e15bc30d569bdad01e0fa7d77fedea36d899f4e5
diff --git a/lib/https/index.js b/lib/https/index.js index <HASH>..<HASH> 100644 --- a/lib/https/index.js +++ b/lib/https/index.js @@ -485,7 +485,7 @@ function resolveWebsocket(socket, wss) { } else { var clientId = headers[config.CLIENT_ID_HEADER]; if (clientId) { - if (util.isEnable(socket, 'keepClientId')) { + if (!util.isEnable(socket, 'keepClientId')) { util.removeClientId(headers); } data.clientId = clientId; diff --git a/lib/inspectors/res.js b/lib/inspectors/res.js index <HASH>..<HASH> 100644 --- a/lib/inspectors/res.js +++ b/lib/inspectors/res.js @@ -523,7 +523,7 @@ module.exports = function(req, res, next) { } else { var clientId = optHeaders[config.CLIENT_ID_HEADER]; if (clientId) { - if (util.isEnable(req, 'keepClientId')) { + if (!util.isEnable(req, 'keepClientId')) { util.removeClientId(optHeaders); } req.setClientId && req.setClientId(clientId);
feat: eanble://keepClientId
avwo_whistle
train
js,js
13051079ab9e51053daf05b2914b331cde7c2207
diff --git a/lib/commands/login/console.js b/lib/commands/login/console.js index <HASH>..<HASH> 100644 --- a/lib/commands/login/console.js +++ b/lib/commands/login/console.js @@ -15,7 +15,7 @@ module.exports = async () => { }, }); log.notice(); - log.notice.success("You are now logged into the Serverless Console'"); + log.notice.success('You are now logged into the Serverless Console'); log.notice(); log.notice('Learn more at https://www.serverless.com/console/docs'); };
refactor(Console): Fix typo in user message
serverless_serverless
train
js
eacd7e44687acfd8fb0779fd62bc22c4dbe6cfd7
diff --git a/packages/cozy-client/src/authentication/mobile.native.js b/packages/cozy-client/src/authentication/mobile.native.js index <HASH>..<HASH> 100644 --- a/packages/cozy-client/src/authentication/mobile.native.js +++ b/packages/cozy-client/src/authentication/mobile.native.js @@ -29,6 +29,7 @@ export const authenticateWithReactNativeInAppBrowser = async url => { enableUrlBarHiding: true, enableDefaultShare: true, forceCloseOnRedirection: false, + showInRecents: true, // Specify full animation resource identifier(package:anim/name) // or only resource name(in case of animation bundled with app). animations: {
fix: Persist native inapp browser when sending application in background
cozy_cozy-client
train
js
1e3168fe6a3a76496397dd58de5efc35797d7fc6
diff --git a/test/build-test.js b/test/build-test.js index <HASH>..<HASH> 100644 --- a/test/build-test.js +++ b/test/build-test.js @@ -1,3 +1,4 @@ +/*global expect, it, beforeEach, afterEach */ 'use strict'; @@ -47,11 +48,11 @@ afterEach(function() { }); describe('build', function() { - it('should create create a home page from first pages card', function() { + it('should create a home page from first pages card', function() { // ... }); - it('should create single pages for all pages cards', function() { + it('should create pages', function() { // ... });
test: Clean up some test declarations and jshint locals
stellojs_stello-tpl-starter
train
js
1dfa2838ed2dab90c68fbfdef3f8df6e71a1a8ec
diff --git a/webapps/camunda-commons-ui/lib/pages/index.js b/webapps/camunda-commons-ui/lib/pages/index.js index <HASH>..<HASH> 100644 --- a/webapps/camunda-commons-ui/lib/pages/index.js +++ b/webapps/camunda-commons-ui/lib/pages/index.js @@ -62,6 +62,13 @@ var ResponseErrorHandlerInitializer = [ function handleHttpError(event, error) { var status = error.status, data = error.data; + + // avoid displaying any error message when performing a request against /camunda-welcome + // since the get request against it is only necessary to determine if deployed + const config = error.response.config; + if (config.method === 'GET' && config.url === '/camunda-welcome') { + return; + } switch (status) { case 500:
fix(webapps): avoid showing an error for `GET /camunda-welcome` related to CAM-<I>, closes #<I>
camunda_camunda-bpm-platform
train
js
11068aa908af29c8e3c0057b2b02b02020842030
diff --git a/lib/config/config-loader.js b/lib/config/config-loader.js index <HASH>..<HASH> 100644 --- a/lib/config/config-loader.js +++ b/lib/config/config-loader.js @@ -16,7 +16,7 @@ function load(configFilePath) { if (isConfigModule(configFilePath)) { // config as a module - shared config // FIXME: not tested function - return require(tryResolve.relative(configFilePath)) + return require(tryResolve(configFilePath)) } else { // auto or specify config file var config = configFilePath ? {config: configFilePath} : null; diff --git a/lib/textlint-engine.js b/lib/textlint-engine.js index <HASH>..<HASH> 100644 --- a/lib/textlint-engine.js +++ b/lib/textlint-engine.js @@ -68,7 +68,7 @@ TextLintEngine.prototype.setupRules = function (config) { if (ruleManager.isDefinedRule(ruleName)) { return; } - var pkgPath = tryResolve.relative("textlint-rule-" + ruleName) || tryResolve.relative(ruleName); + var pkgPath = tryResolve("textlint-rule-" + ruleName) || tryResolve(ruleName); if (pkgPath) { debug("Loading rules from %s", pkgPath); var plugin = require(pkgPath);
fix(config): support for requiring global installed rule use `tryResolve` instead of `tryResolve.relative` `tryResolve.relative` don't load global installed module.
textlint_textlint
train
js,js
493239fc633015ed8cda59bb62432e7eacbe7ddf
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -24,6 +24,7 @@ function getSizeFromBreakpoint(breakpointValue: number | string, breakpoints = { return breakpointValue; } else { console.error('styled-media-query: No valid breakpoint or size specified for media.'); + return '0'; } }
fix: Return zero from getSize
morajabi_styled-media-query
train
js
6dd16a198b6a1c557fdce3e90c2887a3a8ec0ed4
diff --git a/src/resolvers/createMany.js b/src/resolvers/createMany.js index <HASH>..<HASH> 100644 --- a/src/resolvers/createMany.js +++ b/src/resolvers/createMany.js @@ -61,7 +61,7 @@ export default function createMany( args: { records: { type: new graphql.GraphQLNonNull( - graphql.GraphQLList( + new graphql.GraphQLList( (recordHelperArgs(tc, { recordTypeName: `CreateMany${tc.getTypeName()}Input`, removeFields: ['id', '_id'],
fix: createMany exception (#<I>)
graphql-compose_graphql-compose-mongoose
train
js
32a4295d4c4e92a8dfb1a2799ddb9fae0df3ed3a
diff --git a/ui/src/mixins/virtual-scroll.js b/ui/src/mixins/virtual-scroll.js index <HASH>..<HASH> 100644 --- a/ui/src/mixins/virtual-scroll.js +++ b/ui/src/mixins/virtual-scroll.js @@ -54,12 +54,16 @@ function getScrollDetails ( if (beforeRef !== void 0) { for (let el = beforeRef.previousElementSibling; el !== null; el = el.previousElementSibling) { - details.offsetStart += el[propElSize] + if (el.classList.contains('q-virtual-scroll--skip') === false) { + details.offsetStart += el[propElSize] + } } } if (afterRef !== void 0) { for (let el = afterRef.nextElementSibling; el !== null; el = el.nextElementSibling) { - details.offsetEnd += el[propElSize] + if (el.classList.contains('q-virtual-scroll--skip') === false) { + details.offsetEnd += el[propElSize] + } } }
fix(VirtualScroll): skip processing size of elements with .q-virtual-scroll--skip in before and after slots #<I> (#<I>)
quasarframework_quasar
train
js
cc05c65a62293c8b8f1d7b356020d09afa468f78
diff --git a/quasar/icon-set/themify.js b/quasar/icon-set/themify.js index <HASH>..<HASH> 100644 --- a/quasar/icon-set/themify.js +++ b/quasar/icon-set/themify.js @@ -96,7 +96,9 @@ export default { }, tabs: { left: 'ti-angle-left', - right: 'ti-angle-right' + right: 'ti-angle-right', + up: 'ti-angle-up', + down: 'ti-angle-down' }, table: { arrowUp: 'ti-arrow-up',
feat(QTabs): add themify up/down arrow icons to Icon Set
quasarframework_quasar
train
js
1c893fba1b14a7f48a417ef5088e6cb5d1a88b27
diff --git a/fiobank.py b/fiobank.py index <HASH>..<HASH> 100644 --- a/fiobank.py +++ b/fiobank.py @@ -33,6 +33,14 @@ def sanitize_value(value, convert=None): return value +class ThrottlingError(Exception): + """ + Throttling error raised when api is being used too fast. + """ + def __str__(self): + return 'Token should be used only once per 30s.' + + class FioBank(object): base_url = 'https://www.fio.cz/ib_api/rest/'
style: Polish according to pep8
honzajavorek_fiobank
train
py
a4f99bd4d4050cc6e4104f4c21756e5e5b3d2633
diff --git a/lib/app_info/parser/dsym.rb b/lib/app_info/parser/dsym.rb index <HASH>..<HASH> 100644 --- a/lib/app_info/parser/dsym.rb +++ b/lib/app_info/parser/dsym.rb @@ -44,7 +44,7 @@ module AppInfo def app_path unless @app_path path = File.join(contents, 'Contents', 'Resources', 'DWARF') - name = Dir.children(path).first + name = Dir.entries(path).last @app_path = File.join(path, name) end
fix: make works under Ruby <I>/<I>
icyleaf_app_info
train
rb
0079de62793efa574c7710bdbe42a88b087c241d
diff --git a/packages/form-upload/Upload.js b/packages/form-upload/Upload.js index <HASH>..<HASH> 100644 --- a/packages/form-upload/Upload.js +++ b/packages/form-upload/Upload.js @@ -117,13 +117,15 @@ const Upload = ({ onDrop={onDrop} multiple={multiple} maxSize={maxSize} - className="file-drop" - activeClassName="file-drop-active" accept={allowedFileTypes} > - {({ getRootProps, getInputProps }) => ( + {({ getRootProps, getInputProps, isDragActive }) => ( <section> - <div {...getRootProps()}> + <div {...getRootProps({ + className: isDragActive + ? 'file-drop-active' + : 'file-drop', + })}> <input data-testid="file-picker" {...getInputProps()} /> <p> <strong>Drag and Drop</strong>
refactor(form-upload): replace deprecated className and activeClassName props
Availity_availity-react
train
js
466ae800fb4bac182e12a7bae3cc247ce9664996
diff --git a/src/Leevel/Manager/Manager.php b/src/Leevel/Manager/Manager.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Manager/Manager.php +++ b/src/Leevel/Manager/Manager.php @@ -251,7 +251,7 @@ abstract class Manager */ protected function filterCommonOption(array $options): array { - foreach ($this->defaultCommonOption() as $item) { + foreach ($this->getDefaultCommonOption() as $item) { if (isset($options[$item])) { unset($options[$item]); } @@ -263,7 +263,7 @@ abstract class Manager /** * 过滤全局配置项. */ - protected function defaultCommonOption(): array + protected function getDefaultCommonOption(): array { return ['default', 'connect']; }
refactor(manager): method defaultCommonOption changed to getDefaultCommonOption
hunzhiwange_framework
train
php
8f7d3819f7fcb4c58f6407fedfe9724be1273427
diff --git a/packages/www/webpack.client.config.js b/packages/www/webpack.client.config.js index <HASH>..<HASH> 100644 --- a/packages/www/webpack.client.config.js +++ b/packages/www/webpack.client.config.js @@ -37,7 +37,9 @@ module.exports = webpackBaseConfig({ manifestTransforms: [ originalManifest => { const manifest = originalManifest.map(entry => { - entry.url = `${config.get("www.assetUrl")}/${entry.url}`; + if (!entry.url.match(/\.html?$/)) { + entry.url = `${config.get("www.assetUrl")}/${entry.url}`; + } return entry; }); return {manifest};
fix(www): Precache `html` files correctly. Ugh. Another hack to work around the deployment strategy for github-pages. Maybe I just copy the README and package.json to `/docs` and push that directory? Gross af though – we'd be accepting that having folders is too hard, the wrong idea.
randytarampi_me
train
js
c00ea92473ba50371ba93a4af7759d9bde8339c6
diff --git a/src/module/restmod.js b/src/module/restmod.js index <HASH>..<HASH> 100644 --- a/src/module/restmod.js +++ b/src/module/restmod.js @@ -843,9 +843,7 @@ angular.module('plRestmod').provider('$restmod', function() { * @return {Model} model instance */ $build: function(_init) { - var obj = this.$new(); - angular.extend(obj, _init); - return obj; + return this.$new().$extend(_init); }, /**
feat(core): makes $build use $extend. BREAKING CHANGE: $build no longer copies properties that start with $. To migrate existing calls that need to copy properties that start with $ use angular.extend(Model.$new(), init_data) instead.
platanus_angular-restmod
train
js
1d6c0ca13d207311d5030e8f983224f9e81fbf0c
diff --git a/tests/test_xtuml/test_relate.py b/tests/test_xtuml/test_relate.py index <HASH>..<HASH> 100644 --- a/tests/test_xtuml/test_relate.py +++ b/tests/test_xtuml/test_relate.py @@ -34,6 +34,7 @@ class TestRelateUnrelate(unittest.TestCase): s_edt = self.m.new('S_EDT') s_dt = self.m.new('S_DT') pe_pe = self.m.new('PE_PE') + self.assertFalse(xtuml.navigate_one(s_dt).S_EDT[17]()) self.assertTrue(xtuml.relate(s_dt, pe_pe, 8001)) self.assertTrue(xtuml.relate(s_dt, s_edt, 17)) self.assertEqual(s_edt, xtuml.navigate_one(s_dt).S_EDT[17]())
test: improve preconditions of test_relate
xtuml_pyxtuml
train
py
373cde921b35229788a101513d3d8332e191476e
diff --git a/js-given/src/generateJGivenReport.js b/js-given/src/generateJGivenReport.js index <HASH>..<HASH> 100644 --- a/js-given/src/generateJGivenReport.js +++ b/js-given/src/generateJGivenReport.js @@ -13,8 +13,6 @@ import type {ReportModel} from './jgivenReport/ReportModel'; import type {ScenarioModel} from './jgivenReport/ScenarioModel'; import type {StepModel} from './jgivenReport/StepModel'; -export const JGIVEN_APP_VERSION = '0.12.1'; - export async function generateJGivenReport(): Promise<void> { try { if (!directoryExists(`./${REPORTS_DESTINATION}`)) {
refactor(unused): Remove unused code
jsGiven_jsGiven
train
js
871cc466fc8207a50bcf7fd0d2c23735194d2170
diff --git a/lib/endpoint/tags/table.js b/lib/endpoint/tags/table.js index <HASH>..<HASH> 100644 --- a/lib/endpoint/tags/table.js +++ b/lib/endpoint/tags/table.js @@ -5,7 +5,7 @@ const markdownTable = require('markdown-table') const turndown = require('../../turndown') const REQUIRED_REGEXP = /^\*\*Required\*\*\. / -const CAN_BE_ONE_OF_REGEXP = /(can be|one of)/i +const CAN_BE_ONE_OF_REGEXP = /(can be|one of|possible values are)/i const EITHER_REGEXP = /\beither (`[^`]+`)/i const ALLOW_NULL_REGEXP = /\b(set to|or) `null`/i
fix: Merge a pull request - merge_method enum
octokit_routes
train
js
f64a5b857ab5c4021949eee76b44307216519f10
diff --git a/packages/app-frontend/src/features/timeline/index.js b/packages/app-frontend/src/features/timeline/index.js index <HASH>..<HASH> 100644 --- a/packages/app-frontend/src/features/timeline/index.js +++ b/packages/app-frontend/src/features/timeline/index.js @@ -158,7 +158,7 @@ function stackEvent (event) { function _stackEvent (event, roundedTime) { const existingEvent = event.layer.eventTimeMap[roundedTime] - if (existingEvent) { + if (existingEvent && existingEvent.groupId === event.groupId) { existingEvent.stackedEvents.push(event) event.stackParent = existingEvent }
fix(timeline): don't autostack events that are no on the same group
vuejs_vue-devtools
train
js
fed7af6e09ec70efc8d8fa0550c01a48cb1dd006
diff --git a/pygenstub.py b/pygenstub.py index <HASH>..<HASH> 100644 --- a/pygenstub.py +++ b/pygenstub.py @@ -778,6 +778,8 @@ def get_pkg_paths(pkg_name, out_dir): paths = [] try: pkg = import_module(pkg_name) + if not hasattr(pkg, "__path__"): + return get_mod_paths(pkg_name, out_dir) for mod_info in walk_packages(pkg.__path__, pkg.__name__ + "."): mod_paths = get_mod_paths(mod_info.name, out_dir) paths.extend(mod_paths)
refactor: Fall back to -m if -p fails because of path
uyar_pygenstub
train
py
8b440523f58608d99bc15c03143738c5190364c1
diff --git a/docs/app/js/highlight-angular.js b/docs/app/js/highlight-angular.js index <HASH>..<HASH> 100644 --- a/docs/app/js/highlight-angular.js +++ b/docs/app/js/highlight-angular.js @@ -46,8 +46,7 @@ DocsApp }); // Make it so each line starts at 0 whitespace - var match = lines[0].match(/^\s*/); - var firstLineWhitespace = match && match[0] || ''; + var firstLineWhitespace = lines[0].match(/^\s*/)[0]; var startingWhitespaceRegex = new RegExp('^' + firstLineWhitespace); lines = lines.map(function(line) { return line
refactor(docs): remove extraneous var
angular_material
train
js
66a3e5928dbf981be09339d677407e61d59a735c
diff --git a/spec/rack/app/path_to_spec.rb b/spec/rack/app/path_to_spec.rb index <HASH>..<HASH> 100644 --- a/spec/rack/app/path_to_spec.rb +++ b/spec/rack/app/path_to_spec.rb @@ -72,7 +72,14 @@ describe Rack::App do context 'when path params not include all the passed parameter' do let(:path) { '/query' } - it { is_expected.to eq '/mount/d/456?test=hello&world=hy' } + it 'should pass as query string' do + valid_formats = [ + '/mount/d/456?test=hello&world=hy', + '/mount/d/456?world=hy&test=hello' + ] + + expect(valid_formats).to include subject + end end context 'when class not specified, the current application class is the default' do
test: test was depending on parameter order for path_to query string building, not it's fixed
rack-app_rack-app
train
rb
8129a5e61554997e7759ec09f317a1f5b7b249e1
diff --git a/scripts/release/releaseNotesTemplate.js b/scripts/release/releaseNotesTemplate.js index <HASH>..<HASH> 100644 --- a/scripts/release/releaseNotesTemplate.js +++ b/scripts/release/releaseNotesTemplate.js @@ -127,11 +127,12 @@ function createOtherTable(release) { } return `## :relieved: Other -| summary | commit | issues | author | | -|:---|:---|:---|:---|---| +| type | summary | commit | issues | author | | +|---|:---|:---|:---|:---|---| ${release.commitsWithoutPackage .map(entry => { - return `| ${entry.summary} | ${entry.hash} | ${entry.issues.join( + return `| ${entry.type} (${entry.scope || + 'monorepo'}) | ${entry.summary} | ${entry.hash} | ${entry.issues.join( ', ' )} | ${entry.author.name} | ![${entry.author .email}](https://www.gravatar.com/avatar/${md5( @@ -143,6 +144,7 @@ ${release.commitsWithoutPackage } export default release => { + console.log(release) const breaking = Object.keys(release.summary).map(type => createBreakingTable(type, release) )
chore(release): add type and scope to others table
cerebral_cerebral
train
js
ae14a129c92fce07a6191b062df607c60ce3da39
diff --git a/test/tags-input.spec.js b/test/tags-input.spec.js index <HASH>..<HASH> 100644 --- a/test/tags-input.spec.js +++ b/test/tags-input.spec.js @@ -9,12 +9,16 @@ describe('tags-input directive', function() { module('ngTagsInput'); - inject(function(_$compile_, _$rootScope_, _$document_, _$timeout_, _$window_) { + $window = { document: document }; + module(function($provide) { + $provide.value('$window', $window); + }); + + inject(function(_$compile_, _$rootScope_, _$document_, _$timeout_) { $compile = _$compile_; $scope = _$rootScope_; $document = _$document_; $timeout = _$timeout_; - $window = _$window_; }); });
refactor(tagsInput): Mock $window so tests pass on IE in strict mode
mbenford_ngTagsInput
train
js