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 |
|---|---|---|---|---|---|
c429c62d00d24ddda60eee6e1de196db6fcd7fa6
|
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
@@ -44,6 +44,11 @@ import anyconfig.utils
from . import pyyaml
+try:
+ ryaml.YAML # flake8: noqa
+except AttributeError:
+ ImportError("ruamel.yaml may be too old to use!")
+
_YAML_INIT_KWARGS = ["typ", "pure", "plug_ins"] # kwargs for ruamel.yaml.YAML
_YAML_INSTANCE_MEMBERS = ['allow_duplicate_keys', 'allow_unicode',
'block_seq_indent', 'canonical', 'composer',
|
fix: disable ruamel.yaml based backend if its lib is too old
Disable ruamel.yaml based YAML backend if dependent ruamel.yaml library
is too old and does not have the definition of ruamel.yaml.YAML class,
necessary to make it works.
This fix was based on the report from the pr#<I> by Masatake YAMATO.
|
ssato_python-anyconfig
|
train
|
py
|
3a07b504430bb68544fa78ee9803155ddb9b3f06
|
diff --git a/python/neuroglancer/viewer_base.py b/python/neuroglancer/viewer_base.py
index <HASH>..<HASH> 100644
--- a/python/neuroglancer/viewer_base.py
+++ b/python/neuroglancer/viewer_base.py
@@ -134,9 +134,7 @@ class ViewerCommonBase(object):
event.set()
self.async_screenshot(handler, include_depth=include_depth,
statistics_callback=statistics_callback)
- print('Waiting for screenshot')
event.wait()
- print('Got screenshot')
if size is not None and (result[0].screenshot.width != size[0] or
result[0].screenshot.height != size[1]):
continue
|
fix(python): remove screenshot debugging messages that were left in by mistake
|
google_neuroglancer
|
train
|
py
|
09e6edc7742570e8396fd71489efcde878510a8a
|
diff --git a/packages/text/src/react/heading.js b/packages/text/src/react/heading.js
index <HASH>..<HASH> 100644
--- a/packages/text/src/react/heading.js
+++ b/packages/text/src/react/heading.js
@@ -48,7 +48,7 @@ const style = props =>
[sizes.large]: {
fontSize: core.type.fontSizeLarge,
letterSpacing: core.type.letterSpacingLarge,
- lineHeight: core.type.lineHeightStandard,
+ lineHeight: core.type.lineHeightExtra,
fontWeight: core.type.fontWeightBook
},
[sizes.xLarge]: {
|
fix(text): increase large heading line height to extra
|
pluralsight_design-system
|
train
|
js
|
f797cdcec8c37cd90399f929c1970ab17a005183
|
diff --git a/protocol-designer/src/components/FileSidebar/FileSidebar.js b/protocol-designer/src/components/FileSidebar/FileSidebar.js
index <HASH>..<HASH> 100644
--- a/protocol-designer/src/components/FileSidebar/FileSidebar.js
+++ b/protocol-designer/src/components/FileSidebar/FileSidebar.js
@@ -223,6 +223,11 @@ export function FileSidebar(props: Props) {
},
})
+ const scrollToTop = () => {
+ const editPage = document.getElementById('main-page')
+ if (editPage) editPage.scrollTop = 0
+ }
+
return (
<>
{blockingV4ExportHint}
@@ -271,8 +276,10 @@ export function FileSidebar(props: Props) {
<PrimaryButton
onClick={() => {
if (hasWarning) {
+ scrollToTop()
setShowExportWarningModal(true)
} else if (isV4Protocol) {
+ scrollToTop()
setShowV4ExportWarning(true)
} else {
saveFile(downloadData)
|
fix(protocol-designer): Add scroll to top on export modal display (#<I>)
closes #<I>
|
Opentrons_opentrons
|
train
|
js
|
6ac36724a186b2b0bed751c2c860a4fb7c43791d
|
diff --git a/src/cobra/flux_analysis/reaction.py b/src/cobra/flux_analysis/reaction.py
index <HASH>..<HASH> 100644
--- a/src/cobra/flux_analysis/reaction.py
+++ b/src/cobra/flux_analysis/reaction.py
@@ -7,8 +7,6 @@ from __future__ import absolute_import, division
from operator import attrgetter
from warnings import warn
-from six import iteritems
-
from cobra.core import Reaction
@@ -119,7 +117,7 @@ def assess_component(model, reaction, side, flux_coefficient_cutoff=0.001, solve
# Otherwise assess the ability of the model to produce each precursor
# individually. Now assess the ability of the model to produce each
# reactant for a reaction
- for demand_reaction, (component, coeff) in iteritems(demand_reactions):
+ for demand_reaction, (component, coeff) in demand_reactions.items():
# Calculate the maximum amount of the
with m:
m.objective = demand_reaction
|
refactor: remove six usage in flux_analysis/reaction.py
|
opencobra_cobrapy
|
train
|
py
|
7a48e7f54853a11f161edf497910ff7ada8f4d99
|
diff --git a/test/library.js b/test/library.js
index <HASH>..<HASH> 100644
--- a/test/library.js
+++ b/test/library.js
@@ -61,7 +61,7 @@ describe('Library', function () {
'strcpy': [ 'pointer', [ 'pointer', 'string' ] ]
}).strcpy
strcpy(buf, ZEROS_128)
- expect(buf.getCString()).to.equal(ZEROS_128)
+ expect(buf.readCString()).to.equal(ZEROS_128)
})
it('should work with "strcpy" and a 2k length string', function () {
@@ -71,7 +71,7 @@ describe('Library', function () {
'strcpy': [ 'pointer', [ 'pointer', 'string' ] ]
}).strcpy
strcpy(buf, ZEROS_2K)
- expect(buf.getCString()).to.equal(ZEROS_2K)
+ expect(buf.readCString()).to.equal(ZEROS_2K)
})
if (process.platform == 'win32') {
|
test: use readCString()
|
node-ffi-napi_node-ffi-napi
|
train
|
js
|
f95a62b2d7799ad9655ff32902bf19991f9eb705
|
diff --git a/packages/phenomic/src/prerender/resolve.js b/packages/phenomic/src/prerender/resolve.js
index <HASH>..<HASH> 100644
--- a/packages/phenomic/src/prerender/resolve.js
+++ b/packages/phenomic/src/prerender/resolve.js
@@ -23,6 +23,7 @@ const resolveURLsForDynamicParams = async function(
debug(
`fetching collection '${collectionConfig.collection ? collectionConfig.collection : Object.keys(collectionConfig).join(",")}' for route '${route.path}'`
);
+ // @todo memoize for perfs and avoid uncessary call
const collection = await phenomicFetch(createQuery(collectionConfig));
debug(`collection fetched. ${collection.list.length} items`);
const path = route.path || "*";
@@ -96,7 +97,8 @@ const flatten = (array: Array<any>) => {
? flattenedArray.push(...flatten(item))
: flattenedArray.push(item);
});
- return flattenedArray;
+ // array unique
+ return [...new Set(flattenedArray)];
};
const normalizePath = (path: string) => path.replace(/^\//, "");
|
fix(phenomic): avoid rendering a same route multiple times
|
phenomic_phenomic
|
train
|
js
|
4fed2d99890c497e2046f6829e7d4c27c0fdfe21
|
diff --git a/packages/node_modules/@webex/internal-plugin-conversation/test/integration/spec/share.js b/packages/node_modules/@webex/internal-plugin-conversation/test/integration/spec/share.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-conversation/test/integration/spec/share.js
+++ b/packages/node_modules/@webex/internal-plugin-conversation/test/integration/spec/share.js
@@ -362,8 +362,10 @@ describe('plugin-conversation', function () {
return spark.internal.conversation.share(conversation, threadShare);
})
.then((activity) => {
- assert.equal(activity.parentActivityId, parentActivityId);
- assert.equal(activity.activityType, 'reply');
+ const {id, type} = activity.parent;
+
+ assert.equal(id, parentActivityId);
+ assert.equal(type, 'reply');
return spark.internal.conversation.download(activity.object.files.items[0]);
})
|
test(internal-plugin-conversation): reflect new server payload
|
webex_spark-js-sdk
|
train
|
js
|
69863c03ed42f2e69ad474bd3b265667dad4f708
|
diff --git a/src/main/java/org/vafer/jdeb/Processor.java b/src/main/java/org/vafer/jdeb/Processor.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/vafer/jdeb/Processor.java
+++ b/src/main/java/org/vafer/jdeb/Processor.java
@@ -134,6 +134,7 @@ public class Processor {
throw new InvalidDescriptorException(packageDescriptor);
}
+ pOutput.getParentFile().mkdirs();
final InformationOutputStream output = new InformationOutputStream(new FileOutputStream(pOutput), MessageDigest.getInstance("MD5"));
final ArArchiveOutputStream ar = new ArArchiveOutputStream(output);
|
fix: create parent dirs for the output .deb (fails with maven when target is not created yet)
|
tcurdt_jdeb
|
train
|
java
|
1312d62f5c79bbd8ee0b53c40721055cb1e0ead6
|
diff --git a/examples/help.js b/examples/help.js
index <HASH>..<HASH> 100644
--- a/examples/help.js
+++ b/examples/help.js
@@ -12,7 +12,7 @@ cli.command('lint [...files]', 'Lint files').action((files, options) => {
// Display help message when `-h` or `--help` appears
cli.help()
-// Display version number when `-h` or `--help` appears
+// Display version number when `-v` or `--version` appears
cli.version('0.0.0')
cli.parse()
|
chore: fix version example comments (#<I>)
|
cacjs_cac
|
train
|
js
|
d6e7d5ae954e1e7286276e1dd3b96219c183909c
|
diff --git a/pbclient/__init__.py b/pbclient/__init__.py
index <HASH>..<HASH> 100644
--- a/pbclient/__init__.py
+++ b/pbclient/__init__.py
@@ -8,7 +8,7 @@ A simple PYBOSSA client
:license: MIT
"""
-from __future__ import division
+
import requests
import json
|
chore(python3): migrate to python3.
|
Scifabric_pybossa-client
|
train
|
py
|
5287f117a601d22fca824c1117fce5d72a7c9bbb
|
diff --git a/build/tasks/build.js b/build/tasks/build.js
index <HASH>..<HASH> 100644
--- a/build/tasks/build.js
+++ b/build/tasks/build.js
@@ -69,7 +69,7 @@ gulp.task('build-ts-system', function () {
});
gulp.task('build-dts', function() {
- var tsProjectDTS = ts.createProject(compilerTsOptions.es2015(), ts.reporter.defaultReporter());
+ var tsProjectDTS = ts.createProject(compilerTsOptions.dts(), ts.reporter.defaultReporter());
var tsResult = indexSrc.pipe(ts(tsProjectDTS));
return tsResult.dts
.pipe(gulp.dest(paths.output));
diff --git a/build/typescript-options.js b/build/typescript-options.js
index <HASH>..<HASH> 100644
--- a/build/typescript-options.js
+++ b/build/typescript-options.js
@@ -38,3 +38,9 @@ exports.es2015 = function() {
options.target = 'es2015';
return options;
};
+
+exports.dts = function() {
+ var options = exports.base();
+ options.removeComments = false;
+ return options;
+}
|
fix(build): preserve comments in .d.ts
|
aurelia_dependency-injection
|
train
|
js,js
|
e15f97713aac0459dc0cd553cf36658506c47367
|
diff --git a/tmuxp/__init__.py b/tmuxp/__init__.py
index <HASH>..<HASH> 100644
--- a/tmuxp/__init__.py
+++ b/tmuxp/__init__.py
@@ -5,7 +5,7 @@
tmuxp
~~~~~
-:copyright: Copyright 2013-2018 Tony Narlock.
+:copyright: Copyright 2013- Tony Narlock.
:license: MIT, see LICENSE for details
"""
|
docs: Make copyright perpetual
|
tmux-python_tmuxp
|
train
|
py
|
e4e22b3a7e68c835ed5fa96fd0560cc5e32aa1a9
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -70,6 +70,19 @@ quest.stream = function(url, headers) {
return thru
}
+quest.send = function(req, body) {
+ if (body) {
+ if (!Buffer.isBuffer(body)) {
+ if (body.constructor == Object)
+ body = JSON.stringify(body)
+ if (typeof body == 'string')
+ body = Buffer.from(body)
+ }
+ req.write(body)
+ }
+ return quest.fetch(req)
+}
+
quest.fetch = function(url, headers) {
const res = quest.stream(url, headers)
return new Promise((resolve, reject) => {
|
feat: add `quest.send`
This function takes a ClientRequest and an optional string, buffer, or object.
If an object is given, it's encoded as JSON.
The request's `end` method is called automatically.
A promise is returned, which resolves just like `quest.fetch`.
|
aleclarson_quest
|
train
|
js
|
8c5d6256c29d7b59df07e6b78c977ca4cd772a59
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -23,14 +23,14 @@ var empowerOptions = {
if (typeof baseAssert.deepStrictEqual !== 'function') {
baseAssert.deepStrictEqual = function deepStrictEqual (actual, expected, message) {
if (!_deepEqual(actual, expected, true)) {
- baseAssert.fail(actual, expected, message, 'deepStrictEqual', deepStrictEqual);
+ baseAssert.fail(actual, expected, message, 'deepStrictEqual');
}
};
}
if (typeof baseAssert.notDeepStrictEqual !== 'function') {
baseAssert.notDeepStrictEqual = function notDeepStrictEqual (actual, expected, message) {
if (_deepEqual(actual, expected, true)) {
- baseAssert.fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);
+ baseAssert.fail(actual, expected, message, 'notDeepStrictEqual');
}
};
}
|
fix(power-assert): omit 5th argument (`stackStartFunction`) to run with old Node (<I>)
since it causes ReferenceError under some conditions
|
power-assert-js_power-assert
|
train
|
js
|
06093b809b5927c13d4cb8de290bc889e3cfe53c
|
diff --git a/modules/webpack-config.js b/modules/webpack-config.js
index <HASH>..<HASH> 100644
--- a/modules/webpack-config.js
+++ b/modules/webpack-config.js
@@ -114,7 +114,6 @@ class WebpackConfig {
new MiniCssExtractPlugin({
filename: useVersioning ? '[name]-[contenthash:6].css' : '[name].css'
}),
- isProd ? new webpack.HashedModuleIdsPlugin() : new webpack.NamedModulesPlugin()
// new BundleAnalyzerPlugin(),
]
};
@@ -131,6 +130,7 @@ class WebpackConfig {
if (isProd) {
config.optimization.minimizer.push(this.getUglifyJSPlugin());
+ config.plugins.push(new webpack.HashedModuleIdsPlugin());
config.plugins.push(this.getWebpackLoaderOptionsPlugin());
config.plugins.push(this.getWebpackDefinePlugin());
}
|
chore: NamedModulesPlugin -> optimization.namedModules (on by default in develoment mode)
|
miaoxing_app
|
train
|
js
|
a4028565d062339f18a504f39c61cfa04a962802
|
diff --git a/scripts/doctum-config.php b/scripts/doctum-config.php
index <HASH>..<HASH> 100644
--- a/scripts/doctum-config.php
+++ b/scripts/doctum-config.php
@@ -13,7 +13,7 @@ use Symfony\Component\Finder\Finder;
$srcFiles = realpath(__DIR__ . '/../src');
$rootDir = realpath(__DIR__ . '/../') . DIRECTORY_SEPARATOR;
-$iterator = Finder::create()->files()->name('*.php')->in($srcFiles);
+$iterator = Finder::create()->files()->name('*.php')->notName('merge.php')->in($srcFiles);
$description = json_decode(file_get_contents(__DIR__ . '/../composer.json'))->description;
|
fix: exclude merge.php from Doctum
|
williamdes_mariadb-mysql-kbs
|
train
|
php
|
4762049fbcb4dad9d03ea7b7e5b19b8e21a7cc5d
|
diff --git a/stutils/decorators.py b/stutils/decorators.py
index <HASH>..<HASH> 100644
--- a/stutils/decorators.py
+++ b/stutils/decorators.py
@@ -42,7 +42,8 @@ class _FSCacher(object):
self.cache_path = mkdir(cache_dir or DEFAULT_PATH, app_name, cache_type)
if isinstance(idx, int):
- idx = range(idx)
+ # Python3 range objects won't work, so explicitly convert to list
+ idx = list(range(idx))
self.idx = idx
def get_cache_fname(self, *args):
|
fix: @fs_cache fails on Python3 when index_col is set by numeric index
|
CMUSTRUDEL_strudel.utils
|
train
|
py
|
6cffc4c71898da8c6043c99217a00d211062408f
|
diff --git a/tests/Test/Process/ProcessTest.php b/tests/Test/Process/ProcessTest.php
index <HASH>..<HASH> 100644
--- a/tests/Test/Process/ProcessTest.php
+++ b/tests/Test/Process/ProcessTest.php
@@ -66,7 +66,7 @@ class ProcessTest extends TestCase
public function testWatch()
{
- $process = new Process(PHP_BINARY . ' -r "ob_start();var_dump(123);ob_end_flush();sleep(1);ob_start();var_dump(456);ob_end_flush();sleep(1);ob_start();echo \'end\';ob_end_flush();"', __DIR__);
+ $process = new Process(PHP_BINARY . ' -r "ob_start();print_r(123);ob_end_flush();sleep(1);ob_start();print_r(456);ob_end_flush();sleep(1);ob_start();echo \'end\';ob_end_flush();"', __DIR__);
try {
$readed = [];
@@ -80,8 +80,8 @@ class ProcessTest extends TestCase
}, null, 1);
$this->assertEquals([
- 'int(123)' . "\n",
- 'int(456)' . "\n",
+ '123',
+ '456',
'end',
], $readed);
$this->assertEquals(['', '', ''], $errors);
|
test(Process): fix watch test
|
phalcon-nucleon_framework
|
train
|
php
|
b3caba6743d9018d27426220ea39482842c057cf
|
diff --git a/packages/cli/bin/utils/progression.js b/packages/cli/bin/utils/progression.js
index <HASH>..<HASH> 100644
--- a/packages/cli/bin/utils/progression.js
+++ b/packages/cli/bin/utils/progression.js
@@ -101,7 +101,9 @@ const getProgression = (config, recipeId) => {
if (!progress[step.id]) {
progress[step.id] = new ProgressBar({
total: 100,
- schema: `[:bar] :current/:total :percent :elapseds ${step.name}`,
+ width: 20,
+ schema: `:bar ${step.name}`,
+ blank: '░',
});
}
progress[step.id].update(step.progress / 100);
|
feat(progress): change display to match specs
affects: @zetapush/cli
|
zetapush_zetapush
|
train
|
js
|
c749d47aa6d2be8e7a8fb5ae0890b2469f1779e5
|
diff --git a/src/sentry_plugins/__init__.py b/src/sentry_plugins/__init__.py
index <HASH>..<HASH> 100644
--- a/src/sentry_plugins/__init__.py
+++ b/src/sentry_plugins/__init__.py
@@ -1,29 +1,7 @@
from __future__ import absolute_import
+
try:
VERSION = __import__("pkg_resources").get_distribution("sentry-plugins").version
except Exception as e:
VERSION = "unknown"
-
-# Try to hook our webhook watcher into the rest of the watchers
-# iff this module is installed in editable mode.
-if "site-packages" not in __file__:
- import os
-
- root = os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
- node_modules = os.path.join(root, "node_modules")
-
- if os.path.isdir(node_modules):
- from django.conf import settings
-
- settings.SENTRY_WATCHERS += (
- (
- "webpack.plugins",
- [
- os.path.join(node_modules, ".bin", "webpack"),
- "--output-pathinfo",
- "--watch",
- "--config={}".format(os.path.join(root, "webpack.config.js")),
- ],
- ),
- )
|
fix: remove watchers (#<I>)
|
getsentry_sentry-plugins
|
train
|
py
|
c8f696f3b7ccc9c2a583bcd76313a1d02e3940e0
|
diff --git a/Pagination/Decorator/ForceStopScrollerDecorator.php b/Pagination/Decorator/ForceStopScrollerDecorator.php
index <HASH>..<HASH> 100644
--- a/Pagination/Decorator/ForceStopScrollerDecorator.php
+++ b/Pagination/Decorator/ForceStopScrollerDecorator.php
@@ -71,6 +71,7 @@ class ForceStopScrollerDecorator extends AbstractScrollerDecorator
public function getFirstRequest(ClientInterface $client, JobConfig $jobConfig)
{
$this->startTime = time();
+ $this->pageCounter = 1;
return $this->scroller->getFirstRequest($client, $jobConfig);
}
|
fix: Force stop scroller firstPage now counts the request
|
keboola_juicer
|
train
|
php
|
3ae029b41b4fae1e786ffbf6e86cc48366a314be
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -508,7 +508,7 @@ function initialize(entityType, entityLookupMethodName, entityLookupTitle, searc
channel = new BroadcastChannel('cwrc-entity-management-forms')
channel.onmessage = (id) => {
if (id === undefined) {
- // add/edit failed so do nothing
+ // add/edit failed so don't return result
} else {
const uri = entitySources[currentSearchOptions.entityType].get('cwrc').getEntityRoot()+'/'+id
returnResult({
@@ -516,8 +516,8 @@ function initialize(entityType, entityLookupMethodName, entityLookupTitle, searc
uri,
repository: 'cwrc'
})
- entityFormWindow.close()
}
+ entityFormWindow.close() // always close window
}
selectedResult = undefined
|
fix: close entity management window when add/edit fails
|
cwrc_CWRC-PublicEntityDialogs
|
train
|
js
|
fec3533dfd909391f932c421d55253c49df61612
|
diff --git a/pysrt/srtfile.py b/pysrt/srtfile.py
index <HASH>..<HASH> 100644
--- a/pysrt/srtfile.py
+++ b/pysrt/srtfile.py
@@ -183,13 +183,17 @@ class SubRipFile(UserList, object):
Use init eol if no other provided.
"""
path = path or self.path
+
+ save_file = open(path, 'w+')
+ self.write_into(save_file, encoding=encoding, eol=eol)
+ save_file.close()
+
+ def write_into(self, io, encoding=None, eol=None):
encoding = encoding or self.encoding
output_eol = eol or self.eol
- save_file = open(path, 'w+')
for item in self:
string_repr = unicode(item)
if output_eol != '\n':
string_repr = string_repr.replace('\n', output_eol)
- save_file.write(string_repr.encode(encoding))
- save_file.close()
+ io.write(string_repr.encode(encoding))
|
refactor: extract write_into method from SubRipFile.save
|
byroot_pysrt
|
train
|
py
|
cbd43d0b4c95e46fc3f1cffddc6281eced45db4a
|
diff --git a/gitlab/base.py b/gitlab/base.py
index <HASH>..<HASH> 100644
--- a/gitlab/base.py
+++ b/gitlab/base.py
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import importlib
-from typing import Any, Dict, Optional
+from typing import Any, Dict, Optional, Type
from .client import Gitlab, GitlabList
@@ -171,7 +171,9 @@ class RESTObjectList(object):
_list: A GitlabList object
"""
- def __init__(self, manager: "RESTManager", obj_cls, _list: GitlabList) -> None:
+ def __init__(
+ self, manager: "RESTManager", obj_cls: Type[RESTObject], _list: GitlabList
+ ) -> None:
"""Creates an objects list from a GitlabList.
You should not create objects of this type, but use managers list()
@@ -246,7 +248,7 @@ class RESTManager(object):
"""
_path: Optional[str] = None
- _obj_cls: Optional[Any] = None
+ _obj_cls: Optional[Type[RESTObject]] = None
_from_parent_attrs: Dict[str, Any] = {}
def __init__(self, gl: Gitlab, parent: Optional[RESTObject] = None) -> None:
|
chore: improve type-hints for gitlab/base.py
Determined the base class for obj_cls and adding type-hints for it.
|
python-gitlab_python-gitlab
|
train
|
py
|
4e636ae12c66ab789484aa47d4ff4bace2a598ba
|
diff --git a/packages/metascraper-audio/index.js b/packages/metascraper-audio/index.js
index <HASH>..<HASH> 100644
--- a/packages/metascraper-audio/index.js
+++ b/packages/metascraper-audio/index.js
@@ -23,11 +23,13 @@ const audioRules = [
toAudio($ => $('meta[property="og:audio"]').attr('content')),
toAudio($ => {
const contentType = $(
- 'meta[property="twitter:player:stream:content_type"]'
+ 'meta[name="twitter:player:stream:content_type"]'
).attr('content')
- const streamUrl = $('meta[property="twitter:player:stream"]').attr(
- 'content'
- )
+
+ const streamUrl =
+ $('meta[name="twitter:player:stream"]').attr('content') ||
+ $('meta[name="twitter:player"]').attr('content')
+
return contentType ? withContentType(streamUrl, contentType) : streamUrl
}),
toAudio($jsonld('contentUrl')),
|
fix: use name instead of property (#<I>)
|
microlinkhq_metascraper
|
train
|
js
|
fbf7610faf18bef2d1187c932a0f68294cf7ddb1
|
diff --git a/packages/wxa-cli/src/compile-script.js b/packages/wxa-cli/src/compile-script.js
index <HASH>..<HASH> 100644
--- a/packages/wxa-cli/src/compile-script.js
+++ b/packages/wxa-cli/src/compile-script.js
@@ -45,7 +45,9 @@ export default class CScript {
}
resolveDeps(code, type, opath) {
- return code.replace(/(?:[\s\n\t]+require|^require)\(['"]([\w\d_\-\.\/@]+)['"]\)/ig, (match, lib)=>{
+ return code.replace(/([\.][\t\n\s]*)?require\([']([\w\d_\-\.\/@]+)['"]\)/ig, (match, space, lib)=>{
+ if (space) return match;
+
let resolved = lib;
let target = '', source = '', ext = '', needCopy = false;
@@ -216,11 +218,7 @@ export default class CScript {
source: code,
options: {configs: compiler.configs},
transform: (code, options)=>{
- if (options.configs.ignore && this.checkIgnore(opath, options.configs.ignore)) {
- return Promise.resolve({code});
- } else {
- return compiler.parse(code, options.configs, opath);
- }
+ return compiler.parse(code, options.configs, opath);
},
}, this.options.cache).then((succ)=>{
let sourcemap;
|
fix: change regexp for require. drop ignore check.
change regexp for require. drop ignore check (it should be done with compiler)
|
wxajs_wxa
|
train
|
js
|
a4e5eb689bd60381cf76128308b70c80b5a68187
|
diff --git a/generators/kubernetes-knative/prompts.js b/generators/kubernetes-knative/prompts.js
index <HASH>..<HASH> 100644
--- a/generators/kubernetes-knative/prompts.js
+++ b/generators/kubernetes-knative/prompts.js
@@ -23,10 +23,9 @@ module.exports = {
...k8sPrompts,
};
-function askForGeneratorType() {
+async function askForGeneratorType() {
if (this.regenerate) return;
- const done = this.async();
const prompts = [
{
type: 'list',
@@ -46,8 +45,6 @@ function askForGeneratorType() {
},
];
- this.prompt(prompts).then(props => {
- this.generatorType = props.generatorType;
- done();
- });
+ const props = await this.prompt(prompts);
+ this.generatorType = props.generatorType;
}
|
chore: move k8s-knative prompts to async
|
jhipster_generator-jhipster
|
train
|
js
|
77795ef102f7d5c50ca429eaef04fadd7c4ff6a1
|
diff --git a/packages/components/bolt-button/src/button.standalone.js b/packages/components/bolt-button/src/button.standalone.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-button/src/button.standalone.js
+++ b/packages/components/bolt-button/src/button.standalone.js
@@ -39,7 +39,9 @@ class BoltButton extends withHyperHtml() {
// https://github.com/WebReflection/document-register-element#upgrading-the-constructor-context
constructor(self) {
self = super(self);
- this.useShadow = hasNativeShadowDomSupport;
+ self.useShadow = hasNativeShadowDomSupport;
+ return self;
+ }
const root = this;
// If the initial <bolt-button> element contains a button or link, break apart the original HTML so we can retain any button or a tags but swap out the inner content with slots.
|
refactor: update button component constructor to use `self` as referenced in the document-register-element docs
|
bolt-design-system_bolt
|
train
|
js
|
5ede2aa12e3739d66daf500155a67badb30b7b17
|
diff --git a/app/service/database.js b/app/service/database.js
index <HASH>..<HASH> 100644
--- a/app/service/database.js
+++ b/app/service/database.js
@@ -19,7 +19,11 @@ class DataBaseService extends Service {
async ensureNewDir(dir) {
if (fs.existsSync(dir)) rimraf.sync(dir);
- await fs.mkdir(dir);
+
+ // support Docker volume data
+ if (!fs.existsSync(dir)) {
+ await fs.mkdir(dir);
+ }
}
async importData() {
|
feat: support docker edit data (#<I>)
|
macacajs_macaca-datahub
|
train
|
js
|
f985b6bef361e7ddde99396d539cee4d3a6ca5aa
|
diff --git a/src/structures/Role.js b/src/structures/Role.js
index <HASH>..<HASH> 100644
--- a/src/structures/Role.js
+++ b/src/structures/Role.js
@@ -179,7 +179,7 @@ class Role extends Base {
return this.client.api.guilds[this.guild.id].roles[this.id].patch({
data: {
name: data.name || this.name,
- color: Util.resolveColor(data.color || this.color),
+ color: data.color !== null ? Util.resolveColor(data.color || this.color) : null,
hoist: typeof data.hoist !== 'undefined' ? data.hoist : this.hoist,
permissions: data.permissions,
mentionable: typeof data.mentionable !== 'undefined' ? data.mentionable : this.mentionable,
|
fix(Role): allow edit method to null the color (#<I>)
|
discordjs_discord.js
|
train
|
js
|
6ab9d06195e17f36d7451dfd9b10e46385615049
|
diff --git a/test/chainful.js b/test/chainful.js
index <HASH>..<HASH> 100644
--- a/test/chainful.js
+++ b/test/chainful.js
@@ -335,7 +335,7 @@ describe('Chainful', function() {
describe('#setBlockRequester(requester_function)', function() {
it('should request blocks & add them', function(done) {
- this.timeout(4000);
+ this.timeout(20000);
var ecdh = crypto.createECDH('secp256k1');
|
test: increase timeout which causes a fail on travis-ci sometimes
|
skerit_chainful
|
train
|
js
|
7847863619d8fa36df371db9d33be919493bfc44
|
diff --git a/dual/dual.go b/dual/dual.go
index <HASH>..<HASH> 100644
--- a/dual/dual.go
+++ b/dual/dual.go
@@ -77,13 +77,14 @@ func (dht *DHT) Close() error {
return multierror.Append(dht.WAN.Close(), dht.LAN.Close()).ErrorOrNil()
}
-func (dht *DHT) activeWAN() bool {
+// WANActive returns true when the WAN DHT is active (has peers).
+func (dht *DHT) WANActive() bool {
return dht.WAN.RoutingTable().Size() > 0
}
// Provide adds the given cid to the content routing system.
func (dht *DHT) Provide(ctx context.Context, key cid.Cid, announce bool) error {
- if dht.activeWAN() {
+ if dht.WANActive() {
return dht.WAN.Provide(ctx, key, announce)
}
return dht.LAN.Provide(ctx, key, announce)
@@ -167,7 +168,7 @@ func (dht *DHT) Bootstrap(ctx context.Context) error {
// PutValue adds value corresponding to given Key.
func (dht *DHT) PutValue(ctx context.Context, key string, val []byte, opts ...routing.Option) error {
- if dht.activeWAN() {
+ if dht.WANActive() {
return dht.WAN.PutValue(ctx, key, val, opts...)
}
return dht.LAN.PutValue(ctx, key, val, opts...)
|
feat: expose WANActive
That way, external users can easily determine which DHT they should use. E.g.,
in go-ipfs, I'd like to call GetClosestPeers in the `ipfs dht` commands based on
the "active" DHT.
|
libp2p_go-libp2p-kad-dht
|
train
|
go
|
f2cbb44eb55168bc122ed763610e61fec63093f0
|
diff --git a/lib/create-contentful-api.js b/lib/create-contentful-api.js
index <HASH>..<HASH> 100644
--- a/lib/create-contentful-api.js
+++ b/lib/create-contentful-api.js
@@ -178,6 +178,9 @@ export default function createContentfulApi ({
/**
* Synchronizes either all the content or only new content since last sync
* See <a href="https://www.contentful.com/developers/docs/concepts/sync/">Synchronization</a> for more information.
+ * <strong> Important note: </strong> The the sync api endpoint does not support include or link resolution.
+ * However contentful.js is doing link resolution client side if you only make an initial sync.
+ * For the delta sync (using nextSyncToken) it is not possible since the sdk wont have access to all the data to make such an operation.
* @memberof ContentfulClientAPI
* @param {Object} query - Query object for the sync call. One of initial or nextSyncToken always needs to be specified, but not both.
* @param {boolean?} query.initial - Indicates if this is the first sync. Use it if you don't have a sync token.
|
fix(docs): Fix sync docs
contentful.js is doing link resolution client side if you only make an initial sync, for the second
sync it is not possible since the sdk wont have access to all the data to make such an operation.
closes #<I>
|
contentful_contentful.js
|
train
|
js
|
720779fc195940cd3cd1fe5bcc3a6d61c78a6a66
|
diff --git a/src/Traits/EventTrait.php b/src/Traits/EventTrait.php
index <HASH>..<HASH> 100644
--- a/src/Traits/EventTrait.php
+++ b/src/Traits/EventTrait.php
@@ -122,7 +122,7 @@ trait EventTrait
return;
}
- $method = $halt ? 'until' : method_exists($dispatcher, 'fire') ? 'fire' : 'dispatch';
+ $method = $halt ? 'until' : (method_exists($dispatcher, 'fire') ? 'fire' : 'dispatch');
return $dispatcher->{$method}($event, $payload);
}
|
chore: Minor tweak on event dispatcher method resolving
|
cartalyst_support
|
train
|
php
|
fe8128f5d144721c69373a257949151a35f8082e
|
diff --git a/packages/demo/src/modules/user/actions/createUser.js b/packages/demo/src/modules/user/actions/createUser.js
index <HASH>..<HASH> 100644
--- a/packages/demo/src/modules/user/actions/createUser.js
+++ b/packages/demo/src/modules/user/actions/createUser.js
@@ -1,6 +1,6 @@
function createUser ({firebase, path, state}) {
- const email = state.get('user.$signIn.email')
- const password = state.get('user.$signIn.password')
+ const email = state.get('user.$signIn.email.value')
+ const password = state.get('user.$signIn.password.value')
// validate
let validationErrors = {}
|
fix(demos): fix createUser action (#<I>)
|
cerebral_cerebral
|
train
|
js
|
559f685853bd4e146564f891b3134511dc2ee90e
|
diff --git a/src/main/java/org/camunda/bpm/model/xml/impl/parser/AbstractModelParser.java b/src/main/java/org/camunda/bpm/model/xml/impl/parser/AbstractModelParser.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/camunda/bpm/model/xml/impl/parser/AbstractModelParser.java
+++ b/src/main/java/org/camunda/bpm/model/xml/impl/parser/AbstractModelParser.java
@@ -97,7 +97,7 @@ public abstract class AbstractModelParser {
private void enableSecureProcessing(final DocumentBuilderFactory dbf) {
try {
dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
- dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "file,http,https");
+ dbf.setAttribute("http://javax.xml.XMLConstants/property/accessExternalSchema", "file,http,https,jar,wsjar");
} catch (ParserConfigurationException | IllegalArgumentException ignored) {
// ignored
}
|
fix(parser): correct external schema access
* use compatible reference (some JDKs do not contain the XMLConstants constant)
* allow "jar" and "wsjar" references in schema as well
related to CAM-<I>
|
camunda_camunda-xml-model
|
train
|
java
|
5c9c0faac4f04b5e527e020772c5d1a02eb71168
|
diff --git a/lib/cache/index.js b/lib/cache/index.js
index <HASH>..<HASH> 100644
--- a/lib/cache/index.js
+++ b/lib/cache/index.js
@@ -114,11 +114,7 @@ function getStream (byDigest, cache, key, opts) {
opts = opts || {}
var stream
if (!cache || !key) {
- stream = through()
- var err = new Error('no cache or key')
- err.code = 'ENOENT'
- setImmediate(function () { stream.emit('error', err) })
- return stream
+ throw new Error('cache and key are required')
}
var memoed = MEMOIZED[cache + ':' + key]
if (memoed) {
|
fix(cache): this is really a user error, so just throw
|
zkat_pacote
|
train
|
js
|
2786cf2e76a6be59e65e4b4ec19de4c81f22cdf1
|
diff --git a/lib/publish.js b/lib/publish.js
index <HASH>..<HASH> 100644
--- a/lib/publish.js
+++ b/lib/publish.js
@@ -20,10 +20,7 @@ module.exports = async ({npmPublish, pkgRoot}, pkg, context) => {
const distTag = getChannel(channel);
logger.log(`Publishing version ${version} to npm registry`);
- const result = execa('npm', ['publish', basePath, '--tag', distTag, '--registry', registry], {
- cwd,
- env,
- });
+ const result = execa('npm', ['publish', basePath, '--tag', distTag, '--registry', registry], {cwd, env});
result.stdout.pipe(
stdout,
{end: false}
|
style: minor style change in `lib/publish.js`
|
semantic-release_npm
|
train
|
js
|
70b2d6bdbef9ecc651b676527b935a6672186386
|
diff --git a/lib/util.js b/lib/util.js
index <HASH>..<HASH> 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -65,11 +65,8 @@ function parseKeepAliveTimeout (shouldKeepAlive, headers) {
return m ? Number(m[1]) * 1000 : null
}
-function parseHeaders (headers, obj) {
- obj = obj || {}
- if (!headers) {
- return obj
- }
+function parseHeaders (headers) {
+ const obj = {}
for (var i = 0; i < headers.length; i += 2) {
var key = headers[i].toLowerCase()
var val = obj[key]
|
refactor: parseHeaders
|
mcollina_undici
|
train
|
js
|
2db957e6ab2c242fe8fd360a1ea4e11a158c2e58
|
diff --git a/modules/dialog/js/dialog_directive.js b/modules/dialog/js/dialog_directive.js
index <HASH>..<HASH> 100644
--- a/modules/dialog/js/dialog_directive.js
+++ b/modules/dialog/js/dialog_directive.js
@@ -70,7 +70,7 @@
$scope.$on('lx-dialog__close', function(event, id, canceled, params)
{
- if (id === lxDialog.id)
+ if (id === lxDialog.id || id === undefined)
{
close(canceled, params);
}
|
feat(dialog-service-close): allowing to close current dialog when no id is provided
|
lumapps_lumX
|
train
|
js
|
27d4b847ea9062439e95128e917a33f92b3cf93e
|
diff --git a/lib/node-console/index.js b/lib/node-console/index.js
index <HASH>..<HASH> 100644
--- a/lib/node-console/index.js
+++ b/lib/node-console/index.js
@@ -99,7 +99,10 @@ NodeConsole.prototype.create = function(name, fn, color, colorBody) {
self.log.apply(self, [name, fn, color, colorBody].concat([].slice.call(arguments)));
}
logger.push = function() { logger.apply(self, arguments); self.traceDepth++; };
- logger.pop = function() { self.traceDepth--; logger.apply(self, arguments); };
+ logger.pop = function() {
+ self.traceDepth--;
+ if (arguments.length) { logger.apply(self, arguments); }
+ };
return logger;
};
|
feat(tracing): pop() no longer requires args
- If no args are given, only stack level is updated.
|
codeactual_long-con
|
train
|
js
|
6ddbfb8a63e04fcb05a1603858f4584ed7f7da60
|
diff --git a/connection/connect.js b/connection/connect.js
index <HASH>..<HASH> 100644
--- a/connection/connect.js
+++ b/connection/connect.js
@@ -48,6 +48,8 @@ function getSaslSupportedMechs(options) {
}
const credentials = options.credentials;
+
+ // TODO: revisit whether or not items like `options.user` and `options.dbName` should be checked here
const authMechanism = credentials.mechanism;
const authSource = credentials.source || options.dbName || 'admin';
const user = credentials.username || options.user;
|
refactor(connect): leave note regarding `user` and `db` checks
|
mongodb_node-mongodb-native
|
train
|
js
|
891279272ddaa8344126f428a66d4505a602c669
|
diff --git a/shaka-player.uncompiled.js b/shaka-player.uncompiled.js
index <HASH>..<HASH> 100644
--- a/shaka-player.uncompiled.js
+++ b/shaka-player.uncompiled.js
@@ -37,6 +37,7 @@ goog.require('shaka.polyfill.Fullscreen');
goog.require('shaka.polyfill.InputEvent');
goog.require('shaka.polyfill.MathRound');
goog.require('shaka.polyfill.MediaSource');
+goog.require('shaka.polyfill.MediaCapabilities');
goog.require('shaka.polyfill.Orientation');
goog.require('shaka.polyfill.PatchedMediaKeysApple');
goog.require('shaka.polyfill.PatchedMediaKeysMs');
|
feat(MediaCap): Add MediaCap polyfill to uncompiled.js
Adding MediaCapabilities polyfill to uncompiled.js, so that the
polyfill can be used in unit tests.
Fixed the tests failure in Tizen, Safari and other browsers.
Issue #<I>
Change-Id: Ia9e<I>d<I>ac<I>bf4a<I>fb<I>e4f<I>e9e<I>ecc7
|
google_shaka-player
|
train
|
js
|
b00aa14643b2f22fd53d2bfe4622a1b2e5e57114
|
diff --git a/cpsk/__init__.py b/cpsk/__init__.py
index <HASH>..<HASH> 100644
--- a/cpsk/__init__.py
+++ b/cpsk/__init__.py
@@ -104,8 +104,12 @@ def get_routes(departure, dest, vehicle='vlakbus', time='', date=''):
drive.duration = table.xpath('./tr[' + str(datalen) +
']/td[3]/p/strong[1]/text()')[0]
- drive.distance = table.xpath('./tr[' + str(datalen) +
- ']/td[3]/p/strong[2]/text()')[0]
+
+ try:
+ drive.distance = table.xpath('./tr[' + str(datalen) +
+ ']/td[3]/p/strong[2]/text()')[0]
+ except IndexError:
+ drive.distance = 'Distance not known'
routes.append(drive)
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ setup(
description='an unofficial api for grabbing data from cp.sk',
author='Adrian Matejov',
author_email='a.matejov@centrum.sk',
- version='0.1.1',
+ version='0.1.2',
url='https://github.com/Adman/python-cpsk-api',
|
fix: fixed when distance is now known
* built v <I>
|
Adman_python-cpsk-api
|
train
|
py,py
|
70ee9f88c5307a3c9c03bb2c9710bb2f0ba3668d
|
diff --git a/ui/src/plugins/Notify.js b/ui/src/plugins/Notify.js
index <HASH>..<HASH> 100644
--- a/ui/src/plugins/Notify.js
+++ b/ui/src/plugins/Notify.js
@@ -123,7 +123,7 @@ const Notifications = {
}
notif.staticClass = [
- `q-notification row items-stretch`,
+ `q-notification row items-stretch col-auto`,
notif.color && `bg-${notif.color}`,
notif.textColor && `text-${notif.textColor}`,
`q-notification--${notif.multiLine === true ? 'multi-line' : 'standard'}`,
|
fix(Notify): notification get squeezed if too many on same position
|
quasarframework_quasar
|
train
|
js
|
c509eed22edf0fec972e66fdf67707e9b5f9a417
|
diff --git a/memote/suite/runner.py b/memote/suite/runner.py
index <HASH>..<HASH> 100644
--- a/memote/suite/runner.py
+++ b/memote/suite/runner.py
@@ -293,8 +293,10 @@ def new(ctx):
new directory will be placed in the current directory or respect the given
--directory option.
"""
- cookiecutter("gh:biosustain/cookiecutter-memote",
- output_dir=ctx.obj.get("directory", "."))
+ directory = ctx.obj["directory"]
+ if directory is None:
+ directory = os.getcwd()
+ cookiecutter("gh:biosustain/cookiecutter-memote", output_dir=directory)
@cli.command()
|
fix: catch directory argument being `None` (#<I>)
|
opencobra_memote
|
train
|
py
|
442e24c23b92b8b043161db8ac1ce1d491021610
|
diff --git a/lib/adapters/translate_encoder.js b/lib/adapters/translate_encoder.js
index <HASH>..<HASH> 100644
--- a/lib/adapters/translate_encoder.js
+++ b/lib/adapters/translate_encoder.js
@@ -1,10 +1,7 @@
'use strict';
-
var processor = require('node-amqp-encoder').Processor,
-
Composites = require('../types/amqp_composites'),
AMQPArray = Composites.Array,
- AMQPFields = Composites.Fields,
DescribedType = require('../types/described_type'),
ForcedType = require('../types/forced_type');
@@ -72,13 +69,15 @@ var encoder = processor({
for (var idx = 0; idx < vals.length; idx += 2) {
var k = encoder(vals[idx]);
var v = encoder(vals[idx + 1]);
- result[k] = v;
- if (k instanceof ForcedType && k.typeName === 'symbol') {
+ if (k instanceof ForcedType) {
isFields = true;
+ result[k.value] = v;
+ } else {
+ result[k] = v;
}
}
- return isFields ? new AMQPFields(result) : result;
+ return isFields ? new ForcedType('fields', result) : result;
}
},
array: function(type, vals) {
|
fix(translator): ensure keys aren't objects for map types
|
noodlefrenzy_node-amqp10
|
train
|
js
|
8d1b4edfc364493f75bd5e87a86a83fc5d196cc4
|
diff --git a/client/mobrender/components/block-config-menu.connected.js b/client/mobrender/components/block-config-menu.connected.js
index <HASH>..<HASH> 100644
--- a/client/mobrender/components/block-config-menu.connected.js
+++ b/client/mobrender/components/block-config-menu.connected.js
@@ -12,11 +12,11 @@ const mapStateToProps = (state, props) => {
}
const mapActionsToProps = (dispatch, props) => ({
- moveUp: asyncMoveUp,
- moveDown: asyncMoveDown,
- update: asyncUpdateBlock,
- onEdit: handleEdit,
- destroy: asyncDestroyBlock,
+ moveUp: block => dispatch(asyncMoveUp(block)),
+ moveDown: block => dispatch(asyncMoveDown(block)),
+ update: block => dispatch(asyncUpdateBlock(block)),
+ onEdit: key => dispatch(handleEdit(key)),
+ destroy: block => dispatch(asyncDestroyBlock(block)),
duplicate: ({ mobilization_id, bg_class, bg_image, position, hidden, name, menu_hidden }) => {
// Widgets clean
const widgetsAttributes = props.widgets.map(
|
chore(mobilizations): fix actions mapped on block config menu
|
nossas_bonde-client
|
train
|
js
|
797d42dcd9a642a970bb837d51d7a6a73d27287d
|
diff --git a/src/record/record-handler.js b/src/record/record-handler.js
index <HASH>..<HASH> 100644
--- a/src/record/record-handler.js
+++ b/src/record/record-handler.js
@@ -496,7 +496,7 @@ RecordHandler.prototype._onPermissionResponse = function (
socketWrapper.sendError(message.topic, C.EVENT.MESSAGE_PERMISSION_ERROR, error.toString())
} else if (canPerformAction !== true) {
socketWrapper.sendError(
- message.topic, C.EVENT.MESSAGE_DENIED, [message.data[0], message.data[1]]
+ message.topic, C.EVENT.MESSAGE_DENIED, [message.data[0], message.action]
)
} else {
successCallback()
|
fix(records): second data param in MESSAGE_DENIED error should be action
fixes unit tests
previous refactor (0f<I>c8a) used data[1] which was never defined
|
deepstreamIO_deepstream.io
|
train
|
js
|
806a861e4215c800835c798d91616b4cad31840f
|
diff --git a/packages/ui-core/src/components/Position/index.js b/packages/ui-core/src/components/Position/index.js
index <HASH>..<HASH> 100644
--- a/packages/ui-core/src/components/Position/index.js
+++ b/packages/ui-core/src/components/Position/index.js
@@ -143,7 +143,8 @@ class Position extends Component {
const { style, placement, positioned } = this.state
- if (placement !== prevState.placement || style.top !== prevState.style.top || style.left !== prevState.style.left) {
+ if (style && prevState.style && (placement !== prevState.placement || style.top !== prevState.style.top ||
+ style.left !== prevState.style.left)) {
this.props.onPositionChanged({
top: style.top,
left: style.left,
|
fix(browser): fix accessing style when it's undefined in Position
Fixes INSTUI-<I>
Test plan:
- Position example in the docs should behave as before
- Briefly look over components listed under the 'Dialogs'
category to make sure nothing is broken
Change-Id: I6eb1f2a5fbe0bc<I>d7afd0e<I>a5c<I>a<I>f<I>
Reviewed-on: <URL>
|
instructure_instructure-ui
|
train
|
js
|
cdeffb39b06c2a5d56af9e34576d5de66b6d6a54
|
diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js
index <HASH>..<HASH> 100644
--- a/lib/debug/ProfilingPlugin.js
+++ b/lib/debug/ProfilingPlugin.js
@@ -73,7 +73,7 @@ class Profiler {
/**
* @param {string} outputPath The location where to write the log.
- * @returns {{trace: ?, counter: number, profiler: Profiler, fsStream: WriteStream}} The trace object
+ * @returns {{trace: ?, counter: number, profiler: Profiler, end: Function}} The trace object
*/
function createTrace(outputPath) {
const trace = new Trace({
@@ -121,7 +121,7 @@ function createTrace(outputPath) {
trace,
counter,
profiler,
- fsStream
+ end: (callback) => fsStream.end(callback)
};
}
@@ -181,7 +181,7 @@ class ProfilingPlugin {
if (parsedResults === undefined) {
tracer.profiler.destroy();
tracer.trace.flush();
- tracer.fsStream.end(callback);
+ tracer.end(callback);
return;
}
@@ -229,7 +229,7 @@ class ProfilingPlugin {
tracer.profiler.destroy();
tracer.trace.flush();
- tracer.fsStream.end(callback);
+ tracer.end(callback);
});
}
);
|
fix(ProfilingPlugin): only expose the end method of fsStream
|
webpack_webpack
|
train
|
js
|
33669f32a508fe186dfe92b6213b46920a9b6c07
|
diff --git a/GEOparse/GEOTypes.py b/GEOparse/GEOTypes.py
index <HASH>..<HASH> 100755
--- a/GEOparse/GEOTypes.py
+++ b/GEOparse/GEOTypes.py
@@ -9,6 +9,7 @@ import sys
import gzip
import json
import time
+import platform
import subprocess
import numpy as np
from . import utils
|
fix: platform was not imported but used
|
guma44_GEOparse
|
train
|
py
|
a2986652878f92b2e8ca619bc690c04320b85e30
|
diff --git a/app/templates/electron/main-process/electron-main.dev.js b/app/templates/electron/main-process/electron-main.dev.js
index <HASH>..<HASH> 100644
--- a/app/templates/electron/main-process/electron-main.dev.js
+++ b/app/templates/electron/main-process/electron-main.dev.js
@@ -15,8 +15,8 @@ electronDebug({ showDevTools: true })
// Install vuejs devtools
app.whenReady().then(() => {
installExtension(VUEJS_DEVTOOLS)
- .then(ext => {
- console.log(`Added Extension: ${ext.name}`)
+ .then(name => {
+ console.log(`Added Extension: ${name}`)
})
.catch(err => {
console.log('An error occurred: ', err)
|
fix: Electron build gets "undefined" for extension name (#<I>)
According to docs here: <URL>, not an object
|
quasarframework_quasar
|
train
|
js
|
273c0634a26eb189c832dacf097016c54eb4d3da
|
diff --git a/src/Identity/WIF.php b/src/Identity/WIF.php
index <HASH>..<HASH> 100644
--- a/src/Identity/WIF.php
+++ b/src/Identity/WIF.php
@@ -39,11 +39,6 @@ class WIF
{
$network = $network ?? NetworkConfiguration::get();
- $secret = Hash::sha256(new Buffer($secret));
- $seed = Writer::bit8($network->getWif());
- $seed .= $secret->getBinary();
- $seed .= Writer::bit8(0x01);
-
- return Base58::encodeCheck(new Buffer($seed));
+ return PrivateKey::fromSecret($secret)->toWif($network->getFactory());
}
}
|
refactor: use private key to get WIF
|
ArkEcosystem_php-crypto
|
train
|
php
|
2b4b2df8be7621927158d4ae2043df51d82edf20
|
diff --git a/src/Api/FilterLocatorTrait.php b/src/Api/FilterLocatorTrait.php
index <HASH>..<HASH> 100644
--- a/src/Api/FilterLocatorTrait.php
+++ b/src/Api/FilterLocatorTrait.php
@@ -14,6 +14,7 @@ declare(strict_types=1);
namespace ApiPlatform\Api;
use ApiPlatform\Core\Api\FilterCollection;
+use ApiPlatform\Core\Api\FilterInterface;
use ApiPlatform\Exception\InvalidArgumentException;
use Psr\Container\ContainerInterface;
diff --git a/src/Core/Annotation/ApiFilter.php b/src/Core/Annotation/ApiFilter.php
index <HASH>..<HASH> 100644
--- a/src/Core/Annotation/ApiFilter.php
+++ b/src/Core/Annotation/ApiFilter.php
@@ -13,7 +13,7 @@ declare(strict_types=1);
namespace ApiPlatform\Core\Annotation;
-use ApiPlatform\Api\FilterInterface;
+use ApiPlatform\Core\Api\FilterInterface;
use ApiPlatform\Exception\InvalidArgumentException;
/**
|
fix: use legacy filter interface with annotations
|
api-platform_core
|
train
|
php,php
|
73bfe427368a5dd19d430c4084b06a38c0ac9a9f
|
diff --git a/simple_elastic/index.py b/simple_elastic/index.py
index <HASH>..<HASH> 100644
--- a/simple_elastic/index.py
+++ b/simple_elastic/index.py
@@ -124,16 +124,19 @@ class ElasticIndex:
results.append(items)
return results
- def scroll(self, query=None, scroll='5m', size=100):
+ def scroll(self, query=None, scroll='5m', size=100, unpack=True):
"""Scroll an index with the specified search query.
Works as a generator. Will yield `size` results per iteration until all hits are returned.
"""
query = self.match_all if query is None else query
- response = self.instance.search(index=self.index, doc_type=self.doc_type, body=query, size=size, scroll=scroll)
+ response = self.instance.search(index=self.index, doc_type=self.doc_type, body=query, size=size)
while len(response['hits']['hits']) > 0:
scroll_id = response['_scroll_id']
- yield [source['_source'] if '_source' in source else source for source in response['hits']['hits']]
+ if unpack:
+ yield [source['_source'] if '_source' in source else source for source in response['hits']['hits']]
+ else:
+ yield response['hits']['hits']
response = self.instance.scroll(scroll_id=scroll_id, scroll=scroll)
def get(self, identifier):
|
feat(Scroll): Add unpack param.
This allows the user to specify wether the _source field is unpacked or not.
In case of unpacking no metadata fields are returned.
|
UB-UNIBAS_simple-elastic
|
train
|
py
|
b3ce789fd59278c9d06af3a41ba4858ca54575e1
|
diff --git a/lib/client-base.js b/lib/client-base.js
index <HASH>..<HASH> 100644
--- a/lib/client-base.js
+++ b/lib/client-base.js
@@ -191,10 +191,6 @@ class ClientBase extends EventEmitter {
this[kQueue].push(request)
- if (!this[kSocket] && !this[kRetryTimeout]) {
- connect(this)
- }
-
resume(this)
return request
@@ -557,6 +553,11 @@ function resume (client) {
continue
}
+ if (!client[kSocket] && !client[kRetryTimeout]) {
+ connect(client)
+ return
+ }
+
if (!client.connected) {
return
}
|
refactor: move connect to resume
|
mcollina_undici
|
train
|
js
|
25fc171e773540755b3ca887a075244b686329ec
|
diff --git a/packages/razzle/scripts/start.js b/packages/razzle/scripts/start.js
index <HASH>..<HASH> 100755
--- a/packages/razzle/scripts/start.js
+++ b/packages/razzle/scripts/start.js
@@ -105,7 +105,7 @@ function main() {
// Otherwise, create a new watcher for our server code.
watching = serverCompiler.watch(
{
- quiet: true,
+ quiet: !verbose,
stats: 'none',
},
/* eslint-disable no-unused-vars */
|
fix(razzle): don't quiet server compiler if verbose
|
jaredpalmer_razzle
|
train
|
js
|
3b88fd67d9976c215eaccff7ee2f80811be7f057
|
diff --git a/raven/utils/encoding.py b/raven/utils/encoding.py
index <HASH>..<HASH> 100644
--- a/raven/utils/encoding.py
+++ b/raven/utils/encoding.py
@@ -84,7 +84,7 @@ def to_unicode(value):
value = '(Error decoding value)'
except Exception: # in some cases we get a different exception
try:
- value = binary_type(repr(type(value)))
+ value = text_type(force_text(repr(type(value))))
except Exception:
value = '(Error decoding value)'
return value
|
fix: Correct repr fallback of to_unicode
|
getsentry_raven-python
|
train
|
py
|
f0f65e8fab14794ca163a617d5c2166868aae6f3
|
diff --git a/lib/components/viewers/stop-viewer.js b/lib/components/viewers/stop-viewer.js
index <HASH>..<HASH> 100644
--- a/lib/components/viewers/stop-viewer.js
+++ b/lib/components/viewers/stop-viewer.js
@@ -407,7 +407,8 @@ function getHomeTime (homeTimezone = 'America/New_York') {
/**
* Get the timezone name that is set for the user that is currently looking at
- * this website.
+ * this website. Use a bit of hackery to force a specific timezone if in a
+ * test environment.
*/
function getUserTimezone () {
return process.env.NODE_ENV === 'test' ? process.env.TZ : moment.tz.guess()
@@ -423,7 +424,6 @@ function getUserTimezone () {
* @param {string} timeFormat A valid moment.js formatting string
*/
function getFormattedStopTime (stopTime, homeTimezone, soonText = 'Due', timeFormat) {
- // use a bit of hackery to force a specific timezone to be used during testing
const userTimeZone = getUserTimezone()
const inHomeTimezone = homeTimezone && homeTimezone === userTimeZone
|
refactor(stop-viewer): move comments about the user timezone to function jsdoc
|
opentripplanner_otp-react-redux
|
train
|
js
|
8ffd6c5ce21d017a2d2d46f373df9f6c3d20019b
|
diff --git a/lib/rules/_base.js b/lib/rules/_base.js
index <HASH>..<HASH> 100644
--- a/lib/rules/_base.js
+++ b/lib/rules/_base.js
@@ -524,7 +524,7 @@ module.exports = class {
if (!result.node) {
if (!loggedRules.has(this.ruleName)) {
- let message = `Calling the log method without passing the node is deprecated. Please ensure you pass node in the log method's result.`;
+ let message = `Calling the log method without passing the node is deprecated. Please ensure you pass node in the log method's result. Rule ID: ${this.ruleName}.`;
if (process.env.EMBER_TEMPLATE_LINT_DEV_MODE === '1') {
throw new Error(message);
|
fix: Adding ruleId to deprecation message to track its origin
|
ember-template-lint_ember-template-lint
|
train
|
js
|
a36f9488d440472d852eb071f81d27ed3aac7be5
|
diff --git a/lib/pg/em.rb b/lib/pg/em.rb
index <HASH>..<HASH> 100644
--- a/lib/pg/em.rb
+++ b/lib/pg/em.rb
@@ -249,12 +249,16 @@ module PG
raise PG::Error, "timeout expired (async)"
end
ensure
- @client.finish unless poll_method.intern == :reset
+ @client.finish unless reconnecting?
end
end
end
end
+ def reconnecting?
+ @poll_method == :reset_poll
+ end
+
def notify_writable
poll_connection_and_check
end
@@ -276,7 +280,11 @@ module PG
detach
success = @deferrable.protect_and_succeed do
unless @client.status == PG::CONNECTION_OK
- raise PG::Error, @client.error_message
+ begin
+ raise PG::Error, @client.error_message
+ ensure
+ @client.finish unless reconnecting?
+ end
end
@client
end
|
fix: finish connection on any connection error except on reset
|
royaltm_ruby-em-pg-client
|
train
|
rb
|
ec330f09ac85fe4146719a8b331e376e3ec454ea
|
diff --git a/lib/util/parseHeaders.js b/lib/util/parseHeaders.js
index <HASH>..<HASH> 100644
--- a/lib/util/parseHeaders.js
+++ b/lib/util/parseHeaders.js
@@ -13,9 +13,9 @@ const unescapeHtml = html => String(html)
.replace(/>/g, '>')
const removeMarkdownToken = str => String(str)
- .replace(/\[(.*)\]\(.*\)/, '$1') // []()
- .replace(/(`|\*\*|\*|_)(.*[^\\])\1/, '$2') // `{t}` | *{t}* | **{t}** | _{t}_
- .replace(/(\\)(\*|_|`)/g, '$2') // remove escape char '\'
+ .replace(/\[(.*)\]\(.*\)/, '$1') // []()
+ .replace(/(`|\*{1,3}|_)(.*?[^\\])\1/g, '$2') // `{t}` | *{t}* | **{t}** | ***{t}*** | _{t}_
+ .replace(/(\\)(\*|_|`)/g, '$2') // remove escape char '\'
exports.removeTailHtml = (str) => {
return String(str).replace(/<.*>\s*$/g, '')
|
fix: multiple markdown tokens in header text (#<I>)
|
vuejs_vuepress
|
train
|
js
|
00b89c77b64656edb66e570f5065820faf45f7e1
|
diff --git a/lib/datasource/npm.js b/lib/datasource/npm.js
index <HASH>..<HASH> 100644
--- a/lib/datasource/npm.js
+++ b/lib/datasource/npm.js
@@ -133,11 +133,14 @@ async function getPreset(pkgName, presetName = 'default') {
}
async function getDependency(name, retries = 5) {
- logger.trace(`getPkgReleases(${name})`);
+ logger.trace(`npm.getPkgReleases(${name})`);
+
+ // This is our datastore cache and is cleared at the end of each repo, i.e. we never requery/revalidate during a "run"
if (memcache[name]) {
logger.trace('Returning cached result');
return memcache[name];
}
+
const scope = name.split('/')[0];
let regUrl;
try {
@@ -173,7 +176,9 @@ async function getDependency(name, retries = 5) {
delete headers.authorization;
}
- // Retrieve from API if not cached
+ // This tells our http layer not to serve responses directly from the cache and instead to revalidate them every time
+ headers['Cache-Control'] = 'no-cache';
+
try {
const raw = await got(pkgUrl, {
cache: process.env.RENOVATE_SKIP_CACHE ? undefined : map,
|
fix(npm): revalidate all registry requests
Sets Cache-Control to ‘no-cache’ to instruct the http layer to always revalidate cached responses with the registry. Otherwise we can be up to 5 minutes “behind” because npmjs default cache time is <I>s.
|
renovatebot_renovate
|
train
|
js
|
7421836a1e755530a3e094706e5e81aa94725e05
|
diff --git a/task/backend/executor/task_executor.go b/task/backend/executor/task_executor.go
index <HASH>..<HASH> 100644
--- a/task/backend/executor/task_executor.go
+++ b/task/backend/executor/task_executor.go
@@ -352,8 +352,9 @@ func (w *worker) finish(p *promise, rs backend.RunStatus, err error) {
w.te.logger.Debug("Completed successfully", zap.String("taskID", p.task.ID.String()))
}
- w.te.tcs.FinishRun(icontext.SetAuthorizer(p.ctx, p.auth), p.task.ID, p.run.ID)
-
+ if _, err := w.te.tcs.FinishRun(icontext.SetAuthorizer(p.ctx, p.auth), p.task.ID, p.run.ID); err != nil {
+ w.te.logger.Error("Failed to finish run", zap.String("taskID", p.task.ID.String()), zap.String("runID", p.run.ID.String()), zap.Error(err))
+ }
}
func (w *worker) executeQuery(p *promise) {
|
fix(task): add error handling for when a `FinishRun` fails (#<I>)
|
influxdata_influxdb
|
train
|
go
|
e922c0743ec524b40a3a479d50fc7c4e7c1f3679
|
diff --git a/build/prepareNightly.js b/build/prepareNightly.js
index <HASH>..<HASH> 100644
--- a/build/prepareNightly.js
+++ b/build/prepareNightly.js
@@ -48,10 +48,10 @@ fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8')
const readmePath = __dirname + '/../README.md';
-const readmeAttention = `<div style="color:red;font-weight:bold;">
-<p style="font-size:22px;text-transform:uppercase">⚠️ Attention Please</p>
-<p style="font-size:16px">This is nightly build of Apache ECharts. Please DON't use it in your production environment.</p>
-</div>`;
+const readmeAttention = `<h3>
+<p><em>⚠️ ATTENTION PLEASE</em></p>
+<p><em>This is nightly build of Apache ECharts. Please DON't use it in your production environment.</em></p>
+</h3>`;
const readmeContent = fs.readFileSync(readmePath, 'utf-8');
if (!readmeContent.includes(readmeAttention)) {
fs.writeFileSync(readmePath, `
|
chore: optimize style of README attention in nightly build
|
apache_incubator-echarts
|
train
|
js
|
5ecba76f4a4304f9b089b394ac7308e1c4bba431
|
diff --git a/src/streamlink_cli/argparser.py b/src/streamlink_cli/argparser.py
index <HASH>..<HASH> 100644
--- a/src/streamlink_cli/argparser.py
+++ b/src/streamlink_cli/argparser.py
@@ -467,7 +467,7 @@ def build_parser():
inserted inside your --title string.
A full list of the format codes mpv uses is available here:
- https://mpv.io/manual/stable/#property-expansion
+ https://mpv.io/manual/stable/#property-list
Formatting variables available to use in --title:
|
docs: fix mpv property-list link in --title description (#<I>)
|
streamlink_streamlink
|
train
|
py
|
1e9ee8ab0ff8e3c92d58eda853b955936466aa56
|
diff --git a/lib/RuntimeTemplate.js b/lib/RuntimeTemplate.js
index <HASH>..<HASH> 100644
--- a/lib/RuntimeTemplate.js
+++ b/lib/RuntimeTemplate.js
@@ -133,7 +133,7 @@ class RuntimeTemplate {
* @returns {string} generated error IIFE
*/
missingModule({ request }) {
- return `(${this.throwMissingModuleErrorFunction({ request })}())`;
+ return `Object(${this.throwMissingModuleErrorFunction({ request })}())`;
}
/**
|
fix(template): Syntax error caused by runtime template
|
webpack_webpack
|
train
|
js
|
abf63a890ed71473364c55370f23c98239eaf03b
|
diff --git a/packages/ciscospark/test/integration/spec/plugins/team-memberships.js b/packages/ciscospark/test/integration/spec/plugins/team-memberships.js
index <HASH>..<HASH> 100644
--- a/packages/ciscospark/test/integration/spec/plugins/team-memberships.js
+++ b/packages/ciscospark/test/integration/spec/plugins/team-memberships.js
@@ -80,6 +80,10 @@ describe(`ciscospark`, function() {
assert.isTeamMembership(membership);
assert.equal(membership.teamId, team.id);
assert.isTrue(membership.isModerator);
+
+ // prevent this test from breaking other tests
+ membership.isModerator = false;
+ return spark.teamMemberships.update(membership);
}));
});
|
test(ciscospark): adjust test to address in-prod breaking change
|
webex_spark-js-sdk
|
train
|
js
|
8911fe8e752f0e9a2d5b5a2fb878f4f37b868ec1
|
diff --git a/packages/react/src/components/DataTable/stories/with-batch-actions.js b/packages/react/src/components/DataTable/stories/with-batch-actions.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/DataTable/stories/with-batch-actions.js
+++ b/packages/react/src/components/DataTable/stories/with-batch-actions.js
@@ -87,7 +87,7 @@ export default props => (
Action 3
</TableToolbarAction>
</TableToolbarMenu>
- <Button onClick={action('Add new row')} small kind="primary">
+ <Button onClick={action('Add new row')} size="small" kind="primary">
Add new
</Button>
</TableToolbarContent>
|
chore(data-table): update storybook to use correct button variant (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
31bf0a1dbed52daca614e4927dd1c2cd8053a553
|
diff --git a/src/date_utils.js b/src/date_utils.js
index <HASH>..<HASH> 100644
--- a/src/date_utils.js
+++ b/src/date_utils.js
@@ -86,10 +86,7 @@ export function parseDate(value, dateFormat, locale, strictParsing, minDate) {
if (strictParsing) {
strictParsingValueMatch =
isValid(tryParseDate, minDate) &&
- value ===
- format(tryParseDate, df, {
- awareOfUnicodeTokens: true,
- });
+ value === formatDate(tryParseDate, df, locale);
}
if (isValid(tryParseDate, minDate) && strictParsingValueMatch) {
parsedDate = tryParseDate;
@@ -103,7 +100,7 @@ export function parseDate(value, dateFormat, locale, strictParsing, minDate) {
if (strictParsing) {
strictParsingValueMatch =
isValid(parsedDate) &&
- value === format(parsedDate, dateFormat, { awareOfUnicodeTokens: true });
+ value === formatDate(parsedDate, dateFormat, locale);
} else if (!isValid(parsedDate)) {
dateFormat = dateFormat
.match(longFormattingTokensRegExp)
|
fix(date-utils): use current locale for strict parsing
|
Hacker0x01_react-datepicker
|
train
|
js
|
f92f24d34f6cc9b779188ea7fccbe8ae9a3b6354
|
diff --git a/prow/plugins/config.go b/prow/plugins/config.go
index <HASH>..<HASH> 100644
--- a/prow/plugins/config.go
+++ b/prow/plugins/config.go
@@ -1794,7 +1794,7 @@ func (b *Bugzilla) OptionsForRepo(org, repo string) map[string]BugzillaBranchOpt
// BranchCleaner contains the configuration for the branchcleaner plugin.
type BranchCleaner struct {
- // ProtectedBranches is a set of repo branches, branches in this white list
+ // ProtectedBranches is a set of repo branches, branches in this allow list
// are exempt from branch gc, even if the branches are already merged into the target branch
ProtectedBranches []string `json:"protected_branches,omitempty"`
}
|
fix: revise the word.
|
kubernetes_test-infra
|
train
|
go
|
7792134e4a0cb42ea123676037f1a3a59ec67574
|
diff --git a/test/urlMatcherFactorySpec.js b/test/urlMatcherFactorySpec.js
index <HASH>..<HASH> 100644
--- a/test/urlMatcherFactorySpec.js
+++ b/test/urlMatcherFactorySpec.js
@@ -203,6 +203,19 @@ describe("UrlMatcher", function () {
expect(m.format(params)).toEqual('/users');
});
+
+ it("should format query parameters from parent, child, grandchild matchers", function() {
+ var m = new UrlMatcher('/parent?qParent');
+ var m2 = m.append(new UrlMatcher('/child?qChild'));
+ var m3 = m2.append(new UrlMatcher('/grandchild?qGrandchild'));
+
+ var params = { qParent: 'parent', qChild: 'child', qGrandchild: 'grandchild' };
+ var url = '/parent/child/grandchild?qParent=parent&qChild=child&qGrandchild=grandchild';
+
+ var formatted = m3.format(params);
+ expect(formatted).toBe(url);
+ expect(m3.exec(url.split('?')[0], params)).toEqualData(params);
+ })
});
describe(".append()", function() {
|
test(urlMatcher): Add failing test for #<I> improper parent/child query params formatting
|
ui-router_angular
|
train
|
js
|
d15584229dbf765b3f2e93bfdea03786650a73b4
|
diff --git a/lib/tunnel.js b/lib/tunnel.js
index <HASH>..<HASH> 100644
--- a/lib/tunnel.js
+++ b/lib/tunnel.js
@@ -294,7 +294,7 @@ function tunnelProxy(server, proxy) {
if (reqEmitter) {
responsed = true;
data.responseTime = data.endTime = Date.now();
- data.rawHeaderNames = rawHeaderNames;
+ reqData.rawHeaderNames = rawHeaderNames;
resData.statusCode = code || 200;
resData.headers = resHeaders;
reqEmitter.emit('response', data);
|
refactor: Tunnel proxy headers
|
avwo_whistle
|
train
|
js
|
77d6dd91fcc6fcc8f4da45621030572842e87f95
|
diff --git a/packages/hover-react/src/index.js b/packages/hover-react/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/hover-react/src/index.js
+++ b/packages/hover-react/src/index.js
@@ -33,13 +33,14 @@ const Wrapper = styled.span`
}
`
-export default (LinkComponent, microlinkProps) => ({ url, ...props }) => {
- return (
- <Wrapper>
- <LinkComponent {...props} />
- <PopOver className='microlink_hover'>
- <Microlink url={url || props.href} {...microlinkProps} {...props} />
- </PopOver>
- </Wrapper>
- )
-}
+export const withHover = ({ url, LinkComponent = styled('a')``, ...props }) => (
+ <Wrapper>
+ <LinkComponent {...props} />
+ <PopOver className='microlink_hover'>
+ <Microlink url={url || props.href} {...props} />
+ </PopOver>
+ </Wrapper>
+)
+
+export default (LinkComponent, microlinkProps) => props =>
+ withHover({ LinkComponent, ...microlinkProps, ...props })
|
refactor: expose internal decorator
|
microlinkhq_sdk
|
train
|
js
|
9ee519394ddecd7a5434fede9ea31b6e327a8e0a
|
diff --git a/build/post-commit.js b/build/post-commit.js
index <HASH>..<HASH> 100644
--- a/build/post-commit.js
+++ b/build/post-commit.js
@@ -60,13 +60,13 @@ function documentPath(toDoc) {
}
jsdoc2md.render({
files: [toDoc]
- }).then((docs)=>{
- fs.writeFile(dest.path, docs, 'utf8', (err2)=>{
+ }).then((docs) => {
+ fs.writeFile(dest.path, docs, 'utf8', (err2) => {
if (err) {
return reject(err2);
}
- resolve(dest.path);
- })
+ return resolve(dest.path);
+ });
});
});
});
@@ -104,7 +104,6 @@ function removeStale(file) {
}
function processFile(file) {
- console.log(file);
return documentPath(file).then((dest) => {
return verifyDocument(dest);
}, (err) => {
|
chore: update build to pass lint
|
SockDrawer_SockBot
|
train
|
js
|
c2e315d364aeb99076ba07cfb9796e91e6d5b31c
|
diff --git a/packages/blueprint-gatekeeper-cli/lib/GatekeeperClient.js b/packages/blueprint-gatekeeper-cli/lib/GatekeeperClient.js
index <HASH>..<HASH> 100644
--- a/packages/blueprint-gatekeeper-cli/lib/GatekeeperClient.js
+++ b/packages/blueprint-gatekeeper-cli/lib/GatekeeperClient.js
@@ -60,9 +60,8 @@ function newInstance (opts, callback) {
if (err)
return callback (err);
- if (res.statusCode !== 200) {
+ if (res.statusCode !== 200)
return callback (new Error (body));
- }
let token = body.access_token;
let client = new GatekeeperClient (opts, token);
@@ -155,7 +154,7 @@ GatekeeperClient.prototype.deleteAccount = function (accountId, callback) {
* @returns {*}
*/
GatekeeperClient.prototype.getCompleteUrl = function (relativePath) {
- return this.baseUri + '/v1' + relativePath;
+ return `${this.baseUri}${relativePath}`;
};
/**
|
fix: resolved remaining issue with computing full path
|
onehilltech_blueprint
|
train
|
js
|
26383dd21c7cb2ee53578fc966fe406805bcefa4
|
diff --git a/packages/select/src/ResourceSelect.js b/packages/select/src/ResourceSelect.js
index <HASH>..<HASH> 100644
--- a/packages/select/src/ResourceSelect.js
+++ b/packages/select/src/ResourceSelect.js
@@ -82,12 +82,12 @@ const ResourceSelect = ({
if (typeof rest.parameters === 'function') {
data = {
...data,
- ...data.variables(data.variables),
+ ...rest.parameters(data.variables),
};
} else {
data = {
...data,
- ...data.variables,
+ ...rest.parameters,
};
}
@@ -121,7 +121,7 @@ const ResourceSelect = ({
if (typeof rest.parameters === 'function') {
data = {
...data,
- ...data.variables(data.variables),
+ ...rest.parameters(data.variables),
};
}
} else {
|
refactor(select): adjust options for graphql
|
Availity_availity-react
|
train
|
js
|
24afbb9f7498556d4ef8f66fa1165f52ab269889
|
diff --git a/core/src/elements/ons-range.js b/core/src/elements/ons-range.js
index <HASH>..<HASH> 100644
--- a/core/src/elements/ons-range.js
+++ b/core/src/elements/ons-range.js
@@ -38,8 +38,8 @@ class MaterialInputElement extends BaseElement {
createdCallback() {
if (!this.hasAttribute('_compiled')) {
+ ons._prepareAutoStyling(this);
this._compile();
- ModifierUtil.initModifier(this, scheme);
this.setAttribute('_compiled', '');
}
@@ -53,6 +53,8 @@ class MaterialInputElement extends BaseElement {
<input type="range" class="range">
<div class="range__left"></div>
`;
+
+ ModifierUtil.initModifier(this, scheme);
}
_onChange() {
|
feat(ons-range): Automatic Styling.
|
OnsenUI_OnsenUI
|
train
|
js
|
799e391662a9039f238a2283171cb6b83ba4d151
|
diff --git a/.jsdoc.js b/.jsdoc.js
index <HASH>..<HASH> 100644
--- a/.jsdoc.js
+++ b/.jsdoc.js
@@ -41,5 +41,8 @@ module.exports = {
sourceFiles: false,
systemName: 'googleapis',
theme: 'lumen'
+ },
+ markdown: {
+ idInHeadings: true
}
};
|
fix(docs): make anchors work in jsdoc (#<I>)
|
googleapis_google-api-nodejs-client
|
train
|
js
|
fb37f7365e888465d84fca304ca83360ddbae6c3
|
diff --git a/src/CredentialsWrapper.php b/src/CredentialsWrapper.php
index <HASH>..<HASH> 100644
--- a/src/CredentialsWrapper.php
+++ b/src/CredentialsWrapper.php
@@ -193,7 +193,7 @@ class CredentialsWrapper
* @param string $audience optional audience for self-signed JWTs.
* @return callable Callable function that returns an authorization header.
*/
- public function getAuthorizationHeaderCallback(string $audience = null)
+ public function getAuthorizationHeaderCallback($audience = null)
{
$credentialsFetcher = $this->credentialsFetcher;
$authHttpHandler = $this->authHttpHandler;
|
fix: remove typehint from extended method (#<I>)
|
googleapis_gax-php
|
train
|
php
|
699c1b1ae60a76d18be7c44cef714cfd72d81bfc
|
diff --git a/__tests__/corner-cases.js b/__tests__/corner-cases.js
index <HASH>..<HASH> 100644
--- a/__tests__/corner-cases.js
+++ b/__tests__/corner-cases.js
@@ -204,3 +204,7 @@ test('eemeli/yaml#32', () => {
expect(YAML.parse('[ 123, ? ]')).toEqual([123, { '': null }])
expect(YAML.parse('[ 123, ? 456 ]')).toEqual([123, { 456: null }])
})
+
+test('eemeli/yaml#34', () => {
+ expect(YAML.parse('|')).toEqual('')
+})
diff --git a/src/Document.js b/src/Document.js
index <HASH>..<HASH> 100644
--- a/src/Document.js
+++ b/src/Document.js
@@ -107,7 +107,7 @@ export default class Document {
const comments = { before: [], after: [] }
const contentNodes = []
contents.forEach(node => {
- if (node.valueRange && !node.valueRange.isEmpty()) {
+ if (node.valueRange) {
if (contentNodes.length === 1) {
const msg = 'Document is not valid YAML (bad indentation?)'
this.errors.push(new YAMLSyntaxError(node, msg))
|
fix: empty blockValue as empty string (#<I>)
|
eemeli_yaml
|
train
|
js,js
|
d81a544c30ba51a2221af71ef191cf06260386d6
|
diff --git a/build.js b/build.js
index <HASH>..<HASH> 100644
--- a/build.js
+++ b/build.js
@@ -21,7 +21,7 @@ module.exports = {
paths: {
hbs: path.resolve(__dirname, 'index.hbs'),
less: path.resolve(__dirname, 'index.less'),
- js: path.resolve(__dirname, 'index.js')
+ js: [path.resolve(__dirname, 'index.js')]
},
hbs: {},
less: {append: ''},
|
fix(entries): workaround for _.merge behavior that treats strings like arrays rather than scalars
|
dbkaplun_jsonresume-theme-briefstrap
|
train
|
js
|
570d2b59e292d1ba9011794345eebca1411fcf74
|
diff --git a/test/test_bounds.js b/test/test_bounds.js
index <HASH>..<HASH> 100644
--- a/test/test_bounds.js
+++ b/test/test_bounds.js
@@ -483,6 +483,14 @@ describe('BoundingBox', function() {
test
)
+ test = new BoundingBox(bounds7)
+ test.extend(bounds9)
+
+ assert.deepEqual(
+ { minlon: 178, minlat: 50, maxlon: -179, maxlat: 65 },
+ test
+ )
+
done()
})
|
test: test extend() with bounds near lon<I>
|
plepe_boundingbox
|
train
|
js
|
d6906b525e455e10aa6b7523c292dcfdb6bccfc1
|
diff --git a/tests/test_units.py b/tests/test_units.py
index <HASH>..<HASH> 100644
--- a/tests/test_units.py
+++ b/tests/test_units.py
@@ -105,6 +105,9 @@ class TestUnitConversion:
u = units2pint("%")
assert str(u) == "percent"
+ u = units2pint("1")
+ assert str(u) == "dimensionless"
+
def test_pint_multiply(self, pr_series):
a = pr_series([1, 2, 3])
out = pint_multiply(a, 1 * units.days)
diff --git a/xclim/core/units.py b/xclim/core/units.py
index <HASH>..<HASH> 100644
--- a/xclim/core/units.py
+++ b/xclim/core/units.py
@@ -143,6 +143,9 @@ def units2pint(value: Union[xr.DataArray, str]) -> pint.unit.UnitDefinition:
raise NotImplementedError(f"Value of type `{type(value)}` not supported.")
unit = unit.replace("%", "pct")
+ if unit == "1":
+ unit = ""
+
try: # Pint compatible
return units.parse_expression(unit).units
except (
|
feat: support units of 1 (#<I>)
|
Ouranosinc_xclim
|
train
|
py,py
|
145c552d1ace3303607fe4d204106fe9437e24a0
|
diff --git a/packages/webpack-cli/lib/utils/Compiler.js b/packages/webpack-cli/lib/utils/Compiler.js
index <HASH>..<HASH> 100644
--- a/packages/webpack-cli/lib/utils/Compiler.js
+++ b/packages/webpack-cli/lib/utils/Compiler.js
@@ -59,15 +59,15 @@ class Compiler {
return compilation.name ? compilation.name : '';
};
if (outputOptions.watch) {
- compilation.hooks.watchRun.tap('WebpackInfo', (compilation) => {
+ compilation.hooks.watchRun.tap('WebpackCLI', (compilation) => {
logger.info(`Compilation ${resolveCompilationName(compilation)} starting…`);
});
} else {
- compilation.hooks.beforeRun.tap('WebpackInfo', (compilation) => {
+ compilation.hooks.beforeRun.tap('WebpackCLI', (compilation) => {
logger.info(`Compilation ${resolveCompilationName(compilation)} starting…`);
});
}
- compilation.hooks.done.tap('WebpackInfo', (compilation) => {
+ compilation.hooks.done.tap('WebpackCLI', (compilation) => {
logger.info(`Compilation ${resolveCompilationName(compilation)} finished`);
});
}
|
fix: consistent webpack plugin name (#<I>)
|
webpack_webpack-cli
|
train
|
js
|
dce82cb71b86867c45a8ebad203d079aa1d9923d
|
diff --git a/src/Leevel/Validate/Validator.php b/src/Leevel/Validate/Validator.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Validate/Validator.php
+++ b/src/Leevel/Validate/Validator.php
@@ -179,7 +179,7 @@ class Validator implements IValidator
$param[] = $args;
unset($args);
- if (class_exists($fn = __NAMESPACE__.'\\Helper\\validate_'.un_camelize($method))) {
+ if (class_exists($fn = __NAMESPACE__.'\\Helper\\'.un_camelize($method))) {
array_shift($param);
return $fn(...$param);
@@ -805,7 +805,7 @@ class Validator implements IValidator
return;
}
- if (class_exists($fn = __NAMESPACE__.'\\Helper\\validate_'.$rule)) {
+ if (class_exists($fn = __NAMESPACE__.'\\Helper\\'.$rule)) {
if (!$fn($fieldValue, $param, $this, $field)) {
$this->addFailure($field, $rule, $param);
|
fix(validate): fix validate rule
|
hunzhiwange_framework
|
train
|
php
|
8bebf9cbebb23029240f5349238734ade886f26a
|
diff --git a/v1/coordinator/statement_executor.go b/v1/coordinator/statement_executor.go
index <HASH>..<HASH> 100644
--- a/v1/coordinator/statement_executor.go
+++ b/v1/coordinator/statement_executor.go
@@ -439,7 +439,7 @@ func (e *StatementExecutor) executeShowRetentionPoliciesStatement(ctx context.Co
}
return nil, err
}
- row.Values = append(row.Values, []interface{}{dbrp.RetentionPolicy, "", "", "", dbrp.Default})
+ row.Values = append(row.Values, []interface{}{dbrp.RetentionPolicy, "0s", "168h0m0s", 1, dbrp.Default})
}
return []*models.Row{row}, nil
|
fix(coordinator): Return correct data types for stand-in RP values
Future work is required to ensure the retention policy information
is appropriately retrieved from the bucket service and / or meta client
|
influxdata_influxdb
|
train
|
go
|
38cefdd548ed222457948f12a5d4a682dca9a69e
|
diff --git a/src/providers/42.js b/src/providers/42.js
index <HASH>..<HASH> 100644
--- a/src/providers/42.js
+++ b/src/providers/42.js
@@ -4,7 +4,10 @@ export default function FortyTwo(options) {
id: "42-school",
name: "42 School",
type: "oauth",
- authorization: "https://api.intra.42.fr/oauth/authorize",
+ authorization: {
+ url: "https://api.intra.42.fr/oauth/authorize",
+ params: { scope: "public" },
+ },
token: "https://api.intra.42.fr/oauth/token",
userinfo: "https://api.intra.42.fr/v2/me",
profile(profile) {
|
fix(providers): set <I> default scope (#<I>)
With no scope defined, it sets `openid` by default, which is an invalid <I> scope.
|
iaincollins_next-auth
|
train
|
js
|
d573c05c35e69f899bf54d45fc348bd80784840a
|
diff --git a/tests/gui/test_backward_compatibility_storage.py b/tests/gui/test_backward_compatibility_storage.py
index <HASH>..<HASH> 100644
--- a/tests/gui/test_backward_compatibility_storage.py
+++ b/tests/gui/test_backward_compatibility_storage.py
@@ -62,6 +62,10 @@ def get_backward_compatibility_state_machines_path():
return path
+@pytest.mark.parametrize('gui', [
+ {"core_config": {'LOAD_SM_WITH_CHECKS:': True}},
+ {"core_config": {'LOAD_SM_WITH_CHECKS:': False}}
+], indirect=True, ids=["load with checks", "load without checks"])
def test_backward_compatibility_storage(gui):
"""This test ensures that old state machines storage formats can still be opened with the current RAFCON version"""
path = get_backward_compatibility_state_machines_path()
@@ -79,7 +83,6 @@ def test_backward_compatibility_storage(gui):
run_backward_compatibility_state_machines(gui, all_versions_path)
-
def test_unchanged_storage_format(caplog):
"""This test ensures that the state machine storage format does not change in patch releases"""
|
feat(test_backward_compatibility_storage): test loading sm with and without checks
|
DLR-RM_RAFCON
|
train
|
py
|
5b0054b1b8800e0ccdcf0d7880edb71f1ab8c28a
|
diff --git a/packages/source-contentful/index.js b/packages/source-contentful/index.js
index <HASH>..<HASH> 100644
--- a/packages/source-contentful/index.js
+++ b/packages/source-contentful/index.js
@@ -74,7 +74,7 @@ class ContentfulSource {
if (Array.isArray(value)) {
fields[key] = value.map(item =>
- typeof item === 'object' && typeof value.sys !== 'undefined'
+ typeof item === 'object' && typeof item.sys !== 'undefined'
? this.createReferenceField(item)
: item
)
|
fix(contentful): prevent infinite loop for references (#<I>)
|
gridsome_gridsome
|
train
|
js
|
f04ebaab284234933e49256e4debcffede8e1845
|
diff --git a/payloads_test.go b/payloads_test.go
index <HASH>..<HASH> 100644
--- a/payloads_test.go
+++ b/payloads_test.go
@@ -4588,7 +4588,7 @@ const listV3AppsPayloadPage2 = `{
]
}`
-const listV3ServiceInstances = `{
+const listV3ServiceInstancesPayload = `{
"pagination": {
"total_results": 1,
"total_pages": 1,
diff --git a/v3service_instances_test.go b/v3service_instances_test.go
index <HASH>..<HASH> 100644
--- a/v3service_instances_test.go
+++ b/v3service_instances_test.go
@@ -9,7 +9,7 @@ import (
func TestListV3ServiceInstancesByQuery(t *testing.T) {
Convey("List V3 Service Instances", t, func() {
- setup(MockRoute{"GET", "/v3/service_instances", []string{listV3ServiceInstances}, "", http.StatusOK, "", nil}, t)
+ setup(MockRoute{"GET", "/v3/service_instances", []string{listV3ServiceInstancesPayload}, "", http.StatusOK, "", nil}, t)
defer teardown()
c := &Config{ApiAddress: server.URL, Token: "foobar"}
|
refactor: adapt payload const name to naming convention
|
cloudfoundry-community_go-cfclient
|
train
|
go,go
|
88587fde8fc92137660383c401250e492716c396
|
diff --git a/compose/compose.go b/compose/compose.go
index <HASH>..<HASH> 100644
--- a/compose/compose.go
+++ b/compose/compose.go
@@ -117,6 +117,7 @@ func ComposeAllEnabled(config *Config, storage interface{}, secret []byte, key *
OpenIDConnectRefreshFactory,
OAuth2TokenIntrospectionFactory,
+ OAuth2TokenRevocationFactory,
OAuth2PKCEFactory,
)
|
fix: add missing OAuth2TokenRevocationFactory to ComposeAllEnabled (#<I>)
|
ory_fosite
|
train
|
go
|
f602c9d97d34cf3986906ed6ce74f3035d691912
|
diff --git a/gulpfile.js/tasks/release.js b/gulpfile.js/tasks/release.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js/tasks/release.js
+++ b/gulpfile.js/tasks/release.js
@@ -111,6 +111,8 @@ module.exports = function(gulp, config, LL, args) { // eslint-disable-line no-u
* gulp release:bump [options]
*
* options:
+ * -b --break increase major version
+ * -f --feature increase minor version
* -t --type [major, minor, patch] Semver 2.0. default to patch
* -v --version VERSION Bump to a specific version
*/
@@ -124,11 +126,18 @@ module.exports = function(gulp, config, LL, args) { // eslint-disable-line no-u
};
var version = args.v || args.version;
- var type = args.t || args.type || 'patch';
if (version) {
bumpOpts.version = version;
} else {
+ var type;
+ if (args.b || args.break) {
+ type = 'major';
+ } else if (args.f || args.feature) {
+ type = 'minor';
+ } else {
+ type = args.t || args.type || 'patch';
+ }
bumpOpts.type = type;
}
|
chore(gulp): update release:bump
|
adoyle-h_wodule
|
train
|
js
|
b146b49f465419b94c5b778e3e82fc7d1e8832be
|
diff --git a/lib/liquid/strainer.rb b/lib/liquid/strainer.rb
index <HASH>..<HASH> 100644
--- a/lib/liquid/strainer.rb
+++ b/lib/liquid/strainer.rb
@@ -39,6 +39,7 @@ module Liquid
end
def self.global_filter(filter)
+ @@strainer_class_cache.clear
@@global_strainer.add_filter(filter)
end
diff --git a/test/unit/strainer_unit_test.rb b/test/unit/strainer_unit_test.rb
index <HASH>..<HASH> 100644
--- a/test/unit/strainer_unit_test.rb
+++ b/test/unit/strainer_unit_test.rb
@@ -133,4 +133,16 @@ class StrainerUnitTest < Minitest::Test
strainer.class.add_filter(PublicMethodOverrideFilter)
assert strainer.class.filter_methods.include?('public_filter')
end
+
+ module LateAddedFilter
+ def late_added_filter(input)
+ "filtered"
+ end
+ end
+
+ def test_global_filter_clears_cache
+ assert_equal 'input', Strainer.create(nil).invoke('late_added_filter', 'input')
+ Strainer.global_filter(LateAddedFilter)
+ assert_equal 'filtered', Strainer.create(nil).invoke('late_added_filter', 'input')
+ end
end # StrainerTest
|
fix: Clear the strainer cache when a global filter is added (#<I>)
|
Shopify_liquid
|
train
|
rb,rb
|
939bb63a7b7451cd3afb0edc29f54161ba16d432
|
diff --git a/src/CornerstoneViewport/CornerstoneViewport.js b/src/CornerstoneViewport/CornerstoneViewport.js
index <HASH>..<HASH> 100644
--- a/src/CornerstoneViewport/CornerstoneViewport.js
+++ b/src/CornerstoneViewport/CornerstoneViewport.js
@@ -133,6 +133,8 @@ class CornerstoneViewport extends Component {
cornerstoneOptions,
imageIds,
resizeThrottleMs,
+ isPlaying,
+ frameRate,
} = this.props;
const { imageIdIndex } = this.state;
const imageId = imageIds[imageIdIndex];
@@ -174,6 +176,11 @@ class CornerstoneViewport extends Component {
_enableStackPrefetching(this.element);
}
+ if (isPlaying) {
+ const validFrameRate = Math.max(frameRate, 1);
+ cornerstoneTools.playClip(this.element, validFrameRate);
+ }
+
_addAndConfigureInitialToolsForElement(tools, this.element);
_trySetActiveTool(this.element, this.props.activeTool);
this.setState({ isLoading: false });
|
fix(is-playing): CornerstoneViewport now plays the clip on mounting if isPlaying is true (#<I>)
|
cornerstonejs_react-cornerstone-viewport
|
train
|
js
|
5fb0d87e9b7ee247e79ed6020e0c49ee3695ba27
|
diff --git a/lib/mixpanel/tracker/middleware.rb b/lib/mixpanel/tracker/middleware.rb
index <HASH>..<HASH> 100644
--- a/lib/mixpanel/tracker/middleware.rb
+++ b/lib/mixpanel/tracker/middleware.rb
@@ -17,9 +17,11 @@ module Mixpanel
@status, @headers, @response = @app.call(env)
- update_response!
- update_content_length!
- delete_event_queue!
+ if is_trackable_response?
+ update_response!
+ update_content_length!
+ delete_event_queue!
+ end
[@status, @headers, @response]
end
@@ -64,6 +66,10 @@ module Mixpanel
@headers["Content-Type"].include?("text/javascript") if @headers.has_key?("Content-Type")
end
+ def is_trackable_response?
+ is_html_response? || is_javascript_response?
+ end
+
def render_mixpanel_scripts
if @options[:async]
<<-EOT
|
fix: send_file returning empty files. see issue #<I>
|
zevarito_mixpanel
|
train
|
rb
|
91e90a0e234e39dd228635ca8512c08e05c51f2d
|
diff --git a/tests/caniuse-agent-data.test.js b/tests/caniuse-agent-data.test.js
index <HASH>..<HASH> 100644
--- a/tests/caniuse-agent-data.test.js
+++ b/tests/caniuse-agent-data.test.js
@@ -1,6 +1,6 @@
var agentData = require("../src/caniuse-agent-data");
-test("browsers tracked are the same 18 as caniuse", () => {
+test("browsers tracked are the same 19 as caniuse", () => {
const browsers = Object.keys(agentData);
- expect(browsers.length).toBe(18);
+ expect(browsers.length).toBe(19);
});
|
fix(jest): Update number of tracked browsers
|
browserslist_browserslist-ga
|
train
|
js
|
8fe4a3ce8e1ad2317f74d0e6c43ab748be6a6c12
|
diff --git a/packages/pob/lib/generators/pob/index.js b/packages/pob/lib/generators/pob/index.js
index <HASH>..<HASH> 100644
--- a/packages/pob/lib/generators/pob/index.js
+++ b/packages/pob/lib/generators/pob/index.js
@@ -115,7 +115,7 @@ module.exports = class PobBaseGenerator extends Generator {
this.options.license &&
!this.fs.exists(this.destinationPath('LICENSE'))
) {
- const pkg = this.fs.readJSON(this.destinationPath('package.json'));
+ const pkg = this.fs.readJSON(this.destinationPath('package.json'), {});
const author = packageUtils.parsePkgAuthor(pkg);
this.composeWith(require.resolve('generator-license/app'), {
name: author.name,
|
fix: author error when package.json does not exists
|
christophehurpeau_pob-lerna
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.