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
937153a92f5b6ac3818ebfce6a11cda71fb631f8
diff --git a/src/managers/GuildMemberManager.js b/src/managers/GuildMemberManager.js index <HASH>..<HASH> 100644 --- a/src/managers/GuildMemberManager.js +++ b/src/managers/GuildMemberManager.js @@ -5,6 +5,7 @@ const { Error, TypeError, RangeError } = require('../errors'); const GuildMember = require('../structures/GuildMember'); const Collection = require('../util/Collection'); const { Events, OPCodes } = require('../util/Constants'); +const SnowflakeUtil = require('../util/Snowflake'); /** * Manages API methods for GuildMembers and stores their cache. @@ -263,7 +264,7 @@ class GuildMemberManager extends BaseManager { user: user_ids, query, time = 120e3, - nonce = Date.now().toString(16), + nonce = SnowflakeUtil.generate(), force = false, } = {}) { return new Promise((resolve, reject) => {
fix(GuildMemberManager): Use actually random nonce in fetch (#<I>)
discordjs_discord.js
train
js
88c06787d21e475819a928eacc1b5497fdd4f74d
diff --git a/webapps/Gruntfile.js b/webapps/Gruntfile.js index <HASH>..<HASH> 100644 --- a/webapps/Gruntfile.js +++ b/webapps/Gruntfile.js @@ -59,7 +59,6 @@ module.exports = function(grunt) { tasks: ['less'] } }; - require('./grunt/config/watch')(config, watchConf); require('./ui/tasklist/grunt/config/watch')(config, watchConf); require('./ui/cockpit/grunt/config/watch')(config, watchConf); require('./ui/admin/grunt/config/watch')(config, watchConf);
fix(build): do not require non-existent watch file
camunda_camunda-bpm-platform
train
js
93041193e9df99b370779c6523204b03342cce0a
diff --git a/source/php/Module/Curator/Curator.php b/source/php/Module/Curator/Curator.php index <HASH>..<HASH> 100644 --- a/source/php/Module/Curator/Curator.php +++ b/source/php/Module/Curator/Curator.php @@ -46,6 +46,7 @@ class Curator extends \Modularity\Module if(is_array($data['posts']) && !empty($data['posts'])) { foreach($data['posts'] as &$post) { $post->user_readable_name = $this->getUserName($post->user_screen_name); + $post->text = wp_trim_words($post->text, 20, "..."); } }
fix: Curator, truncate long descriptions.
helsingborg-stad_Modularity
train
php
2c79231817aa9d95bde7f4019ce5dfae4e059124
diff --git a/src/main.js b/src/main.js index <HASH>..<HASH> 100644 --- a/src/main.js +++ b/src/main.js @@ -147,13 +147,9 @@ function configureCommandlineSwitchesSync(cliArgs) { if (argvValue === true || argvValue === 'true') { if (argvKey === 'disable-hardware-acceleration') { app.disableHardwareAcceleration(); // needs to be called explicitly - } else if (argvKey === 'disable-color-correct-rendering') { - app.commandLine.appendSwitch('disable-color-correct-rendering'); // needs to be called exactly like this (https://github.com/microsoft/vscode/issues/84154) } else { - app.commandLine.appendArgument(argvKey); + app.commandLine.appendSwitch(argvKey); } - } else { - app.commandLine.appendSwitch(argvKey, argvValue); } });
fix: don't use appendArgument to add switch values (#<I>) * fix: don't use appendArgument to add switch values * args - make sure to allow to enabe color correct rendering
Microsoft_vscode
train
js
5c6c46bc27fb02d4bc15b5a8f6fd46e5ec8b060d
diff --git a/src/EloGank/Replay/Observer/Client/ReplayObserverClient.php b/src/EloGank/Replay/Observer/Client/ReplayObserverClient.php index <HASH>..<HASH> 100644 --- a/src/EloGank/Replay/Observer/Client/ReplayObserverClient.php +++ b/src/EloGank/Replay/Observer/Client/ReplayObserverClient.php @@ -62,7 +62,7 @@ class ReplayObserverClient $stringGameId = (string) $gameId; return sprintf( - '%s/%s/%s/%s/%s/%d', + '%s/%s/%s/%s/%s/%s', $this->replaysDirPath, $region, $stringGameId[0] . $stringGameId[1],
fix: LoL game id has reached the maximum integer value.
EloGank_lol-replay-observer
train
php
cd2889e370a6ffac0696ff25d5e849a9df0120f8
diff --git a/packages/wxa-cli/src/resolvers/ast/index.js b/packages/wxa-cli/src/resolvers/ast/index.js index <HASH>..<HASH> 100644 --- a/packages/wxa-cli/src/resolvers/ast/index.js +++ b/packages/wxa-cli/src/resolvers/ast/index.js @@ -9,6 +9,12 @@ import {generateCodeFromAST} from '../../compilers/script'; let debug = debugPKG('WXA:ASTManager'); +const isStaticSource = (filepath) => { + let ext = path.extname(filepath); + + return ~['png','jpg','jpeg','webp','eot','woff','woff2','ttf','file', 'gif','webm', 'mp3', 'mp4'].indexOf(ext.replace(/^\./, '')); +} + export default class ASTManager { constructor(resolve, meta, wxaConfigs) { this.resolve = resolve; @@ -136,6 +142,12 @@ export default class ASTManager { source, outputPath, resolved, }, }); + + // Allow use import to add static file to project + if (isStaticSource(source)) { + path.remove(); + return; + } switch (typeOfPath) { case StringLiteralRequire:
feat(cli): Allow use import declaration to add static file to project re #<I>
wxajs_wxa
train
js
5a070ce9fe3091095be709b644eeac3125b8924f
diff --git a/packages/swagger2openapi/index.js b/packages/swagger2openapi/index.js index <HASH>..<HASH> 100644 --- a/packages/swagger2openapi/index.js +++ b/packages/swagger2openapi/index.js @@ -56,6 +56,7 @@ function throwOrWarn(message, container, options) { } function fixUpSubSchema(schema,parent,options) { + if (schema.nullable) options.patches++; if (schema.discriminator && typeof schema.discriminator === 'string') { schema.discriminator = { propertyName: schema.discriminator }; }
fix(s2o): existing nullable counts as a patch
Mermade_oas-kit
train
js
70548c1c267b6a7aedb7ca92d02e756c783f778a
diff --git a/tests/integration/test_metrics.py b/tests/integration/test_metrics.py index <HASH>..<HASH> 100644 --- a/tests/integration/test_metrics.py +++ b/tests/integration/test_metrics.py @@ -1,7 +1,6 @@ from datetime import datetime, timedelta, timezone import json import signal -from time import sleep import pytest import requests @@ -9,7 +8,7 @@ import requests from .test_envelope import generate_transaction_item TEST_CONFIG = { - "aggregator": {"bucket_interval": 1, "initial_delay": 0, "debounce_delay": 0,} + "aggregator": {"bucket_interval": 1, "initial_delay": 0, "debounce_delay": 0} } @@ -24,7 +23,7 @@ def _session_payload(timestamp: datetime, started: datetime): "duration": 1947.49, "status": "exited", "errors": 0, - "attrs": {"release": "sentry-test@1.0.0", "environment": "production",}, + "attrs": {"release": "sentry-test@1.0.0", "environment": "production"}, } @@ -301,7 +300,7 @@ def test_session_metrics_non_processing( ) -def test_metrics_extracted_only_once( +def test_session_metrics_extracted_only_once( mini_sentry, relay, relay_with_processing, metrics_consumer ): """
test(integration-metrics): Explicitly mention session metrics integration test (#<I>) - Rename session integration test to explicitly say it's about sessions. Now that there also are integration tests on transaction metrics, I think it's worth the effort to clarify whether it's about sessions. - Remove unused `sleep` import. - Remove extra commas to keep the linter happy.
getsentry_semaphore
train
py
21c1f0dcec1201d8ec40d06d0d4eaeee2ab94f07
diff --git a/lib/filterSeries.js b/lib/filterSeries.js index <HASH>..<HASH> 100644 --- a/lib/filterSeries.js +++ b/lib/filterSeries.js @@ -14,9 +14,6 @@ class FilterSeriesArray extends AigleSeriesArray { } _callResolve(value, index) { - if (this._promise._resolved !== 0) { - return; - } this._result[index] = value ? this._array[index] : INTERNAL; if (--this._rest === 0) { this._promise._resolve(compactArray(this._result)); @@ -34,9 +31,6 @@ class FilterSeriesObject extends AigleSeriesObject { } _callResolve(value, index) { - if (this._promise._resolved !== 0) { - return; - } this._result[index] = value ? this._object[this._keys[index]] : INTERNAL; if (--this._rest === 0) { this._promise._resolve(compactArray(this._result));
refactor(filterSeries): remove unnecessary if statement
suguru03_aigle
train
js
8423429e664ab28aa98b6b52f7195057c60655b3
diff --git a/src/Logging/Mocks/HasManyHandlers.php b/src/Logging/Mocks/HasManyHandlers.php index <HASH>..<HASH> 100644 --- a/src/Logging/Mocks/HasManyHandlers.php +++ b/src/Logging/Mocks/HasManyHandlers.php @@ -17,6 +17,22 @@ trait HasManyHandlers public $default = null; /** + * Check if logger can load many handlers + * + * @param Logger $log + * @return Logger + */ + private function withHandlers(Logger $log) : Logger + { + $channels = Config::has('logging.with_handlers') ? Config::get('logging.with_handlers') : []; + + if (is_array($channels)) + return $this->attachHandlers($log, $channels); + + return $log; + } + + /** * Load other handlers * * @param Logger $log
feat: Check if logger can load many handlers
modulusphp_hibernate
train
php
9ede0af051a34374af75f6a3bcaedc61cac90fb6
diff --git a/lib/crc32.js b/lib/crc32.js index <HASH>..<HASH> 100644 --- a/lib/crc32.js +++ b/lib/crc32.js @@ -1,3 +1,5 @@ +'use strict' + var stream = require( 'stream' ) /**
fix(lib): Node v4 block-scoped declarations
jhermsmeier_node-cyclic-32
train
js
c5b69cf3f36659578cdf773886159a531d0325f6
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ var randomBytes = require('randombytes') -var ALPHABET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ~abcdefghijklmnopqrstuvwxyz_' +var ALPHABET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~' var counter = parseInt(randomBytes(2).toString('hex'), 16) var max = decode('___') var time = Date.now()
fix(ALPHABET): sorted chars.
nxtedition_xuid
train
js
95d7bdbbd88f690c1dc0db4c3cbe0e8419fb03fa
diff --git a/src/connection.js b/src/connection.js index <HASH>..<HASH> 100644 --- a/src/connection.js +++ b/src/connection.js @@ -575,7 +575,7 @@ const GetBlockTimeRpcResult = struct({ jsonrpc: struct.literal('2.0'), id: 'string', error: 'any?', - result: struct.union(['null', 'number']), + result: struct.union(['null', 'number', 'undefined']), }); /**
fix: undefined is a valid result for getBlockTime
solana-labs_solana-web3.js
train
js
a7a96d70de246482ca423d877bf2787c1bc61b89
diff --git a/bindings/vue/vue-onsenui/src/mixins/derive.js b/bindings/vue/vue-onsenui/src/mixins/derive.js index <HASH>..<HASH> 100644 --- a/bindings/vue/vue-onsenui/src/mixins/derive.js +++ b/bindings/vue/vue-onsenui/src/mixins/derive.js @@ -3,8 +3,8 @@ import ons from 'onsenui'; import { camelize, eventToHandler, handlerToProp, capitalize } from '../internal/util'; /* Private */ +const dbb = 'onDeviceBackButton'; const _setupDBB = component => { - const dbb = 'onDeviceBackButton'; // Call original handler or parent handler by default const handler = component[dbb] || (component.$el[dbb] && component.$el[dbb]._callback) || (e => e.callParentHandler()); @@ -25,6 +25,7 @@ const _setupDBB = component => { /* Public */ // Device Back Button Handler const deriveDBB = { + emits: [handlerToProp(dbb)], mounted() { _setupDBB(this); },
fix(vue): Add deviceBackButton event to emits key
OnsenUI_OnsenUI
train
js
4ca9b27828d62015cc4bbe1ff3e03cdf56774772
diff --git a/dirsync/syncer.py b/dirsync/syncer.py index <HASH>..<HASH> 100644 --- a/dirsync/syncer.py +++ b/dirsync/syncer.py @@ -160,7 +160,7 @@ class Syncer(object): left.add(path) anc_dirs = re_path[:-1].split('/') anc_dirs_path = '' - for ad in anc_dirs: + for ad in anc_dirs[1:]: anc_dirs_path = os.path.join(anc_dirs_path, ad) left.add(anc_dirs_path)
fix(syncer): fix range issue introduced in <I>efc<I>
tkhyn_dirsync
train
py
9b3515604a656f685775750e6fa09e0adbf64400
diff --git a/qa/large-data-tests/src/test/java/org/camunda/bpm/qa/largedata/optimize/OptimizeApiPageSizeTest.java b/qa/large-data-tests/src/test/java/org/camunda/bpm/qa/largedata/optimize/OptimizeApiPageSizeTest.java index <HASH>..<HASH> 100644 --- a/qa/large-data-tests/src/test/java/org/camunda/bpm/qa/largedata/optimize/OptimizeApiPageSizeTest.java +++ b/qa/large-data-tests/src/test/java/org/camunda/bpm/qa/largedata/optimize/OptimizeApiPageSizeTest.java @@ -53,11 +53,6 @@ public class OptimizeApiPageSizeTest { generator.generateData(); } - @AfterClass - public static void tearDown() { - TestHelper.assertAndEnsureCleanDbAndCache(processEngineRule.getProcessEngine(), false); - } - @Test @Parameters(method = "optimizeServiceFunctions") public void databaseCanCopeWithPageSize(TestScenario scenario) {
chore(qa): revert cleanup in large data test - the cleanup takes too long to finish due to the amount of data Related to CAM-<I>
camunda_camunda-bpm-platform
train
java
4583695e284676742c3857cc5953c2909da343a6
diff --git a/generators/app/templates/client/app/components/remote-unique/remote-unique.directive.js b/generators/app/templates/client/app/components/remote-unique/remote-unique.directive.js index <HASH>..<HASH> 100644 --- a/generators/app/templates/client/app/components/remote-unique/remote-unique.directive.js +++ b/generators/app/templates/client/app/components/remote-unique/remote-unique.directive.js @@ -30,7 +30,7 @@ var ignore; attrs.$observe('remoteUniqueIgnore', function (newValue) { - ignore = newValue; + if (typeof ignore === 'undefined') ignore = newValue; }); ctrl.$parsers.unshift(validateRemoteUnique);
fix(remoteUnique): fix ignore, ignore 1st val
michaelkrone_generator-material-app
train
js
33e77c02bdb5b3b9c02f5f53d40175bbd52993b1
diff --git a/jobs/create-group-version-branch.js b/jobs/create-group-version-branch.js index <HASH>..<HASH> 100644 --- a/jobs/create-group-version-branch.js +++ b/jobs/create-group-version-branch.js @@ -206,7 +206,7 @@ module.exports = async function ( if (!satisfies && openPR) { const dependencyNameAndVersion = `${depName}-${latestDependencyVersion}` - if (!openPR.comments.includes(dependencyNameAndVersion)) { + if (!openPR.comments || !openPR.comments.includes(dependencyNameAndVersion)) { hasNewUpdates = true await upsert(repositories, openPR._id, { comments: [...(openPR.comments || []), dependencyNameAndVersion]
fix(create-group-version-branch): comments on PR docs might not exist yet
greenkeeperio_greenkeeper
train
js
cc574a703e708e73d1c9deeeae8074378692f7bc
diff --git a/src/modules/Tab/TabPane.js b/src/modules/Tab/TabPane.js index <HASH>..<HASH> 100644 --- a/src/modules/Tab/TabPane.js +++ b/src/modules/Tab/TabPane.js @@ -32,7 +32,7 @@ function TabPane(props) { } return ( - <ElementType {...calculatedDefaultProps} {...rest} className={classes} loading={loading}> + <ElementType {...calculatedDefaultProps} {...rest} className={classes}> {children} </ElementType> )
fix(TabPane): remove extra loading prop (#<I>)
Semantic-Org_Semantic-UI-React
train
js
771b40c6960233e5fff6608f5646bec4405cb899
diff --git a/renku/core/models/provenance/activities.py b/renku/core/models/provenance/activities.py index <HASH>..<HASH> 100644 --- a/renku/core/models/provenance/activities.py +++ b/renku/core/models/provenance/activities.py @@ -278,6 +278,7 @@ class Activity(CommitMixin): def __attrs_post_init__(self): """Sets ``generated`` default value if it's not set already.""" + super().__attrs_post_init__() if not self.generated: self.generated = self.default_generated()
fix: initialize Activity with Commit post-init closes #<I>
SwissDataScienceCenter_renku-python
train
py
6bb0ca28a77c2c3d371e00ce1931f1f0e02ff01d
diff --git a/p2p/protocol/internal/circuitv1-deprecated/relay.go b/p2p/protocol/internal/circuitv1-deprecated/relay.go index <HASH>..<HASH> 100644 --- a/p2p/protocol/internal/circuitv1-deprecated/relay.go +++ b/p2p/protocol/internal/circuitv1-deprecated/relay.go @@ -16,8 +16,10 @@ import ( "github.com/libp2p/go-libp2p-core/peerstore" "github.com/libp2p/go-libp2p-core/transport" - logging "github.com/ipfs/go-log" pool "github.com/libp2p/go-buffer-pool" + + logging "github.com/ipfs/go-log/v2" + ma "github.com/multiformats/go-multiaddr" )
chore: update go-log to v2 (#<I>)
libp2p_go-libp2p
train
go
c143694c4e2e8c98c75310c5fbb41997cf71f20e
diff --git a/kv/session.go b/kv/session.go index <HASH>..<HASH> 100644 --- a/kv/session.go +++ b/kv/session.go @@ -113,6 +113,18 @@ func (s *Service) findSession(ctx context.Context, tx Tx, key string) (*influxdb ps = append(ps, p...) } ps = append(ps, influxdb.MePermissions(sn.UserID)...) + + // TODO(desa): this is super expensive, we should keep a list of a users maximal privileges somewhere + // we did this so that the oper token would be used in a users permissions. + af := influxdb.AuthorizationFilter{UserID: &sn.UserID} + as, err := s.findAuthorizations(ctx, tx, af) + if err != nil { + return nil, err + } + for _, a := range as { + ps = append(ps, a.Permissions...) + } + sn.Permissions = ps return sn, nil }
fix(kv): grant user union of their tokens and urms perms
influxdata_influxdb
train
go
c97c866cd7ec606612a263c7eda2161c76ab3a99
diff --git a/lib/create-http-client.js b/lib/create-http-client.js index <HASH>..<HASH> 100644 --- a/lib/create-http-client.js +++ b/lib/create-http-client.js @@ -76,7 +76,7 @@ export default function createHttpClient (axios, options) { config.basePath = `/${config.basePath.split('/').filter(Boolean).join('/')}` } - const baseURL = `${protocol}://${hostname}:${port}${config.basePath}/spaces/${space}` + const baseURL = options.baseURL || `${protocol}://${hostname}:${port}${config.basePath}/spaces/${space}` config.headers['Authorization'] = 'Bearer ' + config.accessToken
fix(http-client): keep baseURL when passed as option
contentful_contentful-sdk-core
train
js
bf0be69953674ff3295fe986f62131b0103a7d28
diff --git a/sdk/src/core/cc.searchService.js b/sdk/src/core/cc.searchService.js index <HASH>..<HASH> 100644 --- a/sdk/src/core/cc.searchService.js +++ b/sdk/src/core/cc.searchService.js @@ -38,7 +38,7 @@ cc.define('cc.SearchService', function(configService, $http, $q, applier){ url: endpoint, params: { q: createSearchCommand(normalizeUmlauts(searchStr)), - fetch: 'text, categoryUrlKey, categoryName, productUrlKey' + fetch: 'text, categoryUrlKey, categoryName, productUrlKey, productImageUrl' } }) .then(function(response){
feat(searchService): provide productImageUrl for results
sofa_sofa-couch-service
train
js
a7c7420268b57f0bca6656a47c835b114472ef02
diff --git a/packages/build/css/glamor-to-css.js b/packages/build/css/glamor-to-css.js index <HASH>..<HASH> 100644 --- a/packages/build/css/glamor-to-css.js +++ b/packages/build/css/glamor-to-css.js @@ -4,9 +4,9 @@ const jsToCss = require('./js-to-css.js') function glamorToCss(obj) { return ( - convertKeyframes(filterKeyframes(obj)) + - convertAnimations(filterAnimationFunctions(obj)) + - convertCssWithGlamor(filterNonKeyframes(obj)) + convertKeyframes(filterKeyframes(obj.default)) + + convertAnimations(filterAnimationFunctions(obj.default)) + + convertCssWithGlamor(filterNonKeyframes(obj.default)) ) }
fix(build): handle esm styles in cjs-based css build
pluralsight_design-system
train
js
899e2a0e123737600dea2a41a591197f1e078a05
diff --git a/connect_check_dummy.go b/connect_check_dummy.go index <HASH>..<HASH> 100644 --- a/connect_check_dummy.go +++ b/connect_check_dummy.go @@ -2,8 +2,6 @@ package clickhouse -import "net" - -func connCheck(conn net.Conn) error { +func (conn *connect) connCheck() error { return nil }
fix: connCheck signature for unsupported OS
kshvakov_clickhouse
train
go
2968b0ea672ce52cc1ee351b3e8d9cee24329b88
diff --git a/lib/commands/app-management.js b/lib/commands/app-management.js index <HASH>..<HASH> 100644 --- a/lib/commands/app-management.js +++ b/lib/commands/app-management.js @@ -83,8 +83,11 @@ commands.mobileQueryAppState = async function mobileQueryAppState (opts = {}) { return await this.proxyCommand('/wda/apps/state', 'POST', requireOptions(opts, ['bundleId'])); }; -commands.installApp = async function installApp (appPath) { - await this.mobileInstallApp({app: appPath}); +commands.installApp = async function installApp (appPath, opts = {}) { + await this.mobileInstallApp({ + ...(_.isPlainObject(opts) ? opts : {}), + app: appPath, + }); }; commands.activateApp = async function activateApp (bundleId, opts = {}) {
fix: Pass options to installApp call (#<I>)
appium_appium-xcuitest-driver
train
js
76be26c3853a6794f163ca47cbe8d1f63312c81d
diff --git a/lib/promise.js b/lib/promise.js index <HASH>..<HASH> 100644 --- a/lib/promise.js +++ b/lib/promise.js @@ -20,7 +20,7 @@ class Promise { if (executor === INTERNAL) { return; } - executor(value => this._resolve(value), reason => this._reject(reason)); + execute(this, executor); } toString() { @@ -158,6 +158,23 @@ Promise.reject = reject; Promise.all = require('./all')(PromiseArray); Promise.promisify = require('./promisify')(Promise, INTERNAL); +function execute(promise, executor) { + try { + executor(resolve, reject); + } catch(e) { + reject(e); + } + + function resolve(value) { + promise._resolve(value); + } + + function reject(reason) { + promise._reject(reason); + } +} + + function resolve(value) { const promise = new Promise(INTERNAL); promise._resolve(value);
feat(promise): add try-catch for executor
suguru03_aigle
train
js
1751f7f497a92ede61d65f0063ccfbdb92c11820
diff --git a/refract/contrib/apielements.py b/refract/contrib/apielements.py index <HASH>..<HASH> 100644 --- a/refract/contrib/apielements.py +++ b/refract/contrib/apielements.py @@ -1,4 +1,4 @@ -from typing import List +from typing import List, Iterator from refract.elements import Array, String, Number from refract.registry import Registry @@ -183,7 +183,7 @@ class Category(Array): Returns the resource group categories found within the category. """ - categories = filter(is_element(Category), self.children) + categories: Iterator[Category] = filter(is_element(Category), self.children) resourceGroups = filter(has_class('resourceGroup'), categories) return list(resourceGroups) @@ -238,6 +238,6 @@ class ParseResult(Array): Returns an API category found within the parse result. """ - categories = filter(is_element(Category), self.children) + categories: Iterator[Category] = filter(is_element(Category), self.children) apis = filter(has_class('api'), categories) return next(apis)
refactor: resolve mypy complaints
kylef_refract.py
train
py
8df0e392fec50d222132c831b4f2ae3b3f0858a1
diff --git a/scripts/build-examples.js b/scripts/build-examples.js index <HASH>..<HASH> 100644 --- a/scripts/build-examples.js +++ b/scripts/build-examples.js @@ -10,9 +10,24 @@ glob.sync(`${examplesDir}/*/webpack.config.js`, { absolute: true }).forEach((p) => { const config = require(p); - webpack(config, (err) => { + webpack(config, (err, stats) => { if (err) { throw err; } + + const msgs = []; + const { errors, warnings } = stats.compilation; + + if (warnings.length > 0) { + msgs.push(`BUILD EXAMPLES WARNINGS\n${warnings.map(w => w.message).join('\n\n')}`); + } + + if (errors.length > 0) { + msgs.push(`BUILD EXAMPLES ERRORS\n${errors.map(e => e.message).join('\n\n')}`); + } + + if (msgs.length > 0) { + throw new Error(msgs.join('\n')); + } }); });
chore(scripts): fail when errors or warnings in examples build occurs
kisenka_svg-sprite-loader
train
js
909caa03bdd8b40d890f06d5b3e54d982a199be1
diff --git a/gridsome/lib/build.js b/gridsome/lib/build.js index <HASH>..<HASH> 100644 --- a/gridsome/lib/build.js +++ b/gridsome/lib/build.js @@ -44,6 +44,7 @@ module.exports = async (context, args) => { // 5. clean up await plugins.callHook('afterBuild', { context, config, queue }) + await fs.remove(path.resolve(config.cacheDir, 'data')) await fs.remove(config.manifestsDir) console.log()
fix(build): clear cached data files
gridsome_gridsome
train
js
d25a3e9f266fcdbf8b124d4643f744e37854f88f
diff --git a/checkmgr/broker.go b/checkmgr/broker.go index <HASH>..<HASH> 100644 --- a/checkmgr/broker.go +++ b/checkmgr/broker.go @@ -59,6 +59,11 @@ func (cm *CheckManager) getBrokerCN(broker *apiclient.Broker, submissionURL apic cn := "" for _, detail := range broker.Details { + // broker must be active + if detail.Status != statusActive { + continue + } + // certs are generated against the CN (in theory) // 1. find the right broker instance with matching IP or external hostname // 2. set the tls.Config.ServerName to whatever that instance's CN is currently
fix: for enterprise brokers, when getting cn verify status is active
circonus-labs_circonus-gometrics
train
go
77c91cc08513be47798c6866f0fa718bc41e7a69
diff --git a/lib/rollbar/configuration.rb b/lib/rollbar/configuration.rb index <HASH>..<HASH> 100644 --- a/lib/rollbar/configuration.rb +++ b/lib/rollbar/configuration.rb @@ -261,7 +261,10 @@ module Rollbar found = Gem::Specification.each.select { |spec| name === spec.name } puts "[Rollbar] No gems found matching #{name.inspect}" if found.empty? found - end.flatten.uniq.map(&:gem_dir) + end + @project_gem_paths.flatten! + @project_gem_paths.uniq! + @project_gem_paths.map!(&:gem_dir) end def before_process=(*handler) diff --git a/lib/rollbar/item/backtrace.rb b/lib/rollbar/item/backtrace.rb index <HASH>..<HASH> 100644 --- a/lib/rollbar/item/backtrace.rb +++ b/lib/rollbar/item/backtrace.rb @@ -74,10 +74,11 @@ module Rollbar end def map_frames(current_exception) - exception_backtrace(current_exception).map do |frame| + frames = exception_backtrace(current_exception).map do |frame| Rollbar::Item::Frame.new(self, frame, :configuration => configuration).to_h - end.reverse + end + frames.reverse! end # Returns the backtrace to be sent to our API. There are 3 options:
fix: avoid temporary array copies caused by chaining
rollbar_rollbar-gem
train
rb,rb
d4967a59cd73d40783c82a8d6dc1be7f29db1618
diff --git a/test/suites/CSSJanusTest.php b/test/suites/CSSJanusTest.php index <HASH>..<HASH> 100644 --- a/test/suites/CSSJanusTest.php +++ b/test/suites/CSSJanusTest.php @@ -21,6 +21,7 @@ class CSSJanusTest extends PHPUnit_Framework_TestCase { $input = $case[0]; $noop = !isset($case[1]); $output = $noop ? $input : $case[1]; + $roundtrip = isset($test['roundtrip']) ? $test['roundtrip'] : !$noop; $cases[] = array( $input, @@ -29,7 +30,7 @@ class CSSJanusTest extends PHPUnit_Framework_TestCase { $name, ); - if (!$noop) { + if ($roundtrip) { // Round trip $cases[] = array( $output, @@ -58,7 +59,7 @@ class CSSJanusTest extends PHPUnit_Framework_TestCase { protected static function getSpec() { static $json; if ($json == null) { - $version = '1.2.0'; + $version = '1.2.1'; $dir = dirname(__DIR__); $file = "$dir/data-v$version.json"; if (!is_readable($file)) {
test: Update to upstream <I>
cssjanus_php-cssjanus
train
php
8b063b31b29c062e384edc05cb3949d6b6a0807d
diff --git a/src/stylable.js b/src/stylable.js index <HASH>..<HASH> 100644 --- a/src/stylable.js +++ b/src/stylable.js @@ -6,12 +6,13 @@ import Node from './node' import isPureComponent from './isPureComponent' import getDisplayName from './getDisplayName' -export default function stylable (name) { +export default function stylable (selName) { return function wrapWithComponent (WrappedComponent) { - const stylableDisplayName = `Stylable(${getDisplayName(WrappedComponent)})` + const stylableDisplayName = `Stylable(${selName})(${getDisplayName(WrappedComponent)})` const pureComponent = isPureComponent(WrappedComponent) class Stylable extends React.Component { + static name = selName static displayName = stylableDisplayName static WrappedComponent = WrappedComponent static contextTypes = { @@ -27,7 +28,7 @@ export default function stylable (name) { constructor (props, ctx) { super(props, ctx) - this.node = new Node(name, props, ctx.styleNode, ctx.styleSheet) + this.node = new Node(selName, props, ctx.styleNode, ctx.styleSheet) this.state = { childProps: this.node.getChildProps() } this._wrapped = undefined }
feat: Use better naming for components For ex: const Title = stylable('Title')(Text) will be visible in react-devtools like 'Stylable(Title)(Text)'
vovkasm_react-native-stylable
train
js
17dbc38f5670ab221bf941f3cb0ae219d8cbefa8
diff --git a/packages/build-tools/tasks/webpack-tasks.js b/packages/build-tools/tasks/webpack-tasks.js index <HASH>..<HASH> 100644 --- a/packages/build-tools/tasks/webpack-tasks.js +++ b/packages/build-tools/tasks/webpack-tasks.js @@ -220,6 +220,11 @@ async function server(buildTime) { hotClient: { logLevel: 'silent', hot: true, + // Workaround to IE 11-specific issue with webpack-hot-client -- otherwise testing IE 11 on the local dev server is broken + host: { + client: '*', + server: '0.0.0.0', + }, }, content: path.resolve(process.cwd(), config.wwwDir), devWare: {
fix: update webpack-serve config so local IE <I> testing works with webpack-hot-client
bolt-design-system_bolt
train
js
3adc472f06f7c435b922ac3f905d021114029712
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1123,8 +1123,8 @@ gulp.task('!bundle.testing', ['build.js.dev'], function() { {sourceMaps: true}); }); -gulp.task('!bundles.js.docs', function() { - gulp.src('modules/angular2/docs/bundles/*').pipe(gulp.dest('dist/js/bundle')); +gulp.task('!bundles.js.docs', ['clean'], function() { + return gulp.src('modules/angular2/docs/bundles/*').pipe(gulp.dest('dist/js/bundle')); }); gulp.task('!bundles.js.umd', ['build.js.dev'], function() {
chore(build): fix race condition for the !bundles.js.docs task
angular_angular
train
js
9217e10e0610ba807b8e657d3885bb62c5aeed22
diff --git a/packages/netlify-cms-widget-relation/src/RelationControl.js b/packages/netlify-cms-widget-relation/src/RelationControl.js index <HASH>..<HASH> 100644 --- a/packages/netlify-cms-widget-relation/src/RelationControl.js +++ b/packages/netlify-cms-widget-relation/src/RelationControl.js @@ -148,7 +148,7 @@ export default class RelationControl extends React.Component { let metadata; if (Array.isArray(selectedOption)) { - this.setState({ initialOptions: selectedOption }); + this.setState({ initialOptions: selectedOption.filter(Boolean) }); value = selectedOption.map(optionToString); metadata = (!isEmpty(selectedOption) && { @@ -161,7 +161,7 @@ export default class RelationControl extends React.Component { {}; onChange(fromJS(value), metadata); } else { - this.setState({ initialOptions: [selectedOption] }); + this.setState({ initialOptions: [selectedOption].filter(Boolean) }); value = optionToString(selectedOption); metadata = selectedOption && { [field.get('name')]: {
fix(widget-relation): handle optional configuration (#<I>)
netlify_netlify-cms
train
js
fb5fb8a0dfc841ba16722887245c7c0ac15b4969
diff --git a/packages/bonde-admin/client/mobilizations/widgets/components/form-finish-message/index.js b/packages/bonde-admin/client/mobilizations/widgets/components/form-finish-message/index.js index <HASH>..<HASH> 100644 --- a/packages/bonde-admin/client/mobilizations/widgets/components/form-finish-message/index.js +++ b/packages/bonde-admin/client/mobilizations/widgets/components/form-finish-message/index.js @@ -132,7 +132,7 @@ export const FormFinishMessage = props => { const raw = JSON.stringify(value.toJSON()) if (finishMessage.value !== raw) finishMessage.onChange(raw) }} - toolbarStyles={{ position: 'relative', marginBottom: 10, zIndex: 4 }} + toolbarStyles={{ position: 'relative', marginBottom: 10, zIndex: 5 }} contentStyles={{ backgroundColor: '#fff', color: '#666', padding: 10 }} /> )}
fix(widgets): change index on finish custom message
nossas_bonde-client
train
js
8f28784c7d0d8baeb9a8d2a30ca7e8469e09012a
diff --git a/handler/oauth2/flow_resource_owner_test.go b/handler/oauth2/flow_resource_owner_test.go index <HASH>..<HASH> 100644 --- a/handler/oauth2/flow_resource_owner_test.go +++ b/handler/oauth2/flow_resource_owner_test.go @@ -88,7 +88,7 @@ func TestResourceOwnerFlow_HandleTokenEndpointRequest(t *testing.T) { description: "should fail because invalid grant_type specified", setup: func() { areq.GrantTypes = fosite.Arguments{"password"} - areq.Client = &fosite.DefaultClient{GrantTypes: fosite.Arguments{"authoriation_code"}, Scopes: []string{"foo-scope"}} + areq.Client = &fosite.DefaultClient{GrantTypes: fosite.Arguments{"authorization_code"}, Scopes: []string{"foo-scope"}} }, expectErr: fosite.ErrUnauthorizedClient, },
chore: fix typo of authorization_code in test (#<I>)
ory_fosite
train
go
b4efa580e146a14b48d153e463861fea09a89a5a
diff --git a/app-webpack/lib/dev-server-ssr.js b/app-webpack/lib/dev-server-ssr.js index <HASH>..<HASH> 100644 --- a/app-webpack/lib/dev-server-ssr.js +++ b/app-webpack/lib/dev-server-ssr.js @@ -238,11 +238,6 @@ module.exports = class DevServer { setupMiddlewares: (middlewares, opts) => { const { app } = opts - // obsolete hot updates & js maps should be discarded immediately - app.get(/(\.hot-update\.json|\.js\.map)$/, (_, res) => { - res.status(404).send('404') - }) - if (cfg.build.ignorePublicFolder !== true) { app.use(resolveUrlPath('/'), serveStatic('.', { maxAge: 0 })) }
fix(app-webpack): issue with HMR for SSR (#<I>) fixes #<I>
quasarframework_quasar
train
js
82c36da2877f80294599ba0e4f42c36dd4aa2872
diff --git a/generators/gae/index.js b/generators/gae/index.js index <HASH>..<HASH> 100644 --- a/generators/gae/index.js +++ b/generators/gae/index.js @@ -770,7 +770,12 @@ module.exports = class extends BaseGenerator { return { productionBuild() { if (this.abort) return; - + // Until issue; https://github.com/GoogleCloudPlatform/app-gradle-plugin/issues/376 is fixed we shall disable .gcloudignore + this.log( + chalk.bold( + 'Due to a Bug in GCloud SDK you will need to disable the generation of .gcloudignore file before deploying using: "gcloud config set gcloudignore/enabled false". For more info refer: https://github.com/GoogleCloudPlatform/app-gradle-plugin/issues/376' + ) + ); if (this.buildTool === 'maven') { this.log(chalk.bold('Deploy to App Engine: ./mvnw package appengine:deploy -DskipTests -Pgae,prod,prod-gae')); } else if (this.buildTool === 'gradle') {
fix: add info to disable .gcloudignore file generation until GCloud SDK bug is fixed This gives users information to disable .gcloudignore file generation until <URL>
jhipster_generator-jhipster
train
js
35a584234b00297dc511300bb6e42eeaceac8345
diff --git a/lib/server.js b/lib/server.js index <HASH>..<HASH> 100644 --- a/lib/server.js +++ b/lib/server.js @@ -417,12 +417,12 @@ class Server extends KarmaEventEmitter { } processWrapper.on('unhandledRejection', (error) => { - this.log.error(`UnhandledRejection: ${error.message || String(error)}`) + this.log.error(`UnhandledRejection: ${error.stack || error.message || String(error)}`) reportError(error) }) processWrapper.on('uncaughtException', (error) => { - this.log.error(`UncaughtException:: ${error.message || String(error)}`) + this.log.error(`UncaughtException: ${error.stack || error.message || String(error)}`) reportError(error) }) }
feat(server): print stack of unhandledrejections (#<I>) * feat(server): print stack of unhandledrejections The v8 engine includes the error with the stack and most of the time we need the stack also.
karma-runner_karma
train
js
816a3a3dc5d0fc759546dcc2c6a01c9e9e98a611
diff --git a/packages/orbit-components/src/Card/components/CardWrapper/index.js b/packages/orbit-components/src/Card/components/CardWrapper/index.js index <HASH>..<HASH> 100644 --- a/packages/orbit-components/src/Card/components/CardWrapper/index.js +++ b/packages/orbit-components/src/Card/components/CardWrapper/index.js @@ -83,6 +83,10 @@ const StyledCardWrapper = styled.div` outline: 0; background: ${({ theme }) => theme.orbit.paletteWhiteHover}; } + + &:hover { + background: ${({ theme, onClick }) => onClick && theme.orbit.paletteWhiteHover}; + } `; StyledCardWrapper.defaultProps = {
fix(CardSection): missing hover (#<I>)
kiwicom_orbit-components
train
js
bf339d28c29662e599bc1df189bcc5a0edede62d
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,20 +1,31 @@ 'use strict' -var formatter = require('./lib/node-0.10-formatter') +const formatter = require('./lib/node-0.10-formatter') -var orig = Error.prepareStackTrace -Error.prepareStackTrace = function (err, callsites) { +let lastPrepareStackTrace = Error.prepareStackTrace + +Object.defineProperty(Error, 'prepareStackTrace', { + configurable: true, + enumerable: true, + get: function () { + return prepareStackTrace + }, + set: function (fn) { + lastPrepareStackTrace = fn + } +}) + +module.exports = function (err) { + err.stack + return err.__error_callsites +} + +function prepareStackTrace (err, callsites) { Object.defineProperty(err, '__error_callsites', { enumerable: false, configurable: true, writable: false, value: callsites }) - - return (orig || formatter)(err, callsites) -} - -module.exports = function (err) { - err.stack - return err.__error_callsites + return (lastPrepareStackTrace || formatter)(err, callsites) }
feat: support overwriting of Error.prepareStacktrace Previously, if the `Error.prepareStacktrace` function was overwritten after this module was loaded, we would loose the ability to set the magic `__error_callsites` property. With this commit, we'll always ensure to run our `prepareStacktrace` function before any other function added later.
watson_error-callsites
train
js
42aa03541291cfcedf4ca8cc178f19b26bdd330a
diff --git a/tooling/util/coverage.js b/tooling/util/coverage.js index <HASH>..<HASH> 100644 --- a/tooling/util/coverage.js +++ b/tooling/util/coverage.js @@ -76,9 +76,8 @@ async function combine(packageName) { async function report() { const collector = new Collector(); const pattern = `reports/coverage/**/*.json`; - const files = await g(pattern, { - ignore: `legacy/**` - }); + await rimraf(`reports/coverage/legacy`); + const files = await g(pattern); for (const f of files) { collector.add(JSON.parse(await fs.readFile(f))); }
fix(tooling): do not include legacy in code coverage
webex_spark-js-sdk
train
js
fb5dd81c9d0afc37ebd74090576068b192fb1f36
diff --git a/src/components/player.js b/src/components/player.js index <HASH>..<HASH> 100644 --- a/src/components/player.js +++ b/src/components/player.js @@ -12,7 +12,7 @@ import Loader from './loader' import PlayerInfo from './player_info' import $ from 'clappr-zepto' -const baseUrl = currentScriptUrl().replace(/\/[^\/]+$/, '') +const baseUrl = currentScriptUrl().replace(/\/[^/]+$/, '') /** * @class Player
style(player): remove unnecessary escape character
clappr_clappr
train
js
2338409dc7c027bfc95f8c4279dbb5367a268d82
diff --git a/app/modules/checkout/CheckoutController.js b/app/modules/checkout/CheckoutController.js index <HASH>..<HASH> 100644 --- a/app/modules/checkout/CheckoutController.js +++ b/app/modules/checkout/CheckoutController.js @@ -133,7 +133,9 @@ angular $scope.canProceed = function(){ return $scope.billingAddressForm.$valid && - (checkoutModel.addressEqual || $scope.shippingAddressForm.$valid); + (checkoutModel.addressEqual || $scope.shippingAddressForm.$valid) && + checkoutModel.selectedPaymentMethod && + checkoutModel.selectedPaymentMethod.method !== PAYPAL_EXPRESS_ID; }; $scope.proceed = function(){
fix(checkout): never allow to proceed with paypal in regular checkout
sofa_sofa-couch-service
train
js
be360105ecff14f67ddef1e235f07504d0da795f
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -18,8 +18,4 @@ var Treasure = require('./treasure.js'); // Load all cached clients require('./loadClients')(Treasure); -if (typeof global.window.define === 'function' && global.window.define.amd) { - global.window.define('Treasure', function () { return Treasure; }); -} else { - global.window.Treasure = Treasure; -} +global.window.Treasure = Treasure;
fix(export): ADM support is broken and unused
treasure-data_td-js-sdk
train
js
77315744b219b90eb6a02efc9d26e5400f99af62
diff --git a/lib/report.js b/lib/report.js index <HASH>..<HASH> 100644 --- a/lib/report.js +++ b/lib/report.js @@ -74,7 +74,7 @@ class Report { reports.create(_reporter, { skipEmpty: false, skipFull: this.skipFull, - maxCols: 100 + maxCols: process.stdout.columns || 100 }).execute(context) } }
feat: use process.stdout.columns for reporter maxCols (#<I>)
bcoe_c8
train
js
7e24d3ff79ebf8869f967f3c5178b5121a0fc771
diff --git a/scripts/build/build-docs.js b/scripts/build/build-docs.js index <HASH>..<HASH> 100644 --- a/scripts/build/build-docs.js +++ b/scripts/build/build-docs.js @@ -2,6 +2,7 @@ "use strict"; +const fs = require("fs"); const path = require("path"); const shell = require("shelljs"); const parsers = require("./parsers"); @@ -39,6 +40,13 @@ shell.exec( `node_modules/babel-cli/bin/babel.js ${docs}/index.js --out-file ${docs}/index.js --presets=es2015` ); +// wrap content with IIFE to avoid `assign to readonly` error on Safari +(function(filename) { + const content = fs.readFileSync(filename, "utf8"); + const wrapped = `"use strict";(function(){${content}}());`; + fs.writeFileSync(filename, wrapped); +})(`${docs}/index.js`); + shell.exec( `rollup -c scripts/build/rollup.docs.config.js --environment filepath:parser-babylon.js -i ${prettierPath}/parser-babylon.js` );
fix(playground): avoid `assign to readonly` error on Safari (#<I>) * fix(playground): suppress`assign to readonly` error * fix(playground): avoid `assign to readonly` error
josephfrazier_prettier_d
train
js
b3c498210c30c884182a379a9d315232f1ca9c85
diff --git a/tooling/circle-cli/commands/trigger-build.js b/tooling/circle-cli/commands/trigger-build.js index <HASH>..<HASH> 100644 --- a/tooling/circle-cli/commands/trigger-build.js +++ b/tooling/circle-cli/commands/trigger-build.js @@ -64,10 +64,31 @@ module.exports = { return build; }) .then(blockUntilComplete(argv, ci)) + // TODO if status is retried, start polling for completion of new job .then(tap((result) => statusToXunit(argv, ci, result))) .then(tap(() => downloadArtifacts(argv, ci, build))) .then((result) => { + /* eslint complexity: [0] */ console.log(`build ${build.build_num} completed with status ${result.status}`); + switch (result.status) { + case `success`: + case `fixed`: + case `failed`: + process.exit(0); + break; + case `retried`: + case `canceled`: + case `timedout`: + case `not_run`: + case `running`: + case `queued`: + case `scheduled`: + case `not_running`: + case `no_tests`: + case `infrastructure_fail`: + default: + process.exit(1); + } }) .catch(exitWithError); }
chore(tooling): be more aggressive about non-test build failures
webex_spark-js-sdk
train
js
a06c1c6830203a1d0c27b59e605d2d4bc00a6ac4
diff --git a/packages/vue-styleguidist/scripts/make-webpack-config.js b/packages/vue-styleguidist/scripts/make-webpack-config.js index <HASH>..<HASH> 100644 --- a/packages/vue-styleguidist/scripts/make-webpack-config.js +++ b/packages/vue-styleguidist/scripts/make-webpack-config.js @@ -147,10 +147,16 @@ module.exports = function(config, env) { webpackConfig = merge(webpackConfig, { plugins: [new webpack.HotModuleReplacementPlugin()], output: { - publicPath: config.styleguidePublicPath + publicPath: + webpackConfig.output && webpackConfig.output.publicPath + ? webpackConfig.output.publicPath + : config.styleguidePublicPath }, devServer: { - publicPath: config.styleguidePublicPath + publicPath: + webpackConfig.devServer && webpackConfig.devServer.publicPath + ? webpackConfig.devServer.publicPath + : config.styleguidePublicPath }, entry: [require.resolve('react-dev-utils/webpackHotDevClient')] })
fix: webpackConfig has priority on publicPath closes #<I>
vue-styleguidist_vue-styleguidist
train
js
568ba0a19a6050e37ba713c41aac1b5ef20e462f
diff --git a/src/runner.js b/src/runner.js index <HASH>..<HASH> 100644 --- a/src/runner.js +++ b/src/runner.js @@ -40,6 +40,9 @@ function runUser(userId, onlyInRoom) { if(runResult.memory) { promises.push(driver.saveUserMemory(userId, runResult.memory, onlyInRoom)); } + if(runResult.memorySegments) { + promises.push(driver.saveUserMemorySegments(userId, runResult.memorySegments)); + } if(runResult.intents) { promises.push(driver.saveUserIntents(userId, runResult.intents)); }
feat(runtime): new asynchronous memory segments feature
screeps_engine
train
js
be96db1d1dadcb8f30152565da1f804833b68c77
diff --git a/config/webpack/webpack.config.ssr.js b/config/webpack/webpack.config.ssr.js index <HASH>..<HASH> 100644 --- a/config/webpack/webpack.config.ssr.js +++ b/config/webpack/webpack.config.ssr.js @@ -19,6 +19,7 @@ const { webpackDecorator, polyfills, isStartScript, + sourceMapsProd, supportedBrowsers, } = require('../../context'); @@ -85,6 +86,9 @@ const makeWebpackConfig = ({ clientPort, serverPort }) => { const publicPath = isStartScript ? clientServer : paths.publicPath; + const sourceMapStyle = isStartScript ? 'inline-source-map' : 'source-map'; + const useSourceMaps = isStartScript || sourceMapsProd; + const webpackStatsFilename = 'webpackStats.json'; // The file mask is set to just name in start/dev mode as contenthash @@ -97,7 +101,7 @@ const makeWebpackConfig = ({ clientPort, serverPort }) => { name: 'client', mode: webpackMode, entry: clientEntry, - devtool: isStartScript ? 'inline-source-map' : false, + devtool: useSourceMaps ? sourceMapStyle : false, output: { path: paths.target, publicPath,
feat: Add support for sourceMapsProd in SSR (#<I>)
seek-oss_sku
train
js
9456d72c70a13129dfc17d58ba9e6eb93a9f7435
diff --git a/packages/node_modules/samples/browser-single-party-call/app.js b/packages/node_modules/samples/browser-single-party-call/app.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/samples/browser-single-party-call/app.js +++ b/packages/node_modules/samples/browser-single-party-call/app.js @@ -29,6 +29,16 @@ let spark; function connect() { if (!spark) { spark = ciscospark.init({ + config: { + phone: { + // Turn on group calling; there's a few minor breaking changes with + // regards to how single-party calling works (hence, the opt-in), but + // this is how things are going to work in 2.0 and if you plan on + // doing any group calls, you'll need this turned on for your entire + // app anyway. + enableExperimentalGroupCallingSupport: true + } + }, credentials: { access_token: document.getElementById(`access-token`).value }
feat(samples): add the group calling flag to the single-party example
webex_spark-js-sdk
train
js
ef536f35f09038f92f24b9f2de4c8fe464ab36c2
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -72,9 +72,7 @@ function tryCatch (fn, opts, cb) { cb = isAsyncFn ? utils.once(utils.dezalgo(cb)) : utils.once(cb) - opts = opts && typeof opts === 'object' - ? opts - : {} + opts = utils.extend({}, opts) opts.passCallback = typeof opts.passCallback === 'boolean' ? opts.passCallback : isAsyncFn // if `fn` is async, pass callback automatically diff --git a/utils.js b/utils.js index <HASH>..<HASH> 100644 --- a/utils.js +++ b/utils.js @@ -11,9 +11,11 @@ var once = require('once') var dezalgo = require('dezalgo') var tryCatch = require('try-catch-callback') var isAsyncFn = require('is-async-function') +var extendShallow = require('extend-shallow') var utils = {} utils.once = once +utils.extend = extendShallow utils.dezalgo = dezalgo utils.isAsync = isAsyncFn utils.tryCatchCallback = tryCatch
fix(options): immutable options object use extend-shallow to shallow clone passed options object, better defaults fixes #7
hybridables_try-catch-core
train
js,js
835676148e32817599ed4d9f57cfb579c7268e6a
diff --git a/okdownload/src/main/java/com/liulishuo/okdownload/core/breakpoint/BreakpointStoreOnCache.java b/okdownload/src/main/java/com/liulishuo/okdownload/core/breakpoint/BreakpointStoreOnCache.java index <HASH>..<HASH> 100644 --- a/okdownload/src/main/java/com/liulishuo/okdownload/core/breakpoint/BreakpointStoreOnCache.java +++ b/okdownload/src/main/java/com/liulishuo/okdownload/core/breakpoint/BreakpointStoreOnCache.java @@ -141,14 +141,20 @@ public class BreakpointStoreOnCache implements DownloadStore { @Override public boolean markFileDirty(int id) { if (!fileDirtyList.contains(id)) { - fileDirtyList.add(id); - return true; + synchronized (fileDirtyList) { + if (!fileDirtyList.contains(id)) { + fileDirtyList.add(id); + return true; + } + } } return false; } @Override public boolean markFileClear(int id) { - return fileDirtyList.remove(Integer.valueOf(id)); + synchronized (fileDirtyList) { + return fileDirtyList.remove(Integer.valueOf(id)); + } } @Override public synchronized void remove(int id) {
fix: fix raise IndexOutOfBoundsException issue because fileDirtyList exposed with non-thread-safe
lingochamp_okdownload
train
java
21ec9ff48c74c69f63ee0bcb04c001f01e3530ca
diff --git a/app/src/components/Resources/index.js b/app/src/components/Resources/index.js index <HASH>..<HASH> 100644 --- a/app/src/components/Resources/index.js +++ b/app/src/components/Resources/index.js @@ -22,6 +22,13 @@ export default function Resources() { url={'https://protocols.opentrons.com/'} /> </CardRow> + <CardRow> + <ResourceCard + title="Python Protocol API Documentation" + description="Browse documentation for the OT-2 Python Protocol API" + url={'https://docs.opentrons.com/'} + /> + </CardRow> </CardContainer> ) }
feat(app): add link to docs in resources card (#<I>)
Opentrons_opentrons
train
js
8edd6dded5cdf2a6b418a2d7b6543202511487c8
diff --git a/config/karma.conf.js b/config/karma.conf.js index <HASH>..<HASH> 100644 --- a/config/karma.conf.js +++ b/config/karma.conf.js @@ -4,12 +4,16 @@ module.exports = function(config){ files : [ 'app/lib/angular/angular.js', - 'app/lib/angular/angular-*.js', + 'app/lib/angular/angular-.js', 'test/lib/angular/angular-mocks.js', 'app/js/**/*.js', 'test/unit/**/*.js' ], + exclude : [ + 'app/lib/angular/*.min.js' + ], + autoWatch : true, frameworks: ['jasmine'], @@ -20,7 +24,7 @@ module.exports = function(config){ 'karma-junit-reporter', 'karma-chrome-launcher', 'karma-firefox-launcher', - 'karma-jasmine' + 'karma-jasmine' ], junitReporter : {
fix(karma): Excluded minified files from unit test
angular_angular-seed
train
js
8b64efa141970480673b2cd0e76d6551bc179b48
diff --git a/examples/searchLibrary.js b/examples/searchLibrary.js index <HASH>..<HASH> 100644 --- a/examples/searchLibrary.js +++ b/examples/searchLibrary.js @@ -2,6 +2,6 @@ var Sonos = require('../').Sonos var sonos = new Sonos(process.env.SONOS_HOST || '192.168.1.19', process.env.SONOS_PORT || 1400) -sonos.searchMusicLibrary('tracks', 'orange crush', function (err, data) { +sonos.searchMusicLibrary('tracks', 'orange crush', {}, function (err, data) { console.log(err, data) })
fix: missing options param in example (#<I>)
bencevans_node-sonos
train
js
729b6d556b61a46e37bedd510b83ecc7063e0d01
diff --git a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/oauth/OidcUserInfoController.java b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/oauth/OidcUserInfoController.java index <HASH>..<HASH> 100644 --- a/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/oauth/OidcUserInfoController.java +++ b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/rest/oauth/OidcUserInfoController.java @@ -68,7 +68,8 @@ public class OidcUserInfoController { @Autowired private IdTokenFactory idTokenFactory; - @Autowired private List<OAuthClient> clientList; + @Autowired(required = false) + private List<OAuthClient> clientList = Collections.emptyList(); private Map<String, OAuthClient> clientMap = Collections.emptyMap();
fix: correct an issue with the OidcUserInfoController when no beans of type OAuthClient are defined
Jasig_uPortal
train
java
3e3f05b4c11268aa470e23b2b39c451c8e3bad24
diff --git a/test/specs/component/ResponsiveContainerSpec.js b/test/specs/component/ResponsiveContainerSpec.js index <HASH>..<HASH> 100644 --- a/test/specs/component/ResponsiveContainerSpec.js +++ b/test/specs/component/ResponsiveContainerSpec.js @@ -57,8 +57,8 @@ describe('<ResponsiveContainer />', () => { </ResponsiveContainer> ); - expect(wrapper.find('.inside')).to.have.attr('width').equal('0'); - expect(wrapper.find('.inside')).to.have.attr('height').equal('0'); + expect(wrapper.find('.inside')).to.have.attr('width').equal('600'); + expect(wrapper.find('.inside')).to.have.attr('height').equal('300'); }); // Note that we force height and width here which will trigger a warning.
feat: update test spec to accomodate new aspect + height feature
recharts_recharts
train
js
4de7b471e1179bbd1a3d988f3c870d6a5344992f
diff --git a/cursor.js b/cursor.js index <HASH>..<HASH> 100644 --- a/cursor.js +++ b/cursor.js @@ -239,13 +239,13 @@ Cursor.prototype._find = function(callback) { } // Return after processing command cursor - return callback(null, null); + return callback(null, result); } if (Array.isArray(result.documents[0].result)) { self.cursorState.documents = result.documents[0].result; self.cursorState.cursorId = Long.ZERO; - return callback(null, null); + return callback(null, result); } } @@ -260,7 +260,7 @@ Cursor.prototype._find = function(callback) { } // Return callback - callback(null, null); + callback(null, result); }; // Options passed to the pool
fix(cursor): callback with server response on `_find` This allows us to properly include the server reply in APM events in the porcelain driver
mongodb_node-mongodb-native
train
js
2b3415dfd88488bdbab21895f2b94d2ce69bb4c7
diff --git a/build/zip.py b/build/zip.py index <HASH>..<HASH> 100644 --- a/build/zip.py +++ b/build/zip.py @@ -5,6 +5,7 @@ import sys import zipfile LINUX_BINARIES_TO_STRIP = [ + 'chromedriver', 'electron', 'libffmpeg.so', 'libnode.so' @@ -17,6 +18,8 @@ EXTENSIONS_TO_SKIP = [ PATHS_TO_SKIP = [ 'angledata', #Skipping because it is an output of //ui/gl that we don't need 'swiftshader', #Skipping because it is an output of //ui/gl that we don't need + './libVkLayer_', #Skipping because these are outputs that we don't need + './VkLayerLayer_', #Skipping because these are outputs that we don't need ] def skip_path(dep): @@ -57,7 +60,8 @@ def main(argv): with open(runtime_deps) as f: for dep in f.readlines(): dep = dep.strip() - dist_files += [dep] + if dep not in dist_files: + dist_files += [dep] if sys.platform == 'darwin': mac_zip_results = execute(['zip', '-r', '-y', dist_zip] + dist_files) else:
chore: remove duplicate and un-needed files from dist zips (#<I>) * chore: remove duplicate and un-needed files from dist zips * Strip chromedriver binaries Also, fix path for files to skip * Don't strip mksnapshot for now Mksnapshot needs special handling for arm/arm<I> because there is both an x<I> and arm/arm<I> binary in those cases.
electron_electron
train
py
3d85478e186224c28df0e43296d534363c1ef9d0
diff --git a/allauth/account/forms.py b/allauth/account/forms.py index <HASH>..<HASH> 100644 --- a/allauth/account/forms.py +++ b/allauth/account/forms.py @@ -38,7 +38,8 @@ class EmailAwarePasswordResetTokenGenerator(PasswordResetTokenGenerator): user, timestamp ) sync_user_email_addresses(user) - emails = set([user.email] if user.email else []) + email = user_email(user) + emails = set([email] if email else []) emails.update( EmailAddress.objects.filter(user=user).values_list("email", flat=True) )
fix(accounts): Attribute error for custom email field
pennersr_django-allauth
train
py
e6f5c80011e425d217aef58ec91a8e57f175fb3f
diff --git a/packages/mdc-textfield/addon/mixins/helper-text-support.js b/packages/mdc-textfield/addon/mixins/helper-text-support.js index <HASH>..<HASH> 100644 --- a/packages/mdc-textfield/addon/mixins/helper-text-support.js +++ b/packages/mdc-textfield/addon/mixins/helper-text-support.js @@ -89,5 +89,5 @@ export default Mixin.create ({ persistMessage: or ('{helperTextPersistent,errorMessage,validationMessage}'), validation: or ('{errorMessage,validationMessage}'), - message: or ('{errorMessage,validationMessage,helperText}') + message: or ('{validationMessage,errorMessage,helperText}') });
fix: Prioritize validation message or error message since error message is managed externally to the component
onehilltech_ember-cli-mdc
train
js
6692d9cb6140865ad8b7dd2c20c630930f768966
diff --git a/src/http/api/routes/webui.js b/src/http/api/routes/webui.js index <HASH>..<HASH> 100644 --- a/src/http/api/routes/webui.js +++ b/src/http/api/routes/webui.js @@ -17,7 +17,7 @@ module.exports = [ method: '*', path: '/webui', handler (request, h) { - return h.redirect('/ipfs/QmRvPGBVDBEUvrXrinMKgh8Vu8mVBbTZk3C1jJGfgWchSP') + return h.redirect('/ipfs/QmfQkD8pBSBCBxWEwFSu4XaDVSWK6bjnNuaWZjMyQbyDub') } } ]
chore: update to Web UI <I> (#<I>)
ipfs_js-ipfs
train
js
1ea7ad4e93cbf6a49f8988dc155b45ea30b9548b
diff --git a/lib/mongo_client.js b/lib/mongo_client.js index <HASH>..<HASH> 100644 --- a/lib/mongo_client.js +++ b/lib/mongo_client.js @@ -467,7 +467,7 @@ MongoClient.prototype.isConnected = function(options) { * @param {array} [options.readPreferenceTags=null] Read preference tags * @param {number} [options.numberOfRetries=5] The number of retries for a tailable cursor * @param {boolean} [options.auto_reconnect=true] Enable auto reconnecting for single server instances - * @param {number} [minSize] If present, the connection pool will be initialized with minSize connections, and will never dip below minSize connections + * @param {number} [options.minSize] If present, the connection pool will be initialized with minSize connections, and will never dip below minSize connections * @param {MongoClient~connectCallback} [callback] The command result callback * @return {Promise<MongoClient>} returns Promise if no callback passed */
chore(minSize): fixing jsdoc for minSize
mongodb_node-mongodb-native
train
js
9ca2082a033d77990c1813db3e24ff8ea7bfa0ff
diff --git a/utils/replace-html-placeholders.js b/utils/replace-html-placeholders.js index <HASH>..<HASH> 100644 --- a/utils/replace-html-placeholders.js +++ b/utils/replace-html-placeholders.js @@ -1,9 +1,8 @@ const assets = require('../html-scripts'); const sanitizeAppEnvironment = require('./sanitize-app-environment'); -const getGtmTrackingScript = tracking => { - const gtmId = tracking.gtm; - if (gtmId === 'false') return ''; +const getGtmTrackingScript = gtmId => { + if (!gtmId) return ''; const url = `https://www.googletagmanager.com/gtm.js?id=${gtmId}`; return ` <script async type="text/javascript" src="${url}"></script> @@ -24,7 +23,7 @@ const replaceHtmlPlaceholders = (indexHtmlContent, config) => ) .replace( new RegExp('__GTM_SCRIPT__', 'g'), - getGtmTrackingScript(config.tracking) + getGtmTrackingScript(config.trackingGtm) ) .replace(new RegExp('__DATALAYER_JS__', 'g'), assets.dataLayer) .replace(new RegExp('__LOADING_SCREEN_JS__', 'g'), assets.loadingScreen);
chore(k8s): declare env.json config for k8s Deployment
commercetools_merchant-center-application-kit
train
js
9f96b452f11346f2953f3647aaabd6e7044dfa69
diff --git a/lib/datasource/go.js b/lib/datasource/go.js index <HASH>..<HASH> 100644 --- a/lib/datasource/go.js +++ b/lib/datasource/go.js @@ -73,7 +73,7 @@ async function getPkgReleases(purl, config) { const githubPurl = await getSourcePurl(name); if (githubPurl) { const githubTags = await github.getPkgReleases(githubPurl, config); - if (githubTags.releases) { + if (githubTags && githubTags.releases) { githubTags.releases = githubTags.releases.filter( release => release.version && release.version.startsWith('v') );
fix(go): better check tags before releases
renovatebot_renovate
train
js
90cf3812b50881783310ce4fd904f3dd2e195424
diff --git a/lib/inspectors/data.js b/lib/inspectors/data.js index <HASH>..<HASH> 100644 --- a/lib/inspectors/data.js +++ b/lib/inspectors/data.js @@ -2,6 +2,7 @@ var iconv = require('iconv-lite'); var zlib = require('zlib'); var fs = require('fs'); var fse = require('fs-extra'); +var path = require('path'); var MAX_REQ_SIZE = 256 * 1024; var MAX_RES_SIZE = 512 * 1024; var LOCALHOST = '127.0.0.1'; @@ -185,6 +186,10 @@ function emitDataEvents(req, res, proxy) { if (!exportsFile) { return; } + var root = req.rules.exports.root; + if (root) { + exportsFile = path.join(root, exportsFile); + } fse.ensureFile(exportsFile, function(err) { if (err) { return;
feat: Support exports using relative paths
avwo_whistle
train
js
b72ef7c9ca9d1bae0b2a8cd9f5bc9bc1f7532c14
diff --git a/src/components/menuBar/js/menuBarDirective.js b/src/components/menuBar/js/menuBarDirective.js index <HASH>..<HASH> 100644 --- a/src/components/menuBar/js/menuBarDirective.js +++ b/src/components/menuBar/js/menuBarDirective.js @@ -92,10 +92,7 @@ angular .module('material.components.menuBar') .directive('mdMenuBar', MenuBarDirective); -/** - * - * @ngInjdect - */ +/* @ngInject */ function MenuBarDirective($mdUtil, $mdTheming) { return { restrict: 'E', diff --git a/src/components/menuBar/js/menuItemDirective.js b/src/components/menuBar/js/menuItemDirective.js index <HASH>..<HASH> 100644 --- a/src/components/menuBar/js/menuItemDirective.js +++ b/src/components/menuBar/js/menuItemDirective.js @@ -3,10 +3,7 @@ angular .module('material.components.menuBar') .directive('mdMenuItem', MenuItemDirective); - /** - * - * @ngInjdect - */ + /* @ngInject */ function MenuItemDirective() { return { require: ['mdMenuItem', '?ngModel'],
fix(build): closure build needs @ngInject annotation It was labeled as "@ngInjdect" instead of "@ngInject". Refs #<I>. Closes #<I>
angular_material
train
js,js
fc44605fbc05f54af0cd5c378b5941b16d28e326
diff --git a/lib/node-static.js b/lib/node-static.js index <HASH>..<HASH> 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -6,8 +6,8 @@ const fs = require('fs') , http = require('http') , path = require('path') , mime = require('mime') - , util = require('./node-static/util') , minimatch = require('minimatch') + , util = require('./node-static/util') , pkg = require('../package.json'); const version = pkg.version.split('.');
refactor: list 3rd party deps. together
cloudhead_node-static
train
js
0814658223d21d5a1a92b7ad228965bf64311806
diff --git a/lib/policies/service_bus_policy.js b/lib/policies/service_bus_policy.js index <HASH>..<HASH> 100644 --- a/lib/policies/service_bus_policy.js +++ b/lib/policies/service_bus_policy.js @@ -10,6 +10,7 @@ module.exports = new Policy({ maxMessageSize: 10000, // Arbitrary choice }, encoder: function(body) { + if (body instanceof Buffer) return body; var bodyStr = body; if (typeof body !== 'string') { bodyStr = JSON.stringify(body);
fix(ServiceBusPolicy): Avoid jsonifying Buffers
noodlefrenzy_node-amqp10
train
js
2f9df55d8d08bb9fb491893cba0f903e56dd1a8f
diff --git a/webapps/webapp/src/main/webapp/app/cockpit/pages/processInstance.js b/webapps/webapp/src/main/webapp/app/cockpit/pages/processInstance.js index <HASH>..<HASH> 100644 --- a/webapps/webapp/src/main/webapp/app/cockpit/pages/processInstance.js +++ b/webapps/webapp/src/main/webapp/app/cockpit/pages/processInstance.js @@ -233,7 +233,9 @@ ngDefine('cockpit.pages.processInstance', [ child.name = getActivityName(bpmnElement); activityIdToInstancesMap[activityId] = instances; - instanceIdToInstanceMap[child.id] = child; + if(!instanceIdToInstanceMap[child.id]) { + instanceIdToInstanceMap[child.id] = child; + } instances.push(child); decorateActivityInstanceTree(child); @@ -250,7 +252,9 @@ ngDefine('cockpit.pages.processInstance', [ transition.name = getActivityName(bpmnElement); activityIdToInstancesMap[activityId] = instances; - instanceIdToInstanceMap[transition.id] = transition; + if(!instanceIdToInstanceMap[transition.id]) { + instanceIdToInstanceMap[transition.id] = transition; + } instances.push(transition); } }
fix(cockpit): variable scope with TransitionInst - set correct variable scope for variables in Transition Instance related to #CAM-<I>
camunda_camunda-bpm-platform
train
js
58b61929b930052bc20eb682ad5866d019942a63
diff --git a/rocketbelt/base/rocketbelt.js b/rocketbelt/base/rocketbelt.js index <HASH>..<HASH> 100644 --- a/rocketbelt/base/rocketbelt.js +++ b/rocketbelt/base/rocketbelt.js @@ -43,6 +43,14 @@ 'role': 'role' }; + // Self-removing event listener. + window.rb.once = (node, type, callback) => { + node.addEventListener(type, function handler(e) { + e.target.removeEventListener(e.type, handler); + return callback(e); + }); + }; + window.rb.getShortId = function getShortId() { // Break the id into 2 parts to provide enough bits to the random number. // This should be unique up to 1:2.2 bn.
feat(Javascript): Add vanilla self-removing event handler.
Pier1_rocketbelt
train
js
e39dcacea2b5f7b169519c1b8ec7e6ef18899fb5
diff --git a/src/components/toast/toast.js b/src/components/toast/toast.js index <HASH>..<HASH> 100644 --- a/src/components/toast/toast.js +++ b/src/components/toast/toast.js @@ -24,8 +24,9 @@ let ] Events.on('app:vue-ready', (_Vue) => { - toast = new _Vue(Toast) - document.body.appendChild(toast.$el) + let node = document.createElement('div') + document.body.appendChild(node) + toast = new _Vue(Toast).$mount(node) }) function create (opts, defaults) {
refactor: [vue2] Toast
quasarframework_quasar
train
js
28b5f11b6d94d1dfb9056f155902fc5539bd6797
diff --git a/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js b/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js index <HASH>..<HASH> 100644 --- a/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js +++ b/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js @@ -81,7 +81,9 @@ export default class CoreYarnGenerator extends Generator { const pkg = this.fs.readJSON(this.destinationPath('package.json')); if (pkg.scripts.preversion) { - this.spawnCommandSync('yarn', ['run', 'preversion']); + try { + this.spawnCommandSync('yarn', ['run', 'preversion']); + } catch {} } else { if (pkg.scripts.build) { this.spawnCommandSync('yarn', ['run', 'build']);
fix(pob): add try/catch when running preversion script
christophehurpeau_pob-lerna
train
js
ce3be0397afa4ff5742b1ae3177e8b6cb4657e33
diff --git a/packages/cozy-pouch-link/src/PouchManager.js b/packages/cozy-pouch-link/src/PouchManager.js index <HASH>..<HASH> 100644 --- a/packages/cozy-pouch-link/src/PouchManager.js +++ b/packages/cozy-pouch-link/src/PouchManager.js @@ -114,10 +114,11 @@ export default class PouchManager { } console.info('Start replication loop') delay = delay || this.options.replicationDelay || DEFAULT_DELAY - this._stopReplicationLoop = promises.setInterval( - () => this.replicateOnce(), - delay - ) + this._stopReplicationLoop = promises.setInterval(() => { + if (window.navigator.onLine) { + this.replicateOnce() + } + }, delay) this.addListener() return this._stopReplicationLoop }
fix: Launch replication when device are online 📞
cozy_cozy-client
train
js
adaf1d828abb5677172a288e157f83f0967e0726
diff --git a/intranet/apps/eighth/models.py b/intranet/apps/eighth/models.py index <HASH>..<HASH> 100644 --- a/intranet/apps/eighth/models.py +++ b/intranet/apps/eighth/models.py @@ -509,8 +509,8 @@ class EighthBlock(AbstractBaseEighthModel): blocks = (EighthBlock.objects.get_blocks_this_year().order_by( "-date", "-block_letter").filter(Q(date__lt=self.date) | (Q(date=self.date) & Q(block_letter__lt=self.block_letter)))) if quantity == -1: - return reversed(blocks) - return reversed(blocks[:quantity]) + return blocks.reverse() + return blocks[:quantity].reverse() def is_today(self): """Does the block occur today?"""
refactor: make EighthBlock.previous_blocks() return a QuerySet
tjcsl_ion
train
py
58bfcd09c585aac839758c66b880a4b5aad4007f
diff --git a/lib/plugins/gzip.js b/lib/plugins/gzip.js index <HASH>..<HASH> 100644 --- a/lib/plugins/gzip.js +++ b/lib/plugins/gzip.js @@ -9,7 +9,12 @@ var assert = require('assert-plus'); function _writeHead(originalFunction) { this.removeHeader('Content-Length'); - originalFunction.apply(this, Array.prototype.slice.call(arguments, 1)); + var argsLength = arguments.length; + var args = new Array(argsLength - 1); + for (var i = 1; i < argsLength; i++) { + args[i - 1] = arguments[i]; + } + originalFunction.apply(this, args); } ///--- API
fix: arguments leak during _writeHead (#<I>)
restify_plugins
train
js
f0990d58d4be2ef2e87e321dc8aaeb957e6a2d27
diff --git a/src/components/Tooltip/Tooltip.react.js b/src/components/Tooltip/Tooltip.react.js index <HASH>..<HASH> 100644 --- a/src/components/Tooltip/Tooltip.react.js +++ b/src/components/Tooltip/Tooltip.react.js @@ -35,7 +35,7 @@ class Tooltip extends React.Component<Props, State> { const classes = cn( "tooltip", - placement ? "bs-tooltip-" + placement : null, + placement && "bs-tooltip-" + placement, { show: this.state.isShown, }, @@ -57,7 +57,7 @@ class Tooltip extends React.Component<Props, State> { </div> )} </Reference> - {this.state.isShown ? ( + {this.state.isShown && ( <Popper placement={placement} eventsEnabled={true}> {({ ref, style, placement }: PopperChildrenProps) => { return ( @@ -73,7 +73,7 @@ class Tooltip extends React.Component<Props, State> { ); }} </Popper> - ) : null} + )} </Manager> ); }
refactor(Tooltip): Change ternary operators into logical operators All null returning ternary operators ( X ? Y : null ) have been replaced with logical operators ( X && Y)
tabler_tabler-react
train
js
8445b710bdd34e0847f9f2bfd062b26606703e03
diff --git a/src/browsing.js b/src/browsing.js index <HASH>..<HASH> 100644 --- a/src/browsing.js +++ b/src/browsing.js @@ -53,17 +53,33 @@ function lines(text) { return text.split(/\r\n|\n\r|\r|\n/); } +function inheritedMeta(m, name) { + if (m[name]) { + return m[name]; + } else { + var parent = m.belongsTo; + if (parent) { + return inheritedMeta(mm.get(parent), name); + } else { + return null; + } + } +} + function getObjectMeta(object) { - var result = {}; if (Object(object) !== object) { - return result; + return {}; } - while (object != null) { - result = extend(mm.get(object), result); - object = prototypeOf(object); - } - - return result; + var meta = mm.get(object); + return extend(meta, { + authors : inheritedMeta(meta, 'authors'), + licence : inheritedMeta(meta, 'licence'), + since : inheritedMeta(meta, 'since'), + platforms : inheritedMeta(meta, 'platforms'), + repository : inheritedMeta(meta, 'repository'), + stability : inheritedMeta(meta, 'stability'), + portability : inheritedMeta(meta, 'portability') + }); } function signature(meta) {
feat: Allows inheritance of some properties from container objects.
robotlolita_metamagical
train
js
4199c35e1c3b10b4ac32a51403db33909e7c59b2
diff --git a/lib/util/data-server.js b/lib/util/data-server.js index <HASH>..<HASH> 100644 --- a/lib/util/data-server.js +++ b/lib/util/data-server.js @@ -197,6 +197,9 @@ module.exports = function init(_proxy) { var result; if (ip === 'self') { ip = clientIp; + cid = clientId; + } else if (ip === 'clientIp') { + ip = clientIp; } if (ip === 'clientId') { if (clientId) { cid = clientId; @@ -211,6 +214,9 @@ module.exports = function init(_proxy) { cid = clientId; } else { if (item === 'self') { + cid = clientId; + item = clientIp; + } else if (item === 'clientIp') { item = clientIp; } if (net.isIP(item) && list.indexOf(item) === -1) {
feat: self <=> clientIp + clientId
avwo_whistle
train
js
75d3938a4842b2aa667dcd902e376a5a01a797e5
diff --git a/commitizen/git.py b/commitizen/git.py index <HASH>..<HASH> 100644 --- a/commitizen/git.py +++ b/commitizen/git.py @@ -21,7 +21,10 @@ class GitCommit(GitObject): @property def message(self): - return f"{self.title}\n\n{self.body}" + message = self.title + if self.body: + message = message + f"\n\n{self.body}" + return message def __repr__(self): return f"{self.title} ({self.rev})"
fix(git): fix returned value for GitCommit.message when body is empty GitCommit.message should return only title without excess newlines if commit body is empty.
Woile_commitizen
train
py
61c70b442bbd08858ce2435cf410f31a7ec91d37
diff --git a/packages/www/webpack.client.config.base.js b/packages/www/webpack.client.config.base.js index <HASH>..<HASH> 100644 --- a/packages/www/webpack.client.config.base.js +++ b/packages/www/webpack.client.config.base.js @@ -58,7 +58,8 @@ const views = [ ["photos", `${config.get("www.publishUrl")}${config.get("www.photosUrl")}`], ["words", `${config.get("www.publishUrl")}${config.get("www.wordsUrl")}`], ["resume", `${config.get("www.publishUrl")}${config.get("www.resumeUrl")}`], - ["letter", `${config.get("www.publishUrl")}${config.get("www.letterUrl")}`] + ["letter", `${config.get("www.publishUrl")}${config.get("www.letterUrl")}`], + ["map", `${config.get("www.publishUrl")}${config.get("www.mapUrl")}`] ]; module.exports = ({plugins, ...overrides}) => webpackBaseConfig({
fix(www): Generate a `map.html` file so we don't give crawlers <I>s. SEO~~
randytarampi_me
train
js
ba7fd2e1b428b2b76378aa90d0a19e8ec0d12498
diff --git a/lib/utils/telemetry/areDisabled.js b/lib/utils/telemetry/areDisabled.js index <HASH>..<HASH> 100644 --- a/lib/utils/telemetry/areDisabled.js +++ b/lib/utils/telemetry/areDisabled.js @@ -2,4 +2,8 @@ const configUtils = require('@serverless/utils/config'); -module.exports = Boolean(process.env.SLS_TRACKING_DISABLED || configUtils.get('trackingDisabled')); +module.exports = Boolean( + process.env.SLS_TELEMETRY_DISABLED || + process.env.SLS_TRACKING_DISABLED || + configUtils.get('trackingDisabled') +);
feat(Telemetry): Allow to disable telemetry via `SLS_TELEMETRY_DISABLED`
serverless_serverless
train
js
2d11a28e4ef20b9d8c534e1152de98b4fabc1d55
diff --git a/lib/gruff/base.rb b/lib/gruff/base.rb index <HASH>..<HASH> 100644 --- a/lib/gruff/base.rb +++ b/lib/gruff/base.rb @@ -19,9 +19,6 @@ require 'bigdecimal' module Gruff class Base - # Draw extra lines showing where the margins and text centers are - DEBUG = false - # Space around text elements. Mostly used for vertical spacing LEGEND_MARGIN = TITLE_MARGIN = 20.0 LABEL_MARGIN = 10.0 @@ -804,18 +801,6 @@ module Gruff private - # Takes a block and draws it if DEBUG is true. - # - # Example: - # debug { @d.rectangle x1, y1, x2, y2 } - def debug - if DEBUG - @d.fill 'transparent' - @d.stroke 'turquoise' - yield - end - end - # Return a formatted string representing a number value that should be # printed as a label. def label(value, increment)
refactor: Remove unused debug method (#<I>)
topfunky_gruff
train
rb
a2c471a2acce7b81659096d989da10d0eb4f776b
diff --git a/tasks/lint.js b/tasks/lint.js index <HASH>..<HASH> 100644 --- a/tasks/lint.js +++ b/tasks/lint.js @@ -2,7 +2,7 @@ var gulp = require('gulp'); var plugins = require('gulp-load-plugins')(); gulp.task('lint', function() { - return gulp.src(['gulpfile.js', 'tasks/**/*.js', 'src/**/*.js', 'spec/**/*.js', '!src/lib/console.js']) + return gulp.src(['gulpfile.js', 'tasks/**/*.js', 'src/**/*.js', 'spec/**/*.js']) .pipe(plugins.plumber()) .pipe(plugins.eslint()) .pipe(plugins.eslint.format('stylish'))
chore(ci): Remove missing file from gulp lint task
pivotal-cf_dr-frankenstyle
train
js
265ace33f5bbcd313113ac87b4750c7b05f15f26
diff --git a/src/lib/InstantSearch.js b/src/lib/InstantSearch.js index <HASH>..<HASH> 100644 --- a/src/lib/InstantSearch.js +++ b/src/lib/InstantSearch.js @@ -1,4 +1,6 @@ -import algoliasearch from 'algoliasearch/lite'; +// we use the fullpath to the lite build to solve a meteor.js issue: +// https://github.com/algolia/instantsearch.js/issues/1024#issuecomment-221618284 +import algoliasearch from 'algoliasearch/src/browser/builds/algoliasearchLite.js'; import algoliasearchHelper from 'algoliasearch-helper'; import forEach from 'lodash/collection/forEach'; import merge from 'lodash/object/merge';
fix(meteorjs): lite build must point to the browser lite (#<I>) fixes #<I> Actually I had previously fixed #<I> by pointing to the lite build (side effect). But since <URL>)
algolia_instantsearch.js
train
js
3317899440419b313807b62113fbd09c3037a368
diff --git a/app/templates/entry/client-prefetch.js b/app/templates/entry/client-prefetch.js index <HASH>..<HASH> 100644 --- a/app/templates/entry/client-prefetch.js +++ b/app/templates/entry/client-prefetch.js @@ -104,8 +104,8 @@ export function addPreFetchHooks (router<%= store ? ', store' : '' %>, publicPat preFetchList.reduce( (promise, preFetch) => promise.then(() => hasRedirected === false && preFetch({ <% if (store) { %>store,<% } %> - currentRoute: to.value, - previousRoute: from.value, + currentRoute: to, + previousRoute: from, redirect, urlPath, publicPath
fix(app): preFetch's currentRoute is a ref instead of the actual value #<I>
quasarframework_quasar
train
js
1d120b6b3aefe6efaa3f7d9254edb7c906a034b0
diff --git a/packages/button/src/Button.js b/packages/button/src/Button.js index <HASH>..<HASH> 100644 --- a/packages/button/src/Button.js +++ b/packages/button/src/Button.js @@ -160,6 +160,10 @@ const buttonStyles = props => { // vertically align correctly without setting the lineHeight equal to the // smallest fontSize (or smaller). lineHeight: theme.ButtonContent_fontSize_small, + // if the user puts in a small icon in a large button + // we want to force the button to be round/square + // (really just pertinent on icon-only buttons) + minWidth: theme[`Button_size_${size}`], // Because we use boxSizing: 'border-box', we need to substract the borderWidth // from the padding to have the fixed height of Root and Content be correct. padding: `${parseFloat(theme[`Button_padding_${size}`]) - @@ -247,8 +251,10 @@ const contentStyles = props => { }; const innerStyles = { + alignItems: 'center', display: 'inline-flex', justifyContent: 'center', + maxHeight: '100%', width: '100%' };
fix(button): Fix vertical alignment
mineral-ui_mineral-ui
train
js
f3bc3596d109362c75fea7de9fb125037923d43a
diff --git a/src/select.js b/src/select.js index <HASH>..<HASH> 100644 --- a/src/select.js +++ b/src/select.js @@ -1180,6 +1180,8 @@ }; function onDocumentClick(e) { + if (!$select.open) return; //Skip it if dropdown is close + var contains = false; if (window.jQuery) { @@ -1191,8 +1193,12 @@ } if (!contains && !$select.clickTriggeredSelect) { - var targetScope = angular.element(e.target).scope(); - $select.close(targetScope && targetScope.$select && targetScope.$select !== $select); // Skip focusser if the target is another select + //Will lose focus only with certain targets + var focusableControls = ['input','button','textarea']; + var targetScope = angular.element(e.target).scope(); //To check if target is other ui-select + var skipFocusser = targetScope && targetScope.$select && targetScope.$select !== $select; //To check if target is other ui-select + if (!skipFocusser) skipFocusser = ~focusableControls.indexOf(e.target.tagName.toLowerCase()); //Check if target is input, button or textarea + $select.close(skipFocusser); scope.$digest(); } $select.clickTriggeredSelect = false;
fix(focus): prevent to focus stealing on focusable targets
angular-ui_ui-select
train
js
b4a7ad7a0c98202650968af9137b5d6ca156a934
diff --git a/lib/cursor.js b/lib/cursor.js index <HASH>..<HASH> 100644 --- a/lib/cursor.js +++ b/lib/cursor.js @@ -1020,8 +1020,7 @@ Cursor.prototype.transformStream = function(options) { Cursor.prototype.explain = function(callback) { if (this.operation) { this.operation.options.explain = true; - executeOperation(this.s.topology, this.operation, callback); - return; + return executeOperation(this.s.topology, this.operation, callback); } this.s.cmd.explain = true;
fix: return `executeOperation` for explain, if promise is desired
mongodb_node-mongodb-native
train
js
a1d1b5a2f621ba50d986d97b96ff32f33e9a1106
diff --git a/src/rollup.js b/src/rollup.js index <HASH>..<HASH> 100644 --- a/src/rollup.js +++ b/src/rollup.js @@ -54,7 +54,7 @@ module.exports = function linaria({ result.code += `\nimport ${JSON.stringify(filename)};\n`; /* eslint-disable-next-line consistent-return */ - return result.code; + return { code: result.code, map: result.sourceMap }; }, }; };
feat: add a sourcemap to rollup output (#<I>)
callstack_linaria
train
js
fd0f6e15415cf9c75c2c71d15ab324da8b5beb30
diff --git a/superset/connectors/base/models.py b/superset/connectors/base/models.py index <HASH>..<HASH> 100644 --- a/superset/connectors/base/models.py +++ b/superset/connectors/base/models.py @@ -410,7 +410,7 @@ class BaseDatasource( fkmany: List[Column], fkmany_class: Type[Union["BaseColumn", "BaseMetric"]], key_attr: str, - ) -> List[Column]: # pylint: disable=too-many-locals + ) -> List[Column]: """Update ORM one-to-many list from object list Used for syncing metrics and columns using the same code"""
fix: removed disabled lint rule `too-many-locals` in connectors/base/models.py (#<I>)
apache_incubator-superset
train
py
6b8077c8f39c88b5e3939248f098bd1cf0b3bddc
diff --git a/routes/discover.js b/routes/discover.js index <HASH>..<HASH> 100644 --- a/routes/discover.js +++ b/routes/discover.js @@ -1,4 +1,11 @@ /** + * Module dependencies + */ + +var Scope = require('../models/Scope'); + + +/** * Well-Known Endpoint */ @@ -9,7 +16,18 @@ module.exports = function (server) { */ server.get('/.well-known/openid-configuration', function (req, res, next) { - res.json(server.OpenIDConfiguration); + Scope.list(function (err, scopes) { + if (err) { return next(err); } + + // Get a list of scope names + scopes = scopes.map(function (scope) { + return scope.name; + }); + + // Update the OpenIDConfiguration and respond + server.OpenIDConfiguration.scopes_supported = scopes; + res.json(server.OpenIDConfiguration); + }); }); };
fix(discovery): include all registered scopes in server metadata
anvilresearch_connect
train
js
09e9ca6fba221e7ddbf577f68ddc04fbe96363d5
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 @@ -6,7 +6,7 @@ import { formatTime } from '@front/util/format' import { useApps, getApps } from '../apps' import { getBridge } from '../bridge' -const STACK_DURATION = 10 +const STACK_DURATION = 50 const startTime = ref(0) const endTime = ref(0) @@ -122,13 +122,7 @@ function addEvent (appId, event, layer) { function stackEvent (event) { const roundedTime = Math.round(event.time / STACK_DURATION) - // Try neighbors too - const times = [roundedTime, roundedTime - STACK_DURATION, roundedTime + STACK_DURATION] - let wasStacked = false - for (const k in times) { - wasStacked = !!_stackEvent(event, times[k]) - if (wasStacked) break - } + const wasStacked = !!_stackEvent(event, roundedTime) if (!wasStacked) { event.layer.eventTimeMap[roundedTime] = event event.layer.displayedEvents.push(event)
refactor(timeline): simplify auto-stacking
vuejs_vue-devtools
train
js
7a407c9a30306ba6927dda7cfd277181a23f0f08
diff --git a/pgcopy/inspect.py b/pgcopy/inspect.py index <HASH>..<HASH> 100644 --- a/pgcopy/inspect.py +++ b/pgcopy/inspect.py @@ -10,10 +10,7 @@ def get_types(conn, schema, table): SELECT a.attname, t.typcategory AS type_category, - CASE - WHEN t.typcategory = 'A' THEN et.typname - ELSE t.typname - END AS type_name, + COALESCE(et.typname, t.typname) AS type_name, a.atttypmod AS type_mod, a.attnotnull AS not_null, t.typelem
refactor: use COALESCE
altaurog_pgcopy
train
py