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
8d323b74d8ab38ec27735efe5ba608f01cf28c36
diff --git a/src/build/browser.js b/src/build/browser.js index <HASH>..<HASH> 100644 --- a/src/build/browser.js +++ b/src/build/browser.js @@ -39,8 +39,8 @@ function minify (ctx, task) { return fs.readFile(path.join(process.cwd(), 'dist', 'index.js')) .then((code) => { const result = Uglify.minify(code.toString(), { - mangle: false, - compress: false + mangle: true, + compress: { unused: false } }) if (result.error) { throw result.error
feat: enable uglify mangle and compress
ipfs_aegir
train
js
690e84ef913d3f8f6584ec30d764eb05bf52b6cf
diff --git a/tests/FunctionalTestCase.php b/tests/FunctionalTestCase.php index <HASH>..<HASH> 100644 --- a/tests/FunctionalTestCase.php +++ b/tests/FunctionalTestCase.php @@ -28,7 +28,7 @@ class FunctionalTestCase extends \Orchestra\Testbench\TestCase /** * {@inheritdoc} */ - public function setUp() + public function setUp(): void { parent::setUp();
fix: FunctionalTestCase
cartalyst_tags
train
php
b5dc1727d2cf668211ee89c85b22ca32803df375
diff --git a/pkg/services/sqlstore/sqlstore.go b/pkg/services/sqlstore/sqlstore.go index <HASH>..<HASH> 100644 --- a/pkg/services/sqlstore/sqlstore.go +++ b/pkg/services/sqlstore/sqlstore.go @@ -149,8 +149,13 @@ func getEngine() (*xorm.Engine, error) { if len(fields) > 1 && len(strings.TrimSpace(fields[1])) > 0 { port = fields[1] } - cnnstr = fmt.Sprintf("user=%s password=%s host=%s port=%s dbname=%s sslmode=%s", - DbCfg.User, DbCfg.Pwd, host, port, DbCfg.Name, DbCfg.SslMode) + if DbCfg.Pwd == "" { + DbCfg.Pwd = "''" + } + if DbCfg.User == "" { + DbCfg.User = "''" + } + cnnstr = fmt.Sprintf("user=%s password=%s host=%s port=%s dbname=%s sslmode=%s", DbCfg.User, DbCfg.Pwd, host, port, DbCfg.Name, DbCfg.SslMode) case "sqlite3": if !filepath.IsAbs(DbCfg.Path) { DbCfg.Path = filepath.Join(setting.DataPath, DbCfg.Path)
fix(postgres): If password or user is empty use empty quotes for connection string, #<I>
grafana_grafana
train
go
2e03ca047c1241f7c4784f6413173bdebaf4ecad
diff --git a/src/app-router.js b/src/app-router.js index <HASH>..<HASH> 100644 --- a/src/app-router.js +++ b/src/app-router.js @@ -58,8 +58,12 @@ export class AppRouter extends Router { if (!instructionCount) { this.events.publish('router:navigation:processing', { instruction }); + } else if (instructionCount === this.maxInstructionCount - 1) { + logger.error(`${instructionCount + 1} navigation instructions have been attempted without success. Restoring last known good location.`); + restorePreviousLocation(this); + return this.dequeueInstruction(instructionCount + 1); } else if (instructionCount > this.maxInstructionCount) { - throw new Error(`Maximum navigation attempts exceeded. ${this.maxInstructionCount} navigation instructions have been attempted without success. Giving up.`); + throw new Error(`Maximum navigation attempts exceeded. Giving up.`); } let context = this.createNavigationContext(instruction);
feat(router): restore previous location after exceeding max nav attempts
aurelia_router
train
js
ca33c64b6c2c36ada5520be6817039e6be7ced93
diff --git a/src/Manager.php b/src/Manager.php index <HASH>..<HASH> 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -169,13 +169,16 @@ class Manager */ protected function buildRefreshClaims(Payload $payload) { - // assign the payload values as variables for use later - extract($payload->toArray()); + // Get the claims to be persisted from the payload + $persistentClaims = collect($payload->toArray()) + ->only($this->persistentClaims) + ->toArray(); // persist the relevant claims return array_merge( $this->customClaims, - compact($this->persistentClaims, 'sub', 'iat') + $persistentClaims, + $payload->get(['sub', 'iat']), ); }
fix(php): Dont use compact
tymondesigns_jwt-auth
train
php
9bc2659f7062cc1be7c9d5719afadcdd46e5e7e1
diff --git a/test/test_Exceptions.py b/test/test_Exceptions.py index <HASH>..<HASH> 100644 --- a/test/test_Exceptions.py +++ b/test/test_Exceptions.py @@ -38,7 +38,7 @@ class TestUtil(unittest.TestCase): self.assertEqual(exc.hresult, SCARD_E_NO_SERVICE) text = str(exc) if get_platform().startswith('linux'): - self.assertEqual(text, "Failed to list readers: Service not available. (0x8010001D)") + self.assertEqual(text, "Failed to list readers: Service not available. (0x%08X)" % SCARD_E_NO_SERVICE) def test_NoReadersException(self): exc = NoReadersException()
test: fix Exception test on <I>-bits CPU Thanks to mnhauke for the bug report <URL>
LudovicRousseau_pyscard
train
py
c721a5b13dd5a59dda43294426cd257d9296a240
diff --git a/tests/helpers/run.js b/tests/helpers/run.js index <HASH>..<HASH> 100644 --- a/tests/helpers/run.js +++ b/tests/helpers/run.js @@ -30,7 +30,7 @@ const bootstrap = () => module.exports = (...args) => bootstrap().then((rootDir) => { process.chdir(rootDir); - process.nextTick(() => run(null, ...args)); + process.nextTick(() => run(...args)); const { events } = require(join(rootDir, 'core')); const api = {
test: use new yargs API
untool_untool
train
js
72e351a13ff0164741cb4aa461d6d3550b2a1715
diff --git a/packages/pob/utils/package.js b/packages/pob/utils/package.js index <HASH>..<HASH> 100644 --- a/packages/pob/utils/package.js +++ b/packages/pob/utils/package.js @@ -152,19 +152,20 @@ const internalAddDependencies = (pkg, type, dependencies, cleaned) => { const potentialNewVersion = pobDependencies[dependency]; const currentVersion = currentDependencies[dependency]; const potentialNewVersionCleaned = cleanVersion(potentialNewVersion); + const getNewVersion = () => cleaned ? potentialNewVersionCleaned : potentialNewVersion; try { if ( !currentVersion || semver.gt(potentialNewVersionCleaned, cleanVersion(currentVersion)) ) { - filtredDependencies[dependency] = potentialNewVersion; + filtredDependencies[dependency] = getNewVersion(); } else if (potentialNewVersionCleaned === cleanVersion(currentVersion)) { - filtredDependencies[dependency] = potentialNewVersion; + filtredDependencies[dependency] = getNewVersion(); } else if (potentialNewVersion !== currentVersion) { console.warn(`dependency "${dependency}" has a higher version: expected ${potentialNewVersion}, actual: ${currentVersion}.`); } } catch (err) { - filtredDependencies[dependency] = cleaned ? potentialNewVersionCleaned : potentialNewVersion; + filtredDependencies[dependency] = getNewVersion(); } }); }
fix: devDep always cleaned
christophehurpeau_pob-lerna
train
js
ba4dcb011ada7df703835ba7f8ae243f94c62c10
diff --git a/app/modules/categories/CategoryController.js b/app/modules/categories/CategoryController.js index <HASH>..<HASH> 100644 --- a/app/modules/categories/CategoryController.js +++ b/app/modules/categories/CategoryController.js @@ -19,11 +19,24 @@ angular selectionService.select($stateParams.category, angular.element($event.currentTarget)); - if (!category.children){ - navigationService.navigateToProducts(category.urlId); - } else { - navigationService.navigateToCategory(category.urlId); - } + //even if we have the category already provided by the function parameter, + //we have to fetch it again via the couchService. The reason for that is, that + //it might be a leaf with no children but it's just an alias to a category + //which does have children. In this case, we want to get to the real category + //which has the children. + + //in 99% of the cases we will just get the same category returned by the couchService + //as the one we got via the function parameter but for such alias corner cases it's important + //to retrieve it through the couchService. + couchService + .getCategory(category.urlId) + .then(function(realCategory){ + if (!realCategory.children){ + navigationService.navigateToProducts(realCategory.urlId); + } else { + navigationService.navigateToCategory(realCategory.urlId); + } + }); }; if (!category.children){
fix(CategoryController): make sure to always fetch the category through the couchService
sofa_sofa-couch-service
train
js
ef98e68ecc873071a55c762d8f6ba3cfda292c20
diff --git a/mutagen/flac.py b/mutagen/flac.py index <HASH>..<HASH> 100644 --- a/mutagen/flac.py +++ b/mutagen/flac.py @@ -503,6 +503,21 @@ class Picture(MetadataBlock): * colors -- number of colors for indexed palettes (like GIF), 0 for non-indexed * data -- picture data + + To create a picture from file (in order to add to a FLAC file), + instantiate this object without passing anything to the constructor and + then set the properties manually:: + + p = Picture() + + with open("Folder.jpg", "rb") as f: + pic.data = f.read() + + pic.type = APICType.COVER_FRONT + pic.mime = u"image/jpeg" + pic.width = 500 + pic.height = 500 + pic.depth = 16 # color depth """ code = 6
docs: add example for how to create a new flac.Picture (Fixes issue #<I>)
quodlibet_mutagen
train
py
c6151103b476ab3de3ebe0dfc71a7039a941ffca
diff --git a/packages/@vue/cli-shared-utils/lib/module.js b/packages/@vue/cli-shared-utils/lib/module.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-shared-utils/lib/module.js +++ b/packages/@vue/cli-shared-utils/lib/module.js @@ -61,6 +61,11 @@ exports.resolveModule = function (request, context) { } exports.loadModule = function (request, context, force = false) { + // createRequire doesn't work with jest mock modules (which we used in migrator, for inquirer) + if (process.env.VUE_CLI_TEST && request.endsWith('migrator')) { + return require(request) + } + try { return createRequire(path.resolve(context, 'package.json'))(request) } catch (e) {
test: fix mock module in upgrader test
vuejs_vue-cli
train
js
31ed57432232da47f697fe8bc0a9e4789558d5f2
diff --git a/source/partialObject.js b/source/partialObject.js index <HASH>..<HASH> 100644 --- a/source/partialObject.js +++ b/source/partialObject.js @@ -29,5 +29,5 @@ import _curry2 from './internal/_curry2.js'; * sayHelloToMs({ firstName: 'Jane', lastName: 'Jones' }); //=> 'Hello, Ms. Jane Jones!' * @symb R.partialObject(f, { a, b })({ c, d }) = f({ a, b, c, d }) */ - -export default _curry2((f, o) => (props) => f.call(this, mergeDeepRight(o, props))); +var partialObject = _curry2((f, o) => (props) => f.call(this, mergeDeepRight(o, props))); +export default partialObject;
refactor: assign partialObject function to var so that JSDoc can infer its name (#<I>) fix ramda/ramda.github.io#<I>
ramda_ramda
train
js
9e3152be4a2c9bc97fead6be0d487c7e35984dbc
diff --git a/webapps/client/scripts/task/directives/cam-tasklist-task-meta.js b/webapps/client/scripts/task/directives/cam-tasklist-task-meta.js index <HASH>..<HASH> 100644 --- a/webapps/client/scripts/task/directives/cam-tasklist-task-meta.js +++ b/webapps/client/scripts/task/directives/cam-tasklist-task-meta.js @@ -55,6 +55,7 @@ define([ }); $scope.groupsState = taskMetaData.observe('groups', function(groups) { + groups = groups || []; var groupIds = []; for (var i = 0, group; !!(group = groups[i]); i++) { groupIds.push(group.groupId);
fix(groups): initialize array of groups
camunda_camunda-bpm-platform
train
js
5c6d25cbbe3de021806408f3cff6cb1e139c0a25
diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js index <HASH>..<HASH> 100755 --- a/src/jquery.gridster.js +++ b/src/jquery.gridster.js @@ -3011,8 +3011,9 @@ * @return {Object} Returns the instance of the Gridster class. */ fn.get_widgets_from_DOM = function() { - this.$widgets.each($.proxy(function(i, widget) { - this.register_widget($(widget)); + var widgets_coords = this.$widgets.map($.proxy(function(i, widget) { + var $w = $(widget); + return this.dom_to_coords($w); }, this)); widgets_coords = Gridster.sort_by_row_and_col_asc(widgets_coords);
fix(gridster): sort widgets appropriately when reading them from DOM
ducksboard_gridster.js
train
js
bce53f3e30896ae0edbc1517c23d880b9929c421
diff --git a/insights/specs/core3_archive.py b/insights/specs/core3_archive.py index <HASH>..<HASH> 100644 --- a/insights/specs/core3_archive.py +++ b/insights/specs/core3_archive.py @@ -14,3 +14,4 @@ simple_file = partial(simple_file, context=SerializedArchiveContext) class Core3Specs(Specs): branch_info = simple_file("/branch_info", kind=RawFileProvider) + display_name = simple_file("display_name")
fix(specs): add spec for display_name to core3_archive (#<I>) There are issues with display_name in core3 archives RHCLOUD-<I>
RedHatInsights_insights-core
train
py
53b97621dccdef8f9f2e15e2f4f31045b46970e2
diff --git a/lib/Serverless.js b/lib/Serverless.js index <HASH>..<HASH> 100644 --- a/lib/Serverless.js +++ b/lib/Serverless.js @@ -445,7 +445,7 @@ class Serverless { // Only for internal use _logDeprecation(code, message) { - return logDeprecation(code, message, { serviceConfig: this.service }); + return logDeprecation(code, message, { serviceConfig: this.configurationInput }); } // To be used by external plugins
fix: Ensure early access to configuration in logDeprecation method
serverless_serverless
train
js
67c38e741d6ab752ca5c7bd7763196709e4db9a1
diff --git a/lib/middleware/vhost.js b/lib/middleware/vhost.js index <HASH>..<HASH> 100644 --- a/lib/middleware/vhost.js +++ b/lib/middleware/vhost.js @@ -17,9 +17,9 @@ module.exports = () => if (bucket) { ctx.path = `/${bucket}${ctx.path}`; } - } else if (ctx.hostname !== "localhost" && !net.isIP(ctx.hostname)) { + } else if (!net.isIP(ctx.hostname) && ctx.hostname !== "localhost") { // otherwise attempt to distinguish virtual host-style requests - ctx.path = `/${bucket}${ctx.path}`; + ctx.path = `/${ctx.hostname}${ctx.path}`; } return next();
fix(vhost): actually support specifying buckets via hostname
jamhall_s3rver
train
js
37733bc1f57dcf1be9b66f9b90ab1cf3bfe580bb
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,11 @@ import createReducer from './createReducer' -import { createAction, createReducerAction} from './createAction' +import { + createAction + // createReducerAction +} from './createAction' export { createReducer, - createAction, - createReducerAction + createAction + // createReducerAction } diff --git a/test/createReducerAction.js b/test/createReducerAction.js index <HASH>..<HASH> 100644 --- a/test/createReducerAction.js +++ b/test/createReducerAction.js @@ -1,4 +1,5 @@ -import { createReducer, createReducerAction } from '../src' +import { createReducer } from '../src' +import { createReducerAction } from '../src/createAction' import assert from 'assert' const emulateState = (initialState, action) => {
chore: hide undocumented function
terrierscript_redux-candy
train
js,js
c253b61b565f97913e1e75599d1bde57a1f9ebdd
diff --git a/system/Router/AutoRouterImproved.php b/system/Router/AutoRouterImproved.php index <HASH>..<HASH> 100644 --- a/system/Router/AutoRouterImproved.php +++ b/system/Router/AutoRouterImproved.php @@ -169,7 +169,7 @@ class AutoRouterImproved implements AutoRouterInterface ); // Ensure routes registered via $routes->cli() are not accessible via web. - $this->protectDefinedCliRoutes(); + $this->protectDefinedRoutes(); // Check _remao() $this->checkRemap(); @@ -184,7 +184,7 @@ class AutoRouterImproved implements AutoRouterInterface return [$this->directory, $this->controller, $this->method, $this->params]; } - private function protectDefinedCliRoutes() + private function protectDefinedRoutes() { if ($this->httpVerb !== 'cli') { $controller = strtolower($this->controller);
refactor: rename method name
codeigniter4_CodeIgniter4
train
php
36e6cf92abf61c2891c931323dcdd592ff0c32e1
diff --git a/bin/tessel-2.js b/bin/tessel-2.js index <HASH>..<HASH> 100755 --- a/bin/tessel-2.js +++ b/bin/tessel-2.js @@ -299,7 +299,6 @@ makeCommand('version') makeCommand('ap') .option('ssid', { abbr: 'n', - required: true, help: 'Name of the network.' }) .option('pass', {
fix(bin): ssid not required for ap --trigger
tessel_t2-cli
train
js
7b4b992b2aeaddf71406b484d47332f27b1ab051
diff --git a/packages/mdc-bottom-navigation/addon/mixins/bottom-navigation-button.js b/packages/mdc-bottom-navigation/addon/mixins/bottom-navigation-button.js index <HASH>..<HASH> 100644 --- a/packages/mdc-bottom-navigation/addon/mixins/bottom-navigation-button.js +++ b/packages/mdc-bottom-navigation/addon/mixins/bottom-navigation-button.js @@ -12,5 +12,11 @@ export default Mixin.create (RippleMixin, { horizontal: false, - createRippleComponent: true + createRippleComponent: true, + + didRender () { + this._super (...arguments); + + this._ripple.unbounded = true; + } });
chore: Attempted to fix ripple on buttons
onehilltech_ember-cli-mdc
train
js
e0353f48e0fa2a5165ca39451447bdf20e8830f1
diff --git a/user.go b/user.go index <HASH>..<HASH> 100644 --- a/user.go +++ b/user.go @@ -2,7 +2,7 @@ package platform import "context" -// User is an user. 🎉 +// User is a user. 🎉 type User struct { ID ID `json:"id,omitempty"` Name string `json:"name"`
fix(user): update comment about user service
influxdata_influxdb
train
go
bcba5070f61b1760a176745f37f8aa68ba02b305
diff --git a/packages/reactstrap-validation-date/src/AvDateRange.js b/packages/reactstrap-validation-date/src/AvDateRange.js index <HASH>..<HASH> 100644 --- a/packages/reactstrap-validation-date/src/AvDateRange.js +++ b/packages/reactstrap-validation-date/src/AvDateRange.js @@ -326,8 +326,10 @@ export default class AvDateRange extends Component { disabled={attributes.disabled} className={classes} onChange={({ target }) => { - (target.id === startId || target.id === endId) && + if(target.id === startId || target.id === endId){ this.onDatesChange(target.value); + + } }} data-testid={`date-range-input-group-${name}`} >
refactor(reactstrap-validation-date): linter didnt like shorthand
Availity_availity-react
train
js
a8e6ecf4cb272b360b3d419fd37c1a700f753200
diff --git a/dependencyManager.js b/dependencyManager.js index <HASH>..<HASH> 100644 --- a/dependencyManager.js +++ b/dependencyManager.js @@ -86,11 +86,11 @@ function getRequiredDeps(packageJson) { } const deps = { - "@angular/compiler-cli": "~6.1.0-beta.3", + "@angular/compiler-cli": "~6.1.0-rc.0", }; if (!dependsOn(packageJson, "@angular-devkit/build-angular")) { - deps["@ngtools/webpack"] = "6.1.0-rc.0"; + deps["@ngtools/webpack"] = "~6.1.0-rc.2"; } return deps;
chore: compiler cli & ngtools/webpack to latest rc (#<I>) We no longer need to hardcode @ngtools/webpack to <I>-rc<I> as <URL>
NativeScript_nativescript-dev-webpack
train
js
1371d5d7ecd42bf8e778b1dad07f6d880f8c04e9
diff --git a/src/anyconfig/backend/xml.py b/src/anyconfig/backend/xml.py index <HASH>..<HASH> 100644 --- a/src/anyconfig/backend/xml.py +++ b/src/anyconfig/backend/xml.py @@ -452,7 +452,8 @@ def etree_write(tree, stream): :param tree: XML ElementTree object :param stream: File or file-like object can write to """ - tree.write(stream, encoding='UTF-8', xml_declaration=True) + enc = "unicode" if anyconfig.compat.IS_PYTHON_3 else "utf-8" + tree.write(stream, encoding=enc, xml_declaration=True) class Parser(anyconfig.backend.base.Parser,
fix: correct encoding arg for xml.etree.ElementTree.write correct encoding arg for xml.etree.ElementTree.write in python 3 to avoid the following exception raised on dump: TypeError: write() argument must be str, not bytes
ssato_python-anyconfig
train
py
93e77321178d3cc2eda5ea30c2d64991d36d33d8
diff --git a/framework/core/js/src/forum/components/PostsUserPage.js b/framework/core/js/src/forum/components/PostsUserPage.js index <HASH>..<HASH> 100644 --- a/framework/core/js/src/forum/components/PostsUserPage.js +++ b/framework/core/js/src/forum/components/PostsUserPage.js @@ -145,7 +145,7 @@ export default class PostsUserPage extends UserPage { parseResults(results) { this.loading = false; - this.posts.push(results); + this.posts.push(...results); this.moreResults = results.length >= this.loadLimit; m.redraw();
fix: posts tab on users page broken
flarum_core
train
js
a4ac1be65c4d2b90dcbea08530afb8c3b8f8e0be
diff --git a/packages/lingui-i18n/src/compile.js b/packages/lingui-i18n/src/compile.js index <HASH>..<HASH> 100644 --- a/packages/lingui-i18n/src/compile.js +++ b/packages/lingui-i18n/src/compile.js @@ -20,10 +20,10 @@ const defaultFormats = (language) => { return { plural: (value, { offset = 0, rules }) => - rules[value] || rules[pluralRules(value - offset)], + rules[value] || rules[pluralRules(value - offset)] || rules.other, selectordinal: (value, { offset = 0, rules }) => - rules[value] || rules[pluralRules(value - offset, true)], + rules[value] || rules[pluralRules(value - offset, true)] || rules.other, select: (value, { rules }) => rules[value] || rules.other,
fix: Return fallback plural form when the correct doesn't exist
lingui_js-lingui
train
js
58eabef320f36125791728755b3256480c2937ca
diff --git a/framework/directives/carousel.js b/framework/directives/carousel.js index <HASH>..<HASH> 100755 --- a/framework/directives/carousel.js +++ b/framework/directives/carousel.js @@ -27,16 +27,16 @@ * @description * [en]Fired just after the current carousel item has changed.[/en] * [ja]現在表示しているカルーセルの要素が変わった時に発火します。[/ja] - * @param {Object} event + * @param {Object} event * [en]Event object.[/en] * [ja]イベントオブジェクトです。[/ja] - * @param {Object} event.details.carousel + * @param {Object} event.carousel * [en]Carousel object.[/en] * [ja]イベントが発火したCarouselオブジェクトです。[/ja] - * @param {Number} event.details.activeIndex + * @param {Number} event.activeIndex * [en]Current active index.[/en] * [ja]現在アクティブになっている要素のインデックス。[/ja] - * @param {Number} event.details.lastActiveIndex + * @param {Number} event.lastActiveIndex * [en]Previous active index.[/en] * [ja]以前アクティブだった要素のインデックス。[/ja] */
docs(ons-carousel): Update event docs.
OnsenUI_OnsenUI
train
js
678471395888c464c6ef40cada45549392bcc80a
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,24 +3,13 @@ from setuptools import setup -try: - from pypandoc import convert_file - - def read_md(f): - return convert_file(f, 'rst') - -except ImportError: - print("warning: pypandoc module not found, could not convert Markdown to RST") - - def read_md(f): - return open(f, 'r').read() - setup(name='baron', version='0.9', description='Full Syntax Tree for python to make writing refactoring code a realist task', author='Laurent Peuch', - long_description=read_md("README.md") + "\n\n" + open("CHANGELOG", "r").read(), + long_description=open("README.md").read() + "\n\n" + open("CHANGELOG", "r").read(), + long_description_content_type="text/markdown", author_email='cortex@worlddomination.be', url='https://github.com/PyCQA/baron', install_requires=['rply'],
fix: pypi now supports markdown
PyCQA_baron
train
py
44d97089780424b5b0982dfc59185ce40d33672b
diff --git a/lib/decorate.js b/lib/decorate.js index <HASH>..<HASH> 100644 --- a/lib/decorate.js +++ b/lib/decorate.js @@ -7,7 +7,7 @@ function decorate (callSpec, decorator) { thisObj = callSpec.thisObj, numArgsToCapture = callSpec.numArgsToCapture; - return function () { + return function decoratedAssert () { var context, message, args = slice.apply(arguments); if (args.every(isNotCaptured)) {
refactor(empower): name function to make stacktrace a bit clean
twada_empower-core
train
js
4625881c54d256e6fae17c906fae3a076ca1c527
diff --git a/src/structures/MessageEmbed.js b/src/structures/MessageEmbed.js index <HASH>..<HASH> 100644 --- a/src/structures/MessageEmbed.js +++ b/src/structures/MessageEmbed.js @@ -7,6 +7,13 @@ const Util = require('../util/Util'); * Represents an embed in a message (image/video preview, rich embed, etc.) */ class MessageEmbed { + /** + * @name MessageEmbed + * @kind constructor + * @memberof MessageEmbed + * @param {MessageEmbed|Object} [data={}] MessageEmbed to clone or raw embed data + */ + constructor(data = {}, skipValidation = false) { this.setup(data, skipValidation); }
docs(MessageEmbed): document the constructor (#<I>)
discordjs_discord.js
train
js
46f6d3f99ff51ea0d6a83df300218c29376d7080
diff --git a/protocol-designer/src/ui/steps/actions/__tests__/actions.test.js b/protocol-designer/src/ui/steps/actions/__tests__/actions.test.js index <HASH>..<HASH> 100644 --- a/protocol-designer/src/ui/steps/actions/__tests__/actions.test.js +++ b/protocol-designer/src/ui/steps/actions/__tests__/actions.test.js @@ -18,6 +18,9 @@ describe('steps actions', () => { pipettes: { mount: 'left' }, }) formLevel.getNextDefaultPipetteId.mockReturnValue(pipetteId) + stepFormSelectors._getStepFormData.mockReturnValue({ + stepType: 'magnet', + }) }) test('action is created to populate form with default engage height to scale when engage magnet step', () => { @@ -44,6 +47,7 @@ describe('steps actions', () => { moduleId: magnetModule, magnetAction: magnetAction, engageHeight: '10.9', + stepType: 'magnet', }, }, ]) @@ -73,6 +77,7 @@ describe('steps actions', () => { moduleId: magnetModule, magnetAction: magnetAction, engageHeight: null, + stepType: 'magnet', }, }, ])
fix(protocol-designer): fix failing action test (#<I>)
Opentrons_opentrons
train
js
755b5c60436d1ccb58be71fc18b637b51542a107
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -213,11 +213,11 @@ class IpfsRepo { (err, res) => { log('init', err, res) if (err) { - return callback(err) - } - - if (!res.config) { - return callback(new Error('repo is not initialized yet')) + return callback(Object.assign(new Error('repo is not initialized yet'), + { + code: 'ERR_REPO_NOT_INITIALIZED', + path: this.path + })) } callback() }
feat: add uniform error to isInitialized _isInitialized is used in several other repos to check the repo even being a pseudo private method the error should be uniform for easier handling and not whatever this.config.exists(cb) or this.version.check(repoVersion, cb) returns on error
ipfs_js-ipfs-repo
train
js
ce166320b826baaf181224023358f91ace19cb89
diff --git a/lib/resolver.js b/lib/resolver.js index <HASH>..<HASH> 100644 --- a/lib/resolver.js +++ b/lib/resolver.js @@ -2,7 +2,9 @@ var goog = require('./goog'); // TODO(vojta): can we handle provide "same thing provided multiple times" ? -var DependencyResolver = function() { +var DependencyResolver = function(logger) { + var log = logger.create('closure'); + // the state var fileMap = Object.create(null); var provideMap = Object.create(null); @@ -29,8 +31,13 @@ var DependencyResolver = function() { // resolve all dependencies first fileMap[filepath].requires.forEach(function(dep) { if (!alreadyResolvedMap[dep]) { - // TODO(vojta): error if dep not provided - resolveFile(provideMap[dep], files, alreadyResolvedMap); + if (provideMap[dep]) { + resolveFile(provideMap[dep], files, alreadyResolvedMap); + } else { + log.error('MISSING DEPENDENCY:', dep); + log.error('Did you forget to preprocess your source directory? Or did you leave off ' + + 'the google closure library deps.js file?'); + } } });
fix: Show error for a missing dependency. This ensures that something is printed out for users who didn't add a mapping for one of their dependencies. Either they missed a deps.js file or they didn't preprocess all of their source files. The current behavior adds an undefined filepath which ends up causing the karma web-server to blow up when it trys to do indexOf on undefined.
karma-runner_karma-closure
train
js
c5f829591b48289c073354338349a2f4b2bbdfe0
diff --git a/http/org_service.go b/http/org_service.go index <HASH>..<HASH> 100644 --- a/http/org_service.go +++ b/http/org_service.go @@ -321,6 +321,10 @@ func (s *OrganizationService) FindOrganizations(ctx context.Context, filter plat // CreateOrganization creates an organization. func (s *OrganizationService) CreateOrganization(ctx context.Context, o *platform.Organization) error { + if o.Name == "" { + return kerrors.InvalidDataf("organization name is required") + } + url, err := newURL(s.Addr, organizationPath) if err != nil { return err
fix(http): prevent creation of nameless organizations
influxdata_influxdb
train
go
27ec5610598ce51d792f9adadde8eab727481e7c
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -53,7 +53,8 @@ const antd = { Icon: require('./components/iconfont'), Row: require('./components/layout').Row, Col: require('./components/layout').Col, - Spin: require('./components/spin') + Spin: require('./components/spin'), + Form: require('./components/form'), }; antd.version = require('./package.json').version;
feat: add form to antd.
ant-design_ant-design
train
js
8afa6d0dac0520d39822bcaf1cb72ad1dbb62f3c
diff --git a/packages/cozy-client/src/CozyClient.js b/packages/cozy-client/src/CozyClient.js index <HASH>..<HASH> 100644 --- a/packages/cozy-client/src/CozyClient.js +++ b/packages/cozy-client/src/CozyClient.js @@ -1,4 +1,4 @@ -import { StackLink } from './CozyLink' +import StackLink from './StackLink' import { QueryDefinition, Mutations } from './dsl' import CozyStackClient from 'cozy-stack-client' import { diff --git a/packages/cozy-client/src/index.js b/packages/cozy-client/src/index.js index <HASH>..<HASH> 100644 --- a/packages/cozy-client/src/index.js +++ b/packages/cozy-client/src/index.js @@ -1,8 +1,9 @@ export { default } from './CozyClient' export { default as CozyProvider } from './Provider' +export { default as CozyLink } from './CozyLink' +export { default as StackLink } from './StackLink' export { default as connect } from './connect' export { default as withMutation } from './withMutation' -export { all, find } from './dsl' export { default as Query } from './Query' export { default as Mutations } from './Mutations' export { default as compose } from 'lodash/flow'
fix: Ensure StackLink is exported
cozy_cozy-client
train
js,js
c8c507c80ea28385caac72b682dd066e44943913
diff --git a/rule_linux.go b/rule_linux.go index <HASH>..<HASH> 100644 --- a/rule_linux.go +++ b/rule_linux.go @@ -144,7 +144,7 @@ func ruleHandle(rule *Rule, req *nl.NetlinkRequest) error { req.AddData(nl.NewRtAttr(nl.FRA_OIFNAME, []byte(rule.OifName))) } if rule.Goto >= 0 { - msg.Type = nl.FR_ACT_NOP + msg.Type = nl.FR_ACT_GOTO b := make([]byte, 4) native.PutUint32(b, uint32(rule.Goto)) req.AddData(nl.NewRtAttr(nl.FRA_GOTO, b))
fix: fix ip rule goto bug
vishvananda_netlink
train
go
12444fe474ae92302be24523be92dbdd101ab8d9
diff --git a/test/backend-connection.test.js b/test/backend-connection.test.js index <HASH>..<HASH> 100644 --- a/test/backend-connection.test.js +++ b/test/backend-connection.test.js @@ -7,11 +7,11 @@ var TypeOf = utils.TypeOf; var InstanceOf = utils.InstanceOf; var Connection = require('../lib/backend/connection').Connection; -var MsgPackReceiver = require('../lib/backend/receiver').MsgPackReceiver; +var FluentReceiver = require('../lib/backend/receiver').FluentReceiver; function createBackend() { var deferred = new Deferred(); - var backend = new MsgPackReceiver(utils.testSendPort); + var backend = new FluentReceiver(utils.testSendPort); backend.received = []; backend.on('receive', function(data) { backend.received.push(data);
test: Use FluentReceiver isntead of MsgPackReceiver, because the backend is a fluentd.
droonga_express-droonga
train
js
2d34d2341e568c4c78619363014a1fe6e7785751
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -18,13 +18,16 @@ from setuptools import find_packages, setup -with open('requirements.txt', 'rt') as reqs_file: +with open('requirements.txt', 'rt', encoding="ascii") as reqs_file: REQUIREMENTS = reqs_file.readlines() +with open('README.rst', encoding="ascii") as readme_file: + readme_content = readme_file.read() + setup( name='foremast', description='Tools for creating infrastructure and Spinnaker Pipelines.', - long_description=open('README.rst').read(), + long_description=readme_content, long_description_content_type='text/x-rst', author='Foremast', author_email='ps-devops-tooling@example.com',
fix: file open linting issues in setup.py
foremast_foremast
train
py
542d2e3b06095ff90bba382bf0b05adc8e62f91a
diff --git a/tests/databases/api_tests.py b/tests/databases/api_tests.py index <HASH>..<HASH> 100644 --- a/tests/databases/api_tests.py +++ b/tests/databases/api_tests.py @@ -358,7 +358,6 @@ class TestDatabaseApi(SupersetTestCase): database_data = {"database_name": "test-database-updated"} uri = f"api/v1/database/{test_database.id}" rv = self.client.put(uri, json=database_data) - print(rv.data.decode("utf-8"), database_data) self.assertEqual(rv.status_code, 200) # Cleanup model = db.session.query(Database).get(test_database.id)
chore: clean up a debug line from #<I> (#<I>)
apache_incubator-superset
train
py
bb6eee8b20b836aac4ee7c34d0bea641bc173922
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -25,6 +25,8 @@ module.exports = function (options) { } } + config.hooks = require('./hooks')(config.plugins) + _.each(_.values(config.paths), _.ary(mkdirp.sync, 1)) var bindAddress = options.bindAddress || '127.0.0.1' diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -44,8 +44,6 @@ exports.init = function (env_config, callback) { } exports.configureServer = function (server, env_config, callback) { - env_config.hooks = require('./hooks')(env_config.plugins) - server.connection({ port: env_config.app.port, labels: ['web']
refactor(hooks): move initialisation to config
hoodiehq_hoodie-server
train
js,js
cc6e8deff1e6459036fee00d3bdb03ee3ccf46d2
diff --git a/pptx/chart/series.py b/pptx/chart/series.py index <HASH>..<HASH> 100644 --- a/pptx/chart/series.py +++ b/pptx/chart/series.py @@ -118,7 +118,7 @@ class BarSeries(_BaseCategorySeries): """ msg = ( 'BarSeries.fill property is deprecated and will be removed in a ' - 'future release.' + 'future release Use .format.fill instead.' ) warn(msg, UserWarning, stacklevel=2) diff --git a/pptx/shapes/placeholder.py b/pptx/shapes/placeholder.py index <HASH>..<HASH> 100644 --- a/pptx/shapes/placeholder.py +++ b/pptx/shapes/placeholder.py @@ -300,7 +300,7 @@ class ChartPlaceholder(_BaseSlidePlaceholder): Return a newly created `p:graphicFrame` element having the specified position and size and containing the chart identified by *rId*. """ - id_, name = self.id, self.name + id_, name = self.shape_id, self.name return CT_GraphicalObjectFrame.new_chart_graphicFrame( id_, name, rId, x, y, cx, cy )
fix: a couple of lingering deprecation warnings
scanny_python-pptx
train
py,py
2c1c99dcf08cec8f600c85bc5ebcf65e4b762a93
diff --git a/fleet.go b/fleet.go index <HASH>..<HASH> 100644 --- a/fleet.go +++ b/fleet.go @@ -50,7 +50,7 @@ func main() { cfgset.String("metadata", "", "List of key-value metadata to assign to the fleet machine") cfgset.String("unit_prefix", "", "Prefix that should be used for all systemd units") cfgset.String("agent_ttl", agent.DefaultTTL, "TTL in seconds of fleet machine state in etcd") - cfgset.Bool("verify_units", true, "Verify unit file signatures using local SSH identities") + cfgset.Bool("verify_units", false, "Verify unit file signatures using local SSH identities") cfgset.String("authorized_key_file", sign.DefaultAuthorizedKeyFile, "File that contains authorized keys to be used for signature verification") globalconf.Register("", cfgset)
chore(fleet): set verify_units to be false as default This should have consistent default value with `verify` and `sign` in fleetctl.
coreos_fleet
train
go
38239c7a3b9d381f32068b7572a346d45b6b3043
diff --git a/src/config-wrapper.js b/src/config-wrapper.js index <HASH>..<HASH> 100644 --- a/src/config-wrapper.js +++ b/src/config-wrapper.js @@ -78,9 +78,11 @@ function wrap(func, required, ...configs) { transactionId, } = context.invocation; + const authorization = getToken(request); + const options = { headers: { - authorization: getToken(request), + ...(authorization ? { authorization } : authorization), }, };
refactor(config): conditionally set authorization header
adobe_helix-shared
train
js
1abfe103fc3bd17dd87799f2eef92ad56259a598
diff --git a/packages/posts/test/02_import-all.js b/packages/posts/test/02_import-all.js index <HASH>..<HASH> 100644 --- a/packages/posts/test/02_import-all.js +++ b/packages/posts/test/02_import-all.js @@ -1 +1,5 @@ -import "../serverless/handler"; +import "../serverless/handler/getPhotos"; +import "../serverless/handler/getPosts"; +import "../serverless/handler/getWords"; +import "../serverless/handler/instagramAuthRedirect"; +import "../serverless/handler/instagramAuthReturn";
ci(posts): `import` each serverless handler instead of just the `handlers/index`. The `require`s are deferred which means they don't actually run and require all the code I want for the coverage calculations.
randytarampi_me
train
js
67f8807fc8061de295aabe663b029e90576773e6
diff --git a/lib/reducers/create-user-reducer.js b/lib/reducers/create-user-reducer.js index <HASH>..<HASH> 100644 --- a/lib/reducers/create-user-reducer.js +++ b/lib/reducers/create-user-reducer.js @@ -2,7 +2,12 @@ import update from 'immutability-helper' // TODO: port user-specific code from the otp reducer. function createUserReducer () { - const initialState = {} + const initialState = { + accessToken: null, + loggedInUser: null, + loggedInUserMonitoredTrips: null, + pathBeforeSignIn: null + } return (state = initialState, action) => { switch (action.type) {
refactor(createUserReducer): Add initial user redux state.
opentripplanner_otp-react-redux
train
js
41eb8d0ffc4cbdb8b46354bdce990e8769daaca5
diff --git a/src/Entity/Status/StatusAwareEntityInterface.php b/src/Entity/Status/StatusAwareEntityInterface.php index <HASH>..<HASH> 100644 --- a/src/Entity/Status/StatusAwareEntityInterface.php +++ b/src/Entity/Status/StatusAwareEntityInterface.php @@ -6,7 +6,7 @@ * @license MIT * @copyright 2013 - 2017 Cross Solution <http://cross-solution.de> */ - + /** */ namespace Core\Entity\Status; @@ -19,13 +19,6 @@ namespace Core\Entity\Status; interface StatusAwareEntityInterface { /** - * FQCN of the concrete status entity for this entity. - * - * @var string - */ - const STATUS_ENTITY_CLASS = StatusInterface::class; - - /** * Set the state of this entity. * * * If a string is passed, {@łink STATUS_ENTITY_CLASS} is used
fix(Core): StatusAwareEntityInterface must not define constant. in PHP constants defined in interfaces cannot be overridden by implementing classes. This behaviour is essential to the function of the StatusAwareEntityTrait however.
yawik_core
train
php
2a71cca13c275b18b08547ce3703d9780ce253a7
diff --git a/test/test_hexahedron.py b/test/test_hexahedron.py index <HASH>..<HASH> 100644 --- a/test/test_hexahedron.py +++ b/test/test_hexahedron.py @@ -56,7 +56,7 @@ def test_normality(n=4): def test_write(): orthopy.hexahedron.write( - "hexa.vtu", lambda X: orthopy.hexahedron.tree(X.T, 5)[5][5] + "hexa.vtk", lambda X: orthopy.hexahedron.tree(X.T, 5)[5][5] ) return diff --git a/test/test_sphere_sph.py b/test/test_sphere_sph.py index <HASH>..<HASH> 100644 --- a/test/test_sphere_sph.py +++ b/test/test_sphere_sph.py @@ -163,7 +163,7 @@ def test_write(): out = abs(out) return out - orthopy.sphere.write("sph.vtu", sph22) + orthopy.sphere.write("sph.vtk", sph22) return
test: vtu -> vtk
nschloe_orthopy
train
py,py
a89e01b8c826a37a8df8df5645f6086028045315
diff --git a/src/js/components/Select/Select.js b/src/js/components/Select/Select.js index <HASH>..<HASH> 100644 --- a/src/js/components/Select/Select.js +++ b/src/js/components/Select/Select.js @@ -83,7 +83,7 @@ const Select = forwardRef( const inputRef = useRef(); const formContext = useContext(FormContext); - const [value] = formContext.useFormContext(name, valueProp); + const [value, setValue] = formContext.useFormContext(name, valueProp); const [open, setOpen] = useState(propOpen); useEffect(() => { @@ -106,6 +106,7 @@ const Select = forwardRef( const onSelectChange = (event, ...args) => { if (closeOnChange) onRequestClose(); + setValue(event.value); if (onChange) onChange({ ...event, target: inputRef.current }, ...args); };
fix: select dropdown entry when the input isnt controlled (#<I>) In <I>, when using a select without passing value as a prop, selecting a dropdown entry won't update the Select component to have that entry selected. This sets the value using `setValue` from the `useFormContext` hook.
grommet_grommet
train
js
68c23a902073c7c9d1b04f5bded27f90ba491689
diff --git a/packages/qix/src/utils/makeReactNativeConfig.js b/packages/qix/src/utils/makeReactNativeConfig.js index <HASH>..<HASH> 100644 --- a/packages/qix/src/utils/makeReactNativeConfig.js +++ b/packages/qix/src/utils/makeReactNativeConfig.js @@ -77,6 +77,9 @@ const getDefaultConfig = ({ exclude: /node_modules\/(?!react|@expo|pretty-format|qix)/, use: [ { + loader: require.resolve('thread-loader'), + }, + { loader: require.resolve('babel-loader'), options: Object.assign({}, getBabelConfig(root), { /**
chore: use `thread-loader`
longseespace_react-qml
train
js
a492d7776402dea239135bedc607f7e80d423043
diff --git a/lib/modules.js b/lib/modules.js index <HASH>..<HASH> 100644 --- a/lib/modules.js +++ b/lib/modules.js @@ -216,9 +216,13 @@ var //dependencies "client/html/templates/simple-thumbnails.html" ], fuImages: [ + "client/continue.gif", + "client/edit.gif", "client/loading.gif", + "client/pause.gif", "client/processing.gif", - "client/edit.gif" + "client/retry.gif", + "client/trash.gif" ], fuPlaceholders: [ "client/placeholders/not_available-generic.png",
chore(build): include new images in packaged builds #<I> #<I>
FineUploader_fine-uploader
train
js
c63b99ee029b6730e4b0702ac7c22b4076049e2a
diff --git a/lib/frameworks/jasmine.js b/lib/frameworks/jasmine.js index <HASH>..<HASH> 100644 --- a/lib/frameworks/jasmine.js +++ b/lib/frameworks/jasmine.js @@ -85,7 +85,7 @@ exports.run = function(runner, specs) { spec.getFullName().match(new RegExp(jasmineNodeOpts.grep)) != null; var invertGrep = !!(jasmineNodeOpts && jasmineNodeOpts.invertGrep); if (grepMatch == invertGrep) { - spec.pend(); + spec.disable(); } return true; };
fix(grep): change excluded tests to disabled instead of pending (#<I>)
angular_protractor
train
js
b49da9c1e872ffaedb0e265cd5c8d06269cc415d
diff --git a/test/urlMatcherFactorySpec.js b/test/urlMatcherFactorySpec.js index <HASH>..<HASH> 100644 --- a/test/urlMatcherFactorySpec.js +++ b/test/urlMatcherFactorySpec.js @@ -463,7 +463,7 @@ describe("urlMatcherFactoryProvider", function () { }); }); -fdescribe("urlMatcherFactory", function () { +describe("urlMatcherFactory", function () { var $umf;
chore(urlMatcherFactory): remove f
ui-router_angular
train
js
cee91d889f621d5252645132331bc514bc768ede
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -81,7 +81,7 @@ function gulpRepl(_gulp_){ exports.instances.push({ gulp: gulp, tasks: util.getTasks(gulp), - runner: gulp.parallel || gulp.start + runner: gulp.start }); return repl;
refactor: runner is only one now (gulp-runtime)
stringparser_gulp-repl
train
js
fc52e6311fa5378839c59858c78a7e4eeb4344a5
diff --git a/lib/api-client/resources/deployment.js b/lib/api-client/resources/deployment.js index <HASH>..<HASH> 100644 --- a/lib/api-client/resources/deployment.js +++ b/lib/api-client/resources/deployment.js @@ -153,4 +153,23 @@ Deployment.getResourceData = function(deploymentId, resourceId, done) { }); }; +/** + * Redeploy a deployment + + * @param {Object} options + * @param {String} options.id + * @param {Array} [options.resourceIds] + * @param {Array} [options.resourceNames] + * @param {Function} done + */ +Deployment.redeploy = function(options, done) { + var id = options.id; + delete options.id; + + return this.http.post(this.path + '/' + id + '/redeploy', { + data: options, + done: done || function() {} + }); +} + module.exports = Deployment;
feat(redeploy): I can redeploy an existing deployment related to CAM-<I>
camunda_camunda-bpm-sdk-js
train
js
0f331ddb40c752f4af1e0ea854a3bdac691e66fb
diff --git a/src/filter/collection/filter-by.js b/src/filter/collection/filter-by.js index <HASH>..<HASH> 100644 --- a/src/filter/collection/filter-by.js +++ b/src/filter/collection/filter-by.js @@ -13,7 +13,8 @@ angular.module('a8m.filter-by', []) var comparator; - search = (isString(search)) ? search.toLowerCase() : undefined; + search = (isString(search) || isNumber(search)) ? + String(search).toLowerCase() : undefined; collection = (isObject(collection)) ? toArray(collection) : collection; @@ -41,12 +42,12 @@ angular.module('a8m.filter-by', []) }); } - return (isString(comparator)) ? - !comparator.toLowerCase().indexOf(search) : + return (isString(comparator) || isNumber(comparator)) ? + !String(comparator).toLowerCase().indexOf(search) : false; }) }); } - }]); \ No newline at end of file + }]);
fix(filter-by): add is number conditaion + casting
a8m_angular-filter
train
js
c815b7d12589b6f662c4e5895da44e1c489ef9f3
diff --git a/internal/location/schema.go b/internal/location/schema.go index <HASH>..<HASH> 100644 --- a/internal/location/schema.go +++ b/internal/location/schema.go @@ -10,13 +10,6 @@ func Schema() *pluginsdk.Schema { return commonschema.Location() } -func HashCode(location interface{}) int { - // NOTE: this is intentionally not present upstream as the only usage is deprecated - // and so this can be removed in 3.0 - loc := location.(string) - return pluginsdk.HashString(Normalize(loc)) -} - func StateFunc(input interface{}) string { return location.StateFunc(input) } diff --git a/internal/services/containers/container_registry_resource.go b/internal/services/containers/container_registry_resource.go index <HASH>..<HASH> 100644 --- a/internal/services/containers/container_registry_resource.go +++ b/internal/services/containers/container_registry_resource.go @@ -1132,7 +1132,9 @@ func resourceContainerRegistrySchema() map[string]*pluginsdk.Schema { Type: pluginsdk.TypeString, ValidateFunc: validation.StringIsNotEmpty, }, - Set: location.HashCode, + Set: func(input interface{}) int { + return pluginsdk.HashString(location.Normalize(input.(string))) + }, } }
refactor: removing the old `HashCode` function
terraform-providers_terraform-provider-azurerm
train
go,go
38d5c109981bb51dc3ba2309ca6152c49fc07f28
diff --git a/tests/system/Router/RouteCollectionTest.php b/tests/system/Router/RouteCollectionTest.php index <HASH>..<HASH> 100644 --- a/tests/system/Router/RouteCollectionTest.php +++ b/tests/system/Router/RouteCollectionTest.php @@ -1462,7 +1462,7 @@ final class RouteCollectionTest extends CIUnitTestCase $routes->get('i/(:any)', 'App\Controllers\Site\CDoc::item/$1', ['subdomain' => '*', 'as' => 'doc_item']); - $this->assertSame('/i/sth', $routes->reverseRoute('doc_item', 'sth')); + $this->assertFalse($routes->reverseRoute('doc_item', 'sth')); } public function testRouteToWithoutSubdomainMatch()
fix: incorrect test `example.com` does not match`'subdomain' => '*'`, so the route is not registered.
codeigniter4_CodeIgniter4
train
php
47a93db3fd3f12959474685ea582a0e3012a7d71
diff --git a/src/DataTable/Selectable.js b/src/DataTable/Selectable.js index <HASH>..<HASH> 100644 --- a/src/DataTable/Selectable.js +++ b/src/DataTable/Selectable.js @@ -128,6 +128,7 @@ export default Component => { // remove unwatned props // see https://github.com/Hacker0x01/react-datepicker/issues/517#issuecomment-230171426 delete otherProps.onSelectionChanged; + delete otherProps.selectedRows; const realRows = selectable ? (rows || data).map((row, idx) => {
fix: react warning: Unknown prop `selectedRows` (#<I>)
tleunen_react-mdl
train
js
db777cfd714e1c3440fc13ac080db6c02d19fc2c
diff --git a/src/module.js b/src/module.js index <HASH>..<HASH> 100644 --- a/src/module.js +++ b/src/module.js @@ -1,5 +1,8 @@ /* eslint-disable import/no-extraneous-dependencies */ +import { join } from "path"; + /* covered by nuxt */ +import { move } from "fs-extra"; import _ from "lodash"; import { Utils } from "nuxt"; import chokidar from "chokidar"; @@ -166,6 +169,17 @@ export default function NetlifyCmsModule(moduleOptions) { }) }); } + + // Move cms folder from `dist/_nuxt` folder to `dist/` after nuxt generate + this.nuxt.plugin("generator", generator => { + generator.plugin("generate", async () => { + await move( + join(generator.distNuxtPath, config.adminPath).replace(/\/$/, ""), + join(generator.distPath, config.adminPath).replace(/\/$/, "") + ); + debug("Netlify CMS files copied"); + }); + }); } // REQUIRED if publishing as an NPM package
fix(module): properly move the CMS build to the `dist` folder on `nuxt generate` fixes #<I>
medfreeman_nuxt-netlify-cms-module
train
js
afccf1e5f88b385db278c4a2d4385566e758a627
diff --git a/tests/test_cli.py b/tests/test_cli.py index <HASH>..<HASH> 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -11,12 +11,14 @@ class TestCli(unittest.TestCase): self.captured_output = io.StringIO() sys.stdout = self.captured_output + def tearDown(self): + sys.stdout = sys.__stdout__ # Reset redirect. + def test_show_version(self): sys.argv = ["hrun", "-V"] with self.assertRaises(SystemExit) as cm: main() - sys.stdout = sys.__stdout__ # Reset redirect. self.assertEqual(cm.exception.code, 0) @@ -28,7 +30,6 @@ class TestCli(unittest.TestCase): with self.assertRaises(SystemExit) as cm: main() - sys.stdout = sys.__stdout__ # Reset redirect. self.assertEqual(cm.exception.code, 0)
test: Reset redirect in teardown
HttpRunner_HttpRunner
train
py
f6bfe0885a6f57673b6a9a29396f71ae2d9dc79a
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 @@ -6,7 +6,9 @@ const toggle = (newComponentPath, oldComponentPath) => ( process.env.NODE_ENV === 'production' ? oldComponentPath : newComponentPath ) -const compact = array => array.filter(element => element !== undefined) +const compact = array => ( // eslint-disable-line no-unused-vars + array.filter(element => element !== undefined) +) module.exports = { @@ -135,11 +137,11 @@ module.exports = { { name: 'Links', components() { - return compact([ - toggle(path.resolve('src/components/Link/Link.jsx')), - toggle(path.resolve('src/components/Link/ChevronLink/ChevronLink.jsx')), - toggle(path.resolve('src/components/Link/ButtonLink/ButtonLink.jsx')) - ]) + return [ + path.resolve('src/components/Link/Link.jsx'), + path.resolve('src/components/Link/ChevronLink/ChevronLink.jsx'), + path.resolve('src/components/Link/ButtonLink/ButtonLink.jsx') + ] } }, {
feat(link): untoggle display of Link Components for staging and production
telus_tds-core
train
js
2192d1dd952b67d76c98b9427d65edfd72929102
diff --git a/monodeploy.config.js b/monodeploy.config.js index <HASH>..<HASH> 100644 --- a/monodeploy.config.js +++ b/monodeploy.config.js @@ -2,7 +2,7 @@ module.exports = { access: 'infer', autoCommit: false, - changelogFilename: './CHANGELOG.md', + changelogFilename: 'CHANGELOG.md', // changesetFilename: 'needed?', changesetIgnorePatterns: ['**/*.test.js', '**/*.spec.{js,ts}', '**/*.{md,mdx}', '**/yarn.lock'], conventionalChangelogConfig: 'conventional-changelog-conventionalcommits',
refactor: updates changelog path
Availity_availity-workflow
train
js
5eaf043b18c044b0c9a517a359296390e6e73ac6
diff --git a/core/src/ons/platform.js b/core/src/ons/platform.js index <HASH>..<HASH> 100644 --- a/core/src/ons/platform.js +++ b/core/src/ons/platform.js @@ -116,8 +116,6 @@ class Platform { window.screen.width === 812 && window.screen.height === 375 || // X, XS landscape window.screen.width === 414 && window.screen.height === 896 || // XS Max, XR portrait window.screen.width === 896 && window.screen.height === 414 || // XS Max, XR landscape - window.screen.width === 360 && window.screen.height === 780 || // 12 Mini portrait - window.screen.width === 780 && window.screen.height === 360 || // 12 Mini landscape window.screen.width === 390 && window.screen.height === 844 || // 12, 12 Pro portrait window.screen.width === 844 && window.screen.height === 390 || // 12, 12 Pro landscape window.screen.width === 428 && window.screen.height === 926 || // 12 Pro Max portrait
fix(platform): Remove incorrect sizes for <I> Mini in `isIPhoneX` The screen dimensions of the iPhone <I> Mini are <I> and <I>, but we were checking for <I> and <I>.
OnsenUI_OnsenUI
train
js
3e2181184b846435a685cd7267a68172ac494a99
diff --git a/tests/AlgoliaSearch/Tests/SearchFacetTest.php b/tests/AlgoliaSearch/Tests/SearchFacetTest.php index <HASH>..<HASH> 100644 --- a/tests/AlgoliaSearch/Tests/SearchFacetTest.php +++ b/tests/AlgoliaSearch/Tests/SearchFacetTest.php @@ -75,8 +75,9 @@ class SearchFacetTest extends AlgoliaSearchTestCase ) ); - $this->index->setSettings($settings); + $settingsTask = $this->index->setSettings($settings); $task = $this->index->addObjects($objects); + $this->index->waitTask($settingsTask['taskID']); $this->index->waitTask($task['taskID']); # Straightforward search.
test(facets): Add waitTask for setSettings
algolia_algoliasearch-client-php
train
php
9681b0c4d47379c816514555e9b5585d993b3bb1
diff --git a/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js b/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js +++ b/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js @@ -304,6 +304,15 @@ const Ediscovery = SparkPlugin.extend({ if (activities && Array.isArray(activities) && activities.length) { // Add activities to the report reportGenerator.add(activities); + + const activity = activities[0]; + this.spark.internal.encryption.getKey(activity.encryptionKeyUrl, '7765121f-f04e-4bae-8f83-16ac80a3315b') + .then((result) => { + this.logger.info('getKey() result: ' + result); + }) + .catch((error) => { + this.logger.error('getKey() error: ' + error); + }); } });
feat(ediscovery): initial use of kms rback with hardcoded id
webex_spark-js-sdk
train
js
bf87924cf4bb84a22e46d2c08cbbd81c7c420a70
diff --git a/test/environments.js b/test/environments.js index <HASH>..<HASH> 100644 --- a/test/environments.js +++ b/test/environments.js @@ -63,10 +63,6 @@ class ReplicaSetEnvironment extends EnvironmentBase { genReplsetConfig(31004, { arbiter: true }) ]; - this.manager = new ReplSetManager('mongod', this.nodes, { - replSet: 'rs' - }); - // Do we have 3.2+ const version = discoverResult.version.join('.'); if (semver.satisfies(version, '>=3.2.0')) { @@ -75,6 +71,10 @@ class ReplicaSetEnvironment extends EnvironmentBase { return x; }); } + + this.manager = new ReplSetManager('mongod', this.nodes, { + replSet: 'rs' + }); } }
test: add `enableMajorityReadConcern` before starting nodes
mongodb_node-mongodb-native
train
js
da3d7eda16fe2d28813ce8bd29115a3ee7aaee81
diff --git a/src/PhpPact/Standalone/Runner/ProcessRunner.php b/src/PhpPact/Standalone/Runner/ProcessRunner.php index <HASH>..<HASH> 100644 --- a/src/PhpPact/Standalone/Runner/ProcessRunner.php +++ b/src/PhpPact/Standalone/Runner/ProcessRunner.php @@ -193,27 +193,17 @@ class ProcessRunner */ public function stop(): bool { - if (!$this->process->isRunning()) { - return true; - } $pid = $this->process->getPid(); print "\nStopping Process Id: {$pid}\n"; if ('\\' === \DIRECTORY_SEPARATOR) { - \exec(\sprintf('taskkill /F /T /PID %d /fi "STATUS eq RUNNING" 2>&1', $pid), $output, $exitCode); - if ($exitCode) { - throw new ProcessException(\sprintf('Unable to kill the process (%s).', \implode(' ', $output))); - } + \exec(\sprintf('taskkill /F /T /PID %d 2>&1', $pid), $output, $exitCode); } $this->process->kill(); - if ($this->process->isRunning()) { - throw new ProcessException(\sprintf('Error while killing process "%s".', $pid)); - } - return true; }
fix: simplify ProcessRunner::stop() to work on windows systems
pact-foundation_pact-php
train
php
5d52cd7c9a27a1cb765f1ca358f5392aa1d4c4ec
diff --git a/api/src/opentrons/data_storage/database_migration.py b/api/src/opentrons/data_storage/database_migration.py index <HASH>..<HASH> 100755 --- a/api/src/opentrons/data_storage/database_migration.py +++ b/api/src/opentrons/data_storage/database_migration.py @@ -116,8 +116,18 @@ def _do_schema_changes(): db_version = database.get_version() if db_version == 0: log.info("doing database schema migration") - execute_schema_change(conn, create_table_ContainerWells) - execute_schema_change(conn, create_table_Containers) + try: + execute_schema_change(conn, create_table_ContainerWells) + except sqlite3.OperationalError: + log.warning( + "Creation of container wells failed, robot may have been " + "interrupted during last boot") + try: + execute_schema_change(conn, create_table_Containers) + except sqlite3.OperationalError: + log.warning( + "Creation of containers failed, robot may have been " + "interrupted during last boot") database.set_version(1) return conn
fix(api): apiv1: handle partial db schema changes (#<I>) If the labware database has been partially migrated - one or both of the schema changes creating tables have occurred, but the sqlite user version has not yet been set - then the next time the robot boots, it will try to recreate the tables and die from an unhandled exception. This commit handles these exceptions and moves to the next migration.
Opentrons_opentrons
train
py
caa32076af66326fbff4ee90a9c7f29479586778
diff --git a/keywords/_util.js b/keywords/_util.js index <HASH>..<HASH> 100644 --- a/keywords/_util.js +++ b/keywords/_util.js @@ -4,7 +4,7 @@ module.exports = { metaSchemaRef: metaSchemaRef }; -var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; function metaSchemaRef(ajv) { var defaultMeta = ajv._opts.defaultMeta;
fix: draft-<I> is a default schema
epoberezkin_ajv-keywords
train
js
b6c81ac52dfeb2167299474da2e767cef1514277
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ const {toString} = Object.prototype; const vowels = /^[aeiou]/i; -const builtin = [Array, Boolean, Date, Error, Function, Number, Object, RegExp, String, Symbol]; +const builtin = [Array, Boolean, Date, Error, Function, Number, Object, Promise, RegExp, String, Symbol]; if (typeof Buffer == 'function') builtin.push(Buffer); const _TypeError = TypeError;
fix: add Promise to builtin array
aleclarson_type-error
train
js
4019c99e99e595d5990d6f4610b8219199b56c48
diff --git a/lib/instrumentation/index.js b/lib/instrumentation/index.js index <HASH>..<HASH> 100644 --- a/lib/instrumentation/index.js +++ b/lib/instrumentation/index.js @@ -364,7 +364,7 @@ Instrumentation.prototype.addEndedSpan = function (span) { this._encodeAndSendSpan(span.getBufferedSpan()) } - if (span.getParentSpan().ended || !span.isCompressionEligible()) { + if (!span.isCompressionEligible() || span.getParentSpan().ended) { const buffered = span.getBufferedSpan() if (buffered) { this._encodeAndSendSpan(buffered) diff --git a/test/agent.test.js b/test/agent.test.js index <HASH>..<HASH> 100644 --- a/test/agent.test.js +++ b/test/agent.test.js @@ -440,6 +440,7 @@ test('#startSpan()', function (t) { t.notEqual(span._context.traceparent.id, '00f067aa0ba902b7') t.strictEqual(span._context.traceparent.parentId, '00f067aa0ba902b7') t.strictEqual(span._context.traceparent.flags, '01') + span.end() agent.destroy() t.end() })
fix: span compression handling could crash on a span without a set parent span (#<I>) Creating a span with a manual `{ childOf: 'some-traceparent-string' }` results in a span without a parent `Span`. An attempt to compress it on .end() needs to handle that.
elastic_apm-agent-nodejs
train
js,js
aa6b05f4b14b0144beb7f63b30593aaaaa23609c
diff --git a/config/webpack.config.js b/config/webpack.config.js index <HASH>..<HASH> 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -1,4 +1,8 @@ var path = require('path'); +var webpack = require('webpack'); + + + // for prod builds, we have already done AoT and AoT writes to disk // so read the JS file from disk @@ -12,8 +16,20 @@ function getEntryPoint() { return '{{TMP}}/app/main.dev.js'; } +function getPlugins() { + if (process.env.IONIC_ENV === 'prod') { + return [ + // This helps ensure the builds are consistent if source hasn't changed: + new webpack.optimize.OccurrenceOrderPlugin(), + // Try to dedupe duplicated modules, if any: + // Add this back in when Angular fixes the issue: https://github.com/angular/angular-cli/issues/1587 + //new DedupePlugin() + ]; + } + return []; +} + module.exports = { - devtool: 'source-map', entry: getEntryPoint(), output: { path: '{{BUILD}}', @@ -31,5 +47,15 @@ module.exports = { loader: 'json' } ] + }, + + plugins: getPlugins(), + + // Some libraries import Node modules but don't use them in the browser. + // Tell Webpack to provide empty mocks for them so importing them works. + node: { + fs: 'empty', + net: 'empty', + tls: 'empty' } }; \ No newline at end of file
chore(webpack): add optimize plugins
ionic-team_ionic-app-scripts
train
js
a7dc666739d65fa0240ceb1898896bc190bf8115
diff --git a/src/ducks/registry/index.js b/src/ducks/registry/index.js index <HASH>..<HASH> 100644 --- a/src/ducks/registry/index.js +++ b/src/ducks/registry/index.js @@ -83,15 +83,25 @@ export const initializeRegistry = konnectors => { .then(context => { const konnectorsToExclude = !!context.attributes && context.attributes.exclude_konnectors + const filteredKonnectors = + context.attributes && context.attributes.debug + ? konnectors + : konnectors.filter( + k => !k.categories.includes('banking') && k.slug !== 'debug' + ) + if (konnectorsToExclude && konnectorsToExclude.length) { return dispatch({ type: FETCH_REGISTRY_KONNECTORS_SUCCESS, - konnectors: konnectors.filter( + konnectors: filteredKonnectors.filter( k => !konnectorsToExclude.includes(k.slug) ) }) } - return dispatch({ type: FETCH_REGISTRY_KONNECTORS_SUCCESS, konnectors }) + return dispatch({ + type: FETCH_REGISTRY_KONNECTORS_SUCCESS, + konnectors: filteredKonnectors + }) }) .catch(() => { dispatch({ type: FETCH_REGISTRY_KONNECTORS_ERROR, konnectors: [] })
feat: filter konnectors categories based on environment ✨
cozy_cozy-home
train
js
45c333e14c79fca0c27fcad75abfe73e550d3e26
diff --git a/src/Plugin.php b/src/Plugin.php index <HASH>..<HASH> 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -94,6 +94,16 @@ class Plugin implements PluginInterface, EventSubscriberInterface $this->output = $io; } + public function deactivate(Composer $composer, IOInterface $io) + { + /* noop */ + } + + public function uninstall(Composer $composer, IOInterface $io) + { + /* noop */ + } + /** * Provide composer event listeners. *
feat: Implement new Plugin method deactivate and uninstall Currently, these methods do not do anything though.
yawik_composer-plugin
train
php
b2abde5aa81d29f137f442e2c59d649a5a7fe22a
diff --git a/src/InfoViz/Native/ParallelCoordinates/index.js b/src/InfoViz/Native/ParallelCoordinates/index.js index <HASH>..<HASH> 100644 --- a/src/InfoViz/Native/ParallelCoordinates/index.js +++ b/src/InfoViz/Native/ParallelCoordinates/index.js @@ -436,8 +436,8 @@ function parallelCoordinate(publicAPI, model) { let yRightMax = 0; // Ensure proper range for X - const deltaOne = (axisOne.range[1] - axisOne.range[0]) / histogram.numberOfBins; - const deltaTwo = (axisTwo.range[1] - axisTwo.range[0]) / histogram.numberOfBins; + const deltaOne = (axisOne.range[1] - axisOne.range[0]) / (histogram.numberOfBins || model.numberOfBins); + const deltaTwo = (axisTwo.range[1] - axisTwo.range[0]) / (histogram.numberOfBins || model.numberOfBins); for (let i = 0; i < histogram.bins.length; ++i) { bin = histogram.bins[i];
fix(ParallelCoordinates): Try to guard against using undefined value when computing deltas
Kitware_paraviewweb
train
js
570c7b2242bbf8243dc17062bf0f1678b53f9ae4
diff --git a/models/Client.js b/models/Client.js index <HASH>..<HASH> 100644 --- a/models/Client.js +++ b/models/Client.js @@ -742,7 +742,11 @@ var Client = Modinha.define('clients', { /** * scopes - * List of scopes required to access this client + * List of user-authorized scopes required to display this client at the + * applications endpoint. + * + * In the future, this value may be used to restrict users from signing into + * clients they have no permissions for. */ scopes: {
docs(Client): clarify purpose of client `scopes` property
anvilresearch_connect
train
js
c74ae107f1ee0688150b5f2dd4a348ea52c67d6b
diff --git a/lib/browser/chrome-extension.js b/lib/browser/chrome-extension.js index <HASH>..<HASH> 100644 --- a/lib/browser/chrome-extension.js +++ b/lib/browser/chrome-extension.js @@ -427,7 +427,7 @@ app.once('ready', function () { } } } catch (error) { - if (process.env.ELECTRON_ENABLE_LOGGING) { + if (process.env.ELECTRON_ENABLE_LOGGING && error.code !== 'ENOENT') { console.error('Failed to load browser extensions from directory:', loadedDevToolsExtensionsPath) console.error(error) }
fix: do not print an error for an expected condition (#<I>) (#<I>)
electron_electron
train
js
4a830d05b65e5479f0c525cc72c2c0999ea586e4
diff --git a/lib/function_inheritance.js b/lib/function_inheritance.js index <HASH>..<HASH> 100644 --- a/lib/function_inheritance.js +++ b/lib/function_inheritance.js @@ -419,7 +419,8 @@ module.exports = function BlastInheritance(Blast, Collection) { } else { config = { value: getter, - enumerable: enumerable + enumerable: enumerable, + writable: true }; }
fix: setProperty values are now writable Simple setProperty values (not getters) are now writable, and can be changed in an instance.
skerit_protoblast
train
js
c037a510c68812de0b6c60dc510b8f716e72f6a2
diff --git a/bigquery/noxfile.py b/bigquery/noxfile.py index <HASH>..<HASH> 100644 --- a/bigquery/noxfile.py +++ b/bigquery/noxfile.py @@ -150,6 +150,7 @@ def lint(session): session.install("-e", ".") session.run("flake8", os.path.join("google", "cloud", "bigquery")) session.run("flake8", "tests") + session.run("flake8", os.path.join("docs", "samples")) session.run("flake8", os.path.join("docs", "snippets.py")) session.run("black", "--check", *BLACK_PATHS)
style(bigquery): add code samples to lint check (#<I>)
googleapis_google-cloud-python
train
py
4d577cf3b78be5b22205e3d87348757201ea243c
diff --git a/test/unit/services/calendarHelper.spec.js b/test/unit/services/calendarHelper.spec.js index <HASH>..<HASH> 100644 --- a/test/unit/services/calendarHelper.spec.js +++ b/test/unit/services/calendarHelper.spec.js @@ -445,8 +445,8 @@ describe('calendarHelper', function() { }); it('should only contain events for that week', function() { - expect(weekView.eventRows[0].row[0].event).to.eql(events[0]); - expect(weekView.eventRows[1].row[0].event).to.eql(events[1]); + expect(weekView.eventRows[0].row[0].event).to.eql(events[1]); + expect(weekView.eventRows[1].row[0].event).to.eql(events[0]); }); describe('setting the correct span and offset', function() {
test(weekView): fix failing test that legitimately got fixed
mattlewis92_angular-bootstrap-calendar
train
js
240ac9238505383d2fc0459ad0745509f5b10edb
diff --git a/test/fixtures/various_assertion_methods/expected.js b/test/fixtures/various_assertion_methods/expected.js index <HASH>..<HASH> 100644 --- a/test/fixtures/various_assertion_methods/expected.js +++ b/test/fixtures/various_assertion_methods/expected.js @@ -1,4 +1,4 @@ 'use strict'; -function add(a, b) { +async function add(a, b) { return a + b; } diff --git a/test/fixtures/various_assertion_methods/fixture.js b/test/fixtures/various_assertion_methods/fixture.js index <HASH>..<HASH> 100644 --- a/test/fixtures/various_assertion_methods/fixture.js +++ b/test/fixtures/various_assertion_methods/fixture.js @@ -2,7 +2,7 @@ const assert = require('node:assert'); -function add (a, b) { +async function add (a, b) { console.assert(typeof a === 'number'); assert(!isNaN(a)); @@ -54,5 +54,9 @@ function add (a, b) { assert.ifError(a); assert.fail(a, b, 'assertion message', '=='); + + await assert.rejects(prms); + await assert.doesNotReject(prms2); + return a + b; }
test: add test for AwaitExpression
unassert-js_unassert
train
js,js
b9a874bdea2bb28387a6b01ef22363cfcac6638f
diff --git a/src/adapter.js b/src/adapter.js index <HASH>..<HASH> 100644 --- a/src/adapter.js +++ b/src/adapter.js @@ -20,7 +20,9 @@ function createQUnitStartFn (tc, runnerPassedIn) { // eslint-disable-line no-unu var runner = runnerPassedIn || window.QUnit var totalNumberOfTest = 0 var timer = null - var testResult = {} + var testResult = { + errors: [] + } var supportsTestTracking = false var config = (tc.config && tc.config.qunit) || {} var qunitOldTimeout = 13 @@ -98,7 +100,7 @@ function createQUnitStartFn (tc, runnerPassedIn) { // eslint-disable-line no-unu suite: (test.module && [test.module]) || [], success: testResult.success, skipped: test.skipped, - log: testResult.errors || [], + log: testResult.errors, time: new Date().getTime() - timer }
fix: define array prior to array.push (#<I>)
karma-runner_karma-qunit
train
js
50852dfbbfe7f7208bea09324cb2c1794295e1bb
diff --git a/superset/datasets/dao.py b/superset/datasets/dao.py index <HASH>..<HASH> 100644 --- a/superset/datasets/dao.py +++ b/superset/datasets/dao.py @@ -79,7 +79,7 @@ class DatasetDAO(BaseDAO): database.get_table(table_name, schema=schema) return True except SQLAlchemyError as ex: # pragma: no cover - logger.error("Got an error %s validating table: %s", str(ex), table_name) + logger.warning("Got an error %s validating table: %s", str(ex), table_name) return False @staticmethod
chore: downgrade expected exception from error to info (#<I>) * chore: reduce number of error logs * info -> warning
apache_incubator-superset
train
py
cb894c8ce9d6374c635b559abdc8978e8de2fefd
diff --git a/lib/image.js b/lib/image.js index <HASH>..<HASH> 100644 --- a/lib/image.js +++ b/lib/image.js @@ -3,6 +3,7 @@ module.exports = image; var debug = require('debug')('inliner'); function image(url) { + url = url.replace(/#.*$/, ''); this.emit('progress', 'get image ' + url); return this.get(url, { encoding: 'binary' }).then(function then(res) { if (url.indexOf('data:') === 0) {
fix: ignore fragment identifiers on urls Since the cache is keyyed by URL, it makes sense to ignore the hash fragment identifier.
remy_inliner
train
js
0a4f94e95bf936eebde9732c83ca79f73e9598c7
diff --git a/tasks/client.js b/tasks/client.js index <HASH>..<HASH> 100644 --- a/tasks/client.js +++ b/tasks/client.js @@ -159,6 +159,24 @@ module.exports = function (gulp, config) { port: config.staticServer.port, root: config.build.distPath }); + + if (process.env.SERVE_HTTPS === 'true') { + var fs = require('fs'); + + var httpsOptions = true; + if (process.env.HTTPS_KEY && process.env.HTTPS_CERT) { + httpsOptions = { + key: fs.readFileSync(process.env.HTTPS_KEY), + cert: fs.readFileSync(process.env.HTTPS_CERT) + } + } + + connect.server({ + port: config.staticServer.port + 10000, + root: config.build.distPath, + https: httpsOptions + }); + } }, reloadStaticServer: function() {
feat(https): support serving assets on HTTPS
emartech_boar-tasks-client
train
js
8d29ccbf7f61aa2ac1089b7565061d0441d92f6f
diff --git a/packages/patternfly-4/react-core/src/components/AboutModal/examples/SimpleAboutModal.js b/packages/patternfly-4/react-core/src/components/AboutModal/examples/SimpleAboutModal.js index <HASH>..<HASH> 100644 --- a/packages/patternfly-4/react-core/src/components/AboutModal/examples/SimpleAboutModal.js +++ b/packages/patternfly-4/react-core/src/components/AboutModal/examples/SimpleAboutModal.js @@ -31,7 +31,7 @@ class SimpleAboutModal extends React.Component { brandImageSrc={brandImg} brandImageAlt="Patternfly Logo" logoImageSrc={logoImg} - logoImageAlt="AboutModal Logo" + logoImageAlt="Patternfly Logo" heroImageSrc={heroImg} > <TextContent>
docs(AboutModal): update logo alt text to Patternfly Logo (#<I>)
patternfly_patternfly-react
train
js
a3062e291a76067bc859d24ea941da79fb2fc2fb
diff --git a/intranet/apps/eighth/views/admin/general.py b/intranet/apps/eighth/views/admin/general.py index <HASH>..<HASH> 100644 --- a/intranet/apps/eighth/views/admin/general.py +++ b/intranet/apps/eighth/views/admin/general.py @@ -132,11 +132,6 @@ def cache_view(request): @eighth_admin_required -def not_implemented_view(request, *args, **kwargs): - raise NotImplementedError("This view has not been implemented yet.") - - -@eighth_admin_required def history_view(request): history_timeframe = datetime.now() - timedelta(minutes=15) history = {
chore(eighth): remove unused view: not_implemented_view
tjcsl_ion
train
py
0fabb046521c00d18d0f33cb4d57992920f95edd
diff --git a/src/components/swipe-action/index.js b/src/components/swipe-action/index.js index <HASH>..<HASH> 100644 --- a/src/components/swipe-action/index.js +++ b/src/components/swipe-action/index.js @@ -219,7 +219,7 @@ export default class AtSwipeAction extends AtComponent { > {options.map((item, key) => ( <View - key={key} + key={`${item.text}-${key}`} style={item.style} onClick={this.handleClick.bind(this, item, key)} className={classNames(
fix(swipe-action): 修复 AtSwipeAction 循环 key 反优化
NervJS_taro-ui
train
js
52ef6117ba90803846172f69c1f62e31dbb1e578
diff --git a/src/helpers/form-data.js b/src/helpers/form-data.js index <HASH>..<HASH> 100644 --- a/src/helpers/form-data.js +++ b/src/helpers/form-data.js @@ -26,7 +26,6 @@ const carriage = '\r\n' const dashes = '-'.repeat(2) -const carriageLength = Buffer.byteLength(carriage) const NAME = Symbol.toStringTag @@ -101,28 +100,4 @@ module.exports.formDataIterator = function * (form, boundary) { yield getFooter(boundary) } -/** - * @param {FormData} form - * @param {string} boundary - */ -module.exports.getFormDataLength = function (form, boundary) { - let length = 0 - - for (const [name, value] of form) { - length += Buffer.byteLength(getHeader(boundary, name, value)) - - if (isBlob(value)) { - length += value.size - } else { - length += Buffer.byteLength(String(value)) - } - - length += carriageLength - } - - length += Buffer.byteLength(getFooter(boundary)) - - return length -} - module.exports.isBlob = isBlob
style: removing some unused code
Kong_httpsnippet
train
js
47255485913cf8b61ac810b4368c94a1e04036d6
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -53,7 +53,7 @@ module.exports = function(grunt) { mochacli: { options: { require: ['should'], - reporter: 'nyan', + reporter: 'spec', bail: true }, all: ['test/**/*.js']
test: remove ASCII art (#<I>) Closes #<I>
dequelabs_grunt-axe-webdriver
train
js
513675bc5b9be6eda48983cb5c8b4ad4d42c9efb
diff --git a/workflow/executor/executor.go b/workflow/executor/executor.go index <HASH>..<HASH> 100644 --- a/workflow/executor/executor.go +++ b/workflow/executor/executor.go @@ -40,6 +40,13 @@ import ( os_specific "github.com/argoproj/argo/workflow/executor/os-specific" ) +var MainContainerStartRetry = wait.Backoff{ + Steps: 8, + Duration: 1 * time.Second, + Factor: 1.0, + Jitter: 0.1, +} + const ( // This directory temporarily stores the tarballs of the artifacts before uploading tempOutArtDir = "/tmp/argo/outputs/artifacts" @@ -936,7 +943,18 @@ func (we *WorkflowExecutor) waitMainContainerStart() (string, error) { opts := metav1.ListOptions{ FieldSelector: fieldSelector.String(), } - watchIf, err := podsIf.Watch(opts) + + var err error + var watchIf watch.Interface + + err = wait.ExponentialBackoff(MainContainerStartRetry, func() (bool, error) { + watchIf, err = podsIf.Watch(opts) + if err != nil { + log.Debugf("Failed to establish watch, retrying: %v", err) + return false, nil + } + return true, nil + }) if err != nil { return "", errors.InternalWrapErrorf(err, "Failed to establish pod watch: %v", err) }
fix(executor): Add retry on pods watch to handle timeout. (#<I>)
argoproj_argo
train
go
ac5b185347629fc3f4ee7dc0b635451d88658203
diff --git a/stories/DynamicWidgets.stories.js b/stories/DynamicWidgets.stories.js index <HASH>..<HASH> 100644 --- a/stories/DynamicWidgets.stories.js +++ b/stories/DynamicWidgets.stories.js @@ -22,15 +22,4 @@ storiesOf('ais-dynamic-widgets', module) ], }; }, - methods: { - transformItems(_attributes, { results }) { - if (results._state.query === 'dog') { - return ['categories']; - } - if (results._state.query === 'lego') { - return ['categories', 'brand']; - } - return ['brand', 'hierarchicalCategories.lvl0', 'categories']; - }, - }, }));
chore(stories): dynamic widgets dashboard usage
algolia_vue-instantsearch
train
js
701756f48fc627ed1f9cef77e6ad887c2e95e0f8
diff --git a/allauth/socialaccount/providers/discord/views.py b/allauth/socialaccount/providers/discord/views.py index <HASH>..<HASH> 100644 --- a/allauth/socialaccount/providers/discord/views.py +++ b/allauth/socialaccount/providers/discord/views.py @@ -10,9 +10,9 @@ from allauth.socialaccount.providers.oauth2.views import ( class DiscordOAuth2Adapter(OAuth2Adapter): provider_id = DiscordProvider.id - access_token_url = 'https://discordapp.com/api/oauth2/token' - authorize_url = 'https://discordapp.com/api/oauth2/authorize' - profile_url = 'https://discordapp.com/api/users/@me' + access_token_url = 'https://discord.com/api/oauth2/token' + authorize_url = 'https://discord.com/api/oauth2/authorize' + profile_url = 'https://discord.com/api/users/@me' def complete_login(self, request, app, token, **kwargs): headers = {
fix(discord): Switch to new API domain
pennersr_django-allauth
train
py
55f58370cfda6ba48ab9c08cf22039dbbf5b99b0
diff --git a/src/Leevel/Protocol/Server.php b/src/Leevel/Protocol/Server.php index <HASH>..<HASH> 100755 --- a/src/Leevel/Protocol/Server.php +++ b/src/Leevel/Protocol/Server.php @@ -580,8 +580,8 @@ abstract class Server throw new InvalidArgumentException($e); } - if (version_compare(phpversion('swoole'), '4.4.0', '<')) { - $e = 'Swoole 4.4.0 OR Higher'; + if (version_compare(phpversion('swoole'), '4.4.2', '<')) { + $e = 'Swoole 4.4.2 OR Higher'; throw new InvalidArgumentException($e); }
chore: update swoole version
hunzhiwange_framework
train
php
aa79801f904a8c6dbc47f4a75bc2a1fced15054c
diff --git a/src/android/CameraPreview.java b/src/android/CameraPreview.java index <HASH>..<HASH> 100644 --- a/src/android/CameraPreview.java +++ b/src/android/CameraPreview.java @@ -466,9 +466,6 @@ public class CameraPreview extends CordovaPlugin implements CameraActivity.Camer private boolean setOnPictureTakenHandler(JSONArray args, CallbackContext callbackContext) { Log.d(TAG, "setOnPictureTakenHandler"); takePictureCallbackContext = callbackContext; - PluginResult pluginResult = new PluginResult(PluginResult.Status.OK); - pluginResult.setKeepCallback(true); - callbackContext.sendPluginResult(pluginResult); return true; } }
fix: setOnPictureTakenHandler should not be called back immediately after set (#<I>)
cordova-plugin-camera-preview_cordova-plugin-camera-preview
train
java
cce06e7f5d4d86518ae7b44c8ac0c4b423a69b6a
diff --git a/webpack.config.js b/webpack.config.js index <HASH>..<HASH> 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,4 @@ require('argv-set-env')(); var webpack = require('./webpack/config')[process.env.NODE_ENV === 'development' ? 'dist' : 'prod']; -module.exports = webpack; \ No newline at end of file +module.exports = webpack; diff --git a/webpack/build.js b/webpack/build.js index <HASH>..<HASH> 100644 --- a/webpack/build.js +++ b/webpack/build.js @@ -22,4 +22,4 @@ module.exports = function (type) { } ]; } -}; \ No newline at end of file +};
style: missing new lines in webpack
formly-js_angular-formly-templates-material
train
js,js
8c0a940cdb85b40c49009a92f6d0d6da9e827f3f
diff --git a/src/structures/Channel.js b/src/structures/Channel.js index <HASH>..<HASH> 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -100,17 +100,12 @@ class Channel extends Base { const Structures = require('../util/Structures'); let channel; if (!data.guild_id && !guild) { - switch (data.type) { - case ChannelTypes.DM: { - const DMChannel = Structures.get('DMChannel'); - channel = new DMChannel(client, data); - break; - } - case ChannelTypes.GROUP: { - const PartialGroupDMChannel = require('./PartialGroupDMChannel'); - channel = new PartialGroupDMChannel(client, data); - break; - } + if ((data.recipients && data.type !== ChannelTypes.GROUP) || data.type === ChannelTypes.DM) { + const DMChannel = Structures.get('DMChannel'); + channel = new DMChannel(client, data); + } else if (data.type === ChannelTypes.GROUP) { + const PartialGroupDMChannel = require('./PartialGroupDMChannel'); + channel = new PartialGroupDMChannel(client, data); } } else { guild = guild || client.guilds.cache.get(data.guild_id);
fix(Channel): ensure partial DMChannels get created (#<I>)
discordjs_discord.js
train
js
0ada3fbfa4aeef94eb34d0c2678a36ce772f89d8
diff --git a/src/Leevel/Event/Observer.php b/src/Leevel/Event/Observer.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Event/Observer.php +++ b/src/Leevel/Event/Observer.php @@ -68,7 +68,8 @@ class Observer implements SplObserver */ public function __invoke(...$args) { - call_user_func($this->handle, ...$args); + $handle = $this->handle; + $handle(...$args); } /**
perf(event): improves observer performance
hunzhiwange_framework
train
php