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 |
|---|---|---|---|---|---|
c6a239763d3251591223d90b84e2d7e27d8f16c2 | diff --git a/lib/gofer.js b/lib/gofer.js
index <HASH>..<HASH> 100644
--- a/lib/gofer.js
+++ b/lib/gofer.js
@@ -96,7 +96,7 @@ function preventComplexMerge(objValue, srcValue) {
return srcValue || objValue;
}
- return mergeWith(objValue, srcValue, preventComplexMerge);
+ return mergeWith({}, objValue, srcValue, preventComplexMerge);
}
Gofer.prototype._prepareOptions = | fix: Prevent mutation of defaults | groupon_gofer | train | js |
a9cf5f952e18e528dc977bc7938b22a8ed5a2c90 | diff --git a/tests/json-fixtures/test_transactions.py b/tests/json-fixtures/test_transactions.py
index <HASH>..<HASH> 100644
--- a/tests/json-fixtures/test_transactions.py
+++ b/tests/json-fixtures/test_transactions.py
@@ -34,6 +34,9 @@ from eth.vm.forks.constantinople.transactions import (
from eth.vm.forks.petersburg.transactions import (
PetersburgTransaction
)
+from eth.vm.forks.istanbul.transactions import (
+ IstanbulTransaction
+)
from eth_typing.enums import (
ForkName
@@ -101,6 +104,8 @@ def fixture_transaction_class(fixture_data):
return ConstantinopleTransaction
elif fork_name == "Petersburg":
return PetersburgTransaction
+ elif fork_name == ForkName.Istanbul:
+ return IstanbulTransaction
elif fork_name == ForkName.Metropolis:
pytest.skip("Metropolis Transaction class has not been implemented")
else: | test: Add IstanbulTransaction to json tests | ethereum_py-evm | train | py |
a82c42125af16d146c1a9f15672ab6d8be1f954e | diff --git a/test/webdriver/basic.js b/test/webdriver/basic.js
index <HASH>..<HASH> 100644
--- a/test/webdriver/basic.js
+++ b/test/webdriver/basic.js
@@ -80,7 +80,6 @@ browsers.browsers.forEach(function(browser) {
await driver.findElement(By.id('content_video')).click();
let log = driver.findElement(By.id('log'));
await driver.wait(until.elementTextContains(log, 'start'), 10000);
- await driver.sleep(6000);
await driver.switchTo().frame(driver.findElement(
By.css('#content_video_ima-ad-container > div:nth-child(1) > iframe')));
let skipButton = await driver.findElement( | test: Remove unnecessary sleep in test. (#<I>) | googleads_videojs-ima | train | js |
cd9182618c768ccd2375e187fd85396853bd10de | diff --git a/lib/selenium-webdriver/webdriver.js b/lib/selenium-webdriver/webdriver.js
index <HASH>..<HASH> 100644
--- a/lib/selenium-webdriver/webdriver.js
+++ b/lib/selenium-webdriver/webdriver.js
@@ -250,13 +250,16 @@ webdriver.WebDriver.prototype.executeAsyncScript = (script, var_args) => {};
webdriver.WebDriver.prototype.call = function(fn, opt_scope, var_args) {};
/**
- * Schedules a command to wait for a condition to hold.
+ * Schedules a command to wait for a condition to hold or {@link
+ * webdriver.promise.Promise promise} to be resolved.
*
- * This function may be used to block the command flow on the resolution
- * of a {@link webdriver.promise.Promise promise}. When given a promise, the
- * command will simply wait for its resolution before completing. A timeout may
- * be provided to fail the command if the promise does not resolve before the
- * timeout expires.
+ * This function blocks WebDriver's control flow, not the javascript runtime.
+ * It will only delay future webdriver commands from being executed (e.g. it
+ * will cause Protractor to wait before sending future commands to the selenium
+ * server), and only when the webdriver control flow is enabled.
+ *
+ * This function returnes a promise, which can be used if you need to block
+ * javascript execution and not just the control flow.
*
* See also {@link ExpectedConditions}
* | chore(docs): cleaned up documentation for `browser.wait` (#<I>)
The existing documentation was redundant and confusing.
Closes <URL> | angular_protractor | train | js |
4640c7e6f8499eeebee287e2fee0ac8ec8126d80 | diff --git a/src/View/Helper/CrudViewHelper.php b/src/View/Helper/CrudViewHelper.php
index <HASH>..<HASH> 100644
--- a/src/View/Helper/CrudViewHelper.php
+++ b/src/View/Helper/CrudViewHelper.php
@@ -57,7 +57,7 @@ class CrudViewHelper extends Helper
* @param string $field The field to process.
* @param Entity $data The entity data.
* @param array $options Processing options.
- * @return string|null|array|bool|integer
+ * @return string|null|array|bool|int
*/
public function process($field, Entity $data, array $options = [])
{ | fix: switch from integer to int as return type | FriendsOfCake_crud-view | train | php |
f90340601d68e018125ea9a2b181ddc244d8c12a | diff --git a/packages/node_modules/@webex/plugin-authorization-node/src/index.js b/packages/node_modules/@webex/plugin-authorization-node/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/plugin-authorization-node/src/index.js
+++ b/packages/node_modules/@webex/plugin-authorization-node/src/index.js
@@ -2,8 +2,9 @@
* Copyright (c) 2015-2019 Cisco Systems, Inc. See LICENSE file.
*/
-import '@webex/internal-plugin-wdm';
+import '@webex/internal-plugin-device';
import {registerPlugin} from '@webex/webex-core';
+
import Authorization from './authorization';
import config from './config'; | refactor(plugin-authorization-node): migrate to device
Migrate from internal-plugin-wdm to internal-plugin-device. | webex_spark-js-sdk | train | js |
ab04da1c04a16b9861351b0cb0c2df5020b845f4 | diff --git a/deisctl/deisctl.go b/deisctl/deisctl.go
index <HASH>..<HASH> 100644
--- a/deisctl/deisctl.go
+++ b/deisctl/deisctl.go
@@ -39,7 +39,8 @@ Commands, use "deisctl help <command>" to learn more:
journal print the log output of a component
config set platform or component values
refresh-units refresh unit files from GitHub
- ssh open an interacive shell on a machine in the cluster
+ ssh open an interactive shell on a machine in the cluster
+ dock open an interactive shell on a container in the cluster
help show the help screen for a command
Options: | fix(deisctl): add dock to the list of commands | deis_deis | train | go |
f52dcb637fd9a11be706f26e29c4424d011822d1 | diff --git a/agent/agent.go b/agent/agent.go
index <HASH>..<HASH> 100644
--- a/agent/agent.go
+++ b/agent/agent.go
@@ -177,7 +177,7 @@ func (a *Agent) ReportJobState(jobName string, jobState *job.JobState) {
// Submit all possible bids for unresolved offers
func (a *Agent) BidForPossibleJobs() {
a.state.Lock()
- offers := a.state.GetUnbadeOffers()
+ offers := a.state.GetOffersWithoutBids()
a.state.Unlock()
log.V(2).Infof("Checking %d unbade offers", len(offers))
diff --git a/agent/state.go b/agent/state.go
index <HASH>..<HASH> 100644
--- a/agent/state.go
+++ b/agent/state.go
@@ -136,7 +136,9 @@ func (self *AgentState) GetBadeOffers() []job.JobOffer {
return offers
}
-func (self *AgentState) GetUnbadeOffers() []job.JobOffer {
+// GetOffersWithoutBids returns all tracked JobOffers that have
+// no corresponding JobBid tracked in the same AgentState object.
+func (self *AgentState) GetOffersWithoutBids() []job.JobOffer {
offers := make([]job.JobOffer, 0)
for _, offer := range self.offers {
if !self.HasBid(offer.Job.Name) { | refactor(AgentState): Rename GetUnbadeOffers -> GetOffersWithoutBids | coreos_fleet | train | go,go |
dafb262d1ad80a0112fb091fb4813e2688013ffc | diff --git a/app/selectors/editor.js b/app/selectors/editor.js
index <HASH>..<HASH> 100644
--- a/app/selectors/editor.js
+++ b/app/selectors/editor.js
@@ -48,8 +48,13 @@ export const isNodeSelected = (selection, id) => isSelected(selection, ENTITY.NO
export const isLinkSelected = (selection, id) => isSelected(selection, ENTITY.LINK, id);
export const hasSelection = (state) => (
- state.editor.selection.length > 0 ||
- state.editor.linkingPin !== null
+ (
+ state.editor.selection &&
+ state.editor.selection.length > 0
+ ) || (
+ state.editor.linkingPin &&
+ state.editor.linkingPin !== null
+ )
);
export const getLinkingPin = (state) => R.pipe( | fix(selector): add additional checks into selector hasSelection to make sure that editor has props we want to read | xodio_xod | train | js |
24cd9c5e0c837b3b97b315e5b77544642b02ef00 | diff --git a/lib/raven/event.rb b/lib/raven/event.rb
index <HASH>..<HASH> 100644
--- a/lib/raven/event.rb
+++ b/lib/raven/event.rb
@@ -59,10 +59,7 @@ module Raven
return unless configuration.exception_class_allowed?(exc)
new(options) do |evt|
- evt.message = "#{exc.class}: #{exc.message}"
-
evt.add_exception_interface(exc)
-
yield evt if block
end
end | feat: remove message duplicate (#<I>)
We currently send both message and exception. That causes data to render pretty ugly: <URL> | getsentry_raven-ruby | train | rb |
c7a35e1b0175fa59eb8b9d094b8eb7ad0e102a83 | diff --git a/lib/components/state-resources/remove-docs-by-doc-id/index.js b/lib/components/state-resources/remove-docs-by-doc-id/index.js
index <HASH>..<HASH> 100644
--- a/lib/components/state-resources/remove-docs-by-doc-id/index.js
+++ b/lib/components/state-resources/remove-docs-by-doc-id/index.js
@@ -18,9 +18,9 @@ class RemoveDocsByDocId {
const query = docIds.map(docId => `docId:${docId}`)
- debug(`Deleting docs where ${query.join(' AND ')}`)
+ debug(`Deleting docs where ${query.join(' OR ')}`)
- this.solrClient.deleteByQuery(query.join(' AND '), (err, obj) => {
+ this.solrClient.deleteByQuery(query.join(' OR '), (err, obj) => {
if (err) {
return context.sendTaskFailure({ error: 'RemoveDocsByDocIdFail', cause: err })
} | fix: remove docs by id, or rather than and | wmfs_tymly-solr-plugin | train | js |
9a03116899b78b9d5c191fe3fad224c9b7ac7ddb | diff --git a/lib/cli/resolve-input.js b/lib/cli/resolve-input.js
index <HASH>..<HASH> 100644
--- a/lib/cli/resolve-input.js
+++ b/lib/cli/resolve-input.js
@@ -62,7 +62,7 @@ module.exports = memoizee((commandsSchema = require('./commands-schema')) => {
}
// Unlikely scenario, where after applying the command schema different command resolves
// It can happen only in cases where e.g. for "sls deploy --force function -f foo"
- // we intially assume "deploy" command, while after applying "deploy" command schema it's
+ // we initially assume "deploy" command, while after applying "deploy" command schema it's
// actually a "deploy function" command that resolves
command = resolvedCommand;
commandSchema = commandsSchema.get(resolvedCommand); | chore: Fix typo in `resolve-input.js` (#<I>)
intially -> initially | serverless_serverless | train | js |
355334a6a53672394b343cba03939d878ffe7806 | diff --git a/src/InfoViz/Native/MutualInformationDiagram/index.js b/src/InfoViz/Native/MutualInformationDiagram/index.js
index <HASH>..<HASH> 100644
--- a/src/InfoViz/Native/MutualInformationDiagram/index.js
+++ b/src/InfoViz/Native/MutualInformationDiagram/index.js
@@ -1,4 +1,4 @@
-/* global document, window */
+/* global document */
import d3 from 'd3';
import style from 'PVWStyle/InfoVizNative/InformationDiagram.mcss';
@@ -143,7 +143,7 @@ function informationDiagram(publicAPI, model) {
}
};
- publicAPI.updateStatusBarText = (msg) => d3.select(model.container).select('input.status-bar-text').attr('value', msg);
+ publicAPI.updateStatusBarText = msg => d3.select(model.container).select('input.status-bar-text').attr('value', msg);
publicAPI.selectStatusBarText = () => {
// select text so user can press ctrl-c if desired. | fix(MutualInformationDiagram): Lint fixes to allow release build | Kitware_paraviewweb | train | js |
d57c42074f61688080bfeafbe3af9f9c08992a91 | diff --git a/src/main/java/io/fabric8/maven/docker/util/CredentialHelperClient.java b/src/main/java/io/fabric8/maven/docker/util/CredentialHelperClient.java
index <HASH>..<HASH> 100644
--- a/src/main/java/io/fabric8/maven/docker/util/CredentialHelperClient.java
+++ b/src/main/java/io/fabric8/maven/docker/util/CredentialHelperClient.java
@@ -38,10 +38,9 @@ public class CredentialHelperClient {
public AuthConfig getAuthConfig(String registryToLookup) throws MojoExecutionException {
try {
- final GetCommand getCommand = new GetCommand();
- JsonObject creds = getCommand.getCredentialNode(registryToLookup);
+ JsonObject creds = new GetCommand().getCredentialNode(registryToLookup);
if (creds == null) {
- creds = getCommand.getCredentialNode(EnvUtil.ensureRegistryHttpUrl(registryToLookup));
+ creds = new GetCommand().getCredentialNode(EnvUtil.ensureRegistryHttpUrl(registryToLookup));
}
return toAuthConfig(creds);
} catch (IOException e) { | fix: Don't reuse a GetCommand as its a one-shot action
Fixes #<I>. | fabric8io_docker-maven-plugin | train | java |
81715906ebe742cb86c888d2fe2c01b5ecd1be86 | diff --git a/lib/locators.js b/lib/locators.js
index <HASH>..<HASH> 100644
--- a/lib/locators.js
+++ b/lib/locators.js
@@ -354,7 +354,7 @@ ProtractorBy.prototype.repeater = function(repeatDescriptor) {
* </ul>
*
* @example
- * // Returns the DIV for the dog, but not cat.
+ * // Returns the li for the dog, but not cat.
* var dog = element(by.cssContainingText('.pet', 'Dog'));
*/
ProtractorBy.prototype.cssContainingText = function(cssSelector, searchText) { | chore(docs): Correct comment in locators.js
example is misleading as there is no li which returned by cssContainingText | angular_protractor | train | js |
dcf6624f5249de98021d31d52b31185ebabcdccd | diff --git a/webapps/ui/cockpit/plugins/base/app/views/processInstance/userTasksTable.js b/webapps/ui/cockpit/plugins/base/app/views/processInstance/userTasksTable.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/cockpit/plugins/base/app/views/processInstance/userTasksTable.js
+++ b/webapps/ui/cockpit/plugins/base/app/views/processInstance/userTasksTable.js
@@ -157,7 +157,7 @@ module.exports = function(ngModule) {
var userTask = editForm.context;
var copy = taskCopies[userTask.id];
var defaultParams = {id: userTask.id};
- var params = {userId : editForm.value};
+ var params = {userId : editForm.value || null};
TaskResource.setAssignee(defaultParams, params).$promise.then(
// success | fix(cockpit): set assignee to null when input is empty string
Related to CAM-<I> | camunda_camunda-bpm-platform | train | js |
2fa21166a99e1876c6adf3aa2da41999acf06143 | diff --git a/src/Form/FormElement/FormElement.php b/src/Form/FormElement/FormElement.php
index <HASH>..<HASH> 100644
--- a/src/Form/FormElement/FormElement.php
+++ b/src/Form/FormElement/FormElement.php
@@ -18,7 +18,7 @@ use vxPHP\Template\SimpleTemplate;
/**
* abstract base class for "simple" form elements
*
- * @version 0.12.0 2019-10-02
+ * @version 0.12.1 2020-08-11
* @author Gregor Kofler
*
*/
@@ -479,20 +479,16 @@ abstract class FormElement implements FormElementInterface {
return true;
}
- // handle a required checkboxes separately
+ // handle a required checkbox separately
- if(
- $this->required &&
- (
- (
- $this instanceof CheckboxElement &&
- !$this->getChecked()
- )
- ||
- empty($value)
- )
- ) {
- return false;
+ if($this->required) {
+ if ($this instanceof CheckboxElement) {
+ if (!$this->getChecked()) {
+ return false;
+ }
+ } else if ($value === '' || $value === null) {
+ return false;
+ }
}
// fail at the very first validator that does not validate | fix: FormElement::applyValidators() failed with required checkboxes which had no explicitly set value | Vectrex_vxPHP | train | php |
abb1cc28844c565ea7e4d80132f1a620e8b53443 | diff --git a/src/rendering.js b/src/rendering.js
index <HASH>..<HASH> 100644
--- a/src/rendering.js
+++ b/src/rendering.js
@@ -345,8 +345,8 @@ var Rendering = Class(Parent, function() {
*/
_buildHorizontalPath: function(nodeA, nodeB) {
const {dimensions, spacing} = this.properties.node;
- const distance = nodeB.x - nodeA.x + dimensions.width + spacing.vertical;
- const endPoint = distance - (this.properties.line.endMarker.height * this.properties.line.width);
+ const endPoint = nodeB.x - nodeA.x + dimensions.width + (this.properties.line.endMarker.width * this.properties.line.width);
+ const distance = endPoint + spacing.horizontal;
return (nodeA.y === nodeB.y)
? `M 0 0 h ${endPoint}` | fix: coordinates of an arrow to mixin | valerii-zinchenko_inheritance-diagram | train | js |
5d1b325b94363502bf8eb48af5e83b66599b0087 | diff --git a/app/jobs/bulk_create_media_job.rb b/app/jobs/bulk_create_media_job.rb
index <HASH>..<HASH> 100644
--- a/app/jobs/bulk_create_media_job.rb
+++ b/app/jobs/bulk_create_media_job.rb
@@ -54,6 +54,8 @@ class BulkCreateMediaJob < ApplicationJob
type: row_hash['Type (Media, Youtube)']
}
+ media_attributes = strip_attributes(media_attributes)
+
if row_hash['Type (Media, Youtube)'] == 'Media'
begin
media_attachment = zip_file.get_entry(row_hash['Filename'])
@@ -76,4 +78,11 @@ class BulkCreateMediaJob < ApplicationJob
@bulk_job.save!
end
+
+ def strip_attributes(attributes)
+ # Don't update nil attributes, but do clear out attributes with a value of 'N/A'
+ attributes.compact.transform_values do |attribute_value|
+ attribute_value == 'N/A' ? nil : attribute_value
+ end
+ end
end | feat: don't update Media records with nil CSV cell values during Bulk Upload, allow clearing of record values by specifying 'N/A' | cortex-cms_cortex | train | rb |
9b166f1121fa6c4b0957b08b4439f246ddc9f155 | diff --git a/system/HTTP/DownloadResponse.php b/system/HTTP/DownloadResponse.php
index <HASH>..<HASH> 100644
--- a/system/HTTP/DownloadResponse.php
+++ b/system/HTTP/DownloadResponse.php
@@ -38,6 +38,7 @@
use CodeIgniter\HTTP\Exceptions\HTTPException;
use BadMethodCallException;
use CodeIgniter\Files\File;
+use Config\Mimes;
class DownloadResponse extends Message implements ResponseInterface
{
@@ -412,11 +413,27 @@ class DownloadResponse extends Message implements ResponseInterface
$this->setHeader('Content-Disposition', $this->getContentDisponsition());
$this->setHeader('Expires-Disposition', '0');
$this->setHeader('Content-Transfer-Encoding', 'binary');
- $this->setHeader('Content-Length', $this->getContentLength());
+ $this->setHeader('Content-Length', (string)$this->getContentLength());
$this->noCache();
}
/**
+ * output donload file text.
+ *
+ * @return DownloadResponse
+ */
+ public function sendBody()
+ {
+ if ($this->binary !== null) {
+ return $this->sendBodyByBinary();
+ } elseif ($this->file !== null) {
+ return $this->sendBodyByFilePath();
+ }
+
+ throw new RuntimeException();
+ }
+
+ /**
* output download text by file.
*
* @return string | fix: Fixed problem that header was not set correctly. | codeigniter4_CodeIgniter4 | train | php |
19e7c29765732d49661b6644bdca1c9fc77660d4 | diff --git a/ui/src/mixins/virtual-scroll.js b/ui/src/mixins/virtual-scroll.js
index <HASH>..<HASH> 100644
--- a/ui/src/mixins/virtual-scroll.js
+++ b/ui/src/mixins/virtual-scroll.js
@@ -282,6 +282,11 @@ export default {
}
this.prevScrollStart = void 0
+ if (scrollDetails.scrollMaxSize <= 0) {
+ this.__setVirtualScrollSliceRange(scrollEl, scrollDetails, 0, 0)
+ return
+ }
+
this.__scrollViewSize !== scrollDetails.scrollViewSize && this.__setVirtualScrollSize(scrollDetails.scrollViewSize)
this.__updateVirtualScrollSizes(this.virtualScrollSliceRange.from) | fix(VirtualScroll): consider the case when the scrollEl has no height #<I> (#<I>)
* fix(VirtualScroll): consider the case when the scrollEl has no height #<I>
* Update virtual-scroll.js | quasarframework_quasar | train | js |
bd7fd0f7554b45c1b06c39de57e9b479b250711f | diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -399,7 +399,7 @@ class Libp2p extends EventEmitter {
* Called when libp2p has started and before it returns
* @private
*/
- _onDidStart () {
+ async _onDidStart () {
this._isStarted = true
this.connectionManager.start()
@@ -410,7 +410,7 @@ class Libp2p extends EventEmitter {
})
// Peer discovery
- this._setupPeerDiscovery()
+ await this._setupPeerDiscovery()
// Once we start, emit and dial any peers we may have already discovered
for (const peerInfo of this.peerStore.peers.values()) { | fix: await peer discovery start in libp2p start (#<I>) | libp2p_js-libp2p | train | js |
cfdced2392a971627ef9ca7d96292341f17503d2 | diff --git a/interfaces/python/infomap.py b/interfaces/python/infomap.py
index <HASH>..<HASH> 100644
--- a/interfaces/python/infomap.py
+++ b/interfaces/python/infomap.py
@@ -1896,7 +1896,16 @@ class Infomap(InfomapWrapper):
_, ext = os.path.splitext(filename)
# remove the dot
- writer = "write_{}".format(ext[1:])
+ ext = ext[1:]
+
+ if ext == "ftree":
+ ext = "flow_tree"
+ elif ext == "nwk":
+ ext = "newick"
+ elif ext == "net":
+ ext = "pajek"
+
+ writer = "write_{}".format(ext)
if hasattr(self, writer):
return getattr(self, writer)(filename, *args, **kwargs)
@@ -2029,11 +2038,6 @@ class Infomap(InfomapWrapper):
"""
return self.network.writePajekNetwork(filename, flow)
- # for the method "write"
- write_ftree = write_flow_tree
- write_nwk = write_newick
- write_net = write_pajek
-
def main():
import sys | refactor(python): Map to writer methods inside "write" | mapequation_infomap | train | py |
e2e3f46ed36b3df7e7d768810e284597eaa0e1b1 | diff --git a/packages/notifications-flyout/src/presenters/PanelPresenter.js b/packages/notifications-flyout/src/presenters/PanelPresenter.js
index <HASH>..<HASH> 100644
--- a/packages/notifications-flyout/src/presenters/PanelPresenter.js
+++ b/packages/notifications-flyout/src/presenters/PanelPresenter.js
@@ -32,7 +32,7 @@ export default function PanelPresenter({
{
transitionState: null,
loadingTransitionState,
- customStylesheet
+ stylesheet: customStylesheet
},
resolvedRoles
); | fix: passing stylesheet incorrectly to flyout panel | Autodesk_hig | train | js |
b684c784c8986226889feb1524bc029b913c9571 | diff --git a/lib/lifecycles/changelog.js b/lib/lifecycles/changelog.js
index <HASH>..<HASH> 100644
--- a/lib/lifecycles/changelog.js
+++ b/lib/lifecycles/changelog.js
@@ -23,8 +23,9 @@ function outputChangelog (args, newVersion) {
var header = '# Change Log\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n'
var oldContent = args.dryRun ? '' : fs.readFileSync(args.infile, 'utf-8')
// find the position of the last release and remove header:
- if (oldContent.indexOf('<a name=') !== -1) {
- oldContent = oldContent.substring(oldContent.indexOf('<a name='))
+ const changelogSectionRegExp = /<a name=|##? \[?[0-9]+\.[0-9]+\.[0-9]+\]?/
+ if (oldContent.search(changelogSectionRegExp) !== -1) {
+ oldContent = oldContent.substring(oldContent.search(changelogSectionRegExp))
}
var content = ''
var context | fix: make pattern for finding CHANGELOG sections work for non anchors (#<I>) | conventional-changelog_standard-version | train | js |
081e92ddcea017fa8009f24011980b3dd988f39b | diff --git a/go/vt/sqlparser/parse_test.go b/go/vt/sqlparser/parse_test.go
index <HASH>..<HASH> 100644
--- a/go/vt/sqlparser/parse_test.go
+++ b/go/vt/sqlparser/parse_test.go
@@ -3255,6 +3255,27 @@ func TestCreateTable(t *testing.T) {
}
}
+func TestOne(t *testing.T) {
+ testOne := struct {
+ input, output string
+ }{
+ input: "",
+ output: "",
+ }
+ if testOne.input == "" {
+ return
+ }
+ sql := strings.TrimSpace(testOne.input)
+ tree, err := Parse(sql)
+ require.NoError(t, err)
+ got := String(tree)
+ expected := testOne.output
+ if expected == "" {
+ expected = sql
+ }
+ require.Equal(t, expected, got)
+}
+
func TestCreateTableLike(t *testing.T) {
normal := "create table a like b"
testCases := []struct { | test: added testOne to parse_test | vitessio_vitess | train | go |
4786883f42f7fc6f55d0e4e7d1a5af3d1208ed37 | diff --git a/tests/Test/Database/Cli/StatusTaskTest.php b/tests/Test/Database/Cli/StatusTaskTest.php
index <HASH>..<HASH> 100644
--- a/tests/Test/Database/Cli/StatusTaskTest.php
+++ b/tests/Test/Database/Cli/StatusTaskTest.php
@@ -2,6 +2,8 @@
namespace Test\Database\Cli;
+use Neutrino\Cli\Output\Decorate;
+
/**
* Class StatusTaskTest
*
@@ -96,9 +98,9 @@ class StatusTaskTest extends DatabaseCliTestCase
['+------+---------------------------+', true],
['| RAN? | MIGRATION |', true],
['+------+---------------------------+', true],
- ['| Y | 123_create_users_table |', true],
- ['| N | 456_create_profiles_table |', true],
- ['| N | 789_create_roles_table |', true],
+ ['| ' . Decorate::info('Y') . ' | 123_create_users_table |', true],
+ ['| ' . Decorate::apply('N', 'red') . ' | 456_create_profiles_table |', true],
+ ['| ' . Decorate::apply('N', 'red') . ' | 789_create_roles_table |', true],
['+------+---------------------------+', true]
); | test(StatusTaskTest): fix missing coloration excepted | phalcon-nucleon_framework | train | php |
dfbacbbdc7ddb19adef466a892dd9378f804d1f4 | diff --git a/packages/table/src/TableWithSticky.js b/packages/table/src/TableWithSticky.js
index <HASH>..<HASH> 100644
--- a/packages/table/src/TableWithSticky.js
+++ b/packages/table/src/TableWithSticky.js
@@ -323,7 +323,7 @@ const TableWithSticky = ({
selected={getActiveColumnIndex === headerIndex && getActiveRowIndex === -1}
setActiveMultiSelectColumn={setActiveMultiSelectColumn}
>
- <div css={styles.headerHolder}>
+ <div className={css(styles.headerHolder)}>
{column.canGroupBy && meta.groupElements ? (
<span {...column.getGroupByToggleProps()}>
{<GroupHeaderElements isGrouped={column.isGrouped} groupHeaderElementStyles={styles.groupHeaderElement}/>} | refactor: use the proper emotion prop | Autodesk_hig | train | js |
1601e7e1efa81eecc3b112cafb748ac4507159fd | diff --git a/src/lib/reducers/apps.js b/src/lib/reducers/apps.js
index <HASH>..<HASH> 100644
--- a/src/lib/reducers/apps.js
+++ b/src/lib/reducers/apps.js
@@ -52,7 +52,9 @@ export const fetchApps = () => async dispatch => {
try {
await dispatch({ type: FETCH_APPS })
const rawAppList = await stack.get.apps()
- const apps = rawAppList.filter(app => !EXCLUDES.includes(app.attributes.slug))
+ const apps = rawAppList
+ .filter(app => !EXCLUDES.includes(app.attributes.slug))
+ .map(mapApp)
// TODO load only one time icons
await dispatch(setHomeApp(apps))
await dispatch(receiveAppList(apps))
@@ -103,7 +105,7 @@ const reducer = (state = defaultState, action) => {
)
}
case RECEIVE_APP_LIST:
- const appsList = action.apps.map(mapApp).map(app => ({
+ const appsList = action.apps.map(app => ({
...app,
isCurrentApp: isCurrentApp(state, app)
})) | fix: :bug: map app before all processes | cozy_cozy-bar | train | js |
34876d66c12dc346a0972a21dc808274fdde9568 | diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -97,7 +97,7 @@ test('missing "versions" property', function (t) {
}
})
cp.on('close', function (code) {
- t.strictEqual(code, semver.satisfies(process.version, '0.10.x') ? 8 : 1)
+ t.strictEqual(code, 1)
t.ok(found)
process.chdir('../..')
t.end() | test: clean up tests from old node versions | watson_test-all-versions | train | js |
d75556443eec151129ad0029e87d232e22848a31 | diff --git a/src/pluggable.js b/src/pluggable.js
index <HASH>..<HASH> 100644
--- a/src/pluggable.js
+++ b/src/pluggable.js
@@ -1,3 +1,9 @@
+const RESERVED_PLUGINS = {
+ 'compact': true,
+ 'minimal': true,
+ 'serialize': true,
+}
+
export class Pluggable {
static get POST_EXTRACT() { return 'postExtract' };
static get POST_VALUE() { return 'postValue' };
@@ -14,13 +20,23 @@ export class Pluggable {
this._stagePlugins = {};
}
+ requirePlugin(plugin) {
+ if(typeof plugin === 'string') {
+ if(RESERVED_PLUGINS[plugin]) {
+ return require(`./plugins/${plugin}`);
+ } else {
+ return require(plugin);
+ }
+ } else {
+ return plugin;
+ }
+ }
+
init() {
this._plugins.forEach(plugin => {
- if(!plugin) {
- throw new Error('undefined plugin provided');
- }
+ const requiredPlugin = this.requirePlugin(plugin);
- const pluginRun = plugin.run;
+ const pluginRun = requiredPlugin.run;
if(typeof pluginRun !== 'function') {
throw new Error('Plugins must provide a run function'); | feat(plugins): allow plugin to be applied by module name | jgranstrom_sass-extract | train | js |
f659d17101790fb9b7714b2548fdadab57abdab7 | diff --git a/test/write.spec.js b/test/write.spec.js
index <HASH>..<HASH> 100644
--- a/test/write.spec.js
+++ b/test/write.spec.js
@@ -493,8 +493,23 @@ describe('write', function () {
})
})
+ // https://github.com/ipld/js-ipld/issues/157
it.skip('writes a file with a different CID version to the parent', () => {
+ const directory = '/cid-versions'
+ const fileName = `${directory}/file.txt`
+ const expectedBytes = Buffer.from([0, 1, 2, 3])
+ return mfs.mkdir(directory, {
+ cidVersion: 0
+ })
+ .then(() => mfs.write(fileName, expectedBytes, {
+ create: true,
+ cidVersion: 1
+ }))
+ .then(() => mfs.read(fileName))
+ .then(actualBytes => {
+ expect(actualBytes).to.deep.equal(expectedBytes)
+ })
})
it.skip('writes a file with a different hash function to the parent', () => { | test: adds test for different CID versions
License: MIT | ipfs_js-ipfs-mfs | train | js |
839d92c4d736f00a1ca886d4d98f027981e47476 | diff --git a/socketio/server.py b/socketio/server.py
index <HASH>..<HASH> 100644
--- a/socketio/server.py
+++ b/socketio/server.py
@@ -30,7 +30,7 @@ class SocketIOServer(WSGIServer):
:param policy_server: Boolean describing whether or not to use the
Flash policy server. Default True.
- :param policy_listener : A tuple containing (host, port) for the
+ :param policy_listener: A tuple containing (host, port) for the
policy server. This is optional and used only if policy server
is set to true. The default value is 0.0.0.0:843 | docs: Little space that affected the layout in the rendered docs. | abourget_gevent-socketio | train | py |
0c514d3a9590de0dbcf7c85343bf8155fb51ebbc | diff --git a/packages/node_modules/@webex/webex-core/src/lib/storage/memory-store-adapter.js b/packages/node_modules/@webex/webex-core/src/lib/storage/memory-store-adapter.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/webex-core/src/lib/storage/memory-store-adapter.js
+++ b/packages/node_modules/@webex/webex-core/src/lib/storage/memory-store-adapter.js
@@ -24,7 +24,7 @@ function _bind(namespace, options = {}) {
const {logger} = options;
- const map = new Map();
+ const map = new Map([['@', {}]]);
if (options.data) {
Object.keys(options.data).forEach((key) => { | refactor(dev): stop uncaught exception with make storage | webex_spark-js-sdk | train | js |
09d99ddfc2c48cced9d6c21608cf5c955bb54d2d | diff --git a/packages/mysql/lib/mysql_p.js b/packages/mysql/lib/mysql_p.js
index <HASH>..<HASH> 100644
--- a/packages/mysql/lib/mysql_p.js
+++ b/packages/mysql/lib/mysql_p.js
@@ -66,6 +66,25 @@ function patchCreatePool(mysql) {
};
}
+function patchGetConnection(pool) {
+ var baseFcn = '__getConnection';
+ pool[baseFcn] = pool['getConnection'];
+
+ pool['getConnection'] = function patchedGetConnection() {
+ var args = arguments;
+ var callback = args[0];
+
+ if(callback instanceof Function){
+ args[0] = (err, connection) => {
+ if(connection) patchObject(connection);
+ return callback(err, connection);
+ }
+ }
+
+ return pool[baseFcn].apply(pool, args);
+ }
+}
+
function patchObject(connection) {
if (connection.query instanceof Function) {
connection.__query = connection.query;
@@ -76,6 +95,10 @@ function patchObject(connection) {
connection.__execute = connection.execute;
connection.execute = captureOperation('execute');
}
+
+ if(connection.getConnection instanceof Function){
+ patchGetConnection(connection);
+ }
}
function resolveArguments(argsObj) { | feat: patch connections created by a pool's getConnection
Fixes #<I> | aws_aws-xray-sdk-node | train | js |
a7d6fa6dd183d5dac6c83f2e194298e0b2cd49b6 | diff --git a/test/test_backbone_utils.py b/test/test_backbone_utils.py
index <HASH>..<HASH> 100644
--- a/test/test_backbone_utils.py
+++ b/test/test_backbone_utils.py
@@ -15,11 +15,11 @@ class ResnetFPNBackboneTester(unittest.TestCase):
x = torch.rand(1, 3, 300, 300, dtype=self.dtype, device=device)
resnet18_fpn = resnet_fpn_backbone(backbone_name='resnet18', pretrained=False)
y = resnet18_fpn(x)
- assert list(y.keys()) == [0, 1, 2, 3, 'pool']
+ self.assertEqual(list(y.keys()), [0, 1, 2, 3, 'pool'])
def test_resnet50_fpn_backbone(self):
device = torch.device('cpu')
x = torch.rand(1, 3, 300, 300, dtype=self.dtype, device=device)
resnet50_fpn = resnet_fpn_backbone(backbone_name='resnet50', pretrained=False)
y = resnet50_fpn(x)
- assert list(y.keys()) == [0, 1, 2, 3, 'pool']
+ self.assertEqual(list(y.keys()), [0, 1, 2, 3, 'pool']) | test: Updated assert in test_backbone_utils (#<I>)
Updated all raw asserts to corresponding unittest.TestCase.assert. See #<I> | pytorch_vision | train | py |
6f443947b11c88f551c27d18909700eaaf3a00ac | diff --git a/test/browser/test.js b/test/browser/test.js
index <HASH>..<HASH> 100755
--- a/test/browser/test.js
+++ b/test/browser/test.js
@@ -40,16 +40,6 @@ if (process.env.GREP) {
testUrl += '?';
testUrl += querystring.stringify(qs);
-if (process.env.TRAVIS &&
- client.browser !== 'firefox' &&
- client.browser !== 'phantomjs' &&
- client.browser !== 'chrome' &&
- process.env.TRAVIS_SECURE_ENV_VARS === 'false') {
- console.error('Not running test, cannot connect to saucelabs');
- process.exit(1);
- return;
-}
-
function testError(e) {
console.error(e);
console.error('Doh, tests failed'); | test(sauce): debug | delta-db_deltadb-common-utils | train | js |
274446f5b04dfab304c0f2f6727c089480a2fb74 | diff --git a/js/src/figure.js b/js/src/figure.js
index <HASH>..<HASH> 100644
--- a/js/src/figure.js
+++ b/js/src/figure.js
@@ -192,6 +192,11 @@ var FigureView = widgets.DOMWidgetView.extend( {
return false;
}
}
+ window.ipvss = () => {
+ var data = this.screenshot()
+ //download_image(data)
+ return data
+ }
this.camera_control_icon = new ToolIcon('fa-arrow-up', this.toolbar_div)
this.camera_control_icon.a.title = 'Camera locked to \'up\' axis (orbit), instead of trackball mode' | fix: for headless support, was missing ipvss global function | maartenbreddels_ipyvolume | train | js |
f4b2ed2a92a897f2fc2868a84c14b72d07c56fd1 | diff --git a/cmd/web-handlers.go b/cmd/web-handlers.go
index <HASH>..<HASH> 100644
--- a/cmd/web-handlers.go
+++ b/cmd/web-handlers.go
@@ -340,7 +340,7 @@ func (web *webAPIHandlers) ListBuckets(r *http.Request, args *WebGenericArgs, re
for _, bucket := range buckets {
if globalIAMSys.IsAllowed(iampolicy.Args{
AccountName: claims.AccessKey,
- Action: iampolicy.ListAllMyBucketsAction,
+ Action: iampolicy.ListBucketAction,
BucketName: bucket.Name,
ConditionValues: getConditionValues(r, "", claims.AccessKey, claims.Map()),
IsOwner: owner, | fix: filter list buckets operation with ListObjects perm (#<I>)
fix regression introduced in #<I> | minio_minio | train | go |
a87aeb201c63313cb6aebc138a09410b4bffa56f | diff --git a/src/base/polyfills.js b/src/base/polyfills.js
index <HASH>..<HASH> 100644
--- a/src/base/polyfills.js
+++ b/src/base/polyfills.js
@@ -10,8 +10,9 @@
*/
if (!Array.prototype.find) {
Object.defineProperty(Array.prototype, 'find', {
+ // Note: ES6 arrow function syntax is not used on purpose to avoid this to be undefined
value: function(predicate) {
- // 1. Let O be ? ToObject(this value).
+ // 1. Let O be ? ToObject(this value).
if (this == null) {
throw new TypeError('"this" is null or not defined')
} | style(polyfills): fix lint and add comment | clappr_clappr | train | js |
5a3013fea562b1eea3fc2ff3730aaa16f70ea05b | diff --git a/packages/components/bolt-image/src/image.js b/packages/components/bolt-image/src/image.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-image/src/image.js
+++ b/packages/components/bolt-image/src/image.js
@@ -223,7 +223,7 @@ class BoltImage extends withLitHtml() {
? srcset || src || undefined
: this.isLazyLoaded
? srcset
- : placeholderImage,
+ : placeholderImage || undefined,
)}"
data-srcset="${ifDefined(lazyload ? srcset || src : undefined)}"
sizes="${ifDefined( | chore: add missing undefined fallback to srcset behavior | bolt-design-system_bolt | train | js |
d24e168c5b28db82df3ba60870b9f67aa8235854 | diff --git a/src/playbacks/html5_video/html5_video.js b/src/playbacks/html5_video/html5_video.js
index <HASH>..<HASH> 100644
--- a/src/playbacks/html5_video/html5_video.js
+++ b/src/playbacks/html5_video/html5_video.js
@@ -383,6 +383,14 @@ export default class HTML5Video extends Playback {
}
_onError() {
+ const { code, message } = this.el.error
+
+ const formattedError = this.createError({
+ code,
+ description: message,
+ raw: this.el.error,
+ })
+
this.trigger(Events.PLAYBACK_ERROR, this.el.error, this.name)
} | feat(html5_video): create player error on playback error | clappr_clappr | train | js |
228ea3b721b4701dfaf50350b74436da3cb7e8ef | diff --git a/src/actions/analytics.js b/src/actions/analytics.js
index <HASH>..<HASH> 100644
--- a/src/actions/analytics.js
+++ b/src/actions/analytics.js
@@ -159,9 +159,9 @@ export function recordImpressions(queryId, impressions = []) {
headers,
appbaseRef: { url, protocol, credentials },
} = getState();
- if (queryId && impressions.length) {
- const esURL = `${protocol}://${url}`;
- const parsedURL = esURL.replace(/\/+$/, '');
+ const esURL = `${protocol}://${url}`;
+ const parsedURL = esURL.replace(/\/+$/, '');
+ if (!parsedURL.includes('scalr.api.appbase.io') && queryId && impressions.length) {
fetch(`${parsedURL}/${app}/_analytics/search`, {
method: 'PUT',
body: JSON.stringify({ | fix: avoid impressions reacking for app users | appbaseio_reactivecore | train | js |
4e4fa90b1804afce2ebc11f75d7e965548d5513c | diff --git a/webapps/ui/tasklist/client/scripts/tasklist/directives/cam-tasklist-tasks.js b/webapps/ui/tasklist/client/scripts/tasklist/directives/cam-tasklist-tasks.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/tasklist/client/scripts/tasklist/directives/cam-tasklist-tasks.js
+++ b/webapps/ui/tasklist/client/scripts/tasklist/directives/cam-tasklist-tasks.js
@@ -144,7 +144,8 @@ module.exports = [function() {
// Sachbearbeiter starts counting at '1'
$scope.pageNum = ($scope.query.firstResult / $scope.pageSize) + 1;
- if (oldQuery.id) {
+ // only clear the task if the filter changed
+ if (oldQuery.id && oldQuery.id !== taskListQuery.id) {
clearSelectedTask();
}
} else { | fix(cockpit): make task cleared only when filter changes
Related to. CAM-<I> | camunda_camunda-bpm-platform | train | js |
95d407452b619b785efa7a58cc6cd5d6f14c8e72 | diff --git a/test/empower_test.js b/test/empower_test.js
index <HASH>..<HASH> 100644
--- a/test/empower_test.js
+++ b/test/empower_test.js
@@ -386,4 +386,42 @@ test('the case when assertion function call is not listed in patterns (even if m
});
+suite('on rethrowing Error', function () {
+ test('rethrow behavior - name replacement', function () {
+ try {
+ try {
+ throw new baseAssert.AssertionError({
+ actual: 'hoge',
+ expected: 'fuga',
+ operator: '==',
+ message: 'HOOOOOOOO'
+ });
+ } catch (e) {
+ e.foo = 'bar';
+ e.message = 'BARRRRRRRR';
+ throw e;
+ }
+ } catch (e) {
+ baseAssert.equal(e.message, 'BARRRRRRRR');
+ }
+ });
+ test('rethrow behavior - new props', function () {
+ try {
+ try {
+ throw new baseAssert.AssertionError({
+ actual: 'hoge',
+ expected: 'fuga',
+ operator: '==',
+ message: 'HOOOOOOOO'
+ });
+ } catch (e) {
+ e.foo = 'bar';
+ throw e;
+ }
+ } catch (e) {
+ baseAssert.equal(e.foo, 'bar');
+ }
+ });
+});
+
})); | test(empower-core): add learning test on rethrowing Error | twada_empower-core | train | js |
90af24cc55003dc924857e43d18966a7a71cc9a9 | diff --git a/test/integration/read.js b/test/integration/read.js
index <HASH>..<HASH> 100644
--- a/test/integration/read.js
+++ b/test/integration/read.js
@@ -327,6 +327,8 @@ module.exports = function (createFn, setup, dismantle) {
}, (err, res, body) => {
assert.ok(!err)
assert.equal(res.statusCode, 400)
+ assert.equal(body.description, 'invalid_json')
+ assert.equal(body.statusCode, 400)
done()
})
}) | chore(test): confirm invalid json doesn't throw
Closes #<I> | florianholzapfel_express-restify-mongoose | train | js |
69f2624c7caa9c4380a455cb094a1a8602f91415 | diff --git a/lib/features/move/MoveEvents.js b/lib/features/move/MoveEvents.js
index <HASH>..<HASH> 100644
--- a/lib/features/move/MoveEvents.js
+++ b/lib/features/move/MoveEvents.js
@@ -67,7 +67,7 @@ function MoveEvents(eventBus, dragSupport, modeling, selection, rules) {
// add drag target to selection if not done already
if (dragShapes.indexOf(dragContext.element) === -1) {
- dragShapes.push(dragContext.element);
+ dragShapes = [ dragContext.element ];
}
// ensure we remove nested elements in the collection | fix(move): move current element only if not selected | bpmn-io_diagram-js | train | js |
69090ad7c7d46a28f001191c6f73c553220b1cc4 | diff --git a/src/CFPropertyList/CFDate.php b/src/CFPropertyList/CFDate.php
index <HASH>..<HASH> 100644
--- a/src/CFPropertyList/CFDate.php
+++ b/src/CFPropertyList/CFDate.php
@@ -142,13 +142,4 @@ class CFDate extends CFType
}
return gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
}
-
- public function toArray()
- {
- if (class_exists('DateTime')) {
- return new DateTime('@'.intval($this->getValue()), new DateTimeZone('UTC'));
- }
-
- return parent::getValue();
- }
}
diff --git a/src/CFPropertyList/CFTypeDetector.php b/src/CFPropertyList/CFTypeDetector.php
index <HASH>..<HASH> 100644
--- a/src/CFPropertyList/CFTypeDetector.php
+++ b/src/CFPropertyList/CFTypeDetector.php
@@ -155,7 +155,7 @@ class CFTypeDetector
case is_object($value):
// DateTime should be CFDate
- if (class_exists(DateTime::class) && $value instanceof DateTime) {
+ if ($value instanceof DateTime) {
return new CFDate($value->getTimestamp());
} | fix(CFDate): reverse the symmetry issue
DateTime class always exists for php <I> or later, then no need to test its availability
see #<I> | TECLIB_CFPropertyList | train | php,php |
d222f8df1033f6373fa9b4c60735a96f4ba75567 | diff --git a/packages/wxa-cli/src/schedule.js b/packages/wxa-cli/src/schedule.js
index <HASH>..<HASH> 100644
--- a/packages/wxa-cli/src/schedule.js
+++ b/packages/wxa-cli/src/schedule.js
@@ -169,6 +169,9 @@ class Schedule {
compiler.destroy();
+ // empty loader handle this module.
+ if (dep.code == null && !dep.isFile) dep.code = dep.content;
+
debug('childNodes', childNodes.map((node)=>simplify(node)));
let children = childNodes.reduce((children, node)=>{
let child = this.findOrAddDependency(node, dep);
@@ -380,7 +383,7 @@ class Schedule {
},
wrap(mdl) {
mdl.code = `
- require('wxa://core-js/es.promise.finally.js');
+ require('wxa://es/promise.finally.js');
${mdl.code}
`; | fix(cli): wxa file should try to assign code after loader compile | wxajs_wxa | train | js |
da84dbe359081db023b31d87b62bca8344789f84 | diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js
index <HASH>..<HASH> 100644
--- a/src/components/notification/notification.js
+++ b/src/components/notification/notification.js
@@ -18,8 +18,8 @@ import messages from './messages';
const NotificationIcon = props => {
if (props.type === 'error') return <ErrorIcon theme={props.theme} />;
- else if (props.type === 'info') return <InfoIcon theme={props.theme} />;
- else if (props.type === 'warning') return <WarningIcon theme={props.theme} />;
+ if (props.type === 'info') return <InfoIcon theme={props.theme} />;
+ if (props.type === 'warning') return <WarningIcon theme={props.theme} />;
return <SuccessIcon theme={props.theme} />;
}; | fix: disable eslint rule for class member spacing | commercetools_merchant-center-application-kit | train | js |
cd22fc20800d1ba841676428275c31bbf02ae06a | diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -8,7 +8,7 @@ module.exports = function(grunt) {
'package.json',
'bower.json',
'readme.md',
- 'example/js/directives/angular-pdf.js',
+ 'example/js/directives/angular-pdf.min.js',
'dist/angular-pdf.js',
'dist/angular-pdf.min.js'
],
@@ -19,7 +19,7 @@ module.exports = function(grunt) {
'package.json',
'bower.json',
'readme.md',
- 'example/js/directives/angular-pdf.js',
+ 'example/js/directives/angular-pdf.min.js',
'dist/angular-pdf.js',
'dist/angular-pdf.min.js'
],
@@ -34,7 +34,7 @@ module.exports = function(grunt) {
clean: {
all: [
- 'example/js/directives/angular-pdf.js',
+ 'example/js/directives/angular-pdf.min.js',
'example/js/lib/*.js',
'dist/angular-pdf.js',
'dist/angular-pdf.min.js' | fix(Grunt): fixing path of angular-pdf in example folder | sayanee_angularjs-pdf | train | js |
d7bf21161ac8cc74ad30dcb6c40b8db4a2897748 | diff --git a/test/agent.js b/test/agent.js
index <HASH>..<HASH> 100644
--- a/test/agent.js
+++ b/test/agent.js
@@ -861,8 +861,6 @@ test('#captureError()', function (t) {
let span = null
const expect = [
'metadata',
- 'transaction',
- 'span',
'error'
]
@@ -873,8 +871,6 @@ test('#captureError()', function (t) {
this.agent.captureError(new Error('with callback'), function () {
t.pass('called callback')
})
- span.end()
- trans.end()
})
.on('data-error', function (data) {
t.equal(data.exception.message, 'with callback') | test: fix possible race condition (#<I>)
Sometimes the error would arrive before the span and the tests would
fail.
Since we don't actually care about the arrival of the span or the
transaction, we can just not end those and the test will not have a race
condition anymore. | elastic_apm-agent-nodejs | train | js |
2758d9c88c0bc9624b865908ce296e607a265298 | diff --git a/lib/fetch/index.js b/lib/fetch/index.js
index <HASH>..<HASH> 100644
--- a/lib/fetch/index.js
+++ b/lib/fetch/index.js
@@ -1350,15 +1350,12 @@ function httpNetworkFetch (
}
// TODO (fix): Do we need controller here?
- if (context.controller) {
- try {
- context.controller.error(err)
- context.controller = null
- } catch (err) {
- // Will throw TypeError if body is not readable.
- if (err.name !== 'TypeError') {
- throw err
- }
+ try {
+ context.controller?.error(err)
+ } catch (err) {
+ // Will throw TypeError if body is not readable.
+ if (err.name !== 'TypeError') {
+ throw err
}
}
} | fix: don't null controller | mcollina_undici | train | js |
a9b13c98a0aa6812dbdbbf6687d88ad5ff003f9f | diff --git a/client/deis.py b/client/deis.py
index <HASH>..<HASH> 100755
--- a/client/deis.py
+++ b/client/deis.py
@@ -784,7 +784,8 @@ class DeisClient(object):
def builds_create(self, args):
"""
- Creates a new build of an application.
+ Creates a new build of an application. Imports an <image> and deploys it to Deis
+ as a new release.
Usage: deis builds:create <image> [--app=<app>] | docs(client): elaborate upon builds:create | deis_deis | train | py |
58b1fe20f6c58e46fd528c037c0a2888c56ef024 | diff --git a/js/src/files-mfs.js b/js/src/files-mfs.js
index <HASH>..<HASH> 100644
--- a/js/src/files-mfs.js
+++ b/js/src/files-mfs.js
@@ -331,7 +331,7 @@ module.exports = (common) => {
})
// TODO enable this test when this feature gets released on go-ipfs
- it('stat withLocal dir', function (done) {
+ it.skip('stat withLocal dir', function (done) {
if (!withGo) {
console.log('Not supported in js-ipfs yet')
this.skip() | fix: go-ipfs has not shipped withLocal yet | ipfs_interface-js-ipfs-core | train | js |
89f968b96a728d3119eb125270f434a73a1979bc | diff --git a/test/coverage.spec.js b/test/coverage.spec.js
index <HASH>..<HASH> 100644
--- a/test/coverage.spec.js
+++ b/test/coverage.spec.js
@@ -22,7 +22,7 @@ module.exports.addTests = function({testRunner, expect}) {
describe('JSCoverage', function() {
it('should work', async function({page, server}) {
await page.coverage.startJSCoverage();
- await page.goto(server.PREFIX + '/jscoverage/simple.html');
+ await page.goto(server.PREFIX + '/jscoverage/simple.html', {waitUntil: 'networkidle0'});
const coverage = await page.coverage.stopJSCoverage();
expect(coverage.length).toBe(1);
expect(coverage[0].url).toContain('/jscoverage/simple.html'); | test: try to fix CSS coverage flakes on win (#<I>) | GoogleChrome_puppeteer | train | js |
cf7351f9d3e2602bb6ba9d735b85a2722b1abfe2 | diff --git a/src/query.js b/src/query.js
index <HASH>..<HASH> 100644
--- a/src/query.js
+++ b/src/query.js
@@ -291,8 +291,10 @@ module.exports = function(AV) {
* scan a Query. masterKey required.
*
* @since 2.1.0
- * @param {String} orderedBy
- * @param {Number} batchSize
+ * @param {object} [options]
+ * @param {string} [options.orderedBy] specify the key to sort
+ * @param {number} [options.batchSize] specify the batch size for each request
+ * @param {AuthOptions} [authOptions]
* @return {AsyncIterator.<AV.Object>}
* @example const scan = new AV.Query(TestClass).scan({
* orderedBy: 'objectId', | docs(Query): fix the params for #scan | leancloud_javascript-sdk | train | js |
b96bb549c390b0280a131e5a606d490cd049c2f7 | diff --git a/uw_sws/enrollment.py b/uw_sws/enrollment.py
index <HASH>..<HASH> 100644
--- a/uw_sws/enrollment.py
+++ b/uw_sws/enrollment.py
@@ -103,14 +103,12 @@ def _json_to_enrollment(json_data, term):
ENROLLMENT_SOURCE_PCE)
enrollment.unf_pce_courses = {}
# dictionary {section_label: UnfinishedPceCourse}
- if json_data.get('Registrations') is not None and\
- len(json_data['Registrations']) > 0:
- for registration in json_data['Registrations']:
- if is_unfinished_pce_course(registration):
- unf_pce_course = _json_to_unfinished_pce_course(registration,
- term)
- key = unf_pce_course.section_ref.section_label()
- enrollment.unf_pce_courses[key] = unf_pce_course
+ for registration in json_data.get('Registrations', []):
+ if is_unfinished_pce_course(registration):
+ unf_pce_course = _json_to_unfinished_pce_course(registration,
+ term)
+ key = unf_pce_course.section_ref.section_label()
+ enrollment.unf_pce_courses[key] = unf_pce_course
enrollment.majors = []
if json_data.get('Majors') is not None and len(json_data['Majors']) > 0: | refactor: combine if and for statements | uw-it-aca_uw-restclients-sws | train | py |
7e708fdbbf2870c1c99b9ee97e92b5d392438e4a | diff --git a/app/lib/webpack/inject.style-rules.js b/app/lib/webpack/inject.style-rules.js
index <HASH>..<HASH> 100644
--- a/app/lib/webpack/inject.style-rules.js
+++ b/app/lib/webpack/inject.style-rules.js
@@ -4,7 +4,7 @@ const path = require('path')
const appPaths = require('../app-paths')
const cssVariables = require('../helpers/css-variables')
-const postCssConfig = require(appPaths.resolve.app('.postcssrc.js'))
+const postCssConfigFile = appPaths.resolve.app('.postcssrc.js')
const quasarCssPaths = [ path.join('node_modules', 'quasar'), path.join('node_modules', '@quasar') ]
@@ -80,7 +80,10 @@ function injectRule (chain, pref, lang, test, loader, loaderOptions) {
})
}
- const postCssOpts = { sourceMap: pref.sourceMap, ...postCssConfig }
+ // need a fresh copy, otherwise plugins
+ // will keep on adding making N duplicates for each one
+ delete require.cache[postCssConfigFile]
+ const postCssOpts = { sourceMap: pref.sourceMap, ...require(postCssConfigFile) }
if (pref.rtl) {
const postcssRTL = require('postcss-rtl') | fix(app): Backport "duplicate postcss plugins" fix from Qv2 | quasarframework_quasar | train | js |
f3f76e72c7d610759097921405e88782a19129fe | diff --git a/secure_smtpd/smtp_server.py b/secure_smtpd/smtp_server.py
index <HASH>..<HASH> 100644
--- a/secure_smtpd/smtp_server.py
+++ b/secure_smtpd/smtp_server.py
@@ -34,6 +34,7 @@ class SMTPServer(smtpd.SMTPServer):
def _accept_subprocess(self, queue):
while True:
try:
+ newsocket = None
self.socket.setblocking(1)
pair = self.accept()
map = {}
@@ -71,7 +72,8 @@ class SMTPServer(smtpd.SMTPServer):
self._shutdown_socket(newsocket)
self.logger.info('_accept_subprocess(): smtp channel terminated asyncore.')
except Exception as e:
- self._shutdown_socket(newsocket)
+ if newsocket is not None:
+ self._shutdown_socket(newsocket)
self.logger.error('_accept_subprocess(): uncaught exception: %s' % str(e))
def _shutdown_socket(self, s): | fix: crasher if waiting for accept (#<I>) | bcoe_secure-smtpd | train | py |
b6853be59bd75df1e97c9937cff404ae025d2bae | diff --git a/packages/@vue/cli-plugin-e2e-nightwatch/__tests__/nightwatchPlugin.spec.js b/packages/@vue/cli-plugin-e2e-nightwatch/__tests__/nightwatchPlugin.spec.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-plugin-e2e-nightwatch/__tests__/nightwatchPlugin.spec.js
+++ b/packages/@vue/cli-plugin-e2e-nightwatch/__tests__/nightwatchPlugin.spec.js
@@ -1,4 +1,4 @@
-jest.setTimeout(20000)
+jest.setTimeout(30000)
const create = require('@vue/cli-test-utils/createTestProject') | chore: bump nightwatch test timeout | vuejs_vue-cli | train | js |
6654260c299ccc1d8f6d9d3f932bad3035033587 | diff --git a/styleguide.config.js b/styleguide.config.js
index <HASH>..<HASH> 100644
--- a/styleguide.config.js
+++ b/styleguide.config.js
@@ -4,6 +4,7 @@ const { createConfig } = require('@rollup-umd/documentation');
const config = createConfig({
pagePerSection: true,
});
+
/**
* We generally make the modules aliased for having nice example, but in this case
* we use the module itself for the documentation and to prevent multiple version of | fix(release): fixed released version | bootstrap-styled_v4 | train | js |
61b0bd69f3ce757c4ec7a204b477afc8f578182d | diff --git a/packages/ge-scripts/index.js b/packages/ge-scripts/index.js
index <HASH>..<HASH> 100644
--- a/packages/ge-scripts/index.js
+++ b/packages/ge-scripts/index.js
@@ -4,7 +4,7 @@ const spawn = require('cross-spawn');
const messages = require('./messages');
const { set, lensProp, view } = require('ramda');
-const [executor, /* eslint-disable no-unused-vars */ ignoredBin /* eslint-enable */, script, ...args] = process.argv;
+const [executor, , script, ...args] = process.argv;
function handleSignal(result) {
console.log(messages[result.signal](script)); // eslint-disable-line no-console | chore(ge-scripts): use better way to ignore arguments in process.argv array
affects: ge-scripts | goldwasserexchange_public | train | js |
fac47cfa23c6e0573b0baa9b379d7226654c4dbd | diff --git a/lib/classes/PluginManager.js b/lib/classes/PluginManager.js
index <HASH>..<HASH> 100644
--- a/lib/classes/PluginManager.js
+++ b/lib/classes/PluginManager.js
@@ -598,12 +598,15 @@ class PluginManager {
await hook();
}
- await storeTelemetryLocally(await generateTelemetryPayload(this.serverless));
let deferredBackendNotificationRequest;
- if (commandsArray.join(' ') === 'deploy') {
- deferredBackendNotificationRequest = sendTelemetry({
- serverlessExecutionSpan: this.serverless.onExitPromise,
- });
+
+ if (!this.serverless.isTelemetryReportedExternally) {
+ await storeTelemetryLocally(await generateTelemetryPayload(this.serverless));
+ if (commandsArray.join(' ') === 'deploy') {
+ deferredBackendNotificationRequest = sendTelemetry({
+ serverlessExecutionSpan: this.serverless.onExitPromise,
+ });
+ }
}
try { | refactor(Telemetry): Only process in `PluginManager` if flag missing | serverless_serverless | train | js |
63ed7b6e0011b767dd3a65efc3e023b783c40b91 | diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -73,7 +73,7 @@ gulp.task('test.unit', ['test.compile'], function(done) {
done();
return;
}
- return gulp.src(['build/test/**/*.js', '!build/test/**/e2e*.js']).pipe(mocha({timeout: 500}));
+ return gulp.src(['build/test/**/*.js', '!build/test/**/e2e*.js']).pipe(mocha({timeout: 1000}));
});
gulp.task('test.e2e', ['test.compile'], function(done) {
@@ -81,7 +81,7 @@ gulp.task('test.e2e', ['test.compile'], function(done) {
done();
return;
}
- return gulp.src(['build/test/**/e2e*.js']).pipe(mocha({timeout: 5000}));
+ return gulp.src(['build/test/**/e2e*.js']).pipe(mocha({timeout: 10000}));
});
gulp.task('test', ['test.unit', 'test.e2e', 'test.check-format']); | chore: increase test timeouts for Travis.
... which apparently runs on rather slow machines. | angular_tsickle | train | js |
10bfd6ff87107fde16459140792cbc590f8497a0 | diff --git a/lib/replicant/replicant.js b/lib/replicant/replicant.js
index <HASH>..<HASH> 100644
--- a/lib/replicant/replicant.js
+++ b/lib/replicant/replicant.js
@@ -109,7 +109,7 @@ class Replicant extends EventEmitter {
// Initialize the storage object if not present
if (!{}.hasOwnProperty.call(replicator.stores, namespace)) {
- replicator.stores[namespace] = new LocalStorage(path.join(REPLICANTS_ROOT, namespace));
+ replicator.stores[namespace] = new LocalStorage(path.join(REPLICANTS_ROOT, namespace), Infinity);
}
// Get the existing value, if any, and JSON parse if its an object | feat(replicants): remove local storage size quota (#<I>) | nodecg_nodecg | train | js |
731fb31965be8c8c541ea284d3e747bdba83fabb | diff --git a/webapps/ui/cockpit/plugins/base/app/data/dashboard/processDefinitionStatisticsData.js b/webapps/ui/cockpit/plugins/base/app/data/dashboard/processDefinitionStatisticsData.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/cockpit/plugins/base/app/data/dashboard/processDefinitionStatisticsData.js
+++ b/webapps/ui/cockpit/plugins/base/app/data/dashboard/processDefinitionStatisticsData.js
@@ -6,7 +6,7 @@ var Controller = [ '$scope', 'processData', 'ProcessDefinitionResource',
function($scope, processData, ProcessDefinitionResource) {
processData.provide('processDefinitions', function() {
- return ProcessDefinitionResource.queryStatistics({ incidents: true }).$promise;
+ return ProcessDefinitionResource.queryStatistics({ rootIncidents: true }).$promise;
});
processData.provide('processDefinitionStatistics', ['processDefinitions', function(processDefinitions) { | fix(cockpit): only include rootIncidents in processes dashboard
Related to CAM-<I> | camunda_camunda-bpm-platform | train | js |
04018aa6a4a3c9967f7317821959df2144040822 | diff --git a/packages/vue-inbrowser-compiler/rollup.config.js b/packages/vue-inbrowser-compiler/rollup.config.js
index <HASH>..<HASH> 100644
--- a/packages/vue-inbrowser-compiler/rollup.config.js
+++ b/packages/vue-inbrowser-compiler/rollup.config.js
@@ -25,7 +25,7 @@ export default {
typescript({
useTsconfigDeclarationDir: true,
tsconfig: './tsconfig.build.json',
- cacheRoot: '../../node_modules/.rpt2_cache'
+ cacheRoot: '../../node_modules/.rollup_vue-compiler_cache'
}),
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
commonjs() | chore: make rollup cache folder name | vue-styleguidist_vue-styleguidist | train | js |
ce53cf7464141bf8f7c0c5b5984ee21e27a62cb5 | diff --git a/tests/AuditModelTest.php b/tests/AuditModelTest.php
index <HASH>..<HASH> 100644
--- a/tests/AuditModelTest.php
+++ b/tests/AuditModelTest.php
@@ -257,7 +257,16 @@ EOF;
$this->assertInstanceOf(UserStub::class, $audit->user()->getRelated());
- $this->assertEquals('pk_id', $audit->user()->getOwnerKey());
+ // Up to Laravel 5.3, the ownerKey attribute was called otherKey
+ if (method_exists($audit->user(), 'getOtherKey')) {
+ $this->assertEquals('pk_id', $audit->user()->getOtherKey());
+ }
+
+ // From Laravel 5.4 onward, the otherKey attribute was renamed to ownerKey
+ if (method_exists($audit->user(), 'getOwnerKey')) {
+ $this->assertEquals('pk_id', $audit->user()->getOwnerKey());
+ }
+
$this->assertEquals('fk_id', $audit->user()->getForeignKey());
}
} | fix(Tests): call the appropriate method, depending on which Laravel version we're on | owen-it_laravel-auditing | train | php |
9c93481ea94529dc2015317009137b8f3480a261 | diff --git a/master/buildbot/test/expect.py b/master/buildbot/test/expect.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/test/expect.py
+++ b/master/buildbot/test/expect.py
@@ -84,10 +84,6 @@ class Expect:
return self
def log(self, name, **streams):
- if name == 'stdio' and 'stdout' in streams:
- raise NotImplementedError()
- if name == 'stdio' and 'sterr' in streams:
- raise NotImplementedError()
self.behaviors.append(('log', name, streams))
return self | test: Allow stdio logs in command expectations again
This was used to verify all our own tests use stdout and stderr. This is
no longer needed. | buildbot_buildbot | train | py |
0d045630c8ecdbde795b9e6083fb6e89e6e4c98b | diff --git a/query/bridges.go b/query/bridges.go
index <HASH>..<HASH> 100644
--- a/query/bridges.go
+++ b/query/bridges.go
@@ -85,10 +85,10 @@ func (b ProxyQueryServiceAsyncBridge) Query(ctx context.Context, w io.Writer, re
defer results.Release()
encoder := req.Dialect.Encoder()
- _, err = encoder.Encode(w, results)
- if err != nil {
+ if _, err := encoder.Encode(w, results); err != nil {
return flux.Statistics{}, tracing.LogError(span, err)
}
+ results.Release()
stats := results.Statistics()
return stats, nil | fix(query): release the query results before requesting statistics (#<I>)
The statistics are only finalized after release is called. Defer a call
to release to ensure they are released, but explicitly release on
success to ensure that the statistics are finalized from all sources
before returning them. | influxdata_influxdb | train | go |
d8b6eee9d491b64f28bff198f47f5823729b2cf0 | diff --git a/src/utils/helper.js b/src/utils/helper.js
index <HASH>..<HASH> 100644
--- a/src/utils/helper.js
+++ b/src/utils/helper.js
@@ -839,3 +839,32 @@ export const hasCustomRenderer = (props = {}) => {
const { render, children } = props;
return isFunction(children) || isFunction(render);
};
+
+// https://stackoverflow.com/a/65939108/10822996
+export const saveDataAsFile = (
+ filename = 'exportedData',
+ data,
+ format = 'csv', // csv or json
+) => {
+ let dataToWrite = data;
+ const dataType = `text/${format}`;
+
+ if (format === 'json') {
+ dataToWrite = JSON.stringify(dataToWrite, 0, 4);
+ }
+ const blob = new Blob([dataToWrite], { type: dataType });
+ const link = document.createElement('a');
+
+ link.download = `${filename}.${format}`;
+ link.href = window.URL.createObjectURL(blob);
+ link.dataset.downloadurl = [dataType, link.download, link.href].join(':');
+
+ const evt = new MouseEvent('click', {
+ view: window,
+ bubbles: true,
+ cancelable: true,
+ });
+
+ link.dispatchEvent(evt);
+ link.remove();
+}; | feat: add helper method to download csv and json files to desktop | appbaseio_reactivecore | train | js |
4fde43deee22b53fcca52132c51c27f4012d2933 | diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -85,7 +85,7 @@ var start = function(injector, config, launcher, globalEmitter, preprocess, file
socketServer.sockets.on('connection', function (socket) {
log.debug('A browser has connected on socket ' + socket.id);
- var replySocketEvents = events.bufferEvents(socket, ['info', 'error', 'result', 'complete']);
+ var replySocketEvents = events.bufferEvents(socket, ['start', 'info', 'error', 'result', 'complete']);
socket.on('register', function(info) {
var newBrowser; | fix(browser): reply "start" event
When a browser creates another socket.io connection, we forget the old one, however we need to reply all the events that happens in that connection. Somehow I forgot to reply "start" event, which caused the "Adapter did not report number of tests" warning. | karma-runner_karma | train | js |
b078324d5e911ec5e667736b2c552af32f475751 | diff --git a/lib/runAll.js b/lib/runAll.js
index <HASH>..<HASH> 100644
--- a/lib/runAll.js
+++ b/lib/runAll.js
@@ -119,6 +119,7 @@ const runAll = async (
ctx,
exitOnError: false,
nonTTYRenderer: 'verbose',
+ registerSignalListeners: false,
...getRenderer({ debug, quiet }),
}
diff --git a/test/index2.spec.js b/test/index2.spec.js
index <HASH>..<HASH> 100644
--- a/test/index2.spec.js
+++ b/test/index2.spec.js
@@ -33,6 +33,7 @@ describe('lintStaged', () => {
},
"exitOnError": false,
"nonTTYRenderer": "verbose",
+ "registerSignalListeners": false,
"renderer": "silent",
}
`)
@@ -58,6 +59,7 @@ describe('lintStaged', () => {
},
"exitOnError": false,
"nonTTYRenderer": "verbose",
+ "registerSignalListeners": false,
"renderer": "verbose",
}
`) | fix: canceling lint-staged via SIGINT restores state and cleans up (#<I>)
When replacing listr with listr2, this was a change in default behaviour that was left unnoticed | okonet_lint-staged | train | js,js |
f10f44acf5e070faf06eb43f6a9d00a7fe73f977 | diff --git a/script/lib/utils.js b/script/lib/utils.js
index <HASH>..<HASH> 100644
--- a/script/lib/utils.js
+++ b/script/lib/utils.js
@@ -49,7 +49,7 @@ async function getCurrentBranch (gitDir) {
'--remote'
], gitDir)).split('\n')
- branch = branches.filter(b => b === 'master' || b.match(/[0-9]+-[0-9]+-x/))[0]
+ branch = branches.filter(b => b.trim() === 'master' || b.match(/[0-9]+-[0-9]+-x/))[0]
if (!branch) {
console.log(`${fail} no release branch exists for this ref`)
process.exit(1) | fix: trim branch name before comparing to master (#<I>) | electron_electron | train | js |
fccb8e8bc723d577cde1f2c503520d47617ab5f3 | diff --git a/tests/InvoiceTest.php b/tests/InvoiceTest.php
index <HASH>..<HASH> 100644
--- a/tests/InvoiceTest.php
+++ b/tests/InvoiceTest.php
@@ -71,6 +71,18 @@ class InvoiceTest extends PHPUnit_Framework_TestCase
/**
* @test
*/
+ public function weCanGetTheCustomerForANewInvoice()
+ {
+ $includingTaxInvoice = $this->getNewInvoice(IncludingTaxInvoice::class);
+ $excludingTaxInvoice = $this->getNewInvoice(ExcludingTaxInvoice::class);
+
+ $this->assertEquals($includingTaxInvoice->getCustomer(), $this->customer);
+ $this->assertEquals($excludingTaxInvoice->getCustomer(), $this->customer);
+ }
+
+ /**
+ * @test
+ */
public function itCreatesAnInvoiceWithOTotal()
{
$includingTaxInvoice = $this->getNewInvoice(IncludingTaxInvoice::class); | test: getter for the customer of an invoice
Check if we can get the customer of an invoice | QuanticTelecom_invoices | train | php |
884f7b786414127573888ace813a2bcc058f68a9 | diff --git a/lib/config.js b/lib/config.js
index <HASH>..<HASH> 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -625,6 +625,7 @@ exports.extend = function(newConf) {
};
// node 11及以上版本缓存连接有问题,先禁掉
disableAgent = disableAgent || config.debug;
+ config.disableAgent = disableAgent;
config.httpAgent = disableAgent ? false : createAgent(agentConfig);
config.httpsAgent = disableAgent ? false : createAgent(agentConfig, true);
config.getSocksAgent = function(options) {
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -39,7 +39,7 @@ function proxy(callback) {
.concat(require('./inspectors'))
.concat(config.middlewares)
.concat(require('./handlers'));
- server.keepAliveTimeout = 0;
+ server.keepAliveTimeout = config.disableAgent ? 1 : 0;
server.timeout = 0;
proxyEvents.config = config;
proxyEvents.server = server; | refactor: keepAliveTimeout | avwo_whistle | train | js,js |
d32bc2e4f18ce94823b8b9b4cc4297b9ac4072e4 | diff --git a/packages/build-tools/utils/bolt-versions.js b/packages/build-tools/utils/bolt-versions.js
index <HASH>..<HASH> 100644
--- a/packages/build-tools/utils/bolt-versions.js
+++ b/packages/build-tools/utils/bolt-versions.js
@@ -30,9 +30,26 @@ async function writeVersionDataToJson(versionData) {
}
async function gatherBoltVersions() {
+ const config = await getConfig();
+
const versionSpinner = ora(
chalk.blue('Gathering data on the latest Bolt Design System releases...'),
).start();
+
+ // Skip over checking for Bolt releases when not in prod mode to speed up the initial build
+ if (!config.prod) {
+ versionSpinner.succeed(
+ chalk.green('Skipped gathering data on every Bolt release -- dev build!'),
+ );
+ return [
+ {
+ label: 'Local Dev',
+ type: 'option',
+ value: `http://localhost:${config.port}/${config.startPath}`,
+ },
+ ];
+ }
+
const tags = await gitSemverTags();
const tagUrls = []; | feat: update build process to automatically skip over the check for all available Bolt versions — speeds up initial boot up process when doing local dev work | bolt-design-system_bolt | train | js |
b6b17b032582dbde6f4f9faecef3dd662726b3e2 | diff --git a/lib/strategy/timer.js b/lib/strategy/timer.js
index <HASH>..<HASH> 100644
--- a/lib/strategy/timer.js
+++ b/lib/strategy/timer.js
@@ -15,7 +15,7 @@ module.exports = class TimerStrategy extends Strategy {
const { interval, cron, cronOptions, immediate } = this.schedule;
assert(interval || cron || immediate, `[egg-schedule] ${this.key} schedule.interval or schedule.cron or schedule.immediate must be present`);
- assert(is.function(this.handler), '[egg-schedule] ${this.key} strategy should override `handler()` method');
+ assert(is.function(this.handler), `[egg-schedule] ${this.key} strategy should override \`handler()\` method`);
// init cron parser
if (cron) { | fix: should use template literal (#<I>) | eggjs_egg-schedule | train | js |
b930c4a92c3b6ad6d5deb37d55f817631b022eff | diff --git a/lib/image.js b/lib/image.js
index <HASH>..<HASH> 100644
--- a/lib/image.js
+++ b/lib/image.js
@@ -154,6 +154,8 @@ Image.prototype = {
callback.call( self, error )
})
+ this.fd = null
+
return this
}, | fix(image): Null file descriptor in .close() | jhermsmeier_node-udif | train | js |
c492d1bf3215a83311417c216609edd208a05598 | diff --git a/nonebot/typing.py b/nonebot/typing.py
index <HASH>..<HASH> 100644
--- a/nonebot/typing.py
+++ b/nonebot/typing.py
@@ -38,6 +38,10 @@ __all__ = [
'State_T',
'Filter_T',
'PermChecker_T',
+ 'NLPHandler_T',
+ 'NoticeHandler_T',
+ 'RequestHandler_T',
+ 'MessagePreprocessor_T',
'PermissionPolicy_T',
'PluginLifetimeHook_T',
] | fix: typing __all__ missing entires | richardchien_nonebot | train | py |
cbe8e6dd95be1c50b5c97b55812c457f30b72141 | diff --git a/actions/class.CommonModule.php b/actions/class.CommonModule.php
index <HASH>..<HASH> 100644
--- a/actions/class.CommonModule.php
+++ b/actions/class.CommonModule.php
@@ -106,9 +106,9 @@ abstract class tao_actions_CommonModule extends LegacyController implements Serv
return AclProxy::hasAccess($user, $controllerClass, $action, $parameters);
}
- protected function hasWriteAccessToAction(string $action, ?User $user = null): bool
+ protected function hasWriteAccessToAction(string $action, ?string $controller = null, ?User $user = null): bool
{
- return $this->getActionAccessControl()->hasWriteAccess(static::class, $action, $user);
+ return $this->getActionAccessControl()->hasWriteAccess($controller ?? static::class, $action, $user);
}
protected function getUserRoles(): array | refactor: allow to provide controller to check write permissions to action | oat-sa_tao-core | train | php |
5c6699942e128767c6ed463d68cbedc8108d3af8 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -43,7 +43,7 @@ function getRoot(node) {
}
function isShadowRoot(node) {
- return typeof ShadowRoot === 'function' && node instanceof ShadowRoot;
+ return node.nodeName === '#document-fragment' && node.constructor.name === 'ShadowRoot';
} | fix: Make shadow root detection work cross-realmn | foobarhq_get-root-node-polyfill | train | js |
df725cace6f8f23834faf49f658b83f71c80564f | diff --git a/extensions/tags/src/LoadForumTagsRelationship.php b/extensions/tags/src/LoadForumTagsRelationship.php
index <HASH>..<HASH> 100755
--- a/extensions/tags/src/LoadForumTagsRelationship.php
+++ b/extensions/tags/src/LoadForumTagsRelationship.php
@@ -42,6 +42,7 @@ class LoadForumTagsRelationship
->limit(4) // We get one more than we need so the "more" link can be shown.
)
->whereVisibleTo($actor)
+ ->withStateFor($actor)
->get();
}
}
diff --git a/extensions/tags/src/Tag.php b/extensions/tags/src/Tag.php
index <HASH>..<HASH> 100644
--- a/extensions/tags/src/Tag.php
+++ b/extensions/tags/src/Tag.php
@@ -34,6 +34,7 @@ use Illuminate\Database\Eloquent\Builder;
* @property int $last_posted_discussion_id
* @property int $last_posted_user_id
* @property string $icon
+ * @property TagState
*/
class Tag extends AbstractModel
{ | perf: Eager load actor tag states (#<I>) | flarum_core | train | php,php |
b0d3483b38cbea1a95a81e21875c5b11e18f26cd | diff --git a/src/paging/Paging.js b/src/paging/Paging.js
index <HASH>..<HASH> 100644
--- a/src/paging/Paging.js
+++ b/src/paging/Paging.js
@@ -9,6 +9,13 @@ export default class Paging extends Component {
};
this.onPrevOrNext = this.onPrevOrNext.bind(this);
}
+ componentWillReceiveProps(nextProps) {
+ if (nextProps.activePage !== this.props.activePage) {
+ this.setState({
+ activePage: nextProps.activePage,
+ });
+ }
+ }
onPrevOrNext(ty) {
const { total, pageSize, onChange } = this.props;
const { activePage } = this.state; | fix(Paging): fix activePage props is not update. | uiwjs_uiw | train | js |
395b93f34ae94e9107095bfae3209971b63b5486 | diff --git a/generators/docker-base.js b/generators/docker-base.js
index <HASH>..<HASH> 100644
--- a/generators/docker-base.js
+++ b/generators/docker-base.js
@@ -103,10 +103,9 @@ function loadConfigs() {
// Loading configs
this.debug(`Apps folders: ${this.appsFolders}`);
this.appsFolders.forEach(appFolder => {
- const path = this.destinationPath(`${this.directoryPath + appFolder}/.yo-rc.json`);
- const fileData = this.fs.readJSON(path);
- if (fileData) {
- const config = fileData['generator-jhipster'];
+ const path = this.destinationPath(`${this.directoryPath + appFolder}`);
+ if (this.fs.existsSync(`${path}/.yo-rc.json`)) {
+ const config = getAllJhipsterConfig(this, false, path);
if (config.applicationType === 'monolith') {
this.monolithicNb++; | fix: fetch configuration from the blueprints | jhipster_generator-jhipster | train | js |
9324df3c32f151b36e7ed39d5520fff859d715f5 | diff --git a/app/templates/Gruntfile.js b/app/templates/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/app/templates/Gruntfile.js
+++ b/app/templates/Gruntfile.js
@@ -351,6 +351,7 @@ module.exports = function (grunt) {
dist: {
options: {
buildnumber: true,
+ indentSize: 2,
background: {
target: 'scripts/background.js',
exclude: [ | style(manifest): indentation remains unchanged after build | yeoman_generator-chrome-extension | train | js |
726568bd6d7df7066718e30f6b153f73f6463db8 | diff --git a/src/_internals/set.js b/src/_internals/set.js
index <HASH>..<HASH> 100644
--- a/src/_internals/set.js
+++ b/src/_internals/set.js
@@ -528,10 +528,10 @@ function baseSet(object, path, value, customizer){
}
path = isKey(path, object) ? [ path ] : castPath(path)
- const index = -1,
- { length } = path,
- lastIndex = length - 1,
- nested = object
+ let index = -1
+ let nested = object
+ const { length } = path
+ const lastIndex = length - 1
while (nested != null && ++index < length){
let key = toKey(path[ index ]), | fix: internal set after lint | selfrefactor_rambdax | train | js |
4996f1d707a6e3fd119aa77911428c7e431942e6 | diff --git a/lib/couchdb/index.js b/lib/couchdb/index.js
index <HASH>..<HASH> 100644
--- a/lib/couchdb/index.js
+++ b/lib/couchdb/index.js
@@ -118,7 +118,7 @@ exports.pollCouch = function (env_config, callback) {
env_config.couch.version = data.version
env_config.couch.vendor = _.findKey(data, function (prop) {
- return prop === 'Welcome!'
+ return /^welcome/i.test(prop)
})
console.error('CouchDB started') | fix(couchdb): correctly detect couchdbs that reply "Welcome" instead of "Welcome!"
* * *
This commit was sponsored by The Hoodie Firm.
You can hire The Hoodie Firm:
<URL> | hoodiehq_hoodie-server | train | js |
0a610c1ad79df91ef9d0282fb6a85436f79215aa | diff --git a/packages/editor/src/setup-bolt.js b/packages/editor/src/setup-bolt.js
index <HASH>..<HASH> 100644
--- a/packages/editor/src/setup-bolt.js
+++ b/packages/editor/src/setup-bolt.js
@@ -566,7 +566,7 @@ export function setupBolt(editor) {
</bolt-interactive-pathways>`,
});
- // Commented this out because this work was superceded by above starters. But leaving because they're simpler and client may want to reinstate.
+ // Commented this out because this was superceded by above starters. But leaving because they're simpler and client may want to reinstate.
// registerBoltComponent({
// name: 'bolt-interactive-pathways',
// schema: pathwaysSchema, | chore(micro-journey): trigger refresh by changing text | bolt-design-system_bolt | train | js |
e7faab2ecb81c4550419bd1522de9dd8a766e4f8 | diff --git a/packages/core/src/tree/index.js b/packages/core/src/tree/index.js
index <HASH>..<HASH> 100644
--- a/packages/core/src/tree/index.js
+++ b/packages/core/src/tree/index.js
@@ -133,8 +133,7 @@ export default class Tree extends React.Component {
const selected = selectedKeys.indexOf(item.key) > -1;
const noChild = !item.children;
const itemIsOpen = openKeys.indexOf(item.key) > -1;
- let iconItem = icon && typeof icon === 'function' ? icon(item, itemIsOpen, noChild) : 'caret-right';
- iconItem = icon && typeof icon === 'string' ? icon : 'caret-right';
+ const iconItem = icon && typeof icon === 'function' ? icon(item, itemIsOpen, noChild) : (icon && typeof icon === 'string' && icon) || 'caret-right';
return (
<li key={idx}>
<div className={classnames(`${prefixCls}-label`)}> | fix(Tree): Fix icon props issue. | uiwjs_uiw | train | js |
ce255e80667cf519d89e6b2e914cefd4b9e660ca | diff --git a/test/e2e/specs/specs-calypso/wp-my-home-support-search-spec.js b/test/e2e/specs/specs-calypso/wp-my-home-support-search-spec.js
index <HASH>..<HASH> 100644
--- a/test/e2e/specs/specs-calypso/wp-my-home-support-search-spec.js
+++ b/test/e2e/specs/specs-calypso/wp-my-home-support-search-spec.js
@@ -57,13 +57,16 @@ describe( `[${ host }] My Home "Get help" support search card: (${ screenSize })
);
} );
- it( 'Displays Default Results initially', async function () {
- supportSearchComponent = await SupportSearchComponent.Expect( this.driver );
+ // Skipped because it depends on the existing state. If the user does not have a pending purchase
+ // it may show only 5 results, but this test doesn't try to create a purchase.
+ it.skip( 'Displays Default Results initially', async function () {
+ // supportSearchComponent = await SupportSearchComponent.Expect( this.driver );
const resultsCount = await supportSearchComponent.getDefaultResultsCount();
assert.equal( resultsCount, 6, 'There are not 6 Default Results displayed.' );
} );
it( 'Returns API Search Results for valid search query', async function () {
+ supportSearchComponent = await SupportSearchComponent.Expect( this.driver );
await supportSearchComponent.searchFor( 'Domain' );
const searchResultsCount = await supportSearchComponent.getSearchResultsCount(); | ci(e2e): Skip flaky test (#<I>)
* Skip flaky test
* Update test/e2e/specs/specs-calypso/wp-my-home-support-search-spec.js | Automattic_wp-calypso | train | js |
7cfefa58059d7136705899b5f827f81fa40a7b0d | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@ setup(
author='Jacopo Cascioli',
author_email='jacopocascioli@gmail.com',
license='MIT',
- version='0.1.0',
+ version='0.1.1',
packages=find_packages(),
tests_require=[
'pytest', | chore(aratrum): version bump to <I> | Vesuvium_aratrum | train | py |
8f8cc5a727825634e1dbd94e66730d0dbec5acd9 | diff --git a/mishmash/util.py b/mishmash/util.py
index <HASH>..<HASH> 100644
--- a/mishmash/util.py
+++ b/mishmash/util.py
@@ -17,7 +17,7 @@ def splitNameByPrefix(s):
def sortByDate(things, prefer_recording_date=False):
# XXX: Why just just make Album types sortable by intregating this
def _sortkey(a):
- return datePicker(a, prefer_recording_date=prefer_recording_date)
+ return datePicker(a, prefer_recording_date=prefer_recording_date) or 0
return sorted(things, key=_sortkey) | fix: Fix album sorts for missing dates | nicfit_MishMash | train | py |
e0a3a4385e29513589471ca5c4f7b6b86242348c | diff --git a/lib/components/addons/InfoBox.js b/lib/components/addons/InfoBox.js
index <HASH>..<HASH> 100644
--- a/lib/components/addons/InfoBox.js
+++ b/lib/components/addons/InfoBox.js
@@ -116,11 +116,14 @@ var InfoBox = (exports.InfoBox = (function(_React$PureComponent) {
if (!_canUseDom2.default || this.state[_constants.INFO_BOX]) {
return
}
- var GoogleMapsInfobox = require(/* "google-maps-infobox" uses "google" as a global variable. Since we don't
- * have "google" on the server, we can not use it in server-side rendering.
- * As a result, we import "google-maps-infobox" here to prevent an error on
- * a isomorphic server.
- */ "google-maps-infobox")
+
+ var _require = require(/* "google-maps-infobox" uses "google" as a global variable. Since we don't
+ * have "google" on the server, we can not use it in server-side rendering.
+ * As a result, we import "google-maps-infobox" here to prevent an error on
+ * a isomorphic server.
+ */ "google-maps-infobox"),
+ GoogleMapsInfobox = _require.InfoBox
+
var infoBox = new GoogleMapsInfobox()
;(0, _MapChildHelper.construct)(
InfoBox.propTypes, | chore(lib): compile from src with `babel` | tomchentw_react-google-maps | train | js |
a2a8f188349ef4eaf75b99e7106cef261e5ee74c | diff --git a/lib/plugins/index.js b/lib/plugins/index.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/index.js
+++ b/lib/plugins/index.js
@@ -496,11 +496,12 @@ function getRulesFromPlugins(type, req, res, callback) {
rulesCache.del(cacheKey);
}
}
- if (data && data.pendingCallbacks) {
- data.pendingCallbacks.forEach(function(cb) {
+ var pendingCallbacks = data && data.pendingCallbacks;
+ if (pendingCallbacks) {
+ delete data.pendingCallbacks;
+ pendingCallbacks.forEach(function(cb) {
cb(err, body, values, raw);
});
- delete data.pendingCallbacks;
}
body = (body || '') + (!isResRules && plugin._rules ? '\n' + plugin._rules : '');
if (body || values) { | feat: Supports cache the rules of plugin | avwo_whistle | train | js |
b1f13997576a6200697f22a7b7ff9b9a17a1b2f7 | diff --git a/packages/components/bolt-animate/src/animate.js b/packages/components/bolt-animate/src/animate.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-animate/src/animate.js
+++ b/packages/components/bolt-animate/src/animate.js
@@ -134,12 +134,17 @@ class BoltAnimate extends withLitHtml() {
}) {
this._animStyle = {
animationName,
- animationDuration: `${animationDuration}ms`,
- animationDelay: `${animationDelay}ms`,
+ // Safari breaks with 0ms animation-duration
+ animationDuration: `${Math.max(1, animationDuration)}ms`,
animationFillMode,
animationTimingFunction,
animationIterationCount,
};
+
+ // Safari breaks with 0ms animation-delay
+ if (animationDelay > 0) {
+ this._animStyle.animationDelay = `${animationDelay}ms`;
+ }
}
triggerAnimIn() { | fix(bolt-animate): safari animation fixes | bolt-design-system_bolt | train | js |
f543a5749c63aee71d691a306e14471400e6ded0 | diff --git a/python/setup.py b/python/setup.py
index <HASH>..<HASH> 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -108,7 +108,7 @@ if platform.system() == 'Darwin':
setup(
name='neuroglancer',
- version='1.1.2',
+ version='1.1.3',
description='Python data backend for neuroglancer, a WebGL-based viewer for volumetric data',
author='Jeremy Maitin-Shepard, Jan Funke',
author_email='jbms@google.com, jfunke@iri.upc.edu', | chore(python): bump package version to <I> | google_neuroglancer | train | py |
62dafd77338b92f90c46bccca224f937f751cbb8 | diff --git a/lib/dates-between.js b/lib/dates-between.js
index <HASH>..<HASH> 100644
--- a/lib/dates-between.js
+++ b/lib/dates-between.js
@@ -1,5 +1,4 @@
/**
- * Dates-between module
* @module dates-between
*/
'use strict';
@@ -30,7 +29,7 @@ module.exports = function *datesBetween(startDate, endDate) {
* @access private
* @param {Date} date
* The date object to increment.
- * @param {Number} amount
+ * @param {number} amount
* The number of days to increment by.
* @returns {Date}
* Returns the incremented date. | chore: fix eslint issues | rowanmanning_dates-between | train | js |
6923f2531df23b9de55830d802c363b2b3f2676f | diff --git a/webapps/webapp/src/main/webapp/app/cockpit/directives/processDiagram.js b/webapps/webapp/src/main/webapp/app/cockpit/directives/processDiagram.js
index <HASH>..<HASH> 100644
--- a/webapps/webapp/src/main/webapp/app/cockpit/directives/processDiagram.js
+++ b/webapps/webapp/src/main/webapp/app/cockpit/directives/processDiagram.js
@@ -314,7 +314,6 @@ ngDefine('cockpit.directives', [
$scope.selection['view'] = {};
$scope.selection.view['bpmnElements'] = [ selectedBpmnElement ];
$scope.selection.view['selectedBpmnElement'] = {element: selectedBpmnElement, ctrlKey: false, remove: false};
- $scope.selection.view['scrollToBpmnElement'] = selectedBpmnElement;
$scope.$apply();
}; | fix(diagram): Fix scrolling to element on click
- remove scroll behavior on click on an element
related to CAM-<I> | camunda_camunda-bpm-platform | train | js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.