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 |
|---|---|---|---|---|---|
6d91f8a5b24f5be4fc5abd2fe8edb67a08750f0e
|
diff --git a/source/rafcon/core/execution/execution_status.py b/source/rafcon/core/execution/execution_status.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/core/execution/execution_status.py
+++ b/source/rafcon/core/execution/execution_status.py
@@ -34,8 +34,8 @@ class CustomCondition(Condition):
A class which inherits from Condition but can tell the outside world on how many threads are currently waiting.
"""
- def __init__(self, lock=None, verbose=None):
- super(CustomCondition, self).__init__(lock, verbose)
+ def __init__(self, lock=None):
+ super(CustomCondition, self).__init__(lock)
def get_number_of_waiting_threads(self):
"""
|
fix(CustomCondition): No argument verbose in Python3 Condition
|
DLR-RM_RAFCON
|
train
|
py
|
e65659c46da77b2b45cde11073447550502b57d4
|
diff --git a/src/types/boolean.test.js b/src/types/boolean.test.js
index <HASH>..<HASH> 100644
--- a/src/types/boolean.test.js
+++ b/src/types/boolean.test.js
@@ -14,6 +14,8 @@ describe('boolean type', () => {
it('check validators', () => {
const booleanType = new BooleanType();
+ booleanType.validators.map(fn => expect(fn(true)).to.be.true);
+ booleanType.validators.map(fn => expect(fn(false)).to.be.true);
booleanType.validators.map(fn => expect(fn('true')).to.be.true);
booleanType.validators.map(fn => expect(fn('TRUE')).to.be.true);
booleanType.validators.map(fn => expect(fn('1')).to.be.true);
|
test(types): Fix BooleanType validators testing
|
CheerlessCloud_twconf
|
train
|
js
|
e29786c0343f53e0ce908a8104b5e371964289e9
|
diff --git a/src/Auditable.php b/src/Auditable.php
index <HASH>..<HASH> 100644
--- a/src/Auditable.php
+++ b/src/Auditable.php
@@ -230,7 +230,7 @@ trait Auditable
'auditable_type' => $this->getMorphClass(),
'user_id' => $this->resolveUserId(),
'url' => $this->resolveUrl(),
- 'ip_address' => Request::ip(),
+ 'ip_address' => $this->resolveIpAddress(),
'created_at' => $this->freshTimestamp(),
]);
}
@@ -276,6 +276,16 @@ trait Auditable
}
/**
+ * Resolve the current IP address
+ *
+ * @return string
+ */
+ protected function resolveIpAddress()
+ {
+ return Request::ip();
+ }
+
+ /**
* Determine if an attribute is eligible for auditing.
*
* @param string $attribute
|
feat(Auditable): implement resolveIpAddress() method
|
owen-it_laravel-auditing
|
train
|
php
|
c463e12538943aab758fba793e1af24b18856e06
|
diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py
index <HASH>..<HASH> 100644
--- a/test/scenario_test/bgp_router_test.py
+++ b/test/scenario_test/bgp_router_test.py
@@ -432,9 +432,9 @@ class GoBGPTestBase(unittest.TestCase):
g2.local('gobgp global rib add 50.0.0.0/24')
- g1.add_peer(g2)
+ g1.add_peer(g2, passive=True)
g2.add_peer(g1)
- g1.add_peer(g3)
+ g1.add_peer(g3, passive=True)
g3.add_peer(g1)
self.test_01_neighbor_established()
|
test: use passive connection for gobgp and gobgp connection
kinda workaround.
|
osrg_gobgp
|
train
|
py
|
81dd98d6b9b432cf059e92f877084b89365d6c29
|
diff --git a/test/setup.js b/test/setup.js
index <HASH>..<HASH> 100644
--- a/test/setup.js
+++ b/test/setup.js
@@ -66,6 +66,8 @@ mock('plotly.js/dist/plotly', {
'newPlot': function(data, layout, config) {},
})
+mock('enchannel-zmq-backend', {})
+
mock('electron', {
'shell': {
'openExternal': function(url) { },
|
test(mock): mock require enchannel zmq to prevent requiring
|
nteract_nteract
|
train
|
js
|
e44f4fb13f3b33e4fc0cd706838cb6301b7ad482
|
diff --git a/config/webpack/webpack.config.umd.js b/config/webpack/webpack.config.umd.js
index <HASH>..<HASH> 100644
--- a/config/webpack/webpack.config.umd.js
+++ b/config/webpack/webpack.config.umd.js
@@ -10,7 +10,7 @@ module.exports = {
library: 'angularMDCWeb'
},
resolve: {
- extensions: ['.ts', '.tsx', '.js']
+ extensions: ['.ts', '.js']
},
externals: {
'@angular/core': {
@@ -54,7 +54,7 @@ module.exports = {
rules: [{
test: /\.ts$/,
use: [{
- loader: 'babel-loader?presets[]=es2015'
+ loader: 'babel-loader'
}, {
loader: 'awesome-typescript-loader',
options: {
@@ -83,14 +83,5 @@ module.exports = {
}]
},
plugins: [
- new webpack.optimize.UglifyJsPlugin({
- minimize: true,
- sourceMap: true,
- include: /\.min\.js$/,
- }),
- new webpack.SourceMapDevToolPlugin({
- filename: 'core.js.map',
- test: /\.js($|\?)/i
- })
]
};
|
chore(webpack): Remove sourcemap and es<I> preset
|
trimox_angular-mdc-web
|
train
|
js
|
e227932b734bd56bf318d3fbe3be6a491db07d88
|
diff --git a/packages/build/src/index.js b/packages/build/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/build/src/index.js
+++ b/packages/build/src/index.js
@@ -27,9 +27,9 @@ module.exports = ({
production ? "id" : "name"
}].[contenthash:8]`;
const FILENAME_TEMPLATE = `${production ? "" : "[name]."}[contenthash:8]`;
- const NODE_ENV = (process.env.NODE_ENV = production
- ? "production"
- : undefined);
+ const NODE_ENV = production
+ ? (process.env.NODE_ENV = "production")
+ : undefined;
const MODE = production ? "production" : "development";
const DEVTOOL = production ? "source-map" : "cheap-module-source-map";
const BUILD_PATH = path.resolve(CWD, output);
|
fix(build): regression causing multiple copies of Marko in dev mode
|
marko-js_cli
|
train
|
js
|
26d04112cfa348dacea13ed526a244c55df8bccd
|
diff --git a/test/unit/url.test.js b/test/unit/url.test.js
index <HASH>..<HASH> 100644
--- a/test/unit/url.test.js
+++ b/test/unit/url.test.js
@@ -411,6 +411,25 @@ describe('Url', function () {
expect(url.getPath()).to.eql('/get/:beta/:gamma/:delta/:epsilon/:phi');
});
+
+ it('should work correctly without the id field as well', function () {
+ var url = new Url({
+ protocol: 'https',
+ host: 'postman-echo.com',
+ port: '443',
+ path: '/:alpha/:beta/:gamma/:delta/:epsilon/:phi',
+ variable: [
+ { key: 'alpha', value: 'get' },
+ { key: 'beta', value: null },
+ { key: 'gamma', value: NaN },
+ { key: 'gamma', value: undefined },
+ { key: 'epsilon', value: [] },
+ { key: 'phi', value: {} }
+ ]
+ });
+
+ expect(url.getPath()).to.eql('/get/:beta/:gamma/:delta/:epsilon/:phi');
+ });
});
describe('URL Encoding', function () {
|
test: Added path variable edge case unit test :white_check_mark:
|
postmanlabs_postman-collection
|
train
|
js
|
0b62dea702333916ec90fd58e85c30b94778d15d
|
diff --git a/src/addons/Confirm/Confirm.js b/src/addons/Confirm/Confirm.js
index <HASH>..<HASH> 100644
--- a/src/addons/Confirm/Confirm.js
+++ b/src/addons/Confirm/Confirm.js
@@ -7,7 +7,7 @@ import Button from '../../elements/Button'
import Modal from '../../modules/Modal'
/**
- * A Confirm modal gives the user a choice to confirm or cancel an action/
+ * A Confirm modal gives the user a choice to confirm or cancel an action.
* @see Modal
*/
class Confirm extends Component {
|
docs(Modal): fix minor confirm modal typo (#<I>)
Change a '/' to a '.' in docs for the confirm modal
|
Semantic-Org_Semantic-UI-React
|
train
|
js
|
500d8efaf1a05137e12b6c496815ff15e3ef580f
|
diff --git a/packages/node_modules/@webex/internal-plugin-encryption/test/integration/spec/kms.js b/packages/node_modules/@webex/internal-plugin-encryption/test/integration/spec/kms.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-encryption/test/integration/spec/kms.js
+++ b/packages/node_modules/@webex/internal-plugin-encryption/test/integration/spec/kms.js
@@ -466,7 +466,7 @@ describe('Encryption', function () {
before('alter config', () => {
ecdhMaxTimeout = webex2.config.encryption.ecdhMaxTimeout;
- webex2.config.encryption.ecdhMaxTimeout = 500;
+ webex2.config.encryption.ecdhMaxTimeout = 2000;
});
after(() => {
@@ -476,7 +476,7 @@ describe('Encryption', function () {
it('limits the number of retries', () => webex2.internal.encryption.kms.ping()
.then(() => {
debug(`retry: spy call count: ${spy.callCount}`);
- assert.isBelow(spy.callCount, 4);
+ assert.isBelow(spy.callCount, 5);
}));
});
});
|
test(internal-plugin-encryption): extend ping timeout
Extend the ping timeout to compensate for the setup overhead
required to initialize the test.
|
webex_spark-js-sdk
|
train
|
js
|
515ddb666293d79ed77166dd1e68e8c5a80bbbce
|
diff --git a/vyper/context/validation/module.py b/vyper/context/validation/module.py
index <HASH>..<HASH> 100644
--- a/vyper/context/validation/module.py
+++ b/vyper/context/validation/module.py
@@ -173,6 +173,7 @@ class ModuleNodeVisitor(VyperNodeVisitorBase):
type_definition = get_type_from_annotation(
annotation, DataLocation.STORAGE, is_immutable, is_public
)
+ node._metadata["type"] = type_definition
if is_immutable:
if not node.value:
@@ -198,6 +199,7 @@ class ModuleNodeVisitor(VyperNodeVisitorBase):
raise exc.with_annotation(node) from None
try:
self.namespace["self"].add_member(name, type_definition)
+ node.target._metadata["type"] = type_definition
except NamespaceCollision:
raise NamespaceCollision(f"Value '{name}' has already been declared", node) from None
except VyperException as exc:
@@ -214,6 +216,7 @@ class ModuleNodeVisitor(VyperNodeVisitorBase):
func = ContractFunction.from_FunctionDef(node)
try:
self.namespace["self"].add_member(func.name, func)
+ node._metadata["type"] = func
except VyperException as exc:
raise exc.with_annotation(node) from None
|
feat: annotate module-level ast nodes with type data
|
ethereum_vyper
|
train
|
py
|
49d262dac28787b84bc276d1a16269e280f0157c
|
diff --git a/src/download.js b/src/download.js
index <HASH>..<HASH> 100644
--- a/src/download.js
+++ b/src/download.js
@@ -1,7 +1,5 @@
'use strict'
-'use strict'
-
/*
Download go-ipfs distribution package for desired version, platform and architecture,
and unpack it to a desired output directory.
|
chore: cleanup in download.js (#<I>)
|
ipfs_npm-go-ipfs
|
train
|
js
|
15bd50681c6267e200e69360f84d7b167683b2b0
|
diff --git a/src/features/index.js b/src/features/index.js
index <HASH>..<HASH> 100644
--- a/src/features/index.js
+++ b/src/features/index.js
@@ -7,6 +7,7 @@ import set from './set'
import query from './query'
import exception from './exception'
import social from './social'
+import gaRequire from './require'
export default {
autoTrackPage,
@@ -17,5 +18,10 @@ export default {
time,
exception,
set,
- query
+ query,
+
+ // require is already a used keyword in javascript
+ // need to pass it in a different way or could export
+ // the wrong function
+ require: gaRequire
}
diff --git a/src/features/require.js b/src/features/require.js
index <HASH>..<HASH> 100644
--- a/src/features/require.js
+++ b/src/features/require.js
@@ -4,6 +4,6 @@ import ga from '../ga'
* Use Google Analytics require key
* @param {any} value
*/
-export default function require (value) {
+export default function gaRequire (value) {
ga('require', value)
}
|
refactor(features): export require feature
|
MatteoGabriele_vue-analytics
|
train
|
js,js
|
208ef7a65bb2ace10c2eac16c7a1a2ca3c9c163a
|
diff --git a/test/helpers/kubectl.go b/test/helpers/kubectl.go
index <HASH>..<HASH> 100644
--- a/test/helpers/kubectl.go
+++ b/test/helpers/kubectl.go
@@ -2301,6 +2301,7 @@ func (kub *Kubectl) CiliumInstall(filename string, options map[string]string) er
resourcesToDelete = map[string]string{
"configmap": "cilium-config",
"daemonset": "cilium",
+ "daemonset ": "cilium-node-init",
"deployment": "cilium-operator",
"clusterrolebinding": "cilium cilium-operator",
"clusterrole": "cilium cilium-operator",
|
ci: Delete cilium-node-init ds before cilium install
`--validate` helm flag introduced in <I>cc7c3d<I> caused ci to fail in gke
where we enable node init daemonset. It needs to be cleared before
cilium installation.
|
cilium_cilium
|
train
|
go
|
8a8200acaf1f46a959f8a19bc1dcda293fbfd680
|
diff --git a/optlang/symbolics.py b/optlang/symbolics.py
index <HASH>..<HASH> 100644
--- a/optlang/symbolics.py
+++ b/optlang/symbolics.py
@@ -86,14 +86,16 @@ if USE_SYMENGINE: # pragma: no cover
def add(*args):
if len(args) == 1:
args = args[0]
+ elif len(args) == 0:
+ return Zero
return Add(*args)
def mul(*args):
if len(args) == 1:
args = args[0]
- if len(args) == 0:
- return(Zero) # if you multiply nothing the result should be zero
- return reduce(operator.mul, args, One)
+ elif len(args) == 0:
+ return One # if you multiply nothing the result should be zero
+ return Mul(args)
else: # Use sympy
import sympy
@@ -134,9 +136,13 @@ else: # Use sympy
def add(*args):
if len(args) == 1:
args = args[0]
+ elif len(args) == 0:
+ return Zero
return sympy.Add._from_args(args)
def mul(*args):
if len(args) == 1:
args = args[0]
+ elif len(args) == 0:
+ return One
return sympy.Mul._from_args(args)
|
feat: add and mul return identities if called without arguments
|
biosustain_optlang
|
train
|
py
|
0be97397d5905fa55275694ef92707a7ed55381e
|
diff --git a/src/RedialContext.js b/src/RedialContext.js
index <HASH>..<HASH> 100755
--- a/src/RedialContext.js
+++ b/src/RedialContext.js
@@ -223,6 +223,7 @@ export default class RedialContext extends Component {
)
.then(() => {
if (this.completed.afterTransition) {
+ this.completed.afterTransition = false;
this.props.onCompleted('afterTransition');
}
})
|
fix: Solve a bug in onCompleted for afterTransition when using parallel
It could call onCompleted for afterTransition twice without this fix.
|
dlmr_react-router-redial
|
train
|
js
|
a8f981ff8e0aa16812d608ccd91724a4531e4dbf
|
diff --git a/internal/pkg/db/redis/client.go b/internal/pkg/db/redis/client.go
index <HASH>..<HASH> 100644
--- a/internal/pkg/db/redis/client.go
+++ b/internal/pkg/db/redis/client.go
@@ -74,10 +74,14 @@ func NewClient(config db.Configuration, lc logger.LoggingClient) (*Client, error
conn, err := redis.Dial(
"tcp", connectionString, opts...,
)
- if err != nil {
- return nil, fmt.Errorf("Could not dial Redis: %s", err)
+ if err == nil {
+ _, err = conn.Do("PING")
+ if err == nil {
+ return conn, nil
+ }
}
- return conn, nil
+
+ return nil, fmt.Errorf("could not dial Redis: %s", err)
}
// Default the batch size to 1,000 if not set
batchSize := 1000
|
fix(all): add PING check after Dial to validate DB is ready
|
edgexfoundry_edgex-go
|
train
|
go
|
84a42f59064350f099bb2be5b0b177457c32d0e2
|
diff --git a/src/internalHelpers/test/_hexToRgb.test.js b/src/internalHelpers/test/_hexToRgb.test.js
index <HASH>..<HASH> 100644
--- a/src/internalHelpers/test/_hexToRgb.test.js
+++ b/src/internalHelpers/test/_hexToRgb.test.js
@@ -8,7 +8,7 @@ describe('transparentize', () => {
it('it should correctly convert hex #000000 to rgb', () => {
expect(hexToRgb('#000000')).toMatchSnapshot()
})
- // it('it should throw an error on invalid color #00000', () => {
- // expect(() => { hexToRgb('#00000') }).toThrow('Invalid hex color')
- // })
+ it('it should throw an error on invalid color #00000', () => {
+ expect(() => { hexToRgb('#00000') }).toThrow('Invalid hex color')
+ })
})
|
chore(transparentize): Added _hexToRgb throw error test
|
styled-components_polished
|
train
|
js
|
9f512e45f7177338a2db5f04912fcdc1352c12f4
|
diff --git a/config/webpack/webpack.config.js b/config/webpack/webpack.config.js
index <HASH>..<HASH> 100644
--- a/config/webpack/webpack.config.js
+++ b/config/webpack/webpack.config.js
@@ -93,7 +93,9 @@ const buildWebpackConfigs = builds.map(
loader: require.resolve('babel-loader'),
options: {
babelrc: false,
- presets: [require.resolve('babel-preset-env')]
+ presets: [
+ [require.resolve('babel-preset-env'), { modules: false }]
+ ]
}
}
]
|
fix(webpack): Dont compile external modules to commonjs (#<I>)
|
seek-oss_sku
|
train
|
js
|
50bbdc3bc0bb57da11353a84af200304c3f57c82
|
diff --git a/test/utils.test.js b/test/utils.test.js
index <HASH>..<HASH> 100644
--- a/test/utils.test.js
+++ b/test/utils.test.js
@@ -139,7 +139,7 @@ describe('utils', () => {
expect(utils.resolveModulePath('not-a-real-package')).to.be.undefined;
var chaiPath = utils.resolveModulePath('chai');
- expect(chaiPath).to.equal(path.join(__dirname, '..', 'node_modules', 'chai'));
+ expect(chaiPath).to.exist;
var chaiJsPath = utils.resolveModulePath(path.join('chai', 'lib', 'chai.js'));
expect(chaiJsPath).to.equal(path.join(chaiPath, 'lib', 'chai.js'));
|
test(utils): Fix resolveModulePath test in yarn workspaces.
|
ngageoint_opensphere-build-resolver
|
train
|
js
|
afe97f69eac2540db94897c39c5bb467cf137e3c
|
diff --git a/packages/webpack-cli/lib/utils/cli-executer.js b/packages/webpack-cli/lib/utils/cli-executer.js
index <HASH>..<HASH> 100644
--- a/packages/webpack-cli/lib/utils/cli-executer.js
+++ b/packages/webpack-cli/lib/utils/cli-executer.js
@@ -1,4 +1,5 @@
const { MultiSelect, Input } = require('enquirer');
+const chalk = require('chalk');
const runner = require('../runner');
const logger = require('./logger');
const cliArgs = require('./cli-flags').core;
@@ -50,10 +51,14 @@ async function prompter() {
}
async function run() {
- const args = await prompter();
- process.stdout.write('\n');
- logger.info(`Executing CLI\n`);
- runner([], args);
+ try {
+ const args = await prompter();
+ process.stdout.write('\n');
+ logger.info(`Executing CLI\n`);
+ runner([], args);
+ } catch (err) {
+ logger.error(`Action Interrupted, use ${chalk.cyan(`webpack-cli help`)} to see possible options.`)
+ }
}
module.exports = run;
|
fix(webpack-cli): handle promise rejection happening with cli-executor (#<I>)
* fix: handle promise rejection
* chore: update packages/webpack-cli/lib/utils/cli-executer.js
|
webpack_webpack-cli
|
train
|
js
|
35365b37523e5c18efa10ecaa3479452827bc021
|
diff --git a/src/dynamodb_encryption_sdk/material_providers/most_recent.py b/src/dynamodb_encryption_sdk/material_providers/most_recent.py
index <HASH>..<HASH> 100644
--- a/src/dynamodb_encryption_sdk/material_providers/most_recent.py
+++ b/src/dynamodb_encryption_sdk/material_providers/most_recent.py
@@ -282,7 +282,7 @@ class CachingMostRecentProvider(CryptographicMaterialsProvider):
:raises AttributeError: if provider could not locate version
"""
blocking_wait = bool(ttl_action is TtlActions.EXPIRED)
- acquired = self._lock.acquire(blocking_wait)
+ acquired = self._lock.acquire(blocking_wait) # pylint: disable=consider-using-with
if not acquired:
# We failed to acquire the lock.
# If blocking, we will never reach this point.
@@ -320,7 +320,7 @@ class CachingMostRecentProvider(CryptographicMaterialsProvider):
:rtype: CryptographicMaterialsProvider
"""
blocking_wait = bool(ttl_action is TtlActions.EXPIRED)
- acquired = self._lock.acquire(blocking_wait)
+ acquired = self._lock.acquire(blocking_wait) # pylint: disable=consider-using-with
if not acquired:
# We failed to acquire the lock.
|
chore: Fix static analysis (#<I>)
|
aws_aws-dynamodb-encryption-python
|
train
|
py
|
cfd107090bb657895f98d37a76f4eb31b6a7a50b
|
diff --git a/webpack.config.lib.es5.js b/webpack.config.lib.es5.js
index <HASH>..<HASH> 100644
--- a/webpack.config.lib.es5.js
+++ b/webpack.config.lib.es5.js
@@ -7,6 +7,7 @@ const root = path.join(__dirname)
module.exports = merge(common, {
mode: 'production',
+ target: 'web',
output: {
path: path.resolve(root + '/dist'),
filename: '[name]/[name].min.js',
diff --git a/webpack.config.lib.js b/webpack.config.lib.js
index <HASH>..<HASH> 100644
--- a/webpack.config.lib.js
+++ b/webpack.config.lib.js
@@ -6,6 +6,7 @@ const root = path.join(__dirname)
module.exports = merge(common, {
mode: 'development',
+ target: 'node',
output: {
path: path.resolve(root + '/dist'),
filename: '[name]/index.js',
|
feat(build): Add SSR support for library (close #<I>)
|
matsp_material-components-vue
|
train
|
js,js
|
86f1830c18963fd4f0225175ce93d1a1f9b4b181
|
diff --git a/lib/tushare/stock/trading.rb b/lib/tushare/stock/trading.rb
index <HASH>..<HASH> 100644
--- a/lib/tushare/stock/trading.rb
+++ b/lib/tushare/stock/trading.rb
@@ -287,6 +287,7 @@ module Tushare
.uniq
_write_head
result = _parse_fq_data(_get_index_url(index, code, qs[0]), index)
+ return [] if result.empty?
if qs.length > 1
1.upto(qs.length - 1).each do |i|
_write_console
@@ -300,7 +301,6 @@ module Tushare
date = Date.strptime(object['date'], '%F')
date >= start_date && date <= end_date
end
- return [] if result.empty?
if index
return result.sort_by { |object| Date.strptime(object['date'], '%F') }
end
|
fix: emoty sorted_result array error, return immediately if result is empty
|
waditu_tushare-ruby
|
train
|
rb
|
ba0ebb43b5618032440a8513c12238eaf1dccee0
|
diff --git a/packages/bonde-webpage/src/lib/plugins/donation/components/finish-post-donation.js b/packages/bonde-webpage/src/lib/plugins/donation/components/finish-post-donation.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-webpage/src/lib/plugins/donation/components/finish-post-donation.js
+++ b/packages/bonde-webpage/src/lib/plugins/donation/components/finish-post-donation.js
@@ -136,7 +136,7 @@ export default class FinishPostDonation extends Component {
</select>
<button
id="donate-btn"
- onClick={() => this.props.onFinish(this.state.selectedValue)}
+ onClick={() => this.props.onFinish(settings[this.state.selectedValue])}
className="btn col-12 p2 mb2"
style={{
backgroundColor: mainColor,
|
fix(webpage): onFinish returning wrong value
|
nossas_bonde-client
|
train
|
js
|
bc6c946ce08c3a7c7cbdb5c136f5fa6088d39afb
|
diff --git a/lib/ibm_watson.rb b/lib/ibm_watson.rb
index <HASH>..<HASH> 100644
--- a/lib/ibm_watson.rb
+++ b/lib/ibm_watson.rb
@@ -7,6 +7,15 @@ module IBMWatson
ApiException = IBMCloudSdkCore::ApiException
DetailedResponse = IBMCloudSdkCore::DetailedResponse
+ module Auth
+ BasicAuthenticator = IBMCloudSdkCore::BasicAuthenticator
+ BearerTokenAuthenticator = IBMCloudSdkCore::BearerTokenAuthenticator
+ CloudPakForDataAuthenticator = IBMCloudSdkCore::CloudPakForDataAuthenticator
+ ConfigBasedAuthenticatorFactory = IBMCloudSdkCore::ConfigBasedAuthenticatorFactory
+ IamAuthenticator = IBMCloudSdkCore::IamAuthenticator
+ NoAuthAuthenticator = IBMCloudSdkCore::NoAuthAuthenticator
+ end
+
require_relative("./ibm_watson/personality_insights_v3.rb")
require_relative("./ibm_watson/tone_analyzer_v3.rb")
require_relative("./ibm_watson/assistant_v1.rb")
|
feat(Auth): include auth modules in ibm_watson
|
watson-developer-cloud_ruby-sdk
|
train
|
rb
|
4bc14cac4e030fdd517be9919087b3440e8f2cfb
|
diff --git a/anyconfig/backend/xml.py b/anyconfig/backend/xml.py
index <HASH>..<HASH> 100644
--- a/anyconfig/backend/xml.py
+++ b/anyconfig/backend/xml.py
@@ -80,20 +80,20 @@ def etree_to_container(root, to_container=dict, pprefix=_PARAM_PREFIX):
if root is None:
return tree
- tree[root.tag] = to_container()
+ troot = tree[root.tag] = to_container()
if root.attrib:
- tree[root.tag][attrs] = to_container(root.attrib)
+ troot[attrs] = to_container(root.attrib)
if root.text and root.text.strip():
- tree[root.tag][text] = root.text.strip()
+ troot[text] = root.text.strip()
if len(root): # It has children.
# Note: Configuration item cannot have both attributes and values
# (list) at the same time in current implementation:
kwargs = dict(to_container=to_container, pprefix=pprefix)
- tree[root.tag][children] = [etree_to_container(c, **kwargs) for c
- in root]
+ troot[children] = [etree_to_container(c, **kwargs) for c in root]
+
return tree
|
refactor: use an alias for a nested dict
|
ssato_python-anyconfig
|
train
|
py
|
864cf2c2d17bb9dd4d6642b7a7544de25e985926
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -121,14 +121,18 @@ function configureAurelia(aurelia){
};
}));
+ toLoad.push(System.normalize('aurelia-templating-router', bName).then(templatingRouter => {
+ aurelia.use.router = function(){
+ aurelia.use.plugin(templatingRouter);
+ return this;
+ };
+ }));
+
toLoad.push(System.normalize('aurelia-history-browser', bName).then(historyBrowser => {
- return System.normalize('aurelia-templating-router', bName).then(templatingRouter => {
- aurelia.use.router = function(){
- aurelia.use.plugin(historyBrowser);
- aurelia.use.plugin(templatingRouter);
- return this;
- };
- });
+ aurelia.use.history = function(){
+ aurelia.use.plugin(historyBrowser);
+ return this;
+ };
}));
toLoad.push(System.normalize('aurelia-templating-resources', bName).then(name => {
@@ -151,6 +155,7 @@ function configureAurelia(aurelia){
aurelia.use
.defaultBindingLanguage()
.defaultResources()
+ .history()
.router()
.eventAggregator();
return this;
|
fix(all): break out the history from the router plugin config
This is a potential BREAKING CHANGE to anyone using manual
configuration via a main.js and not using the standardConfiguration
helper. You must now call use.router() and use.history().
|
aurelia_bootstrapper
|
train
|
js
|
52c56052a627636a71bc2b88611bceba9976fa69
|
diff --git a/rollup.config.umd.js b/rollup.config.umd.js
index <HASH>..<HASH> 100644
--- a/rollup.config.umd.js
+++ b/rollup.config.umd.js
@@ -9,6 +9,7 @@ export default {
sourceMap:true,
external: [
'@angular/core',
+ '@angular/forms'
],
dest: "dist/npm/bundles/igniteui-angular-wrappers.umd.js",
plugins: [
|
fix: add `@angular/forms` as external rollup dependency
|
IgniteUI_igniteui-angular-wrappers
|
train
|
js
|
3f485355f752a153dd0deea0bb647ad64f6f3693
|
diff --git a/btree_generic.go b/btree_generic.go
index <HASH>..<HASH> 100644
--- a/btree_generic.go
+++ b/btree_generic.go
@@ -990,6 +990,11 @@ func (t *BTree) Min() Item {
return i
}
+// Has returns true if the given key is in the tree.
+func (t *BTree) Has(key Item) bool {
+ return (*BTreeG[Item])(t).Has(key)
+}
+
// ReplaceOrInsert adds the given item to the tree. If an item in the tree
// already equals the given one, it is removed from the tree and returned.
// Otherwise, nil is returned.
|
fix: add Has method for a `BTreeG[Item]`
|
google_btree
|
train
|
go
|
fed102fb9bf584cd4a3bd52d84c4580469af6dfe
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -2,21 +2,22 @@
import inspect
import os
import sys
+import typing as t
from os.path import dirname, relpath
from pathlib import Path
import cihai
# Get the project root dir, which is the parent dir of this
-cwd = Path.cwd()
+cwd = Path(__file__).parent
project_root = cwd.parent
sys.path.insert(0, str(project_root))
sys.path.insert(0, str(cwd / "_ext"))
# package data
-about = {}
-with open("../cihai/__about__.py") as fp:
+about: t.Dict[str, str] = {}
+with open(project_root / "cihai" / "__about__.py") as fp:
exec(fp.read(), about)
extensions = [
|
docs(conf): Fix paths so pytest can handle the file
|
cihai_cihai
|
train
|
py
|
dd76ae06019d1b5674af36c72ea8648e04495f8a
|
diff --git a/lib/base.js b/lib/base.js
index <HASH>..<HASH> 100644
--- a/lib/base.js
+++ b/lib/base.js
@@ -17,6 +17,10 @@ Base.prototype = Object.create(Emitter.prototype)
Base.prototype.target =
Base.prototype.forward =
Base.prototype.forwardTo = function (url, opts) {
+ if (Array.isArray(url)) {
+ return this.balance(url)
+ }
+
this.opts.target = url
assign(this.opts, opts)
return this
|
refactor(base): support array of urls
|
h2non_rocky
|
train
|
js
|
954fdd5e8fae5935898e2e46c0a500c21f0e11dd
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -6,9 +6,9 @@ import sys
import os
from unittest.mock import MagicMock
-sys.path.insert(0, os.path.abspath('..')) # noqa
+sys.path.insert(0, os.path.abspath('..'))
-from yamllint import __copyright__, APP_NAME, APP_VERSION
+from yamllint import __copyright__, APP_NAME, APP_VERSION # noqa
# -- General configuration ------------------------------------------------
|
style: Fix 'noqa' for flake8 <I>
There was a change in behavior of E<I>, see:
<URL>
|
adrienverge_yamllint
|
train
|
py
|
113d34c83bc1bec190e1cf01b8daf8c6d234e84b
|
diff --git a/packages/micro-journeys/src/connection.js b/packages/micro-journeys/src/connection.js
index <HASH>..<HASH> 100644
--- a/packages/micro-journeys/src/connection.js
+++ b/packages/micro-journeys/src/connection.js
@@ -28,6 +28,10 @@ class BoltConnection extends withLitContext() {
return ['theme'];
}
+ contextChangedCallback(name, oldValue, value) {
+ this.triggerUpdate();
+ }
+
render() {
const props = this.validateProps(this.props);
const classes = cx('c-bolt-connection');
|
fix: update connection band to re-trigger an update when the context changes
|
bolt-design-system_bolt
|
train
|
js
|
72315405457a8a598d75999ce99ae372fe559f2b
|
diff --git a/tests/index.js b/tests/index.js
index <HASH>..<HASH> 100644
--- a/tests/index.js
+++ b/tests/index.js
@@ -274,7 +274,11 @@ describe( 'rollup-plugin-babel-minify', () => {
sourcemap: false
} ) );
} ).then( ( result ) => {
- expect( result.map ).to.equal( null );
+ // It seems that Rollup tends to behave differently on different versions of
+ // Node.js, returning null on Node 8+ and undefined otherwise.
+ expect( result.map ).to.satisfy( ( value ) => {
+ return value === undefined || value === null;
+ } );
} );
} );
|
test(sourcemap): broaden conditional for not-generated sourcemap
|
Comandeer_rollup-plugin-babel-minify
|
train
|
js
|
bb773160ace96b20028580432f38ee128d3ee94b
|
diff --git a/lib/client.js b/lib/client.js
index <HASH>..<HASH> 100644
--- a/lib/client.js
+++ b/lib/client.js
@@ -150,14 +150,10 @@ class Parser extends HTTPParser {
process.nextTick(callback, err, null)
}
}
- client[kQueue].splice(0, client[kInflight])
+ client[kQueue].splice(0, client[kInflight], ...retry)
client[kInflight] = 0
client[kComplete] = 0
- while (retry.length) {
- client[kQueue].unshift(retry.pop())
- }
-
resume(client)
}
}
|
refactor: splice in retry
|
mcollina_undici
|
train
|
js
|
037e4f8d945896112d76ff5fd7c7411d885d3db5
|
diff --git a/scripts/utils/mergeWebpackConfigVueCLI.js b/scripts/utils/mergeWebpackConfigVueCLI.js
index <HASH>..<HASH> 100644
--- a/scripts/utils/mergeWebpackConfigVueCLI.js
+++ b/scripts/utils/mergeWebpackConfigVueCLI.js
@@ -31,7 +31,7 @@ module.exports = function mergeWebpackConfigVueCLI(baseConfig, userConfig, env)
if (rule.test && rule.test.test('.vue')) {
return {
test: rule.test,
- use: rule.use.filter(use => use.loader === 'vue-loader'),
+ use: (rule.use || []).filter(use => use.loader === 'vue-loader'),
};
}
return rule;
|
fix: if using cli and using rules with use as a table
|
vue-styleguidist_vue-styleguidist
|
train
|
js
|
28fa0aea1ff179d3cf297cbc01a089d60c83e108
|
diff --git a/widgets/pagination.js b/widgets/pagination.js
index <HASH>..<HASH> 100644
--- a/widgets/pagination.js
+++ b/widgets/pagination.js
@@ -2,7 +2,7 @@ var React = require('react');
var utils = require('../lib/utils.js');
-function pagination({container, cssClass, labels, maxPages} = {}) {
+function pagination({container, cssClass, labels, maxPages, showFirstLast} = {}) {
var Pagination = require('../components/Pagination/Pagination.js');
var containerNode = utils.getContainerNode(container);
@@ -22,6 +22,7 @@ function pagination({container, cssClass, labels, maxPages} = {}) {
setCurrentPage={helper.setCurrentPage.bind(helper)}
cssClass={cssClass}
labels={labels}
+ showFirstLast={showFirstLast}
/>,
containerNode
);
|
fix(pagination): missing showFirstLast attribute when instanciating
|
algolia_instantsearch.js
|
train
|
js
|
50711cc8baba499250934e1d12fd24e65534f31e
|
diff --git a/ibis/backends/dask/execution/join.py b/ibis/backends/dask/execution/join.py
index <HASH>..<HASH> 100644
--- a/ibis/backends/dask/execution/join.py
+++ b/ibis/backends/dask/execution/join.py
@@ -34,6 +34,7 @@ def execute_asof_join(op, left, right, by, tolerance, predicates, **kwargs):
assert 0 <= len(left_on) <= 1, f"len(left_on) == {len(left_on)}"
assert 0 <= len(right_on) <= 1, f"len(right_on) == {len(right_on)}"
+ on = left_on if left_on == right_on else None
return dd.merge_asof(
left=left,
right=right,
@@ -41,9 +42,9 @@ def execute_asof_join(op, left, right, by, tolerance, predicates, **kwargs):
# https://github.com/dask/dask/pull/8857 that keeps a column if `on` is
# non-empty without checking whether `left_on` is non-empty, this
# check works around that
- on=left_on if left_on == right_on else None,
- left_on=left_on,
- right_on=right_on,
+ on=on,
+ left_on=left_on if on is None else None,
+ right_on=right_on if on is None else None,
left_by=left_by or None,
right_by=right_by or None,
tolerance=tolerance,
|
fix(dask): fix asof joins for newer version of dask
|
ibis-project_ibis
|
train
|
py
|
39538463de89bdda8a1b4a4fe66b1691f01957b5
|
diff --git a/pkg/util/iptables/iptables_test.go b/pkg/util/iptables/iptables_test.go
index <HASH>..<HASH> 100644
--- a/pkg/util/iptables/iptables_test.go
+++ b/pkg/util/iptables/iptables_test.go
@@ -797,8 +797,8 @@ COMMIT
t.Fatalf("%s: Expected success, got %v", protocol, err)
}
- if string(buffer.Bytes()) != output {
- t.Errorf("%s: Expected output '%s', got '%v'", protocol, output, string(buffer.Bytes()))
+ if buffer.String() != output {
+ t.Errorf("%s: Expected output '%s', got '%v'", protocol, output, buffer.String())
}
if fcmd.CombinedOutputCalls != 1 {
@@ -817,8 +817,8 @@ COMMIT
if err == nil {
t.Errorf("%s: Expected failure", protocol)
}
- if string(buffer.Bytes()) != stderrOutput {
- t.Errorf("%s: Expected output '%s', got '%v'", protocol, stderrOutput, string(buffer.Bytes()))
+ if buffer.String() != stderrOutput {
+ t.Errorf("%s: Expected output '%s', got '%v'", protocol, stderrOutput, buffer.String())
}
}
|
test: Use bytes.Buffer.String
Fix some warnings from go-staticcheck.
"should use buffer.String() instead of string(buffer.Bytes()) (S<I>)"
This warning is explained at this link.
<URL>
|
kubernetes_kubernetes
|
train
|
go
|
ba51db4582e347f8892737b3d4168aa0ddf6b255
|
diff --git a/vendors/hypeJunction/hypeList.js b/vendors/hypeJunction/hypeList.js
index <HASH>..<HASH> 100644
--- a/vendors/hypeJunction/hypeList.js
+++ b/vendors/hypeJunction/hypeList.js
@@ -617,9 +617,12 @@
*/
deleteItem: function (e) {
e.preventDefault();
- var confirmText = $(this).data('confirm') || elgg.echo('question:areyousure');
- if (!confirm(confirmText)) {
- return false;
+ var $target = $(e.target).closest('.elgg-menu-item').andSelf();
+ if (!$target.is('.elgg-requires-confirmation,[data-confirm]').length) {
+ var confirmText = $(this).data('confirm') || elgg.echo('question:areyousure');
+ if (!confirm(confirmText)) {
+ return false;
+ }
}
var $elem = $(this),
$item = $elem.closest($elem.closest('.elgg-list,.elgg-gallery').children()),
|
fix(js): remove duplicate confirmation dialogs
|
hypeJunction_hypeLists
|
train
|
js
|
76f7d2d1f04bad8f7f7d8e969196c7de9974410c
|
diff --git a/src/jquery.lazyloadxt.js b/src/jquery.lazyloadxt.js
index <HASH>..<HASH> 100644
--- a/src/jquery.lazyloadxt.js
+++ b/src/jquery.lazyloadxt.js
@@ -78,7 +78,8 @@
$el.attr('src', blankImage);
}
- $el.lazyLoadXT = elementOptionsOverrides;
+ // clone elementOptionsOverrides object
+ $el.lazyLoadXT = $.extend({}, elementOptionsOverrides);
triggerEvent('init', $el);
|
fix: $el.lazyLoadXT should be single object (required by picture addon)
|
ressio_lazy-load-xt
|
train
|
js
|
872fda191fd4aa8cb2a8edec075bb9e039940514
|
diff --git a/src/router.js b/src/router.js
index <HASH>..<HASH> 100644
--- a/src/router.js
+++ b/src/router.js
@@ -341,7 +341,9 @@ export class Router {
return this.parent.updateTitle();
}
- this.currentInstruction._updateTitle();
+ if (this.currentInstruction) {
+ this.currentInstruction._updateTitle();
+ }
return undefined;
}
|
fix(Router): fix an error when updateTitle is called but there is not current instruction
|
aurelia_router
|
train
|
js
|
ccbcd397bd7eb878d788e91fc02a0515a70cf0f5
|
diff --git a/anyconfig/backend/yaml/ruamel_yaml.py b/anyconfig/backend/yaml/ruamel_yaml.py
index <HASH>..<HASH> 100644
--- a/anyconfig/backend/yaml/ruamel_yaml.py
+++ b/anyconfig/backend/yaml/ruamel_yaml.py
@@ -38,7 +38,6 @@ Changelog:
"""
from __future__ import absolute_import
-import re
import ruamel.yaml as ryaml
import anyconfig.utils
@@ -46,13 +45,6 @@ from . import pyyaml
_YAML_INIT_KWARGS = ["typ", "pure", "plug_ins"] # kwargs for ruamel.yaml.YAML
-# _ALPHA_RE = re.compile(r'[a-z]+[a-z_]+')
-# .. todo:: Find out other better and reliable way to list options.
-# _YAML = ryaml.YAML()
-# _YAML_INSTANCE_MEMBERS = [
-# x for x in dir(_YAML)
-# if _ALPHA_RE.match(x) and not callable(getattr(_YAML, x))
-# ]
_YAML_INSTANCE_MEMBERS = ['allow_duplicate_keys', 'allow_unicode',
'block_seq_indent', 'canonical', 'composer',
'constructor', 'default_flow_style', 'default_style',
|
fix: remove unused import of re and some related comments
|
ssato_python-anyconfig
|
train
|
py
|
116cc7ab8b199425e8c5cf3df5be9f4e65294df8
|
diff --git a/lib/angularjs/forms/camunda-form-angular.js b/lib/angularjs/forms/camunda-form-angular.js
index <HASH>..<HASH> 100644
--- a/lib/angularjs/forms/camunda-form-angular.js
+++ b/lib/angularjs/forms/camunda-form-angular.js
@@ -57,12 +57,12 @@ var CamundaFormAngular = CamundaForm.extend(
this.formElement = angular.element(this.formElement);
+ var moment = require('moment');
var injector = this.formElement.injector();
var scope = this.formElement.scope();
/*eslint-disable */
- (function(camForm, $scope) {
-
+ (function(camForm, $scope, moment) {
// hook to create the service with injection
var inject = function(extensions) {
// if result is an array or function we expect
@@ -78,7 +78,7 @@ var CamundaFormAngular = CamundaForm.extend(
eval(script);
/* jshint evil: false */
- })(this, scope);
+ })(this, scope, moment);
/*eslint-enable */
},
|
fix(camunda-form): inject moment in camunda form script
Related to CAM-<I>
|
camunda_camunda-bpm-sdk-js
|
train
|
js
|
76cd7b048133989a6fb9777de53e2420af867df1
|
diff --git a/superset/dashboards/api.py b/superset/dashboards/api.py
index <HASH>..<HASH> 100644
--- a/superset/dashboards/api.py
+++ b/superset/dashboards/api.py
@@ -722,9 +722,9 @@ class DashboardRestApi(BaseSupersetModelRestApi):
$ref: '#/components/responses/500'
"""
requested_ids = kwargs["rison"]
+ token = request.args.get("token")
if is_feature_enabled("VERSIONED_EXPORT"):
- token = request.args.get("token")
timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
root = f"dashboard_export_{timestamp}"
filename = f"{root}.zip"
@@ -763,6 +763,8 @@ class DashboardRestApi(BaseSupersetModelRestApi):
resp.headers["Content-Disposition"] = generate_download_headers("json")[
"Content-Disposition"
]
+ if token:
+ resp.set_cookie(token, "done", max_age=600)
return resp
@expose("/<pk>/thumbnail/<digest>/", methods=["GET"])
|
fix: Dashboad export loading indicator (#<I>)
|
apache_incubator-superset
|
train
|
py
|
5dc1b166c960a068e4b272d828d70ed3d03a320f
|
diff --git a/src/geshi/cfm.php b/src/geshi/cfm.php
index <HASH>..<HASH> 100644
--- a/src/geshi/cfm.php
+++ b/src/geshi/cfm.php
@@ -318,7 +318,7 @@ $language_data = array (
'#' => '#'
),
2 => array(
- '<cfscript>' => '</cfscript>;'
+ '<cfscript>' => '</cfscript>'
),
3 => array(
'<' => '>'
|
fix: cfscript does not need to be closed by '</cfscript>;'
|
GeSHi_geshi-1.0
|
train
|
php
|
d328fe4ea5006866a182f720e5f8de364b4b0269
|
diff --git a/lib/renderer.js b/lib/renderer.js
index <HASH>..<HASH> 100644
--- a/lib/renderer.js
+++ b/lib/renderer.js
@@ -115,29 +115,22 @@ marked.setOptions({
});
module.exports = function(data, options) {
- const siteCfg = Object.assign({}, {
- config: {
- url: this.config.url,
- root: this.config.root,
- relative_link: this.config.relative_link,
- post_asset_folder: this.config.post_asset_folder
- }
- });
+ hexo = this;
// exec filter to extend renderer.
const renderer = new Renderer();
this.execFilterSync('marked:renderer', renderer, {context: this});
- let path = '';
+ let postId = '';
if (data.path && this.config.post_asset_folder && this.config.marked.prependRoot && this.config.marked.postAsset) {
const Post = this.model('Post');
// Windows compatibility, Post.findOne() requires forward slash
const source = data.path.replace(this.source_dir, '').replace('\\', '/');
const post = Post.findOne({ source });
- path = post ? post.path : '';
+ postId = post ? post._id : '';
}
return marked(data.text, Object.assign({
renderer
- }, this.config.marked, options, siteCfg, { path }));
+ }, this.config.marked, options, { postId }));
};
|
fix(postAsset): utilise PostAsset model to target existed post's assets
|
hexojs_hexo-renderer-marked
|
train
|
js
|
edfa5345c2ea879c4e30924440d6f7fd7f9ea58e
|
diff --git a/src/adapter.js b/src/adapter.js
index <HASH>..<HASH> 100644
--- a/src/adapter.js
+++ b/src/adapter.js
@@ -80,7 +80,7 @@ var createMochaReporterConstructor = function(tc) {
var createMochaStartFn = function(mocha) {
return function(config) {
- if(config.grep){
+ if(config && config.grep){
mocha.grep(config.grep);
}
mocha.run();
|
fix: config does not have to be defined
This is a fix for bug introduced in 9bdcae<I>f<I>cdcee<I>ed0fb<I>dd<I>c9ce<I>ed
|
karma-runner_karma-mocha
|
train
|
js
|
46a6a669cc2a42fae1bd8f5bbe7f36820f44fc1f
|
diff --git a/test/index.js b/test/index.js
index <HASH>..<HASH> 100644
--- a/test/index.js
+++ b/test/index.js
@@ -122,13 +122,34 @@ describe('Liftoff', function () {
it('should pass environment to first argument of launch callback', function (done) {
process.argv = [];
- app.launch( function (env) {
+ app.launch(function (env) {
expect(env).to.deep.equal(app.buildEnvironment({"_":[]}));
done();
});
});
});
+ describe('requireLocal', function () {
+
+ it('should emit `require` with the name of the module and the required module', function (done) {
+ app.on('require', function (name, module) {
+ expect(name).to.equal('mocha');
+ expect(module).to.equal(require('mocha'));
+ done();
+ });
+ app.requireLocal('mocha', __dirname);
+ });
+
+ it('should emit `requireFail` with an error if a module can\'t be found.', function (done) {
+ app.on('requireFail', function (name, module) {
+ expect(name).to.equal('badmodule');
+ done();
+ });
+ app.requireLocal('badmodule', __dirname);
+ });
+
+ });
+
});
require('./file_search');
|
chore: Add unit tests for requireLocal
|
js-cli_js-liftoff
|
train
|
js
|
d4847ce1316d14bf9ce3b9e41183afe0e15941ff
|
diff --git a/packages/api-core/src/resources/slotmachine.js b/packages/api-core/src/resources/slotmachine.js
index <HASH>..<HASH> 100644
--- a/packages/api-core/src/resources/slotmachine.js
+++ b/packages/api-core/src/resources/slotmachine.js
@@ -1,4 +1,4 @@
-import { AvMicroservice } from '..';
+import AvMicroservice from '../ms';
export default class AvSlotMachine extends AvMicroservice {
constructor({ http, promise, merge, config }) {
|
style(api-core): dependency cycle detected
|
Availity_sdk-js
|
train
|
js
|
5960431e7c6114c59f932e353660a7b742133691
|
diff --git a/js/model/aggregate.js b/js/model/aggregate.js
index <HASH>..<HASH> 100644
--- a/js/model/aggregate.js
+++ b/js/model/aggregate.js
@@ -27,10 +27,11 @@ Aggregate.prototype.updated = function (updatedAt, newVersion) {
/**
* @param {Number} deletedAt
+ * @param {Number} newVersion
*/
-Aggregate.prototype.deleted = function (deletedAt) {
+Aggregate.prototype.deleted = function (deletedAt, newVersion) {
let self = this
- self.$version++
+ self.$version = newVersion || self.$version + 1
self.$deleted = true
self.$deletedAt = deletedAt || Date.now()
}
|
fix(Aggregate): add newVersion parameter to deleted method
|
ResourcefulHumans_rheactor-web-app
|
train
|
js
|
319d73a478f340e7854428bf53d4013f6962fb2a
|
diff --git a/lib/socket-mgr.js b/lib/socket-mgr.js
index <HASH>..<HASH> 100644
--- a/lib/socket-mgr.js
+++ b/lib/socket-mgr.js
@@ -101,6 +101,13 @@ function initStatus(ctx, enable) {
}
}
+function removePending(reqId) {
+ var index = pendingReqList.indexOf(reqId);
+ if (index !== -1) {
+ pendingReqList.splice(index, 1);
+ }
+}
+
exports.handleConnect = function(req, res) {
var hasEvent = util.listenerCount(proxy, 'tunnelRequest');
var isConn = req.inspectFrames;
@@ -115,6 +122,7 @@ exports.handleConnect = function(req, res) {
var emitData, handleInspect;
if (customParser || !isConn) {
+ removePending(reqId);
handleInspect = function(chunk, encoding, cb) {
hasEvent && proxy.emit('tunnelRequest', url);
cb(null, chunk);
@@ -334,6 +342,7 @@ exports.handleWebsocket = function(req, res) {
req.emit('error', err);
});
if (customParser) {
+ removePending(reqId);
handleInspect = function(chunk, encoding, cb) {
hasEvent && proxy.emit('wsRequest', url);
cb(null, chunk);
|
fix: delayed response auto-close in custom parser
|
avwo_whistle
|
train
|
js
|
289128b96cd60d8a29a08df3d301c20e64ca89b8
|
diff --git a/script/lint.js b/script/lint.js
index <HASH>..<HASH> 100755
--- a/script/lint.js
+++ b/script/lint.js
@@ -44,7 +44,7 @@ function spawnAndCheckExitCode (cmd, args, opts) {
}
function cpplint (args) {
- args.unshift(`--project_root=${SOURCE_ROOT}`);
+ args.unshift(`--root=${SOURCE_ROOT}`);
const result = childProcess.spawnSync(IS_WINDOWS ? 'cpplint.bat' : 'cpplint.py', args, { encoding: 'utf8', shell: true });
// cpplint.py writes EVERYTHING to stderr, including status messages
if (result.stderr) {
|
chore: use --root instead of --project_root for cpplint (#<I>)
--root has been improved upstream in depot_tools to better handle Windows:
<URL>
|
electron_electron
|
train
|
js
|
d7be211726652935816b5e148a53877263a9620d
|
diff --git a/src/make-dialog.js b/src/make-dialog.js
index <HASH>..<HASH> 100644
--- a/src/make-dialog.js
+++ b/src/make-dialog.js
@@ -48,7 +48,7 @@ export default function makeDialog (options, ...props) {
// Inject a `$close` function and pre-defined props into dialog component
component: {
extends: component,
- props: diff(['dialogId', 'arguments', ...props], Object.keys(component.props || [])),
+ props: diff(['dialogId', 'arguments', ...props], Object.keys(component.props || (component.options && component.options.props) || [])),
methods: {
$close (data) {
this.$emit('vue-modal-dialogs:close', data)
|
fix: props are overwritten when using class component definition
|
hjkcai_vue-modal-dialogs
|
train
|
js
|
850b12b88ef1cdd33d4be81d63366ff2995c708f
|
diff --git a/platform/nativescript/runtime/index.js b/platform/nativescript/runtime/index.js
index <HASH>..<HASH> 100644
--- a/platform/nativescript/runtime/index.js
+++ b/platform/nativescript/runtime/index.js
@@ -57,13 +57,14 @@ Vue.prototype.$mount = function(el, hydrating) {
}
Vue.prototype.$start = function() {
- const self = this
+ let self = this
+ const AppConstructor = Vue.extend(this.$options)
start({
create() {
if (self.$el) {
- self.$el.nativeView.parent = null
- return self.$el.nativeView
+ self.$destroy()
+ self = new AppConstructor()
}
self.$mount()
|
fix(bootstrap): re-mount when activity is re-created
|
nativescript-vue_nativescript-vue
|
train
|
js
|
23fc7c3cf34966af7318926d777975304db00462
|
diff --git a/src/elements/picker/Picker.js b/src/elements/picker/Picker.js
index <HASH>..<HASH> 100644
--- a/src/elements/picker/Picker.js
+++ b/src/elements/picker/Picker.js
@@ -200,11 +200,16 @@ export class Picker extends OutsideClick {
writeValue(value) {
if (typeof value === 'string') {
this.term = value;
- this._value = value;
+ } else if (value && value.label) {
+ this.term = value.label;
+ } else if (value && value.firstName) {
+ this.term = `${value.firstName} ${value.lastName}`;
+ } else if (value && value.name) {
+ this.term = value.name;
} else {
this.term = value;
- this._value = value;
}
+ this._value = value;
}
//From ControlValueAccessor interface
|
fix(picker): Fixing the initial value being [Object object]
|
bullhorn_novo-elements
|
train
|
js
|
df4b895ffd29934417f3570b5dd730d55a6b5e23
|
diff --git a/packages/razzle/config/createConfigAsync.js b/packages/razzle/config/createConfigAsync.js
index <HASH>..<HASH> 100644
--- a/packages/razzle/config/createConfigAsync.js
+++ b/packages/razzle/config/createConfigAsync.js
@@ -172,6 +172,7 @@ module.exports = (
if (IS_DEV) {
} else {
+ webpackOptions.terserPluginOptions = {};
}
}
@@ -608,21 +609,26 @@ module.exports = (
// We define environment variables that can be accessed globally in our
new webpack.DefinePlugin(webpackOptions.definePluginOptions),
];
- // in dev mode emitting one huge server file on every save is very slow
+
+ config.entry = {
+ server: [paths.appServerIndexJs],
+ };
+
if (IS_PROD) {
// Prevent creating multiple chunks for the server
+ // in dev mode emitting one huge server file on every save is very slow
+
config.plugins.push(
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
})
);
- }
-
- config.entry = {
- server: [paths.appServerIndexJs],
- };
-
- if (IS_PROD) {
+ config.optimization = {
+ minimize: true,
+ minimizer: [
+ new TerserPlugin(webpackOptions.terserPluginOptions)
+ ],
+ }
if (hasStaticExportJs) {
config.entry.static_export = [paths.appStaticExportJs];
}
|
feat(razzle): add webpackOptions.terserPluginOptions in node production
|
jaredpalmer_razzle
|
train
|
js
|
2d0980d54387347a56c2ce171c9f2e391b736edc
|
diff --git a/tests/fixtures/index-no-newline.expected.js b/tests/fixtures/index-no-newline.expected.js
index <HASH>..<HASH> 100644
--- a/tests/fixtures/index-no-newline.expected.js
+++ b/tests/fixtures/index-no-newline.expected.js
@@ -1 +1 @@
-/* hubla bubla */console.log( 'Test' );
+/* hubla bubla */console.log('Test');
diff --git a/tests/fixtures/index.expected.js b/tests/fixtures/index.expected.js
index <HASH>..<HASH> 100644
--- a/tests/fixtures/index.expected.js
+++ b/tests/fixtures/index.expected.js
@@ -1,2 +1,2 @@
/* hubla bubla */
-console.log( 'Test' );
+console.log('Test');
diff --git a/tests/fixtures/index.js b/tests/fixtures/index.js
index <HASH>..<HASH> 100644
--- a/tests/fixtures/index.js
+++ b/tests/fixtures/index.js
@@ -1 +1 @@
-console.log( 'Test' );
+console.log('Test');
|
test(fixtures): fix incorrect codestyle
|
Comandeer_babel-plugin-banner
|
train
|
js,js,js
|
a6654328ee8622a7f7fa2492fe14ee5014b99988
|
diff --git a/kubernetes-model-generator/openshift-model/src/main/java/io/fabric8/openshift/api/model/Template.java b/kubernetes-model-generator/openshift-model/src/main/java/io/fabric8/openshift/api/model/Template.java
index <HASH>..<HASH> 100644
--- a/kubernetes-model-generator/openshift-model/src/main/java/io/fabric8/openshift/api/model/Template.java
+++ b/kubernetes-model-generator/openshift-model/src/main/java/io/fabric8/openshift/api/model/Template.java
@@ -69,9 +69,9 @@ import java.util.Map;
})
@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage=false, builderPackage = "io.fabric8.kubernetes.api.builder")
@Version("v1")
-@Group("")
+@Group("template.openshift.io")
@TemplateTransformations({
- @TemplateTransformation(value = "/manifest.vm", outputPath = "openshift.properties", gather = true)
+ @TemplateTransformation(value = "/manifest.vm", outputPath = "openshift.properties", gather = true)
})
public class Template implements HasMetadata, Namespaced {
|
fix: KubernetesDeserializer needs properly annotated model types
|
fabric8io_kubernetes-client
|
train
|
java
|
25e497daee3740b82961826373855869b0c306a8
|
diff --git a/lib/components/narrative/narrative-itineraries.js b/lib/components/narrative/narrative-itineraries.js
index <HASH>..<HASH> 100644
--- a/lib/components/narrative/narrative-itineraries.js
+++ b/lib/components/narrative/narrative-itineraries.js
@@ -142,6 +142,12 @@ class NarrativeItineraries extends Component {
const resultText = pending
? 'Finding your options...'
: `${itineraries.length} itineraries found.`
+ const itineraryBodyProps = {
+ ...this.props,
+ // Override setActiveLeg from props spreading
+ setActiveLeg: this._setActiveLeg
+
+ }
return (
<div className='options itinerary' style={containerStyle}>
<div
@@ -202,11 +208,6 @@ class NarrativeItineraries extends Component {
const active = index === activeItinerary
// Hide non-active itineraries.
if (!active && itineraryIsExpanded) return null
- const itineraryBodyProps = {
- ...this.props,
- // Override setActiveLeg from props spreading
- setActiveLeg: this._setActiveLeg
- }
return (
<ItineraryBody
active={active}
|
refactor(NarrativeItineraries): Attempt to fix lint
|
opentripplanner_otp-react-redux
|
train
|
js
|
5b559baaa88e6b4197de13121508c2e2d6f1ff22
|
diff --git a/lib/gruff/patch/rmagick.rb b/lib/gruff/patch/rmagick.rb
index <HASH>..<HASH> 100644
--- a/lib/gruff/patch/rmagick.rb
+++ b/lib/gruff/patch/rmagick.rb
@@ -13,6 +13,7 @@ module Magick
text.gsub('%', '%%'))
end
+ remove_method :stroke_opacity
def stroke_opacity(_opacity)
raise '#stroke_opacity method has different behavior between RMagick and RMagick4J. Should not use this method.'
end
|
refactor: Remove stroke_opacity before overriding to get rid of warning message (#<I>)
This patch will remove following warning message.
```
$ bundle exec rake
/opt/gruff/lib/gruff/patch/rmagick.rb:<I>: warning: method redefined; discarding old stroke_opacity
```
|
topfunky_gruff
|
train
|
rb
|
5c873159c1b19fd8ff2c60f7077a0aebf9fd36b2
|
diff --git a/docker/container.go b/docker/container.go
index <HASH>..<HASH> 100644
--- a/docker/container.go
+++ b/docker/container.go
@@ -52,7 +52,7 @@ type APIMount struct {
Driver string `json:"Driver,omitempty" yaml:"Driver,omitempty" toml:"Driver,omitempty"`
Mode string `json:"Mode,omitempty" yaml:"Mode,omitempty" toml:"Mode,omitempty"`
RW bool `json:"RW,omitempty" yaml:"RW,omitempty" toml:"RW,omitempty"`
- Propogation string `json:"Propogation,omitempty" yaml:"Propogation,omitempty" toml:"Propogation,omitempty"`
+ Propagation string `json:"Propagation,omitempty" yaml:"Propagation,omitempty" toml:"Propagation,omitempty"`
}
// APIContainers represents each container in the list returned by
|
fix: misspelling APIMount field (#<I>)
See #<I>
|
ory_dockertest
|
train
|
go
|
88b77b517497f5b305fbfb40c0ab9bbb5543946a
|
diff --git a/src/components/VueSignaturePad.js b/src/components/VueSignaturePad.js
index <HASH>..<HASH> 100644
--- a/src/components/VueSignaturePad.js
+++ b/src/components/VueSignaturePad.js
@@ -160,6 +160,15 @@ export default {
return [...nonReactiveProrpImages, ...nonReactiveCachImages];
}
},
+ watch: {
+ options: function(nextOptions) {
+ Object.keys(nextOptions).forEach(option => {
+ if (this.signaturePad[option]) {
+ this.signaturePad[option] = nextOptions[option];
+ }
+ });
+ }
+ },
render(createElement) {
const { width, height, customStyle } = this;
|
fix: add watcher for changing signature options
|
neighborhood999_vue-signature-pad
|
train
|
js
|
e9191bfc30664c684c7629d8c908289056b8a21e
|
diff --git a/src/Ufo/Core/Debug.php b/src/Ufo/Core/Debug.php
index <HASH>..<HASH> 100644
--- a/src/Ufo/Core/Debug.php
+++ b/src/Ufo/Core/Debug.php
@@ -161,10 +161,12 @@ class Debug implements DebugInterface
$dump ? var_dump($var) : print_r($var);
echo PHP_EOL . str_replace("=>\n", ' =>', ob_get_clean());
} else {
+ // @codeCoverageIgnoreStart
echo '<pre' . ($float ? ' class="debugfloat"' : '') . '>';
$dump ? var_dump($var) : print_r($var);
echo htmlspecialchars(str_replace("=>\n", ' =>', ob_get_clean()));
echo '</pre>';
+ // @codeCoverageIgnoreEnd
}
// @codeCoverageIgnoreStart
|
chore: close unreacheable (for cli) code from coverage
|
enikeishik_ufoframework
|
train
|
php
|
3891e87667ec97eab03d211ca74ef5d3d6cdbb43
|
diff --git a/gridsome/lib/webpack/createBaseConfig.js b/gridsome/lib/webpack/createBaseConfig.js
index <HASH>..<HASH> 100644
--- a/gridsome/lib/webpack/createBaseConfig.js
+++ b/gridsome/lib/webpack/createBaseConfig.js
@@ -28,6 +28,7 @@ module.exports = (context, options, { isProd, isServer }) => {
.alias
.set('~', resolve('src', context))
.set('@', resolve('src', context))
+ .set('gridsome$', path.resolve(options.appPath, 'index.js'))
.end()
.extensions
.merge(['.js', '.vue', '.json'])
|
fix(webpack): alias to gridsome app
|
gridsome_gridsome
|
train
|
js
|
b1cc20d891ec43a000e5b31caa18918e8d4ef189
|
diff --git a/lib/platform/github/index.js b/lib/platform/github/index.js
index <HASH>..<HASH> 100644
--- a/lib/platform/github/index.js
+++ b/lib/platform/github/index.js
@@ -849,7 +849,13 @@ async function ensureComment(issueNo, topic, content) {
}
return true;
} catch (err) /* istanbul ignore next */ {
- logger.warn({ err }, 'Error ensuring comment');
+ if (
+ err.message === 'Unable to create comment because issue is locked. (403)'
+ ) {
+ logger.info('Issue is locked - cannot add comment');
+ } else {
+ logger.warn({ err }, 'Error ensuring comment');
+ }
return false;
}
}
@@ -868,7 +874,13 @@ async function ensureCommentRemoval(issueNo, topic) {
await deleteComment(commentId);
}
} catch (err) /* istanbul ignore next */ {
- logger.warn({ err }, 'Error ensuring comment removal');
+ if (
+ err.message === 'Unable to create comment because issue is locked. (403)'
+ ) {
+ logger.info('Issue is locked - cannot add comment');
+ } else {
+ logger.warn({ err }, 'Error ensuring comment removal');
+ }
}
}
|
refactor(github): don’t warn if failing to comment on locked issue
|
renovatebot_renovate
|
train
|
js
|
16706efb7cc17de41ea69e03ff478b50e265e3ca
|
diff --git a/rocketbelt/components/dialogs/rocketbelt.dialogs.js b/rocketbelt/components/dialogs/rocketbelt.dialogs.js
index <HASH>..<HASH> 100644
--- a/rocketbelt/components/dialogs/rocketbelt.dialogs.js
+++ b/rocketbelt/components/dialogs/rocketbelt.dialogs.js
@@ -1,5 +1,6 @@
/* global $cache:true element:true closers:true */
-(function ($) {
+'use strict';
+(jQuery(function ($) {
var options = initOptions();
var focusedBeforeDialog;
var scrollBeforeDialog;
@@ -273,4 +274,4 @@
element.trigger(event, data);
return !($.isFunction(callback) && callback.apply(element[0], [event].concat(data)) === false || event.isDefaultPrevented());
}
-})(jQuery);
+})());
|
fix(Dialogs): Pass in the jQuery object to the dialog handler.
|
Pier1_rocketbelt
|
train
|
js
|
6e5eeb72153f1fc2b11354fd9efa575aff39b90f
|
diff --git a/src/Diagram.js b/src/Diagram.js
index <HASH>..<HASH> 100644
--- a/src/Diagram.js
+++ b/src/Diagram.js
@@ -18,7 +18,7 @@ class Diagram {
// console.log('this.type', this.type, diagrams[this.type]);
// Setup diagram
this.db = diagrams[this.type].db;
- this.db.clear();
+ this.db.clear?.();
this.renderer = diagrams[this.type].renderer;
this.parser = diagrams[this.type].parser;
|
fix(Diagram): C4C diagram does not have a db.clear method
|
knsv_mermaid
|
train
|
js
|
f27ab279bf36f7225780236cf45f7b0da9f339e8
|
diff --git a/samcli/lib/package/utils.py b/samcli/lib/package/utils.py
index <HASH>..<HASH> 100644
--- a/samcli/lib/package/utils.py
+++ b/samcli/lib/package/utils.py
@@ -178,8 +178,9 @@ def zip_folder(folder_path):
def make_zip(file_name, source_root):
zipfile_name = "{0}.zip".format(file_name)
source_root = os.path.abspath(source_root)
+ compression_type = zipfile.ZIP_DEFLATED
with open(zipfile_name, "wb") as f:
- zip_file = zipfile.ZipFile(f, "w", zipfile.ZIP_DEFLATED)
+ zip_file = zipfile.ZipFile(f, "w", compression_type)
with contextlib.closing(zip_file) as zf:
for root, _, files in os.walk(source_root, followlinks=True):
for filename in files:
@@ -200,7 +201,7 @@ def make_zip(file_name, source_root):
info.external_attr = 0o100755 << 16
# Set host OS to Unix
info.create_system = 3
- zf.writestr(info, file_bytes)
+ zf.writestr(info, file_bytes, compress_type=compression_type)
else:
zf.write(full_path, relative_path)
|
fix: No Default Compress Type for Windows (#<I>)
* Fixed No Default Compress Type for Windows
* Reformatted with Black
* Removed compresslevel to Support Python <I>
|
awslabs_aws-sam-cli
|
train
|
py
|
7802e982bb6996cb65603bf32bf21a32a3850cb4
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -32,12 +32,11 @@ const analyzeCommits = wrapPlugin(
NAMESPACE,
'analyzeCommits',
plugin => async (pluginConfig, config) => {
- const { dryRun, commentTag, pullRequests } = pluginConfig;
+ const { dryRun, pullRequests } = pluginConfig;
const nextRelease = await plugin(pluginConfig, config);
if (!nextRelease && !dryRun) {
// Create "no release" comment
- const { logger } = config;
await pullRequests.forEach(createChangelog(pluginConfig, config));
}
|
chore: remove dead code in `analyzeCommits`
|
Updater_semantic-release-github-pr
|
train
|
js
|
617e678289cf68c300785206929f666fa68cbb21
|
diff --git a/packages/dva-core/src/createStore.js b/packages/dva-core/src/createStore.js
index <HASH>..<HASH> 100644
--- a/packages/dva-core/src/createStore.js
+++ b/packages/dva-core/src/createStore.js
@@ -1,7 +1,7 @@
import { createStore, applyMiddleware, compose } from 'redux';
import flatten from 'flatten';
import invariant from 'invariant';
-import window from 'global/window';
+import win from 'global/window';
import { returnSelf, isArray } from './utils';
export default function({
@@ -27,8 +27,8 @@ export default function({
]);
const composeEnhancers =
- process.env.NODE_ENV !== 'production' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
- ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ trace: true, maxAge: 30 })
+ process.env.NODE_ENV !== 'production' && win.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
+ ? win.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ trace: true, maxAge: 30 })
: compose;
const enhancers = [applyMiddleware(...middlewares), ...extraEnhancers];
|
fix: window 会在小程序里报错 (#<I>)
|
dvajs_dva
|
train
|
js
|
fa49b47c7089251b50ead66d6db19e633fd0a20b
|
diff --git a/lib/fromPgn.js b/lib/fromPgn.js
index <HASH>..<HASH> 100644
--- a/lib/fromPgn.js
+++ b/lib/fromPgn.js
@@ -598,7 +598,7 @@ fieldTypeReaders['ASCII or UNICODE string starting with length and control byte'
if ( field.Name === 'AtoN Name' && len > 20 ) {
nameLen = 20
- } else if ( len == 0 ) {
+ } else if ( len <= 0 ) {
return null
}
|
fix: error when a string is encoded improperly (#<I>)
|
canboat_canboatjs
|
train
|
js
|
068c2d4938bafe4c7fa12cf9aff4fb6b5e1f1e0e
|
diff --git a/lib/platform/github/index.js b/lib/platform/github/index.js
index <HASH>..<HASH> 100644
--- a/lib/platform/github/index.js
+++ b/lib/platform/github/index.js
@@ -1063,8 +1063,9 @@ async function getOpenPrs() {
} else {
const baseCommitSHA = await getBaseCommitSHA();
if (
+ pr.commits.nodes[0].commit.parents.edges.length &&
pr.commits.nodes[0].commit.parents.edges[0].node.oid !==
- baseCommitSHA
+ baseCommitSHA
) {
pr.isStale = true;
}
|
fix(github): check for parent edges
|
renovatebot_renovate
|
train
|
js
|
028194a0086ad1a4fc3216a3a5c0fb81d11db1a1
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -196,7 +196,7 @@ describe('gulp-alex', () => {
expect(true).to.eql('an error should not happen')
})
.on('end', () => {
- expect(findUpStub.callCount()).to.eql(1)
+ expect(findUpStub.callCount()).to.eql(2)
done()
})
|
fix(test): correct findup call count assertion
|
dustinspecker_gulp-alex
|
train
|
js
|
0a22e3f43dfc94c7a310e5ebfdade06caaeda53f
|
diff --git a/test/runner/filters/unified_filter.js b/test/runner/filters/unified_filter.js
index <HASH>..<HASH> 100644
--- a/test/runner/filters/unified_filter.js
+++ b/test/runner/filters/unified_filter.js
@@ -17,7 +17,7 @@ class UnifiedTopologyFilter {
return (
typeof unifiedTopology !== 'boolean' ||
- unifiedTopology === process.env.MONGODB_UNIFIED_TOPOLOGY
+ unifiedTopology === !!process.env.MONGODB_UNIFIED_TOPOLOGY
);
}
}
|
test: allow values other than `true` for unified filter
|
mongodb_node-mongodb-native
|
train
|
js
|
1a856e19ac42c646740d878fc60a098698a7bda4
|
diff --git a/packages/cozy-client/src/queries/optimize.js b/packages/cozy-client/src/queries/optimize.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-client/src/queries/optimize.js
+++ b/packages/cozy-client/src/queries/optimize.js
@@ -1,7 +1,9 @@
import mapValues from 'lodash/mapValues'
import groupBy from 'lodash/groupBy'
import flatten from 'lodash/flatten'
+import isEqual from 'lodash/isEqual'
import uniq from 'lodash/uniq'
+import uniqWith from 'lodash/uniqWith'
import { QueryDefinition } from './dsl'
const isIdQuery = query => query.id || query.ids
@@ -25,7 +27,9 @@ const optimizeDoctypeQueries = queries => {
ids: uniq(flatten(idQueries.map(q => q.id || q.ids)))
})
: []
- return others.concat(groupedIdQueries)
+
+ // Deduplicate before concataining
+ return uniqWith(others, isEqual).concat(groupedIdQueries)
}
/**
|
feat(client): Optimize queries by deduplicating ✨
|
cozy_cozy-client
|
train
|
js
|
ddfc4b914e3a8b42cf927cf7e2ff99e5003e5738
|
diff --git a/test/func/advanced.spec.js b/test/func/advanced.spec.js
index <HASH>..<HASH> 100644
--- a/test/func/advanced.spec.js
+++ b/test/func/advanced.spec.js
@@ -43,7 +43,7 @@ describe('Functional: Advanced usage', function () {
expect(sevenWindows._args).to.includes('-ssc')
})
- it('should be able to compress from stdin', function (done) {
+ it.only('should be able to compress from stdin', function (done) {
const source = `${mockDir}/DirImages/architectural-design-architecture-blueprint-239886.jpg`
const archive = `${tmpDir}/advanced-stdin.7z`
const stdin = require('fs').createReadStream(source)
@@ -52,6 +52,7 @@ describe('Functional: Advanced usage', function () {
})
stdin.pipe(seven._childProcess.stdin)
seven.on('end', function () {
+ console.log(seven.info)
expect(seven.info.get('Items to compress')).to.eql('1')
done()
})
|
fix: Add debug statement for Windows
|
quentinrossetti_node-7z
|
train
|
js
|
033a91f9291d870d1a1d785ffcbd4b78bd71d789
|
diff --git a/packages/react/src/components/ContentSwitcher/ContentSwitcher.js b/packages/react/src/components/ContentSwitcher/ContentSwitcher.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/ContentSwitcher/ContentSwitcher.js
+++ b/packages/react/src/components/ContentSwitcher/ContentSwitcher.js
@@ -110,7 +110,7 @@ export default class ContentSwitcher extends React.Component {
const classes = classNames(`${prefix}--content-switcher`, className);
return (
- <div {...other} className={classes}>
+ <div {...other} className={classes} role="tablist">
{React.Children.map(children, (child, index) =>
React.cloneElement(child, {
index,
|
fix(content-switcher): fix dap violations (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
c90137cf1fac9ba3e80610bb438f96da04ed8f78
|
diff --git a/salt/utils/docker/__init__.py b/salt/utils/docker/__init__.py
index <HASH>..<HASH> 100644
--- a/salt/utils/docker/__init__.py
+++ b/salt/utils/docker/__init__.py
@@ -225,7 +225,7 @@ def translate_input(**kwargs):
# format {'Type': log_driver, 'Config': log_opt}. So, we need to
# construct this argument to be passed to the API from those two
# arguments.
- if log_driver is not NOTSET and log_opt is not NOTSET:
+ if log_driver is not NOTSET or log_opt is not NOTSET:
kwargs['log_config'] = {
'Type': log_driver if log_driver is not NOTSET else 'none',
'Config': log_opt if log_opt is not NOTSET else {}
|
fix(docker): allow log_driver or log_opt
Docker allows either option without the other and the docks make no mention of both options being required.
|
saltstack_salt
|
train
|
py
|
dcec9bb3a90dbe1fe357d8677a500527d79b529d
|
diff --git a/tests/integ/test_auto_ml.py b/tests/integ/test_auto_ml.py
index <HASH>..<HASH> 100644
--- a/tests/integ/test_auto_ml.py
+++ b/tests/integ/test_auto_ml.py
@@ -170,6 +170,7 @@ def test_auto_ml_describe_auto_ml_job(sagemaker_session):
},
"TargetAttributeName": TARGET_ATTRIBUTE_NAME,
"ContentType": "text/csv;header=present",
+ "ChannelType": "training",
}
]
expected_default_output_config = {
@@ -207,6 +208,7 @@ def test_auto_ml_attach(sagemaker_session):
},
"TargetAttributeName": TARGET_ATTRIBUTE_NAME,
"ContentType": "text/csv;header=present",
+ "ChannelType": "training",
}
]
expected_default_output_config = {
|
fix: Automl integ describe job check (#<I>)
|
aws_sagemaker-python-sdk
|
train
|
py
|
6991d66987d6276665bff07259bf1ca464ffeab7
|
diff --git a/lib/cli/render-help/general.js b/lib/cli/render-help/general.js
index <HASH>..<HASH> 100644
--- a/lib/cli/render-help/general.js
+++ b/lib/cli/render-help/general.js
@@ -36,9 +36,7 @@ module.exports = (loadedPlugins) => {
renderOptions(globalOptions, { shouldWriteModernOnly: true });
const allCommands = new Map(
- Array.from(commandsSchema).filter(
- ([commandName, { isHidden, lifecycleEvents }]) => commandName && !isHidden && lifecycleEvents
- )
+ Array.from(commandsSchema).filter(([commandName, { isHidden }]) => commandName && !isHidden)
);
const mainCommands = new Map(
Array.from(allCommands).filter(([, { groupName }]) => groupName === 'main')
|
refactor(CLI): Do not filter commands by `lifecycleEvents` for help
Not clear at this point why such filter was added.
It's harmful for commands configured externally of `Serverless` class
|
serverless_serverless
|
train
|
js
|
20a8bf843b7284f0738763b2dcaac0f59d770ef3
|
diff --git a/packages/aws-amplify-angular/rollup.config.js b/packages/aws-amplify-angular/rollup.config.js
index <HASH>..<HASH> 100644
--- a/packages/aws-amplify-angular/rollup.config.js
+++ b/packages/aws-amplify-angular/rollup.config.js
@@ -28,7 +28,7 @@ export default {
'rxjs/add/observable/of': 'Rx.Observable'
},
},
- external: ['aws-sdk' ,'@angular/core', '@angular/common', 'aws-amplify', '@ionic/angular'],
+ external: ['aws-sdk' ,'@angular/core', '@angular/common', 'aws-amplify', '@ionic/angular', '@aws-amplify/core'],
plugins: [
nodeResolve({ preferBuiltins: false, modulesOnly: true }),
commonjs({include: 'node_modules/**'}),
|
fix(aws-amplify-angular): declare @aws-amplify/core as rollup external
|
aws-amplify_amplify-js
|
train
|
js
|
23c55cc279f1e3715a742836a55c74883042feaa
|
diff --git a/packages/service/addon/index.js b/packages/service/addon/index.js
index <HASH>..<HASH> 100644
--- a/packages/service/addon/index.js
+++ b/packages/service/addon/index.js
@@ -9,7 +9,7 @@ import { gte } from 'ember-compatibility-helpers';
import Component from '@ember/component';
import { inject as service } from '@ember-decorators/service';
- export default class StoreInjectedComponent extends Component
+ export default class StoreInjectedComponent extends Component {
@service store;
}
```
|
docs(service): [typo] add missing opening curly brace (#<I>)
|
ember-decorators_ember-decorators
|
train
|
js
|
fc7e5dfa3283291968518222f0c3fb1669286ab5
|
diff --git a/src/components/layout.js b/src/components/layout.js
index <HASH>..<HASH> 100644
--- a/src/components/layout.js
+++ b/src/components/layout.js
@@ -29,7 +29,9 @@ const Layout = ({ children }) => (
>
{children}
<footer>
- © 2018, Built with <a href="https://www.gatsbyjs.org">Gatsby</a>
+ © {new Date().getFullYear()}, Built with
+ {` `}
+ <a href="https://www.gatsbyjs.org">Gatsby</a>
</footer>
</div>
</>
|
feat(starters): make copyright year dynamic (#<I>)
|
gatsbyjs_gatsby-starter-default
|
train
|
js
|
61274baed742135fb929b4c7ea0673b5283dcaa6
|
diff --git a/views/js/controller/history/index.js b/views/js/controller/history/index.js
index <HASH>..<HASH> 100644
--- a/views/js/controller/history/index.js
+++ b/views/js/controller/history/index.js
@@ -22,7 +22,7 @@ define([
revision = $this.data('revision');
var id = $('#resource_id').val();
- var message = prompt("Please enter a message", __("Restored version %s", revision));
+ var message = prompt(__("Please enter a message"), __("Restored version %s", revision));
if( typeof revision !== "undefined" &&
typeof message !== "undefined" &&
@@ -36,7 +36,7 @@ define([
if(res && res.success){
feedback().success(__("Resource restored"));
$(body).append(lineTpl(res));
- $('.tree').trigger('refresh.taotree');
+ $('.tree').trigger('refresh.taotree');
} else {
feedback().error(__("Something went wrong..."));
}
|
feat: update code to include more tokens to translate
|
oat-sa_extension-tao-revision
|
train
|
js
|
3427d7c471c7eb615cb6cbb1fe75fc1a2376ce60
|
diff --git a/packages/availity-workflow-settings/index.js b/packages/availity-workflow-settings/index.js
index <HASH>..<HASH> 100644
--- a/packages/availity-workflow-settings/index.js
+++ b/packages/availity-workflow-settings/index.js
@@ -138,7 +138,11 @@ const settings = {
}
// Merge in ./workflow.js defaults with overrides from developer config
- merge(this.configuration, developerConfig);
+ if (typeof developerConfig === 'function') {
+ this.configuration = developerConfig(this.configuration);
+ } else {
+ merge(this.configuration, developerConfig);
+ }
// Merge in CLI overrides. The command line args can pass nested properties like:
//
|
feat(settings): allow merge function
Allows a function to be exported from the developer workflow.js which is used to merge the configuration
|
Availity_availity-workflow
|
train
|
js
|
3e7eb3d3206b8835ada1399c9d91213e1a6a53b5
|
diff --git a/src/components/observables/QResizeObservable.js b/src/components/observables/QResizeObservable.js
index <HASH>..<HASH> 100644
--- a/src/components/observables/QResizeObservable.js
+++ b/src/components/observables/QResizeObservable.js
@@ -34,10 +34,10 @@ export default {
},
render (h) {
return h('object', {
- style: 'display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;visibility:hidden;',
+ style: this.style,
attrs: {
type: 'text/html',
- data: this.$q.platform.is.ie ? null : 'about:blank',
+ data: this.url,
'aria-hidden': true
},
on: {
@@ -48,6 +48,11 @@ export default {
}
})
},
+ beforeCreate () {
+ const ie = this.$q.platform.is.ie
+ this.style = `display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;${ie ? 'visibility:hidden;' : ''}`
+ this.url = ie ? null : 'about:blank'
+ },
mounted () {
this.parent = this.$el.parentNode
this.size = { width: -1, height: -1 }
|
fix(QResizeObservable): Use visibility hidden only for IE (#<I>)
Hides object border on IE and fixes Firefox
|
quasarframework_quasar
|
train
|
js
|
8aabea52e52fe71a5aa7353f56db2a177719006f
|
diff --git a/packages/node_modules/@webex/internal-plugin-flag/src/index.js b/packages/node_modules/@webex/internal-plugin-flag/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-flag/src/index.js
+++ b/packages/node_modules/@webex/internal-plugin-flag/src/index.js
@@ -5,7 +5,7 @@
import {registerInternalPlugin} from '@webex/webex-core';
import '@webex/internal-plugin-conversation';
-import '@webex/internal-plugin-wdm';
+import '@webex/internal-plugin-device';
import Flag from './flag';
import config from './config';
|
refactor(internal-plugin-flag): migrate to device
Migrate from internal-plugin-wdm to internal-plugin-device.
|
webex_spark-js-sdk
|
train
|
js
|
9ec3194c5e8c65b0071e0e77d077667cf841e005
|
diff --git a/classes/VideoDownload.php b/classes/VideoDownload.php
index <HASH>..<HASH> 100644
--- a/classes/VideoDownload.php
+++ b/classes/VideoDownload.php
@@ -99,7 +99,7 @@ class VideoDownload
$process = $this->getProcess($arguments);
//This is needed by the openload extractor because it runs PhantomJS
- $process->setEnv(['QT_QPA_PLATFORM'=>'phantom', 'PATH'=>$this->config->phantomjsDir]);
+ $process->setEnv(['PATH'=>$this->config->phantomjsDir]);
$process->inheritEnvironmentVariables();
$process->run();
if (!$process->isSuccessful()) {
|
fix: Don't set QT_QPA_PLATFORM
It looks like it not needed with the static build and it causes troubles on Windows
|
Rudloff_alltube
|
train
|
php
|
dc0030b917e50eb227327b0e103e771b65a6ad0d
|
diff --git a/lib/rules/rules.js b/lib/rules/rules.js
index <HASH>..<HASH> 100644
--- a/lib/rules/rules.js
+++ b/lib/rules/rules.js
@@ -1048,7 +1048,7 @@ function resolveFilterPattern(matcher) {
return {
not: not,
isInclude: isInclude,
- filter: '^[a-z]+://[^/?]+/' + path
+ filter: '^[a-z]+://' + (wildcard.length > 3 ? '[^?]' : '[^/?]') + '+/' + path
};
}
var result = isRegUrl('^' + filter);
|
fix: filter ***/path/to
|
avwo_whistle
|
train
|
js
|
25d183f928275899dd7c765990a2fb055c5f65e0
|
diff --git a/tests/Models/Article.php b/tests/Models/Article.php
index <HASH>..<HASH> 100644
--- a/tests/Models/Article.php
+++ b/tests/Models/Article.php
@@ -22,4 +22,21 @@ class Article extends Model implements Auditable
{
use \OwenIt\Auditing\Auditable;
use SoftDeletes;
+
+ /**
+ * {@inheritdoc}
+ */
+ protected $casts = [
+ 'published' => 'bool',
+ ];
+
+ /**
+ * Uppercase Title accessor.
+ *
+ * @return string
+ */
+ public function getTitleAttribute(): string
+ {
+ return strtoupper($this->attributes['title']);
+ }
}
|
feat(Tests): add boolean cast and mutator to Article model
|
owen-it_laravel-auditing
|
train
|
php
|
0a531b438533b932f99c972970585f990fe174fa
|
diff --git a/flask_raml.py b/flask_raml.py
index <HASH>..<HASH> 100644
--- a/flask_raml.py
+++ b/flask_raml.py
@@ -98,8 +98,10 @@ class API(raml.API):
result.extend((uri, method) for method in resource['methodsByName'] if method.upper() not in methods)
return result
- def abort(self, status, error, encoder=True):
- return abort(self.encoders[encoder].make_response(dict(status=status, error=error), status=status))
+ def abort(self, status, error=None, encoder=True):
+ return abort(
+ self.encoders[encoder].make_response(dict(status=status, error=error), status=status) if error
+ else Response(status=status))
def add_route(self, resource, view, methods=None, endpoint=None, **options):
return self.route(resource, methods, endpoint, **options)(view)
|
feat: allow abort without response body
|
salsita_flask-raml
|
train
|
py
|
f32f10bc6d22e9288ab6f3b8e6ca11208c71a351
|
diff --git a/deis/__init__.py b/deis/__init__.py
index <HASH>..<HASH> 100644
--- a/deis/__init__.py
+++ b/deis/__init__.py
@@ -6,4 +6,4 @@ the api, provider, cm, and web Django apps.
from __future__ import absolute_import
-__version__ = '0.13.0'
+__version__ = '0.13.1'
|
chore(release): update version to <I>
|
deis_controller-sdk-go
|
train
|
py
|
4156ea6174a5ca1ff61dcb0d8cb05f104a23c94d
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -349,6 +349,7 @@ describe('Array', function() {
});
it('should not be susceptible to call stack limits', function() {
+ this.timeout(0);
var expected = [];
var array = [];
var nestedArray = array;
|
test: Disable timeout for call stack test
|
nwoltman_pro-array
|
train
|
js
|
9c3c977966457180c034b75db1de93bc337daa77
|
diff --git a/lib/array.js b/lib/array.js
index <HASH>..<HASH> 100644
--- a/lib/array.js
+++ b/lib/array.js
@@ -7,7 +7,7 @@ export default function inspectArray(array, options) {
const listContents = inspectList(array, options)
options.truncate -= listContents.length
const nonIndexProperties = Object.getOwnPropertyNames(array).filter(key => {
- if (Number(key) < array.length) return false
+ return Number(key) >= array.length || key !== 'length'
if (key === 'length') return false
return true
})
|
refactor(array): shorten filter condition for enumerable keys
|
chaijs_loupe
|
train
|
js
|
eb9de5082df87f1209aad44ba2fef68780520d47
|
diff --git a/src/components/__tests__/__Template.js b/src/components/__tests__/__Template.js
index <HASH>..<HASH> 100644
--- a/src/components/__tests__/__Template.js
+++ b/src/components/__tests__/__Template.js
@@ -1,14 +1,15 @@
import { mount } from '@vue/test-utils';
import Template from '../__Template.vue';
+import { __setState } from '../../component';
jest.mock('../../component');
it('renders correctly', () => {
- const wrapper = mount(Template);
- wrapper.setData({
+ __setState({
state: {
hits: ['yo', 'how', 'are', 'you', 'doing', '?'],
},
});
+ const wrapper = mount(Template);
expect(wrapper.html()).toMatchSnapshot();
});
|
test(template): explain setState
|
algolia_vue-instantsearch
|
train
|
js
|
b412c125a437852673106f232ea13afc2d76569c
|
diff --git a/src/PhpDocument.php b/src/PhpDocument.php
index <HASH>..<HASH> 100644
--- a/src/PhpDocument.php
+++ b/src/PhpDocument.php
@@ -160,7 +160,9 @@ class PhpDocument
// Register this document on the project for references
foreach ($this->referenceNodes as $fqn => $nodes) {
- $this->index->addReferenceUri($fqn, $this->uri);
+ // Cast the key to string. If (string)'2' is set as an array index, it will read out as (int)2. We must
+ // deal with incorrect code, so this is a valid scenario.
+ $this->index->addReferenceUri((string)$fqn, $this->uri);
}
$this->sourceFileNode = $treeAnalyzer->getSourceFileNode();
|
fix(indexing): handle integer FQNs
|
felixfbecker_php-language-server
|
train
|
php
|
c69011fad44cce67a20904df869ceeb430c60209
|
diff --git a/Exscript/protocols/ssh2.py b/Exscript/protocols/ssh2.py
index <HASH>..<HASH> 100644
--- a/Exscript/protocols/ssh2.py
+++ b/Exscript/protocols/ssh2.py
@@ -199,7 +199,7 @@ class SSH2(Protocol):
continue
for regex in self.get_password_prompt():
- match = password_re.search(prompt)
+ match = regex.search(prompt)
if match is not None:
response.append(password)
break
|
fix: broken password login for ssh
|
knipknap_exscript
|
train
|
py
|
bfcf7d74d2d8a32ea2431c2166213af5f9549683
|
diff --git a/rope/refactor/__init__.py b/rope/refactor/__init__.py
index <HASH>..<HASH> 100644
--- a/rope/refactor/__init__.py
+++ b/rope/refactor/__init__.py
@@ -47,3 +47,9 @@ monitoring the progress of refactorings.
"""
from rope.refactor.importutils import ImportOrganizer
from rope.refactor.topackage import ModuleToPackage
+
+
+__all__ = ['rename', 'move', 'inline', 'extract', 'restructure', 'topackage',
+ 'importutils', 'usefunction', 'change_signature',
+ 'encapsulate_field', 'introduce_factory', 'introduce_parameter',
+ 'localtofield', 'method_object', 'multiproject']
|
refactor: adding __all__ to rope.refactor
|
python-rope_rope
|
train
|
py
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.