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
4b29c490ed3502fed0d9a7652797cdf6232de14e
diff --git a/src/formatters/json.js b/src/formatters/json.js index <HASH>..<HASH> 100644 --- a/src/formatters/json.js +++ b/src/formatters/json.js @@ -1,7 +1,7 @@ /*eslint no-console: "off"*/ function printResults(results) { - console.log(JSON.stringify(results)); + console.error(JSON.stringify(results)); } module.exports = { diff --git a/src/formatters/stylish.js b/src/formatters/stylish.js index <HASH>..<HASH> 100644 --- a/src/formatters/stylish.js +++ b/src/formatters/stylish.js @@ -64,12 +64,12 @@ function printResults(results) { results.forEach(function(result) { if (result.errors.length > 0) { - console.log(stylizeFilePath(result.filePath)); + console.error(stylizeFilePath(result.filePath)); result.errors.forEach(function(error) { - console.log(stylizeError(error, maxErrorMsgLength, maxLineChars)); + console.error(stylizeError(error, maxErrorMsgLength, maxLineChars)); }); - console.log('\n'); + console.error('\n'); } }); }
fix: use console.error instead of console.log this fixes e.g. output in a Jenkins console, since normal console.log statements are mapped to INFO instead of ERROR
vsiakka_gherkin-lint
train
js,js
165765db3fd9951262e85376f20fe1e35f6cc25d
diff --git a/packages/react-dev-utils/printHostingInstructions.js b/packages/react-dev-utils/printHostingInstructions.js index <HASH>..<HASH> 100644 --- a/packages/react-dev-utils/printHostingInstructions.js +++ b/packages/react-dev-utils/printHostingInstructions.js @@ -39,7 +39,7 @@ function printHostingInstructions( console.log(); console.log('Find out more about deployment here:'); console.log(); - console.log(` ${chalk.yellow('https://bit.ly/CRA-deploy')}`); + console.log(` ${chalk.yellow('https://create-react-app.dev/docs/deployment')}`); console.log(); }
chore: Fix broken link for CRA deployment (#<I>)
facebook_create-react-app
train
js
db9ef0f94435a81811e4a8ce0f686abecc695c7d
diff --git a/src/select/__test__/Select.test.js b/src/select/__test__/Select.test.js index <HASH>..<HASH> 100644 --- a/src/select/__test__/Select.test.js +++ b/src/select/__test__/Select.test.js @@ -45,7 +45,7 @@ describe('<Select>', () => { }); it('Test onChange func', () => { - const select = wrapper.find('.w-select').at(0).find('.w-input').at(0); + const select = wrapper.find('.w-select').at(0).find('input').at(0); select.simulate('change'); expect(wrapperState.value).toBe(7); });
test(Select): Update test case.
uiwjs_uiw
train
js
c1d8c162da52dde7a8acef01bd607423198897a9
diff --git a/integration/single/test_basic_function.py b/integration/single/test_basic_function.py index <HASH>..<HASH> 100644 --- a/integration/single/test_basic_function.py +++ b/integration/single/test_basic_function.py @@ -1,6 +1,7 @@ from unittest.case import skipIf -from integration.config.service_names import KMS, XRAY, ARM, CODE_DEPLOY +from integration.config.service_names import KMS, XRAY, ARM, CODE_DEPLOY, HTTP_API + from integration.helpers.resource import current_region_does_not_support from parameterized import parameterized from integration.helpers.base_test import BaseTest @@ -35,6 +36,7 @@ class TestBasicFunction(BaseTest): "single/function_alias_with_http_api_events", ] ) + @skipIf(current_region_does_not_support([HTTP_API]), "HTTP API is not supported in this testing region") def test_function_with_http_api_events(self, file_name): self.create_and_verify_stack(file_name)
chore: FOSS add skip tests (#<I>)
awslabs_serverless-application-model
train
py
416daa0d11d6146e00131cf668998656186aef6a
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index <HASH>..<HASH> 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -574,7 +574,7 @@ class SymbolicReference(object): # walk loose refs # Currently we do not follow links for root, dirs, files in os.walk(join_path_native(repo.git_dir, common_path)): - if 'refs/' not in root: # skip non-refs subfolders + if 'refs' not in root.split(os.sep): # skip non-refs subfolders refs_id = [d for d in dirs if d == 'refs'] if refs_id: dirs[0:] = ['refs']
fix(refs): don't assume linux path separator Instead, work with os.sep. Fixes #<I>
gitpython-developers_GitPython
train
py
e1c7235741f9a9ec0d2922ac7755ec5b74bad3c5
diff --git a/config/webpack/test.js b/config/webpack/test.js index <HASH>..<HASH> 100644 --- a/config/webpack/test.js +++ b/config/webpack/test.js @@ -7,7 +7,7 @@ export default { { test: /\.js$/, exclude: /node_modules/, - loader: 'babel-loader?stage=0&optional[]=runtime' + loader: 'babel-loader?stage=0&optional[]=runtime&loose=true' } ] }, diff --git a/tasks/react-components.js b/tasks/react-components.js index <HASH>..<HASH> 100644 --- a/tasks/react-components.js +++ b/tasks/react-components.js @@ -17,7 +17,7 @@ const buildFolder = 'dist/react'; gulp.task('react-build-src', function() { return gulp.src('src/pivotal-ui-react/**/*.js') .pipe(plugins.plumber()) - .pipe(plugins.babel({stage: 0, optional: ['runtime']})) + .pipe(plugins.babel({stage: 0, optional: ['runtime'], loose: true})) .pipe(plugins.header(COPYRIGHT)) .pipe(gulp.dest(buildFolder)); });
chore(babel): Uses loose setting for babel translation [Finishes #<I>]
pivotal-cf_pivotal-ui
train
js,js
c6f1626cb5ddbd249e49bc9963b9e0ed723b2b0a
diff --git a/Classes/Lib/Searchphrase.php b/Classes/Lib/Searchphrase.php index <HASH>..<HASH> 100644 --- a/Classes/Lib/Searchphrase.php +++ b/Classes/Lib/Searchphrase.php @@ -33,7 +33,7 @@ class Searchphrase /** * @var Pluginbase */ - protected $pObj; + public $pObj; /** * initializes this object
feat: make pluginbase accessible in searchphrase hooks
teaminmedias-pluswerk_ke_search
train
php
2088e635d1274a3ac4c5f76699c731a1a1a47d32
diff --git a/src/components/__tests__/pagination.js b/src/components/__tests__/pagination.js index <HASH>..<HASH> 100644 --- a/src/components/__tests__/pagination.js +++ b/src/components/__tests__/pagination.js @@ -89,3 +89,27 @@ test('it should be hidden if there are no results in the current context', () => expect(vm.$el.outerHTML).toMatchSnapshot(); }); + +test('it should emit a "page-change" event when page changes', () => { + const searchStore = { + page: 1, + totalPages: 20, + totalResults: 4000, + }; + const Component = Vue.extend(Pagination); + const vm = new Component({ + propsData: { + searchStore, + }, + }); + + const onPageChange = jest.fn(); + vm.$on('page-change', onPageChange); + + vm.$mount(); + + expect(onPageChange).not.toHaveBeenCalled(); + + vm.$el.getElementsByTagName('li')[3].getElementsByTagName('a')[0].click(); + expect(onPageChange).toHaveBeenCalledTimes(1); +});
test(pagination): test that page-change event is emitted
algolia_vue-instantsearch
train
js
4505818a47964a24bdfc42e58bb56f6a3b01d08c
diff --git a/jest.config.js b/jest.config.js index <HASH>..<HASH> 100644 --- a/jest.config.js +++ b/jest.config.js @@ -4,6 +4,7 @@ const commonConfig = { setupFilesAfterEnv: [ '<rootDir>/packages/cozy-stack-client/src/__tests__/setup.js' ], + watchPathIgnorePatterns: ['node_modules'], modulePathIgnorePatterns: ['<rootDir>/packages/.*/dist/'], transformIgnorePatterns: ['node_modules/(?!(cozy-ui))'], testEnvironment: 'jest-environment-jsdom-sixteen',
fix: Prevent Too many open files error Do not watch node_modules since there are too many files in there
cozy_cozy-client
train
js
b37e23b5819abbc03049124bc3a29120f91aeb8c
diff --git a/scripts/release/build-experimental-typescript.js b/scripts/release/build-experimental-typescript.js index <HASH>..<HASH> 100755 --- a/scripts/release/build-experimental-typescript.js +++ b/scripts/release/build-experimental-typescript.js @@ -19,5 +19,11 @@ fs.writeFileSync( `export default '${newVersion}';\n` ); -shell.exec(`NODE_ENV=production VERSION=${newVersion} yarn build`); -shell.exec('yarn build:types'); +const results = [ + shell.exec(`NODE_ENV=production VERSION=${newVersion} yarn build`), + shell.exec('yarn build:types'), +]; + +if (results.some(({ code }) => code !== 0)) { + shell.exit(1); +}
fix(build): ensure build fails when types building fails (#<I>) * fix(build): ensure build fails when types building fails * Apply suggestions from code review
algolia_instantsearch.js
train
js
e26fac2400a82f8851cf0931f1363155b6ce6766
diff --git a/piazza_api/__init__.py b/piazza_api/__init__.py index <HASH>..<HASH> 100644 --- a/piazza_api/__init__.py +++ b/piazza_api/__init__.py @@ -1,3 +1,3 @@ from piazza_api.piazza import Piazza -__version__ = "0.3.0" +__version__ = "0.4.0" diff --git a/piazza_api/network.py b/piazza_api/network.py index <HASH>..<HASH> 100644 --- a/piazza_api/network.py +++ b/piazza_api/network.py @@ -1,3 +1,5 @@ +from collections import namedtuple + from .rpc import PiazzaRPC @@ -52,6 +54,19 @@ class Network(object): self._rpc = PiazzaRPC(network_id=self._nid) self._rpc.cookies = cookies + ff = namedtuple('FeedFilters', ['unread', 'following', 'folder']) + self._feed_filters = ff(UnreadFilter, FollowingFilter, FolderFilter) + + @property + def feed_filters(self): + """namedtuple instance containing FeedFilter classes for easy access + + :rtype: namedtuple + :returns: namedtuple with unread, following, and folder attributes + mapping to filters + """ + return self._feed_filters + ######### # Posts # #########
feat(user): Add feed_filters property to Network for easy access
hfaran_piazza-api
train
py,py
e5384aaeb36498ecfbd7814be05c30911fd85545
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -508,6 +508,17 @@ exports.extend = function(newConf) { variableProperties.forEach(function(name) { config[name] = newConf[name] || pkgConf[name]; }); + var extra = newConf.extra; + if (extra && typeof extra === 'string') { + extra = readFileText(extra); + try { + extra = extra && JSON.parse(extra); + if (extra && typeof extra === 'object') { + config.pluginsDataMap = extend({}, config.pluginsDataMap, extra); + } + } catch (e) {} + extra = null; + } var customHandler = newConf.customHandler || newConf.customHandle; if (typeof customHandler === 'function') { config.customHandler = customHandler;
refactor: read json from extra
avwo_whistle
train
js
375c441fb54570ad2393e003bceeeeddca9f75fb
diff --git a/routes-v1/subroutes/mobilizations.js b/routes-v1/subroutes/mobilizations.js index <HASH>..<HASH> 100644 --- a/routes-v1/subroutes/mobilizations.js +++ b/routes-v1/subroutes/mobilizations.js @@ -63,13 +63,15 @@ const InsideMobilization = connect(stateToProps, actionsToProps)(class extends R render () { const { - match: { path }, + match: { path, params: { mobilization_id: id } }, mobilization, blocksIsLoaded, widgetsIsLoaded } = this.props - return !mobilization || !blocksIsLoaded || !widgetsIsLoaded ? <Loading /> : ( + const hasId = id && !isNaN(id) + + return (!mobilization || !blocksIsLoaded || !widgetsIsLoaded) && hasId ? <Loading /> : ( <React.Fragment> <Route exact path={`${path}/blocks/create`} component={BlockCreate} /> <Route exact path={`${path}/edit`} component={MobilizationsEdit} />
fix(routes-v1): mobilization featch loading layer condition
nossas_bonde-client
train
js
0a8b78b719b675a9ecbd16c381ddc54ebbf34e39
diff --git a/src/commands/isDescendent.js b/src/commands/isDescendent.js index <HASH>..<HASH> 100644 --- a/src/commands/isDescendent.js +++ b/src/commands/isDescendent.js @@ -37,11 +37,9 @@ export async function isDescendent ({ ancestor, depth = -1 }) { - console.log('isDescendent', oid, ancestor) try { const fs = new FileSystem(_fs) const shallows = await GitShallowManager.read({ fs, gitdir }) - console.log('shallows', shallows) if (!oid) { throw new GitError(E.MissingRequiredParameterError, { function: 'isDescendent', @@ -67,7 +65,6 @@ export async function isDescendent ({ throw new GitError(E.MaxSearchDepthExceeded, { depth }) } const oid = queue.shift() - console.log('oid', oid) const { type, object } = await readObject({ fs, gitdir,
fix: remove stray console.logs (#<I>)
isomorphic-git_isomorphic-git
train
js
ab3b70b9fb982840551cb5d9450458adb1f74f8f
diff --git a/test/mock/index.js b/test/mock/index.js index <HASH>..<HASH> 100644 --- a/test/mock/index.js +++ b/test/mock/index.js @@ -1,5 +1,34 @@ var Server = require('./lib/server'); +const cleanup = (servers, spy, callback) => { + if (!Array.isArray(servers)) { + throw new Error('First argument must be an array of mock servers'); + } + + if (spy) { + const alreadyDrained = spy.connectionCount() === 0; + const finish = () => { + callback(null, null); + }; + + if (!alreadyDrained) { + spy.once('drained', () => finish()); + } + + const cleanupPromise = Promise.all(servers.map(server => server.destroy())).catch(err => + callback(err, null) + ); + + if (alreadyDrained) { + cleanupPromise.then(() => finish()); + } + } else { + Promise.all(servers.map(server => server.destroy())) + .then(() => callback(null, null)) + .catch(err => callback(err, null)); + } +}; + /* * Main module */ @@ -7,5 +36,7 @@ module.exports = { createServer: function(port, host, options) { options = options || {}; return new Server(port, host, options).start(); - } + }, + + cleanup: cleanup };
feat(mock): support a means of consistently cleaning up mock servers NODE-<I>
mongodb-js_mongodb-core
train
js
04c24e9231ba3a3f4716bdfebddaaaa8b8bc76a0
diff --git a/config/webpack.js b/config/webpack.js index <HASH>..<HASH> 100644 --- a/config/webpack.js +++ b/config/webpack.js @@ -116,7 +116,8 @@ const shared = { }, timeout: 80000, plugins: [ - new webpack.DefinePlugin({'fs.writeSync': false}) + new webpack.DefinePlugin({'fs.writeSync': false}), + new webpack.optimize.DedupePlugin() ] }
feat(webpack): enable dedupe plugin
ipfs_aegir
train
js
178bbbc31c594f9ded4b8a66b0beecbb16cfa949
diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index <HASH>..<HASH> 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -120,6 +120,7 @@ spec: }).ExpectWorkflowNode(func(status v1alpha1.NodeStatus) bool { return strings.Contains(status.Name, "hook") }, func(t *testing.T, status *v1alpha1.NodeStatus, pod *apiv1.Pod) { + t.Skip("https://github.com/argoproj/argo-workflows/issues/8757") assert.Equal(t, v1alpha1.NodeSucceeded, status.Phase) }) }
fix: Temporarily fix CI build. Fixes #<I>. (#<I>) * fix: Temporarily fix CI build
argoproj_argo
train
go
b7988cf09160a33f6c696d32ff6500f473a85150
diff --git a/algoliasearch/index_iterator.go b/algoliasearch/index_iterator.go index <HASH>..<HASH> 100644 --- a/algoliasearch/index_iterator.go +++ b/algoliasearch/index_iterator.go @@ -28,7 +28,6 @@ func (it *indexIterator) Next() (res Map, err error) { // Abort if the user call `Next()` on a IndexIterator that has been // initialized without being able to load the first page. if len(it.page.Hits) == 0 { - //err = errors.New("No more hits") err = NoMoreHitsErr return } @@ -38,7 +37,6 @@ func (it *indexIterator) Next() (res Map, err error) { // been returned. if it.pos == len(it.page.Hits) { if it.cursor == "" { - //err = errors.New("No more hits") err = NoMoreHitsErr } else { err = it.loadNextPage() @@ -64,7 +62,6 @@ func (it *indexIterator) loadNextPage() (err error) { // Return an error if the newly loaded pages contains no results if len(it.page.Hits) == 0 { - //err = errors.New("No more hits") err = NoMoreHitsErr return }
refactor: Remove commented dead code
algolia_algoliasearch-client-go
train
go
b008d6958464739935ffd941247d136655098f4a
diff --git a/packages/d3fc-data-join/src/dataJoin.js b/packages/d3fc-data-join/src/dataJoin.js index <HASH>..<HASH> 100644 --- a/packages/d3fc-data-join/src/dataJoin.js +++ b/packages/d3fc-data-join/src/dataJoin.js @@ -23,9 +23,8 @@ export default (element, className) => { const dataJoin = function(container, data) { data = data || ((d) => d); - const selector = className == null ? element : `${element}.${className}`; - const selected = container.selectAll(selector) - .filter((d, i, nodes) => nodes[i].parentNode === container.node()); + const selected = container.selectAll((d, i, nodes) => nodes[i].children) + .filter(className == null ? element : `${element}.${className}`); let update = selected.data(data, key); // N.B. insert() is used to create new elements, rather than append(). insert() behaves in a special manner
refactor: improve performance of child-only selector Select children then post-filter to matching selector rather than select all matching descendents then post-filter to children.
d3fc_d3fc
train
js
4cdb94613303d5b5e20a94b6468e181df044bebc
diff --git a/webapps/webapp/src/main/webapp/app/tasklist/services/EngineApi.js b/webapps/webapp/src/main/webapp/app/tasklist/services/EngineApi.js index <HASH>..<HASH> 100644 --- a/webapps/webapp/src/main/webapp/app/tasklist/services/EngineApi.js +++ b/webapps/webapp/src/main/webapp/app/tasklist/services/EngineApi.js @@ -16,7 +16,7 @@ ngDefine('tasklist.services', [ var forms = $resource(Uri.appUri("engine://engine/:engine/:context/:id/:action"), { id: "@id" } , { startForm : { method: 'GET', params : { context: "process-definition", action: 'startForm' }}, - taskForm : { method: 'GET', params : { context: "task" }} + taskForm : { method: 'GET', params : { context: "task", action: 'form' }} }); this.taskList.getForm = function(data, fn) {
fix(tasklist): resolve task form using correct uri Related to CAM-<I>
camunda_camunda-bpm-platform
train
js
a1c5bf61d7b244ac382afd3b55ce249bc0dcd937
diff --git a/connection/commands.js b/connection/commands.js index <HASH>..<HASH> 100644 --- a/connection/commands.js +++ b/connection/commands.js @@ -315,7 +315,8 @@ GetMore.prototype.toBin = function() { /************************************************************** * KILLCURSOR **************************************************************/ -var KillCursor = function(bson, cursorIds) { +var KillCursor = function(bson, ns, cursorIds) { + this.ns = ns; this.requestId = _requestId++; this.cursorIds = cursorIds; };
refactor(kill-cursor): include ns with KillCursor for upconverting NODE-<I>
mongodb_node-mongodb-native
train
js
508ff40032efaf103fa11ad17b6f745d7f060182
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -71,8 +71,6 @@ export { default as TimeRangePicker } from './components/time-range-picker'; export { default as Text } from './components/typography/text'; -export { default as HorizontalConstraint } from './components/constraints/horizontal'; - export { default as withMouseDownState } from './hocs/with-mouse-down-state'; export { default as withMouseOverState } from './hocs/with-mouse-over-state';
fix: remove HorizontalConstraint export (#<I>) It is already avialable as Constraints.Horizontal. BREAKING CHANGE: HorizontalConstraint export is no longer available.
commercetools_ui-kit
train
js
20b492bb134b80cfcfdd7f1c0b83999db7116ec9
diff --git a/query/influxql/compiler.go b/query/influxql/compiler.go index <HASH>..<HASH> 100644 --- a/query/influxql/compiler.go +++ b/query/influxql/compiler.go @@ -61,12 +61,8 @@ func (c *Compiler) Compile(ctx context.Context) (flux.Program, error) { if err != nil { return nil, err } - - astCompiler := lang.ASTCompiler{ - AST: astPkg, - Now: now, - } - return astCompiler.Compile(ctx) + compileOptions := lang.WithLogPlanOpts(c.logicalPlannerOptions...) + return lang.CompileAST(astPkg, now, compileOptions), nil } func (c *Compiler) CompilerType() flux.CompilerType {
refactor(influxql): compile with planner options (#<I>)
influxdata_influxdb
train
go
c129970b63ccdfbcedca9565d3796f36931362c1
diff --git a/source/application/layouts/index.js b/source/application/layouts/index.js index <HASH>..<HASH> 100644 --- a/source/application/layouts/index.js +++ b/source/application/layouts/index.js @@ -50,13 +50,17 @@ function layout(props) { } function isAbsolute(reference) { - return !isRelative(reference); + return !isRelative(reference) && !hasUri(reference); } function isReference(reference) { - return 'id' in reference; + return 'id' in reference || 'uri' in reference; } function isRelative(reference) { - return (reference.id || '').charAt(0) === '.'; + return (reference.id || '').charAt(0) === '.' || hasUri(reference); +} + +function hasUri(reference) { + return 'uri' in reference; }
fix: make sure .uri references are injected
patternplate-archive_patternplate-server
train
js
859ac3d715494c5d7fa62c383026f826d936a9c9
diff --git a/bin/start-mc.js b/bin/start-mc.js index <HASH>..<HASH> 100755 --- a/bin/start-mc.js +++ b/bin/start-mc.js @@ -7,7 +7,7 @@ const mri = require('mri'); const shell = require('shelljs'); const fetch = require('node-fetch'); const env = require('@commercetools-frontend/mc-html-template/env'); -const replaceHtmlPlaceholders = require('@commercetools-frontend/mc-html-template/replace-html-placeholders'); +const replaceHtmlPlaceholders = require('@commercetools-frontend/mc-html-template/utils/replace-html-placeholders'); if (process.env.NODE_ENV !== 'production') throw new Error(
refactor(html-template): group files into folders
commercetools_merchant-center-application-kit
train
js
02502e1bc9776bfd326ac52f59470c3f437500ee
diff --git a/spec/watcher_spec.rb b/spec/watcher_spec.rb index <HASH>..<HASH> 100644 --- a/spec/watcher_spec.rb +++ b/spec/watcher_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "spec_helper" describe(Jekyll::Watcher) do
fix: unfreeze to make tests pass
jekyll_jekyll-watch
train
rb
f81164a210e670064cee9dd95fc7a2524db74fbe
diff --git a/tests/integ/__init__.py b/tests/integ/__init__.py index <HASH>..<HASH> 100644 --- a/tests/integ/__init__.py +++ b/tests/integ/__init__.py @@ -71,7 +71,7 @@ EI_SUPPORTED_REGIONS = [ NO_LDA_REGIONS = ["eu-west-3", "eu-north-1", "sa-east-1", "ap-east-1"] NO_MARKET_PLACE_REGIONS = ["eu-west-3", "eu-north-1", "sa-east-1", "ap-east-1"] -EFS_TEST_ENABLED_REGION = ["us-west-2"] +EFS_TEST_ENABLED_REGION = [] logging.getLogger("boto3").setLevel(logging.INFO) logging.getLogger("botocore").setLevel(logging.INFO)
fix: skip efs and fsx integ tests in all regions (#<I>)
aws_sagemaker-python-sdk
train
py
d5aa0d32a4161ce8c50bacdd846034575f287340
diff --git a/test/scenario_test/lib/base.py b/test/scenario_test/lib/base.py index <HASH>..<HASH> 100644 --- a/test/scenario_test/lib/base.py +++ b/test/scenario_test/lib/base.py @@ -82,7 +82,7 @@ def make_gobgp_ctn(tag='gobgp', local_gobgp_path=''): class Bridge(object): - def __init__(self, name, subnet='', with_ip=True): + def __init__(self, name, subnet='', with_ip=True, self_ip=False): self.name = name self.with_ip = with_ip if with_ip: @@ -101,7 +101,8 @@ class Bridge(object): local("ip link add {0} type bridge".format(self.name), capture=True) local("ip link set up dev {0}".format(self.name), capture=True) - if with_ip: + self.self_ip = self_ip + if self_ip: self.ip_addr = self.next_ip_address() local("ip addr add {0} dev {1}".format(self.ip_addr, self.name), capture=True)
test: don't give ip address to a bridge by default now telnet to quagga occurs in quagga container's local network namespace. we don't need to address a bridge
osrg_gobgp
train
py
22407fc8974f89b34b71b697bb5411db30e05b25
diff --git a/pkg/metrics/counter.go b/pkg/metrics/counter.go index <HASH>..<HASH> 100644 --- a/pkg/metrics/counter.go +++ b/pkg/metrics/counter.go @@ -29,9 +29,8 @@ func RegCounter(name string, tagStrings ...string) Counter { // StandardCounter is the standard implementation of a Counter and uses the // sync/atomic package to manage a single int64 value. type StandardCounter struct { + count int64 //Due to a bug in golang the 64bit variable need to come first to be 64bit aligned. https://golang.org/pkg/sync/atomic/#pkg-note-BUG *MetricMeta - - count int64 } // Clear sets the counter to zero.
fix(metrics): <I>bit aligns standardcounter Due to a bug in golang the <I>bit variable i need to come first to be <I>bit aligned. <URL>
grafana_grafana
train
go
853153d26332b35f1fd6901da828cf4ac0ca9698
diff --git a/src/Component/JsonSchema/Console/Loader/SchemaLoader.php b/src/Component/JsonSchema/Console/Loader/SchemaLoader.php index <HASH>..<HASH> 100644 --- a/src/Component/JsonSchema/Console/Loader/SchemaLoader.php +++ b/src/Component/JsonSchema/Console/Loader/SchemaLoader.php @@ -40,6 +40,7 @@ class SchemaLoader implements SchemaLoaderInterface 'use-cacheable-supports-method', 'skip-null-values', 'skip-required-fields', + 'custom-string-format-mapping' ]; }
fix: missing declaration of new config option
janephp_janephp
train
php
dcfbf4774a65d3f6dbbdb7b3217201a662b9cd01
diff --git a/android/src/main/java/com/imagepicker/Utils.java b/android/src/main/java/com/imagepicker/Utils.java index <HASH>..<HASH> 100644 --- a/android/src/main/java/com/imagepicker/Utils.java +++ b/android/src/main/java/com/imagepicker/Utils.java @@ -8,7 +8,6 @@ import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; -import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.hardware.camera2.CameraCharacteristics; @@ -17,7 +16,6 @@ import android.net.Uri; import android.os.Build; import android.os.ParcelFileDescriptor; import android.provider.MediaStore; -import android.provider.OpenableColumns; import android.util.Base64; import android.util.Log; import android.webkit.MimeTypeMap; @@ -38,10 +36,6 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.nio.file.*; -import java.nio.file.attribute.BasicFileAttributes; -import java.nio.file.attribute.FileTime; -import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays;
fix(deps): remove unused Android Java dependancies (#<I>)
react-native-community_react-native-image-picker
train
java
0e940fad17470483088da6c84192c26cc55a87e7
diff --git a/packages/cozy-konnector-libs/src/libs/linkBankOperations.js b/packages/cozy-konnector-libs/src/libs/linkBankOperations.js index <HASH>..<HASH> 100644 --- a/packages/cozy-konnector-libs/src/libs/linkBankOperations.js +++ b/packages/cozy-konnector-libs/src/libs/linkBankOperations.js @@ -92,6 +92,7 @@ class Linker { /* Commit updates */ commitChanges() { + log('debug', `linkBankOperations: commiting ${this.toUpdate.length} changes`) return cozyClient.fetchJSON( 'POST', `/data/${DOCTYPE_OPERATIONS}/_bulk_docs`,
chore: Add log to know how many changes have been commited
konnectors_libs
train
js
ea81dfe48b17171ed3ed7d58c47b29ef11253da2
diff --git a/src/immer.js b/src/immer.js index <HASH>..<HASH> 100644 --- a/src/immer.js +++ b/src/immer.js @@ -49,18 +49,14 @@ export function produce(baseState, producer, patchListener) { if (patchListener !== undefined && typeof patchListener !== "function") throw new Error("the third argument of a producer should not be set or a function") } - // if state is a primitive, don't bother proxying at all - if (typeof baseState !== "object" || baseState === null) { + // avoid proxying anything except plain objects and arrays + if (!isProxyable(baseState)) { const returnValue = producer(baseState) return returnValue === undefined ? baseState : normalizeResult(returnValue) } - if (!isProxyable(baseState)) - throw new Error( - `the first argument to an immer producer should be a primitive, plain object or array, got ${typeof baseState}: "${baseState}"` - ) return normalizeResult( getUseProxies() ? produceProxy(baseState, producer, patchListener)
fix(produce): avoid throwing on unproxyable objects
immerjs_immer
train
js
5c4d0a026dd20a857535eb724ecefa4b00210eb7
diff --git a/packages/openneuro-server/src/graphql/resolvers/snapshots.js b/packages/openneuro-server/src/graphql/resolvers/snapshots.js index <HASH>..<HASH> 100644 --- a/packages/openneuro-server/src/graphql/resolvers/snapshots.js +++ b/packages/openneuro-server/src/graphql/resolvers/snapshots.js @@ -186,7 +186,7 @@ export const filterLatestSnapshot = snapshots => { snapshots, snapshotCreationComparison, ) - return sortedSnapshots[0].tag + return sortedSnapshots[sortedSnapshots.length - 1].tag } else { return null }
fix(api): Fix inverted sort order for latestSnapshot
OpenNeuroOrg_openneuro
train
js
8d480a4985ff26708b1e1fc6fb08170feadc8e0a
diff --git a/config.js b/config.js index <HASH>..<HASH> 100644 --- a/config.js +++ b/config.js @@ -14,7 +14,7 @@ module.exports = { packageTTL: parseInt(env.CACHE_PACKAGE_TTL) || 60, tarballTTL: parseInt(env.CACHE_TARBALL_TTL) || (6 * 60 * 60) }, - fs: {directory: env.NPM_REGISTER_FS_DIRECTORY || 'fs'}, + fs: {directory: env.NPM_REGISTER_FS_DIRECTORY || 'tmp'}, s3: {bucket: env.AWS_S3_BUCKET} } diff --git a/lib/storage/fs.js b/lib/storage/fs.js index <HASH>..<HASH> 100644 --- a/lib/storage/fs.js +++ b/lib/storage/fs.js @@ -9,7 +9,7 @@ const Stream = require('stream') class FS extends require('./base') { constructor () { super() - this.directory = path.resolve(config.fs.directory || 'fs') + this.directory = path.resolve(config.fs.directory) console.error(`Saving files to local filesystem at ${this.directory}`) if (!config.fs.directory) console.error('Set NPM_REGISTER_FS_DIRECTORY to change directory') }
fix: default fs path should be './tmp' according to the README (#<I>)
jdxcode_npm-register
train
js,js
bebefd8b80acb92ccfb34d2bc3bd1c723a700252
diff --git a/server/etcdserver/api/v3rpc/watch.go b/server/etcdserver/api/v3rpc/watch.go index <HASH>..<HASH> 100644 --- a/server/etcdserver/api/v3rpc/watch.go +++ b/server/etcdserver/api/v3rpc/watch.go @@ -346,8 +346,9 @@ func (sws *serverWatchStream) recvLoop() error { } default: // we probably should not shutdown the entire stream when - // receive an valid command. + // receive an invalid command. // so just do nothing instead. + sws.lg.Warn("invalid watch request received in gRPC stream") continue } }
chore: log when an invalid watch request is received As protobuf doesn't have required field, user may send an empty WatchRequest by mistake. Currently, etcd will ignore the invalid request and keep the stream opening. If we don't reject the invalid request by closing the stream, it would be better to leave a log there. This commit also fixes a typo in the comment.
etcd-io_etcd
train
go
5bc20c85e7b1ca63459713a09208b0fe9dd88078
diff --git a/src/components/VCard/VCard.js b/src/components/VCard/VCard.js index <HASH>..<HASH> 100644 --- a/src/components/VCard/VCard.js +++ b/src/components/VCard/VCard.js @@ -22,7 +22,8 @@ export default { type: String, default: 'div' }, - tile: Boolean + tile: Boolean, + width: [String, Number] }, computed: { @@ -47,6 +48,10 @@ export default { style.background = `url("${this.img}") center center / cover no-repeat` } + if (this.width) { + style.width = isNaN(this.width) ? this.width : `${this.width}px` + } + return style } },
feat(v-card): added new **width** prop
vuetifyjs_vuetify
train
js
f84897df6c3cfe35dde9eba6dfdd75b92b0ee8bf
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -106,6 +106,10 @@ class RedisMock extends EventEmitter { return mock; } + duplicate() { + return this.createConnectedClient() + } + // eslint-disable-next-line class-methods-use-this disconnect() { const removeFrom = ({ instanceListeners }) => {
fix: Add duplicate function to support instance duplication for TypeScript mocks (#<I>)
stipsan_ioredis-mock
train
js
4836cfcdf54e4923639c8e304b230327838552e4
diff --git a/code/GoogleGeocoding.php b/code/GoogleGeocoding.php index <HASH>..<HASH> 100644 --- a/code/GoogleGeocoding.php +++ b/code/GoogleGeocoding.php @@ -26,6 +26,10 @@ class GoogleGeocoding { 'region' => $region, 'key' => $key )); + if (!$service->request()->getBody()) { + // If blank response, ignore to avoid XML parsing errors. + return false; + } $response = $service->request()->simpleXML(); if ($response->status != 'OK') {
fix(EmptyResponse): If the response is empty, avoid parsing with XML as it will throw an exception.
symbiote_silverstripe-addressable
train
php
fd3656f2e318882b018e8eea0720dc6736aa43a2
diff --git a/notification-portlet-webcomponents/notification-component-icon/src/NotificationIcon.js b/notification-portlet-webcomponents/notification-component-icon/src/NotificationIcon.js index <HASH>..<HASH> 100644 --- a/notification-portlet-webcomponents/notification-component-icon/src/NotificationIcon.js +++ b/notification-portlet-webcomponents/notification-component-icon/src/NotificationIcon.js @@ -21,6 +21,11 @@ const StyledDropdownMenu = styled(DropdownMenu)` } `; const StyledDropdownToggle = styled(DropdownToggle)` + &:hover, + &:focus { + color: white; + } + &.up-notification--toggle { background-color: inherit; } @@ -191,9 +196,9 @@ class NotificationIcon extends Component { const {t, seeAllNotificationsUrl} = this.props; const {notifications, isDropdownOpen} = this.state; - const dropdownClasses = ['up-notification--toggle']; + let dropdownClasses = 'up-notification--toggle'; if (notifications.length !== 0) { - dropdownClasses.push('up-active'); + dropdownClasses += ' up-active'; } return (
fix: ensure notification button shows are red when there are unread
Jasig_NotificationPortlet
train
js
eaea6445607ef182789412305985028a79a1c103
diff --git a/source/rafcon/gui/mygaphas/canvas.py b/source/rafcon/gui/mygaphas/canvas.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/mygaphas/canvas.py +++ b/source/rafcon/gui/mygaphas/canvas.py @@ -60,8 +60,6 @@ class MyCanvas(gaphas.canvas.Canvas): def remove(self, item): from rafcon.gui.mygaphas.items.state import StateView from rafcon.gui.mygaphas.items.connection import ConnectionView, ConnectionPlaceholderView, DataFlowView - print "remove view", item, hex(id(item)) - print "for model", item.model, hex(id(item.model)) if isinstance(item, (StateView, ConnectionView)) and not isinstance(item, ConnectionPlaceholderView): self._remove_view_maps(item) super(MyCanvas, self).remove(item)
chore(canvas): clean prints of Franz
DLR-RM_RAFCON
train
py
a3f8065554b0b555a785666708d00c01cebd08c7
diff --git a/src/uki-core/view/focusable.js b/src/uki-core/view/focusable.js index <HASH>..<HASH> 100644 --- a/src/uki-core/view/focusable.js +++ b/src/uki-core/view/focusable.js @@ -57,7 +57,7 @@ uki.view.Focusable = { if (!preCreatedInput) this.bind('mousedown', function(e) { setTimeout(uki.proxy(function() { - this._focusableInput.disabled || this._focusableInput.focus(); + try { this._focusableInput.disabled || this._focusableInput.focus(); } catch (e) {}; }, this), 1); }); }, @@ -73,7 +73,7 @@ uki.view.Focusable = { }, blur: function() { - this._focusableInput.blur() + this._focusableInput.blur(); }, hasFocus: function() {
fix: ie fails to focus sometimes
voloko_uki
train
js
a905420a7d350f4fe753ae1e3dcb78be39e97875
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -69,8 +69,12 @@ module.exports = function(schema) { function defaultOptions(pathname, v) { const ret = { path: pathname, options: { maxDepth: 10 } }; - if (v.ref) { + if (v.ref != null) { ret.model = v.ref; + ret.ref = v.ref; + } + if (v.refPath != null) { + ret.refPath = v.refPath; } return ret; } @@ -107,7 +111,7 @@ function handleObject(value, optionsToUse) { } function handleFunction(fn, options) { - const val = fn.call(this); + const val = fn.call(this, options); processOption.call(this, val, options); }
fix: call function with options and include refPath in options Fix #<I>
mongodb-js_mongoose-autopopulate
train
js
335b045325c1d488aae79db1726baeeeeb4fc573
diff --git a/packages/ui-text-area/src/TextArea/styles.js b/packages/ui-text-area/src/TextArea/styles.js index <HASH>..<HASH> 100644 --- a/packages/ui-text-area/src/TextArea/styles.js +++ b/packages/ui-text-area/src/TextArea/styles.js @@ -77,14 +77,11 @@ const generateStyle = (theme, themeOverride, props, state) => { wordWrap: 'break-word', textAlign: 'start', ...fontSizeVariants[size], - '&:focus + span': { + '&:focus + [class$=-textArea__outline]': { transform: 'scale(1)', opacity: 1 }, - '&[aria-invalid]': { - borderColor: componentTheme.errorBorderColor - }, - '&[aria-invalid]:focus, &[aria-invalid]:focus + span': { + '&[aria-invalid], &[aria-invalid]:focus, &[aria-invalid]:focus + [class$=-textArea__outline]': { borderColor: componentTheme.errorBorderColor }, '&::placeholder': {
refactor: make CSS selectors more specific
instructure_instructure-ui
train
js
db64f5c74e9075349bab1e92fb64390d2960cca4
diff --git a/e2e/visual/webpack.config.js b/e2e/visual/webpack.config.js index <HASH>..<HASH> 100644 --- a/e2e/visual/webpack.config.js +++ b/e2e/visual/webpack.config.js @@ -26,6 +26,12 @@ module.exports = { content: 'mini-html-webpack-template', }, ], + scripts: [ + { + src: + '//polyfill.io/v3/polyfill.min.js?features=Set%2CArray.prototype.%40%40iterator%2CArray.prototype.find', + }, + ], }, body: { raw: '<div id="app"></div>',
chore(e2e): add polyfills to Cartesian application
telus_tds-core
train
js
27c6a2a42edd0fdbae1b8c3bdf9e1374e7715d7b
diff --git a/packages/date/src/DateRange.js b/packages/date/src/DateRange.js index <HASH>..<HASH> 100644 --- a/packages/date/src/DateRange.js +++ b/packages/date/src/DateRange.js @@ -67,7 +67,6 @@ const DateRange = ({ const [focusedInput, setFocusedInput] = useState(null); const calendarIconRef = useRef(); - const startId = `${(id || name).replace(/[^a-zA-Z0-9]/gi, '')}-start`; const endId = `${(id || name).replace(/[^a-zA-Z0-9]/gi, '')}-end`; @@ -159,7 +158,7 @@ const DateRange = ({ const onFocusChange = async input => { if (!input) await setFieldTouched(name, true); - if (autoSync) await syncDates(); + if (autoSync && !endValue) await syncDates(); setFocusedInput(input); if (onPickerFocusChange) onPickerFocusChange({ focusedInput: input }); };
fix(date): autosync infinite loop
Availity_availity-react
train
js
2cdcc5a00102de4f9126406b0751add42983cff3
diff --git a/lib/get-webpack-config.js b/lib/get-webpack-config.js index <HASH>..<HASH> 100644 --- a/lib/get-webpack-config.js +++ b/lib/get-webpack-config.js @@ -105,8 +105,13 @@ module.exports = function (options) { output: { ascii_only: true }, + beautify: false, // 最紧凑的输出 + comments: false, // 删除所有的注释 compress: { - warnings: false + warnings: false, // 在UglifyJs删除没有用到的代码时不输出警告 + drop_console: true, // 删除所有的 `console` 语句, 还可以兼容ie浏览器 + collapse_vars: true, // 内嵌定义了但是只用到一次的变量 + reduce_vars: true // 提取出出现多次但是没有定义成变量去引用的静态值 } })); }
refactor: improve webpack UglifyJsPlugin config
zuzucheFE_guido
train
js
249901bf2cf319295e055f11a0c387dcd2c25f72
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -22,6 +22,8 @@ module.exports = function(json, options) { maxFileSize = options.maxFileSize; } const ajv = new Ajv({ + schemaId: 'id', // for draft-04 + meta: false, // don't load draft-07 meta schema allErrors: true, unknownFormats: true, errorDataPath: 'property', @@ -39,6 +41,9 @@ module.exports = function(json, options) { ajv.removeKeyword('propertyNames'); ajv.removeKeyword('contains'); ajv.removeKeyword('const'); + ajv.removeKeyword('if'); + ajv.removeKeyword('then'); + ajv.removeKeyword('else'); ajv.addKeyword('maxFileSize', { validate: function validateMaxFileSize(schema, data) {
fix: for ajv@6 with JSON Schema draft-<I>
kintone_plugin-manifest-validator
train
js
44bf050da02fad698ec962bfefe0f3f8955a8595
diff --git a/api/src/opentrons/api/session.py b/api/src/opentrons/api/session.py index <HASH>..<HASH> 100755 --- a/api/src/opentrons/api/session.py +++ b/api/src/opentrons/api/session.py @@ -548,15 +548,6 @@ class Session(object): self._broker.set_logger(self._default_logger) return self - def identify(self): - self._hw_iface().identify() - - def turn_on_rail_lights(self): - self._hw_iface().set_lights(rails=True) - - def turn_off_rail_lights(self): - self._hw_ifce().set_lights(rails=False) - def set_state(self, state): log.debug("State set to {}".format(state)) if state not in VALID_STATES:
fix(api): typo in Session.turn_off_rail_lights (#<I>) * fix typo in Session.turn_off_rail_lights * remove identify, turn_on_rail_lights, and turn_off_rail_lights from Session. these methods are not used.
Opentrons_opentrons
train
py
2f5d421befd26b9b5b79411b8e41474c7aa91bd2
diff --git a/pool_test.go b/pool_test.go index <HASH>..<HASH> 100644 --- a/pool_test.go +++ b/pool_test.go @@ -47,10 +47,12 @@ func TestPool_Get(t *testing.T) { } for i := 0; i < (InitialCap - 1); i++ { - _, err := testPool.Get() - if err != nil { - t.Errorf("Get error: %s", err) - } + go func() { + _, err := testPool.Get() + if err != nil { + t.Errorf("Get error: %s", err) + } + }() } if testPool.UsedCapacity() != 0 {
test: run get's concurrently
fatih_pool
train
go
5d672986a9d4b1c69070e301d7951805d2593cad
diff --git a/src/Elements/Html.php b/src/Elements/Html.php index <HASH>..<HASH> 100644 --- a/src/Elements/Html.php +++ b/src/Elements/Html.php @@ -37,8 +37,17 @@ class Html extends Element public function display() { return sprintf( - '<tr><td></td><td colspan="2">%s</td></tr>', - $this->content + '<tr %s><td><div title="%s">%s</div></td><td>%s</td></tr>', + $this->renderFieldAttributes(), + $this->getAttribute('name'), + $this->label, + $this->displayValue() ); } + + + public function displayValue() + { + return $this->content; + } }
fix(HTML): apply field attributes
laravolt_semantic-form
train
php
b20b622c20bf9f78b8ab06f9020935843f9a8cc3
diff --git a/lib/resolve.js b/lib/resolve.js index <HASH>..<HASH> 100644 --- a/lib/resolve.js +++ b/lib/resolve.js @@ -25,6 +25,12 @@ module.exports = function resolve(dirname) { return path.resolve(process.env.APP_ROOT_PATH); } + // Defer to Yarn Plug'n'Play if enabled + if (process.versions.pnp) { + var pnp = require('pnpapi'); + return pnp.getPackageInformation(pnp.topLevel).packageLocation; + } + // Defer to main process in electron renderer if ('undefined' !== typeof window && window.process && 'renderer' === window.process.type) { var electron = 'electron';
feat: Yarn Plug'n'Play support
inxilpro_node-app-root-path
train
js
f8b2c5eb571e46d99b88dab8498408b35f892f11
diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index <HASH>..<HASH> 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -195,7 +195,7 @@ const defaultNotes = `1. Get the application URL by running these commands: {{- else if contains "NodePort" .Values.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT/login + echo http://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get svc -w {{ template "fullname" . }}'
fix(create): incorrect URL in default NOTES.txt
helm_helm
train
go
a92f74447948558b98bce14e725df7c78095703a
diff --git a/test/dsl_test.go b/test/dsl_test.go index <HASH>..<HASH> 100644 --- a/test/dsl_test.go +++ b/test/dsl_test.go @@ -287,6 +287,12 @@ func initRoot() fileOp { }, IsInit} } +func custom(f func(func(fileOp) error) error) fileOp { + return fileOp{func(c *ctx) error { + return f(func(fop fileOp) error { return fop.operation(c) }) + }, Defaults} +} + func mkdir(name string) fileOp { return fileOp{func(c *ctx) error { _, _, err := c.getNode(name, createDir, resolveAllSyms) @@ -299,12 +305,16 @@ func write(name string, contents string) fileOp { } func writeBS(name string, contents []byte) fileOp { + return pwriteBS(name, contents, 0) +} + +func pwriteBS(name string, contents []byte, off int64) fileOp { return fileOp{func(c *ctx) error { f, _, err := c.getNode(name, createFile, resolveAllSyms) if err != nil { return err } - return c.engine.WriteFile(c.user, f, contents, 0, true) + return c.engine.WriteFile(c.user, f, contents, off, true) }, Defaults} }
test: Add operations custom and pwriteBS
keybase_client
train
go
cc113cdd6c0974d497c7549ec88a99b769055ff9
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -285,7 +285,7 @@ FileStub.prototype.make = function() { }; /** - * Reverse make() stubbing. + * Undo make(). */ FileStub.prototype.unlink = function() { var name = this.get('name'); @@ -312,7 +312,7 @@ FileStub.prototype.unlink = function() { fsStub.readdir.withArgs(name).throws(err); fsStub.readdirSync.withArgs(name).throws(err); - //delete fileStubMap[name]; + delete fileStubMap[name]; }; var globalInjector = {
fix(unlink): Delete old stub map entry
codeactual_sinon-doublist-fs
train
js
c01dc089bbf42ed6403bda1bfc01504381232d9d
diff --git a/packages/@vue/cli-ui/tests/e2e/specs/test.js b/packages/@vue/cli-ui/tests/e2e/specs/test.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-ui/tests/e2e/specs/test.js +++ b/packages/@vue/cli-ui/tests/e2e/specs/test.js @@ -108,6 +108,6 @@ describe('Plugins', () => { cy.get('.loading-screen .vue-ui-loading-indicator').should('be.visible') cy.get('.prompts-list', { timeout: 250000 }).should('be.visible') cy.get('[data-testid="finish-install"]').should('not.have.class', 'disabled').click() - cy.get('.project-plugin-item').should('have.length', 3) + cy.get('.project-plugin-item', { timeout: 250000 }).should('have.length', 3) }) })
test: fix plugin install: command timeout
vuejs_vue-cli
train
js
fdffa7a929d7687821c339f39d2b81cd0950aec6
diff --git a/packages/docs/src/store/modules/notifications.js b/packages/docs/src/store/modules/notifications.js index <HASH>..<HASH> 100644 --- a/packages/docs/src/store/modules/notifications.js +++ b/packages/docs/src/store/modules/notifications.js @@ -3,8 +3,6 @@ import { make } from 'vuex-pathify' import { subDays } from 'date-fns' import bucket from '@/plugins/cosmicjs' -console.log(subDays(Date.now(), 40).getTime()) - const state = { all: [], }
chore(notifications): remove dev code
vuetifyjs_vuetify
train
js
c2bae0786df3bc12987cb1dc55d288ce445a73dd
diff --git a/tests/e2e/test_e2e.py b/tests/e2e/test_e2e.py index <HASH>..<HASH> 100644 --- a/tests/e2e/test_e2e.py +++ b/tests/e2e/test_e2e.py @@ -90,6 +90,9 @@ def test_incremental(caplog): assert num_docs == max_docs docs = corpus_parser.get_documents() + last_docs = corpus_parser.get_documents() + + assert len(docs[0].sentences) == len(last_docs[0].sentences) # Mention Extraction part_ngrams = MentionNgramsPart(parts_by_doc=None, n_max=3) @@ -242,9 +245,13 @@ def test_e2e(caplog): logger.info("Sentences: {}".format(num_sentences)) # Divide into test and train - docs = corpus_parser.get_documents() + docs = sorted(corpus_parser.get_documents()) + last_docs = sorted(corpus_parser.get_last_documents()) + ld = len(docs) - assert ld == len(corpus_parser.get_last_documents()) + assert ld == len(last_docs) + assert len(docs[0].sentences) == len(last_docs[0].sentences) + assert len(docs[0].sentences) == 799 assert len(docs[1].sentences) == 663 assert len(docs[2].sentences) == 784
test(e2e): ensure sentences are accessible from the docs in get_last_documents
HazyResearch_fonduer
train
py
e7c556371a5fbf8046dc9865ad9945791e3e2d74
diff --git a/core/src/elements/ons-segment.js b/core/src/elements/ons-segment.js index <HASH>..<HASH> 100755 --- a/core/src/elements/ons-segment.js +++ b/core/src/elements/ons-segment.js @@ -140,6 +140,7 @@ export default class SegmentElement extends BaseElement { <div class="segment__item"> <input type="radio" class="segment__input" onclick="this.nextElementSibling.click()" + value="${index}" name="${this._segmentId}" ${!this.hasAttribute('tabbar-id') && index === (parseInt(this.getAttribute('active-index')) || 0) ? 'checked' : ''}> </div>
feat(ons-segment): Index as radio value.
OnsenUI_OnsenUI
train
js
a0cfbe342cba4a6495c30e8a3d27d49394940e5e
diff --git a/src/Fields/Text.php b/src/Fields/Text.php index <HASH>..<HASH> 100644 --- a/src/Fields/Text.php +++ b/src/Fields/Text.php @@ -42,4 +42,16 @@ class Text extends Field * @var string */ protected $type = 'text'; + + /** + * Set the character limit + * + * @return self + */ + public function maxLength(int $length): self + { + $this->config->set('maxlength', $length); + + return $this; + } } diff --git a/tests/Fields/TextTest.php b/tests/Fields/TextTest.php index <HASH>..<HASH> 100644 --- a/tests/Fields/TextTest.php +++ b/tests/Fields/TextTest.php @@ -98,4 +98,10 @@ class TextTest extends TestCase $field = Text::make('Append')->append('suffix')->toArray(); $this->assertSame('suffix', $field['append']); } + + public function testMaxLength() + { + $field = Text::make('Title with length')->maxLength(10)->toArray(); + $this->assertEquals($field['maxlength'], 10); + } }
feat: added maxLength for texts fields (#<I>) * feat: added maxLength for texts fields * fix: typo maxlength
wordplate_acf
train
php,php
8a47c681072a6c621425acdf6776b930519fe34e
diff --git a/test/functional/sessions_tests.js b/test/functional/sessions_tests.js index <HASH>..<HASH> 100644 --- a/test/functional/sessions_tests.js +++ b/test/functional/sessions_tests.js @@ -50,7 +50,7 @@ describe('Sessions', function() { } }); - describe.only('withSession', { + describe('withSession', { metadata: { requires: { mongodb: '>3.6.0' } }, test: function() { [
chore(sessions): remove accidentally committed `.only`
mongodb_node-mongodb-native
train
js
60e6d89c60a26aa856236aad4bf65d80b239e604
diff --git a/bindings/vue/src/internal/optionsObjectHelper.js b/bindings/vue/src/internal/optionsObjectHelper.js index <HASH>..<HASH> 100644 --- a/bindings/vue/src/internal/optionsObjectHelper.js +++ b/bindings/vue/src/internal/optionsObjectHelper.js @@ -59,7 +59,7 @@ const createComputedPropertiesFor = (targetClass) => { // register a computed property // which relay set/get operations to its corresponding property of DOM element computed[propertyName] = { - get() { return this.$el[propertyName].__vue__ || this.$el[propertyName]; }, + get() { return (this.$el[propertyName] && this.$el[propertyName].__vue__) || this.$el[propertyName]; }, set(newValue) { this.$el[propertyName] = newValue; } }; }
fix(vue): Property could return null.
OnsenUI_OnsenUI
train
js
61180a166fc77fbbee013a55eb049fc33fe36816
diff --git a/dist/RegularList.js b/dist/RegularList.js index <HASH>..<HASH> 100644 --- a/dist/RegularList.js +++ b/dist/RegularList.js @@ -36,6 +36,9 @@ var RegularList = function (_List) { } _createClass(RegularList, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps() {} + }, { key: 'render', value: function render() { var _this2 = this; diff --git a/lib/RegularList.js b/lib/RegularList.js index <HASH>..<HASH> 100644 --- a/lib/RegularList.js +++ b/lib/RegularList.js @@ -3,6 +3,10 @@ import React, { PropTypes } from 'react'; import _ from 'lodash'; class RegularList extends List { + componentWillReceiveProps() { + + } + render() { const data = this.checkForModificationsAndReturnModifiedData(this.props.data); const style = {
fix: do not check data for regular list
poetic_react-super-components
train
js,js
1a67b0d212b0ad80412b36c626dec2a89b5891d8
diff --git a/GPy/inference/latent_function_inference/var_dtc.py b/GPy/inference/latent_function_inference/var_dtc.py index <HASH>..<HASH> 100644 --- a/GPy/inference/latent_function_inference/var_dtc.py +++ b/GPy/inference/latent_function_inference/var_dtc.py @@ -142,8 +142,7 @@ class VarDTC(LatentFunctionInference): Cpsi1Vf, _ = dtrtrs(Lm, tmp, lower=1, trans=1) # data fit and derivative of L w.r.t. Kmm - dL_dm = -np.dot((_LBi_Lmi_psi1.T.dot(_LBi_Lmi_psi1)) - - np.eye(Y.shape[0]), VVT_factor) + dL_dm = -_LBi_Lmi_psi1.T.dot(_LBi_Lmi_psi1.dot(VVT_factor)) + VVT_factor delit = tdot(_LBi_Lmi_psi1Vf) data_fit = np.trace(delit)
fix: reorder brackets to avoid an n^2 array
SheffieldML_GPy
train
py
9ffed1133b2f8fdfe6e7a650e689055c525f7122
diff --git a/lib/database/index.js b/lib/database/index.js index <HASH>..<HASH> 100644 --- a/lib/database/index.js +++ b/lib/database/index.js @@ -79,7 +79,7 @@ exports.checkExternalCouch = function (couch_url, callback) { return /^welcome/i.test(prop) }) - if (vendor !== 'couchdb' || vendor !== 'express-pouchdb') { + if (vendor !== 'couchdb' && vendor !== 'express-pouchdb') { log.warn( 'database', 'You are not running an official CouchDB distribution, ' +
fix(database): correctly detect untested vendors * * * This commit was sponsored by The Hoodie Firm. You can hire The Hoodie Firm: <URL>
hoodiehq_hoodie-server
train
js
bc40b89e8fa04645942a34324790bd08f33ac635
diff --git a/src/widgets/current-refined-values/current-refined-values.js b/src/widgets/current-refined-values/current-refined-values.js index <HASH>..<HASH> 100644 --- a/src/widgets/current-refined-values/current-refined-values.js +++ b/src/widgets/current-refined-values/current-refined-values.js @@ -168,6 +168,13 @@ currentRefinedValues({ * container: '#current-refined-values', * clearAll: 'after', * clearsQuery: true, + * attributes: [ + * {name: 'free_shipping', label: 'Free shipping'}, + * {name: 'price', label: 'Price'}, + * {name: 'brand', label: 'Brand'}, + * {name: 'category', label: 'Category'}, + * ], + * onlyListedAttributes: true, * }) * ); */
chore(showcase): Better config for current refinements
algolia_instantsearch.js
train
js
c63efb4efc4063eb365b19d6f0422b05b59544ed
diff --git a/src/transports/file/__specs__/file.spec.js b/src/transports/file/__specs__/file.spec.js index <HASH>..<HASH> 100644 --- a/src/transports/file/__specs__/file.spec.js +++ b/src/transports/file/__specs__/file.spec.js @@ -68,7 +68,7 @@ describe('transports/file/file', function () { var testFile = new file.File(path.join(tmpDir.path, 'test.txt')); testFile.writeLine('1'.repeat(4096)); - testFile.crop(8); + testFile.crop(7 + os.EOL.length); expect(fs.readFileSync(testFile.path, 'utf8')) .toEqual('[log cropped]' + os.EOL + '1111111' + os.EOL + os.EOL);
fix(file): Test on Windows
megahertz_electron-log
train
js
1f41e73195b5c8b5e2ef10faaf69f586706c352f
diff --git a/test/func/alias.js b/test/func/alias.js index <HASH>..<HASH> 100644 --- a/test/func/alias.js +++ b/test/func/alias.js @@ -58,6 +58,8 @@ describe('updateAliasSet', () => { afterEach(function () { return truncateTables(bookshelf, [ + 'bookbrainz.alias_set__alias', + 'bookbrainz.alias_set', 'bookbrainz.alias', 'musicbrainz.language' ]); diff --git a/test/func/identifier.js b/test/func/identifier.js index <HASH>..<HASH> 100644 --- a/test/func/identifier.js +++ b/test/func/identifier.js @@ -54,6 +54,8 @@ describe('updateIdentifierSet', () => { afterEach(function () { return truncateTables(bookshelf, [ + 'bookbrainz.identifier_set__identifier', + 'bookbrainz.identifier_set', 'bookbrainz.identifier', 'bookbrainz.identifier_type' ]);
fix(test): also truncate associated tables in func set tests
bookbrainz_bookbrainz-data-js
train
js,js
d9559c724732b466c9c906c37cec1f2794201b43
diff --git a/src/sagemaker/model.py b/src/sagemaker/model.py index <HASH>..<HASH> 100644 --- a/src/sagemaker/model.py +++ b/src/sagemaker/model.py @@ -1581,9 +1581,6 @@ class ModelPackage(Model): container_def = {"ModelPackageName": model_package_name} - if self.env != {}: - container_def["Environment"] = self.env - self._ensure_base_name_if_needed(model_package_name.split("/")[-1]) self._set_model_name_if_needed()
fix: remove specifying env-vars when creating model from model package (#<I>)
aws_sagemaker-python-sdk
train
py
d7e99673e9aba10447fb2fb5ae7cb5f9ccaec7e3
diff --git a/lib/crypto.js b/lib/crypto.js index <HASH>..<HASH> 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -2,7 +2,8 @@ module.exports = function BlastCrypto(Blast, Collection) { 'use strict'; - var libcrypto; + var libcrypto, + instance; /** * The Crypto class @@ -18,6 +19,25 @@ module.exports = function BlastCrypto(Blast, Collection) { }); /** + * Get a UID + * + * @author Jelle De Loecker <jelle@codedor.be> + * @since 0.1.4 + * @version 0.1.4 + * + * @return {String} + */ + Crypto.setStatic(function uid() { + + if (instance == null) { + instance = new Crypto(); + instance.populate(10); + } + + return instance.uid(); + }); + + /** * Generate a pseudorandom hex string * * @author Jelle De Loecker <jelle@codedor.be> @@ -228,4 +248,6 @@ module.exports = function BlastCrypto(Blast, Collection) { }); }); } + + Blast.defineClass('Crypto', Crypto); }; \ No newline at end of file
feat: Expose Crypto class & allow user to create uid without instancing manually
skerit_protoblast
train
js
2c855ebf46de103dae26a27940da6b3008966ecf
diff --git a/packages/components/bolt-share/src/share.standalone.js b/packages/components/bolt-share/src/share.standalone.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-share/src/share.standalone.js +++ b/packages/components/bolt-share/src/share.standalone.js @@ -7,6 +7,7 @@ class BoltShare extends withHyperHtml { constructor(self) { self = super(self); + this.useShadow = false; return self; }
fix: manually opt out of shadow DOM encapsulation of the share component for the time being (until ongoing refactor work is wrapped up)
bolt-design-system_bolt
train
js
792b684e758f93e8bff409fb0a1dfd3e4d6de6af
diff --git a/src/Database/index.js b/src/Database/index.js index <HASH>..<HASH> 100644 --- a/src/Database/index.js +++ b/src/Database/index.js @@ -50,8 +50,10 @@ export type DataFactory<T> = () => T; export type DataSerializer<T: Object, S: Object> = (data: T) => S; +export opaque type RecordId = number; + export type Record<T> = { - +id: number, + +id: RecordId, +data: T, save(): void, delete(): void
refactor: add record id flow type
devlucky_Kakapo.js
train
js
1c79a78fac9c1a732b0b8e2d570bbd4f16c371ba
diff --git a/packages/core/plugins/scoping.js b/packages/core/plugins/scoping.js index <HASH>..<HASH> 100644 --- a/packages/core/plugins/scoping.js +++ b/packages/core/plugins/scoping.js @@ -60,9 +60,11 @@ module.exports = (css, result) => { } globals[key] = true; - if (result.opts.exportGlobals !== false) { + + if(result.opts.exportGlobals !== false) { lookup[key] = [ child.value ]; } + child.ignore = true; }); }); diff --git a/packages/core/test/plugin.scoping.test.js b/packages/core/test/plugin.scoping.test.js index <HASH>..<HASH> 100644 --- a/packages/core/test/plugin.scoping.test.js +++ b/packages/core/test/plugin.scoping.test.js @@ -201,7 +201,7 @@ describe("/plugins", function() { 100% { color: black; } } `), { - exportGlobals: false + exportGlobals : false }).messages ) .toMatchSnapshot();
chore: fix some linting warnings
tivac_modular-css
train
js,js
859d2337f8b832ab095cab0566d78055d1b06fdf
diff --git a/webpack.client.config.base.js b/webpack.client.config.base.js index <HASH>..<HASH> 100644 --- a/webpack.client.config.base.js +++ b/webpack.client.config.base.js @@ -16,13 +16,18 @@ const { } = util; const plugins = [ - new MiniCssExtractPlugin(), - new BundleAnalyzerPlugin({ - analyzerMode: "static", - openAnalyzer: false - }) + new MiniCssExtractPlugin() ]; +if (!process.env.CI) { + plugins.push( + new BundleAnalyzerPlugin({ + analyzerMode: "static", + openAnalyzer: false + }) + ); +} + if (process.env.DEPLOY && process.env.SENTRY_AUTH_TOKEN) { plugins.push( new SentryPlugin({
chore: Don't run the webpack analyzer plugin in CI environments. See if this saves us anything over time.
randytarampi_me
train
js
56b27570d3b89c37b7ef4ab9396d0069881f1b98
diff --git a/src/test/java/net/emaze/dysfunctional/equality/EqualsBuilderTest.java b/src/test/java/net/emaze/dysfunctional/equality/EqualsBuilderTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/net/emaze/dysfunctional/equality/EqualsBuilderTest.java +++ b/src/test/java/net/emaze/dysfunctional/equality/EqualsBuilderTest.java @@ -21,7 +21,7 @@ import org.junit.runners.Suite.SuiteClasses; TestArrays.class, TestIgnoreParamsWhenAlreadyDifferent.class, TestIgnoreArrayParamsWhenAlreadyDifferent.class, - TestIntrospectsArrays.class, + TestIntrospectsArrays.class }) public class EqualsBuilderTest {
fix: spurious comma
cybazeitalia_emaze-dysfunctional
train
java
60eca8f516d477662e59bfff5802515e14e85c10
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -52,7 +52,9 @@ const isConnected = conn => isConnection(conn) && conn.readyState === 1; */ mongoose.oldConnect = function() { const conn = mongoose.connection; - return conn.openUri(arguments[0], arguments[1], arguments[2]).then(() => mongoose); + return conn + .openUri(arguments[0], arguments[1], arguments[2]) + .then(() => mongoose); }; /* set global mongoose promise */ @@ -642,7 +644,11 @@ exports.connect = (url, done) => { const _done = _.isFunction(url) ? url : done; // connection options - const _options = { useNewUrlParser: true, useCreateIndex: true }; + const _options = { + useNewUrlParser: true, + useCreateIndex: true, + useUnifiedTopology: true, + }; // establish mongoose connection uri = _.trim(uri) || MONGODB_URI;
fix: add support for new server discover & monitoring engine
lykmapipo_mongoose-common
train
js
e5fb025a70806d7645eabdfb4d03ae027f889c57
diff --git a/scripts/listPackagesWithTests.js b/scripts/listPackagesWithTests.js index <HASH>..<HASH> 100644 --- a/scripts/listPackagesWithTests.js +++ b/scripts/listPackagesWithTests.js @@ -20,8 +20,8 @@ const CUSTOM_HANDLERS = { // Split "api-headless-cms" tests into batches of "api-headless-cms": () => { return [ - "packages/api-page-builder/* --keyword=cms:ddb --keyword=cms:base", - "packages/api-page-builder/* --keyword=cms:ddb-es --keyword=cms:base" + "packages/api-headless-cms/* --keyword=cms:ddb --keyword=cms:base", + "packages/api-headless-cms/* --keyword=cms:ddb-es --keyword=cms:base" ]; } };
ci: split PB and CMS Jest tests into two separate runs (ddb, ddb+es)
Webiny_webiny-js
train
js
e437076aca2e76526f30493772e82ba2c9dbdbb8
diff --git a/src/Cluster.js b/src/Cluster.js index <HASH>..<HASH> 100644 --- a/src/Cluster.js +++ b/src/Cluster.js @@ -34,7 +34,7 @@ Cluster.prototype.cut = function (threshold) { /** * Merge the leaves in the minimum way to have 'minGroups' number of clusters - * @param {number} minGroups + * @param {number} minGroups - Them minimum number of children the first level of the tree should have * @return {Cluster} */ Cluster.prototype.group = function (minGroups) { @@ -61,4 +61,21 @@ Cluster.prototype.group = function (minGroups) { return root; }; +/** + * Traverses the tree depth-first and provide callback to be called on each individual node + * @param {function} cb - The callback to be called on each node encounter + * @type {Cluster} + */ +Cluster.prototype.traverse = function (cb) { + function visit(root, callback) { + callback(root); + if (root.children) { + for (var i = root.children.length - 1; i >= 0; i--) { + visit(root.children[i], callback); + } + } + } + visit(this, cb); +}; + module.exports = Cluster;
feat(cluster): add traverse method Traverses all the nodes of the tree and calls provided callback on each of them
mljs_hclust
train
js
95774518a35100bb88309fcaa7f474187d6f9884
diff --git a/packages/form/src/react/divider.js b/packages/form/src/react/divider.js index <HASH>..<HASH> 100644 --- a/packages/form/src/react/divider.js +++ b/packages/form/src/react/divider.js @@ -1,5 +1,4 @@ import * as glamor from 'glamor' -import PropTypes from 'prop-types' import React from 'react' import { useTheme } from '@pluralsight/ps-design-system-theme/react' @@ -26,8 +25,5 @@ const Divider = props => { ) } Divider.displayName = 'Divider' -Divider.contextTypes = { - themeName: PropTypes.string -} export default Divider
refactor(form): remove unneed contexttype declaration
pluralsight_design-system
train
js
45892f8514e7ec8bc111430b6f3a21d8ca56126d
diff --git a/jest.config.js b/jest.config.js index <HASH>..<HASH> 100644 --- a/jest.config.js +++ b/jest.config.js @@ -26,5 +26,6 @@ module.exports = { '<rootDir>/src/**/*.{js,jsx,ts,tsx}', '!**/demos/**', '!**/tests/**', + '!**/.umi/**', ], }
chore: update coverage config to exclude `.umi` (#<I>)
ant-design_ant-design-mobile
train
js
a2ad30ae9ea66157b7e21f441e9adbbf9085d9b2
diff --git a/lib/compiler.js b/lib/compiler.js index <HASH>..<HASH> 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -179,7 +179,7 @@ class HtmlWebpackChildCompiler { */ function extractHelperFilesFromCompilation (mainCompilation, childCompilation, filename, childEntryChunks) { const helperAssetNames = childEntryChunks.map((entryChunk, index) => { - return mainCompilation.mainTemplate.hooks.assetPath.call(filename, { + return mainCompilation.mainTemplate.getAssetPath(filename, { hash: childCompilation.hash, chunk: entryChunk, name: `HtmlWebpackPlugin_${index}` @@ -261,7 +261,7 @@ function compileTemplate (templatePath, outputFilename, mainCompilation) { if (!compiledTemplates[templatePath]) console.log(Object.keys(compiledTemplates), templatePath); const compiledTemplate = compiledTemplates[templatePath]; // Replace [hash] placeholders in filename - const outputName = mainCompilation.mainTemplate.hooks.assetPath.call(outputFilename, { + const outputName = mainCompilation.mainTemplate.getAssetPath(outputFilename, { hash: compiledTemplate.hash, chunk: compiledTemplate.entry });
refactor: Use getAssetPath instead of calling the hook directly
jantimon_html-webpack-plugin
train
js
831c3de6cbd39cc89d5ae4b008080dd0af8041fa
diff --git a/pnc_cli/bpmbuildconfigurations.py b/pnc_cli/bpmbuildconfigurations.py index <HASH>..<HASH> 100644 --- a/pnc_cli/bpmbuildconfigurations.py +++ b/pnc_cli/bpmbuildconfigurations.py @@ -49,8 +49,10 @@ def create_build_configuration_process(repository, revision, **kwargs): if not kwargs.get("generic_parameters"): kwargs["generic_parameters"] = {} - kwargs["project"] = projects_api.get_specific(kwargs.get("project_id")).content - kwargs["environment"] = envs_api.get_specific(kwargs.get("build_environment_id")).content + if not kwargs.get("project"): + kwargs["project"] = projects_api.get_specific(kwargs.get("project_id")).content + if not kwargs.get("environment"): + kwargs["environment"] = envs_api.get_specific(kwargs.get("build_environment_id")).content build_configuration = create_build_conf_object(scm_revision=revision, **kwargs) repo_creation = swagger_client.RepositoryCreationUrlAutoRest()
fix: get fields by id in BPM BC create only when needed
project-ncl_pnc-cli
train
py
e29ce5c2fa88100e3db9ad8b33e1fc809f5d1df7
diff --git a/src/attributes.js b/src/attributes.js index <HASH>..<HASH> 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -12,9 +12,31 @@ export class AttributesCustomAttribute { } valueChanged() { - Object.keys(this.value).forEach(attribute => { + Object.keys(normalizeAtttibutes(this.value)).forEach(attribute => { this.element.setAttribute(attribute, this.value[attribute]); }); } } + +/** + * @param {object|string|string[]} value + * @returns {object} where all the values are strings or boolean + */ +function normalizeAtttibutes(value, result = {}) { + if (typeof this.value === 'string') { + result[this.value] = true; + + return result; + } + + if (Array.isArray(this.value)) { + this.value.forEach(v => { + result = normalizeAtttibutes(v, result); + }); + + return result; + } + + return result; +}
feat(attributes): normalize attributes to an object One can now pass a string, array of strings or an object with string or boolean values to the attributes form-element property.
SpoonX_aurelia-form
train
js
447f2dc9e80a2dedbeadcb54de150933037bf8b1
diff --git a/sample.go b/sample.go index <HASH>..<HASH> 100644 --- a/sample.go +++ b/sample.go @@ -1,5 +1,17 @@ package zipkintracer +import ( + "github.com/openzipkin/zipkin-go" +) + // Sampler functions return if a Zipkin span should be sampled, based on its // traceID. type Sampler func(id uint64) bool + +var ( + NeverSample = zipkin.NeverSample + AlwaysSample = zipkin.AlwaysSample + NewModuloSampler = zipkin.NewModuloSampler + NewBoundarySampler = zipkin.NewBoundarySampler + NewCountingSampler = zipkin.NewCountingSampler +)
feat: adds support for samplers.
openzipkin-contrib_zipkin-go-opentracing
train
go
ff4f56d8bdcca9c1f93675ebe5976b770bb5c3e6
diff --git a/src/linear-converter.js b/src/linear-converter.js index <HASH>..<HASH> 100644 --- a/src/linear-converter.js +++ b/src/linear-converter.js @@ -82,7 +82,7 @@ module.exports = function factory(Decimal) { * @return {Boolean} whether the presets are equivalent or not */ api.equivalentPresets = function equivalentPresets(presetA, presetB) { - return [api.getCoefficientA, api.getCoefficientB].every(function(coefficient) { + return [api.getCoefficientB, api.getCoefficientA].every(function(coefficient) { return coefficient(presetA).equals(coefficient(presetB)); }); };
perf: check coef b for equiv first as it is less expensive
javiercejudo_linear-converter
train
js
381ff81e104dc478f9bfff26c7e1f3511b290949
diff --git a/pynubank/nubank.py b/pynubank/nubank.py index <HASH>..<HASH> 100644 --- a/pynubank/nubank.py +++ b/pynubank/nubank.py @@ -141,6 +141,10 @@ class Nubank: feed = self.get_card_feed() return list(filter(lambda x: x['category'] == 'transaction', feed['events'])) + def get_card_payments(self): + feed = self.get_card_feed() + return list(filter(lambda x: x['category'] == 'payment', feed['events'])) + def get_bills(self): if self._bills_url is not None: request = self._client.get(self._bills_url)
feat: Add payments list filter to credit cards (#<I>)
andreroggeri_pynubank
train
py
50738ff358a94f99a2839f1379f3373716379b43
diff --git a/test/unit/models/classes/xml/XmlEditorTest.php b/test/unit/models/classes/xml/XmlEditorTest.php index <HASH>..<HASH> 100644 --- a/test/unit/models/classes/xml/XmlEditorTest.php +++ b/test/unit/models/classes/xml/XmlEditorTest.php @@ -8,6 +8,7 @@ use oat\taoQtiTest\models\xmlEditor\XmlEditor; use PHPUnit\Framework\MockObject\MockObject; use qtism\data\storage\xml\XmlDocument; use qtism\data\storage\xml\XmlStorageException; +use SplObjectStorage; use taoQtiTest_models_classes_QtiTestConverterException; use \taoQtiTest_models_classes_QtiTestService; use taoQtiTest_models_classes_QtiTestServiceException; @@ -116,15 +117,18 @@ EOL; "preConditions" => [ ], "branchRules" => [ - ] + ], + "observers" => new SplObjectStorage(), ] ], "testFeedbacks" => [ - ] + ], + "observers" => new SplObjectStorage(), ] ], "testFeedbacks" => [ - ] + ], + "observers" => new SplObjectStorage(), ]; $this->qtiTestServiceMock
fix: Fixed breaking test, added observers from qti-sdk.
oat-sa_extension-tao-testqti
train
php
a437e195fffc9120ecb57ed2169775a9116b59e4
diff --git a/index.es6.js b/index.es6.js index <HASH>..<HASH> 100644 --- a/index.es6.js +++ b/index.es6.js @@ -2,8 +2,8 @@ import algoliasearchHelper from 'algoliasearch-helper'; import toFactory from 'to-factory'; -import InstantSearch from './dist-es6-module/lib/InstantSearch.js'; -import version from './dist-es6-module/lib/version.js'; +import InstantSearch from './lib/InstantSearch.js'; +import version from './lib/version.js'; // import instantsearch from 'instantsearch.js'; // -> provides instantsearch object without connectors and widgets
fix(es): wrong path to files (#<I>)
algolia_instantsearch.js
train
js
ad0ebba054078429805bb461c5b3064f325a0575
diff --git a/packages/spark-core/test/integration/spec/plugins/credentials.js b/packages/spark-core/test/integration/spec/plugins/credentials.js index <HASH>..<HASH> 100644 --- a/packages/spark-core/test/integration/spec/plugins/credentials.js +++ b/packages/spark-core/test/integration/spec/plugins/credentials.js @@ -197,6 +197,29 @@ describe(`spark-core`, function() { }); + describe(`when the api responds with a 401`, () => { + it(`refreshes the access token`, () => { + const spark = new Spark({ + credentials: { + authorization: user.token + } + }); + const initialToken = user.token; + // eslint-disable-next-line camelcase + spark.credentials.authorization.access_token = `invalid`; + spark.request({ + service: `conversation`, + method: `GET`, + resource: `build_info` + }) + .then((res) => { + assert.equal(res.statusCode, 200); + assert.notEqual(spark.credentials.authorization.apiToken.access_token, initialToken); + }); + + }); + }); + }); }); });
test(spark-core): prove that token refresh works
webex_spark-js-sdk
train
js
2b9a7507b9d622ba2b3398f1636768aa2eb96ef1
diff --git a/packages/@vue/cli-service/generator/index.js b/packages/@vue/cli-service/generator/index.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-service/generator/index.js +++ b/packages/@vue/cli-service/generator/index.js @@ -66,4 +66,9 @@ module.exports = (api, options) => { devDependencies: deps[options.cssPreprocessor] }) } + + // additional tooling configurations + if (options.configs) { + api.extendPackage(options.configs) + } } diff --git a/packages/@vue/cli/lib/options.js b/packages/@vue/cli/lib/options.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli/lib/options.js +++ b/packages/@vue/cli/lib/options.js @@ -15,7 +15,8 @@ const presetSchema = createSchema(joi => joi.object().keys({ router: joi.boolean(), vuex: joi.boolean(), cssPreprocessor: joi.string().only(['sass', 'less', 'stylus']), - plugins: joi.object().required() + plugins: joi.object().required(), + configs: joi.object() })) const schema = createSchema(joi => joi.object().keys({
feat: allow specifying additional configs in preset
vuejs_vue-cli
train
js,js
6925ee4035f5b78c0c6ccd1413d02e24a2a163e6
diff --git a/docs/build/search.js b/docs/build/search.js index <HASH>..<HASH> 100644 --- a/docs/build/search.js +++ b/docs/build/search.js @@ -25,7 +25,7 @@ const createFolder = (folder) => { } const createIndex = (data) => { - const requiredFields = [ levelName + '0', levelName + '1', 'url' ] + const requiredFields = [ levelName + '0', 'url' ] const missingFields = requiredFields.filter( (requiredField) => !data[ requiredField ] ) @@ -275,8 +275,7 @@ const processChildren = (parent, entry, entries, level) => { const processMenuItem = (menuItem, entries, level = 0) => { const entryItem = { - [ levelName + '0' ]: 'Documentation', - [ levelName + '1' ]: menuItem.name, + [ levelName + level ]: menuItem.name, content: '', anchor: '', url: '/' + menuItem.path
feat(docs): additional change to search
quasarframework_quasar
train
js
e83e6a1ad47834a21feb0585c0bd2e25c536d98f
diff --git a/src/generateDoc.js b/src/generateDoc.js index <HASH>..<HASH> 100644 --- a/src/generateDoc.js +++ b/src/generateDoc.js @@ -79,11 +79,15 @@ module.exports = async function generateDoc(pushToGithub) { builtDocs = true; } } + } - if (pushToGithub && builtDocs) { + if (builtDocs) { + console.log('Successfully built docs'); + if (pushToGithub) { await execa('git', ['add', 'docs']); await execa('git', ['commit', '-m', 'doc: rebuild docs [ci skip]']); await execa('git', ['push', 'origin', 'master']); + console.log('Committed and pushed to GitHub'); } } };
fix: also publish custom-built docs
cheminfo_tools
train
js
05f027c6fc89ebc731da91ead64628c0e7e093da
diff --git a/cmd/cmd.go b/cmd/cmd.go index <HASH>..<HASH> 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -281,7 +281,7 @@ Options: } dir, _ := client.ExpandUser(args["--path"].(string)) // create the target dir if necessary - if err := os.MkdirAll(dir, 0700); err != nil { + if err := os.MkdirAll(dir, 0755); err != nil { return err } // download and save the unit files to the specified path @@ -312,7 +312,7 @@ Options: if err != nil { return err } - if err = ioutil.WriteFile(dest, data, 0600); err != nil { + if err = ioutil.WriteFile(dest, data, 0644); err != nil { return err } fmt.Printf("Refreshed %s from %s\n", unit, branch)
fix(cmd): create unit files as readable to all users
deis_deis
train
go
0a6f106871bafb35a28f8426494d234a8c197622
diff --git a/packages/appframe/src/react/__specs__/storyshots.spec.js b/packages/appframe/src/react/__specs__/storyshots.spec.js index <HASH>..<HASH> 100644 --- a/packages/appframe/src/react/__specs__/storyshots.spec.js +++ b/packages/appframe/src/react/__specs__/storyshots.spec.js @@ -3,9 +3,7 @@ import initStoryshots, { snapshotWithOptions } from '@storybook/addon-storyshots' -jest.mock('@pluralsight/ps-design-system-storybook-addon-theme') - -const createNodeMock = el => document.createElement('div') +const createNodeMock = () => document.createElement('div') initStoryshots({ configPath: path.resolve(__dirname, '../../../.storybook'),
test(appframe): update snapshot
pluralsight_design-system
train
js
5dd1316fd9c050bc654fa91c7397ea731e041cf4
diff --git a/packages/node_modules/@webex/plugin-meetings/test/unit/spec/meeting/index.js b/packages/node_modules/@webex/plugin-meetings/test/unit/spec/meeting/index.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/plugin-meetings/test/unit/spec/meeting/index.js +++ b/packages/node_modules/@webex/plugin-meetings/test/unit/spec/meeting/index.js @@ -716,10 +716,12 @@ describe('plugin-meetings', () => { describe('#parseMeetingInfo', () => { it('should parse meeting info, set values, and return null', () => { meeting.parseMeetingInfo({ - convoId: uuid1, - locusUrl: url1, - sipMeetingUri: test1, - owner: test2 + body: { + convoId: uuid1, + locusUrl: url1, + sipMeetingUri: test1, + owner: test2 + } }); assert.equal(meeting.convoId, uuid1); assert.equal(meeting.locusUrl, url1);
fix(meeting): fix uts
webex_spark-js-sdk
train
js
c0e87d57f2f567b7583d881efa331f9d313d0ccb
diff --git a/lib/core/connection/msg.js b/lib/core/connection/msg.js index <HASH>..<HASH> 100644 --- a/lib/core/connection/msg.js +++ b/lib/core/connection/msg.js @@ -130,7 +130,8 @@ class Msg { } Msg.getRequestId = function() { - return ++_requestId; + _requestId = (_requestId + 1) & 0x7fffffff; + return _requestId; }; class BinMsg {
fix(OpMsg): cap requestIds at 0x7fffffff Since OpMsg uses buffer write methods, these methods can throw if the buffer attempts to write a number to large for the space. We now cap the requestId at 0x7fffffff and loop back around to 0 Fixes NODE-<I>
mongodb_node-mongodb-native
train
js
46f98b8d5cb1fd35acf3460e4c7159d6dab88998
diff --git a/heyui/plugins/notify/index.js b/heyui/plugins/notify/index.js index <HASH>..<HASH> 100644 --- a/heyui/plugins/notify/index.js +++ b/heyui/plugins/notify/index.js @@ -23,6 +23,7 @@ const notifyContainerCls = 'h-notify-container'; const notifyBodyCls = 'h-notify-body'; const notifyCloseCls = 'h-notify-close'; const notifyMaskCls = 'h-notify-mask'; +const notifyHasMaskCls = 'h-notify-has-mask'; const notifyShowCls = 'h-notify-show'; const closeIcon = 'h-icon-close'; @@ -72,6 +73,9 @@ class Notify { html += '</div>'; let $body = document.createElement(`div`); utils.addClass($body, notifyCls); + if (param.hasMask) { + utils.addClass($body, notifyHasMaskCls); + } if (param.class) { utils.addClass($body, param.class); }
fix: modal plugin add notify-has-class on $body
heyui_heyui
train
js
bb527eb9ad7a5f695fa7668f773bea50b04dcabb
diff --git a/lib/dashboard/public/elements/ncg-dialog.js b/lib/dashboard/public/elements/ncg-dialog.js index <HASH>..<HASH> 100644 --- a/lib/dashboard/public/elements/ncg-dialog.js +++ b/lib/dashboard/public/elements/ncg-dialog.js @@ -19,6 +19,7 @@ listeners: { 'neon-animation-finish': '_onNeonAnimationFinish', + 'iron-overlay-opened': '_onIronOverlayOpened', 'iron-overlay-closed': '_onIronOverlayClosed' }, @@ -51,6 +52,11 @@ } }, + _onIronOverlayOpened: function () { + var iframeDocument = this.querySelector('iframe').contentDocument; + iframeDocument.dispatchEvent(new CustomEvent('dialog-opened')); + }, + _onIronOverlayClosed: function (e) { var iframeDocument = this.querySelector('iframe').contentDocument; if (e.detail.confirmed) {
feat(dashboard): emit `dialog-opened` event in a dialog's `document` when it opens
nodecg_nodecg
train
js
f1e25c869beaa469ab244a325af33a6ec890609c
diff --git a/test/tabletmanager.py b/test/tabletmanager.py index <HASH>..<HASH> 100755 --- a/test/tabletmanager.py +++ b/test/tabletmanager.py @@ -7,10 +7,6 @@ warnings.simplefilter("ignore") import json import logging -import os -import signal -from subprocess import PIPE -import threading import time import unittest import urllib @@ -21,7 +17,6 @@ import utils import tablet from mysql_flavor import mysql_flavor from protocols_flavor import protocols_flavor -from vtdb import dbexceptions tablet_62344 = tablet.Tablet(62344) tablet_62044 = tablet.Tablet(62044)
test: Remove unused imports from tabletmanager.py.
vitessio_vitess
train
py
c756291f701296b36411ccdd639a965a302a5af8
diff --git a/server/workflow/workflow_server.go b/server/workflow/workflow_server.go index <HASH>..<HASH> 100644 --- a/server/workflow/workflow_server.go +++ b/server/workflow/workflow_server.go @@ -299,9 +299,6 @@ func (s *workflowServer) DeleteWorkflow(ctx context.Context, req *workflowpkg.Wo if err != nil { return nil, err } - if wf.Finalizers != nil && !req.Force { - return nil, fmt.Errorf("%s has finalizer. Use argo delete --force to delete this workflow", wf.Name) - } if req.Force { _, err := auth.GetWfClient(ctx).ArgoprojV1alpha1().Workflows(wf.Namespace).Patch(ctx, wf.Name, types.MergePatchType, []byte("{\"metadata\":{\"finalizers\":null}}"), metav1.PatchOptions{}) if err != nil {
fix: removed error check which prevented deleting successful artGC wfs. (#<I>) fix: removed error check which prevented deleting successful artGC workflows
argoproj_argo
train
go