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 |
|---|---|---|---|---|---|
7fb2df94f4f06d984c326b5ee897f877d69e86b0
|
diff --git a/packages/helix-shared-config/src/fetchconfig/cache.js b/packages/helix-shared-config/src/fetchconfig/cache.js
index <HASH>..<HASH> 100644
--- a/packages/helix-shared-config/src/fetchconfig/cache.js
+++ b/packages/helix-shared-config/src/fetchconfig/cache.js
@@ -12,7 +12,7 @@
const LRU = require('lru-cache');
-let lru = new LRU({ max: 1000, maxAge: 60 * 1000 });
+let lru = new LRU({ max: 1000, ttl: 60 * 1000 });
/**
* Returns a memoized version of the function `fn`.
|
fix: suppress deprecation warning (maxAge has been replaced by ttl) (#<I>)
|
adobe_helix-shared
|
train
|
js
|
4e154ac5ad1a697cc8376205a0ece8acb864b5eb
|
diff --git a/packages/@vue/cli-service-global/index.js b/packages/@vue/cli-service-global/index.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-service-global/index.js
+++ b/packages/@vue/cli-service-global/index.js
@@ -91,5 +91,5 @@ exports.build = (_entry, args) => {
if (asLib) {
args.entry = entry
}
- createService(entry, asLib).run('build', args)
+ return createService(entry, asLib).run('build', args)
}
|
feat(cli-service-global): to know if the build has finished (#<I>)
|
vuejs_vue-cli
|
train
|
js
|
31aaeec87fcd59eb3866682a0d529100a975f7fb
|
diff --git a/test/integration/contract-aci.js b/test/integration/contract-aci.js
index <HASH>..<HASH> 100644
--- a/test/integration/contract-aci.js
+++ b/test/integration/contract-aci.js
@@ -289,7 +289,8 @@ describe('Contract instance', function () {
const value = event.decoded[tIndex]
switch (t) {
case SOPHIA_TYPES.address:
- event.address.should.be.equal(`ct_${value}`)
+ // the address type in sophia is with ak_ prefix, if a ct_ prefix is expected, contract type should be used
+ event.address.replace('ct_', 'ak_').should.be.equal(value)
break
case SOPHIA_TYPES.int:
expect(typeof value === 'string' || typeof value === 'number')
|
fix(events): fix test for incorrect address return type
|
aeternity_aepp-sdk-js
|
train
|
js
|
7767702bfdbed1e6012fe88e7f8cc9fd142cdedf
|
diff --git a/src/cli/index.js b/src/cli/index.js
index <HASH>..<HASH> 100644
--- a/src/cli/index.js
+++ b/src/cli/index.js
@@ -13,7 +13,7 @@ const cli = meow(
description: 'Codemods for migrating test files to Jest.',
help: `
Usage
- $ jest-codemods <path> [options]
+ $ npx jest-codemods <path> [options]
path Files or directory to transform. Can be a glob like src/**.test.js
|
docs: Update in actual cli as well
|
skovhus_jest-codemods
|
train
|
js
|
569fd240de154a02c8bbcf3e1f8a2a5eccded1f1
|
diff --git a/packages/build-tools/create-webpack-config.js b/packages/build-tools/create-webpack-config.js
index <HASH>..<HASH> 100644
--- a/packages/build-tools/create-webpack-config.js
+++ b/packages/build-tools/create-webpack-config.js
@@ -314,7 +314,7 @@ async function createWebpackConfig(buildConfig) {
},
},
{
- test: /\.(cur|svg)$/,
+ test: /\.(cur|svg|png)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]',
|
feat: update webpack to process png with file-loader
|
bolt-design-system_bolt
|
train
|
js
|
c160906859fd188a340404eac917cb0083e7f03e
|
diff --git a/ariadne/asgi.py b/ariadne/asgi.py
index <HASH>..<HASH> 100644
--- a/ariadne/asgi.py
+++ b/ariadne/asgi.py
@@ -438,3 +438,4 @@ class GraphQL:
if self.on_subscription_complete:
await self.on_subscription_complete(subscription)
await subscription.async_generator.aclose()
+
|
chore: missing blank line at end of file
|
mirumee_ariadne
|
train
|
py
|
84872d231ac0ec9c737a1f6729c8797a2e7bb828
|
diff --git a/dvc/remote/local/__init__.py b/dvc/remote/local/__init__.py
index <HASH>..<HASH> 100644
--- a/dvc/remote/local/__init__.py
+++ b/dvc/remote/local/__init__.py
@@ -134,7 +134,19 @@ class RemoteLOCAL(RemoteBASE):
self.makedirs(to_info.parent)
- # NOTE: just create an empty file for an empty cache
+ # If there are a lot of empty files (which happens a lot in datasets),
+ # and the cache type is `hardlink`, we might reach link limits and
+ # will get something like: `too many links error`
+ #
+ # This is because all those empty files will have the same checksum
+ # (i.e. 68b329da9893e34099c7d8ad5cb9c940), therfore, they will be
+ # linked to the same file in the cache.
+ #
+ # From https://en.wikipedia.org/wiki/Hard_link
+ # * ext4 limits the number of hard links on a file to 65,000
+ # * Windows with NTFS has a limit of 1024 hard links on a file
+ #
+ # That's why we simply create an empty file rather than a link.
if self.getsize(from_info) == 0:
self.open(to_info, "w+").close()
|
docs: explain potential of hitting link limit
|
iterative_dvc
|
train
|
py
|
084dff477ee73729dd24e7831d270fe0855d835b
|
diff --git a/cmd/helm/install.go b/cmd/helm/install.go
index <HASH>..<HASH> 100644
--- a/cmd/helm/install.go
+++ b/cmd/helm/install.go
@@ -310,7 +310,14 @@ func vals(valueFiles valueFiles, values []string) ([]byte, error) {
// User specified a values files via -f/--values
for _, filePath := range valueFiles {
currentMap := map[string]interface{}{}
- bytes, err := ioutil.ReadFile(filePath)
+
+ var bytes []byte
+ var err error
+ if strings.TrimSpace(filePath) == "-" {
+ bytes, err = ioutil.ReadAll(os.Stdin)
+ } else {
+ bytes, err = ioutil.ReadFile(filePath)
+ }
if err != nil {
return []byte{}, err
}
|
feat(helm):Support reading the values file from STDIN
We can use the command like
<pre>sed "s|foo|bar|g" values-template.yaml | helm install -f - stable/foo</pre>
This may be helpful in scripting.
Closes #<I>
|
helm_helm
|
train
|
go
|
19c8576a6ab9ac2338e3aee649f314113d1c8459
|
diff --git a/src/methods/create.js b/src/methods/create.js
index <HASH>..<HASH> 100644
--- a/src/methods/create.js
+++ b/src/methods/create.js
@@ -17,12 +17,12 @@ export default function({model, req, res}) {
data = [data]
}
- const attributes = _.map(data, document => document.attributes)
+ const properties = _.map(data, document => adapter.properties(model, document))
return model.sequelize
.transaction(() => {
return model
- .bulkCreate(attributes)
+ .bulkCreate(properties)
// FIXME: workaround for http://docs.sequelizejs.com/en/latest/api/model/#bulkcreaterecords-options-promisearrayinstance
.then(documents => {
return Promise
|
feat: create resource w/ relationship key immediately
This does affect resource relationships which are of type `BelongsTo`
and `HasOne` and therefore have a foreign key field within the same table
(`relationshipId`). This change was necessary as it is common to have
non nullable foreign keys and the previously used `setRelationship`
need an extra query to set the foreign key value.
|
netiam_contrib-rest
|
train
|
js
|
e795ac9c03aa2563140848e0d612de8a577c47cb
|
diff --git a/schema_salad/ref_resolver.py b/schema_salad/ref_resolver.py
index <HASH>..<HASH> 100644
--- a/schema_salad/ref_resolver.py
+++ b/schema_salad/ref_resolver.py
@@ -581,7 +581,7 @@ class Loader(object):
document[idmapField] = ls
- typeDSLregex = re.compile(ur"^([^[?]+)(\[\])?(\?)?$")
+ typeDSLregex = re.compile(u"^([^[?]+)(\[\])?(\?)?$")
def _type_dsl(self,
t, # type: Union[Text, Dict, List]
|
fix: make regex command python3 compatible
|
common-workflow-language_schema_salad
|
train
|
py
|
2fbc872740ea87224a2344256d32365942e1e5aa
|
diff --git a/app/src/components/CalibrationPanels/SaveXYPoint.js b/app/src/components/CalibrationPanels/SaveXYPoint.js
index <HASH>..<HASH> 100644
--- a/app/src/components/CalibrationPanels/SaveXYPoint.js
+++ b/app/src/components/CalibrationPanels/SaveXYPoint.js
@@ -158,6 +158,7 @@ export function SaveXYPoint(props: CalibrationPanelProps): React.Node {
sessionType,
activePipette,
instruments,
+ checkBothPipettes,
} = props
const {
@@ -193,7 +194,7 @@ export function SaveXYPoint(props: CalibrationPanelProps): React.Node {
}
if (
finalCommand &&
- instruments?.length &&
+ checkBothPipettes &&
activePipette?.rank === Sessions.CHECK_PIPETTE_RANK_FIRST
) {
commands = [...commands, { command: finalCommand }]
|
fix(app): Ensure we are using the correct logic for screen transitions in cal check (#<I>)
|
Opentrons_opentrons
|
train
|
js
|
d793c46e7d4d26f669f1c4f67b52ad36e94fb1f5
|
diff --git a/tests/Tokenizer/FileTest.php b/tests/Tokenizer/FileTest.php
index <HASH>..<HASH> 100644
--- a/tests/Tokenizer/FileTest.php
+++ b/tests/Tokenizer/FileTest.php
@@ -91,7 +91,7 @@
public function testHtml() {
# create temp file
- $code = '<html><?php= 1 ?></html>';
+ $code = '<html><?= 1 ?></html>';
$file = $file = $this->getFileObjectWithCode($code);
|
fix: test php code in html
|
funivan_PhpTokenizer
|
train
|
php
|
af7e5f054dbf9c5af45144143357e64e1eaefba8
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -11,9 +11,10 @@ const elements = `${__dirname}/node_modules/pearson-elements/dist/css/e
module.exports = {
entry: {
- demo : [ demo, demoScss ],
- dev : [ elements, icons, main ],
- dist : [ compounds ]
+ demo : [ demo, demoScss ],
+ dev : [ elements, icons ],
+ eventInstantiator : [ main ],
+ dist : [ compounds ]
},
output: {
path : path.resolve(__dirname, 'build'),
|
chore: move main out of webpack dev package and into its own package called eventInstatiator
|
Pearson-Higher-Ed_compounds
|
train
|
js
|
3ed27c641fe9a21dc1be81bfecb5ef1afb630ccc
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -61,10 +61,8 @@ class Key {
*
* @description
* A high level class for accepting and processing keys
- *
- * @param {String} [scum]
*/
- constructor (scum) {
+ constructor () {
}
|
chore(index): goofing around
|
EternalDeiwos_keyto
|
train
|
js
|
7dc9842e4eba09f039672721a5ac4123ad1f8951
|
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
@@ -1340,17 +1340,18 @@ function httpNetworkFetch (
if (this.destroyed) {
return
}
-
this.destroyed = true
+ err = err ?? new AbortError()
+
if (this.abort) {
- this.abort()
+ this.abort(err)
this.abort = null
}
+ // TODO (fix): Do we need controller here?
if (context.controller) {
try {
- err = err ?? new AbortError()
context.controller.error(err)
context.controller = null
} catch (err) {
|
fix: fetch abort connection with reason
|
mcollina_undici
|
train
|
js
|
af3f57e1a4c7bfbe1e548abf1f3224a4d4289829
|
diff --git a/test/basic.js b/test/basic.js
index <HASH>..<HASH> 100644
--- a/test/basic.js
+++ b/test/basic.js
@@ -38,6 +38,17 @@ test('data send/receive text', function (t) {
t.equal(peer1.initiator, true, 'peer1 is initiator')
t.equal(peer2.initiator, false, 'peer2 is not initiator')
+ t.equal(peer1.localAddress, peer2.remoteAddress)
+ t.equal(peer1.localPort, peer2.remotePort)
+
+ t.equal(peer2.localAddress, peer1.remoteAddress)
+ t.equal(peer2.localPort, peer1.remotePort)
+
+ t.ok(typeof peer1.remoteFamily === 'string')
+ t.ok(peer1.remoteFamily.indexOf('IPv') === 0)
+ t.ok(typeof peer2.remoteFamily === 'string')
+ t.ok(peer2.remoteFamily.indexOf('IPv') === 0)
+
peer1.send('sup peer2')
peer2.on('data', function (data) {
t.equal(data, 'sup peer2', 'got correct message')
|
test: add tests for adress properties
|
feross_simple-peer
|
train
|
js
|
5de14674942fb653e987efdff9c1a2222ab53e24
|
diff --git a/src/productionEnum.macro.js b/src/productionEnum.macro.js
index <HASH>..<HASH> 100644
--- a/src/productionEnum.macro.js
+++ b/src/productionEnum.macro.js
@@ -19,7 +19,7 @@ module.exports = createMacro(({references, babel: {types: t, template}}) => {
references.default.forEach(({parentPath: ref}, index) => {
if (!ref.isCallExpression()) {
throw new Error(
- `${__filename} is supposed to be used as function call, isntead you have used it as ${
+ `${__filename} is supposed to be used as function call, instead you have used it as ${
ref.node.type
}.`,
)
|
chore: fix misspelling in comment (#<I>)
fixes a small letter transposition in a comment
|
downshift-js_downshift
|
train
|
js
|
b97c89fd2dbe5e47b4848134bb0ca6749401b956
|
diff --git a/wandb/wandb_torch.py b/wandb/wandb_torch.py
index <HASH>..<HASH> 100644
--- a/wandb/wandb_torch.py
+++ b/wandb/wandb_torch.py
@@ -352,7 +352,11 @@ class TorchGraph(wandb.data_types.Graph):
if not graph.criterion_passed:
if hasattr(output[0], "grad_fn"):
graph.criterion = output[0].grad_fn
- elif isinstance(output[0], list) and hasattr(output[0][0], "grad_fn"):
+ elif (
+ isinstance(output[0], list)
+ and output[0]
+ and hasattr(output[0][0], "grad_fn")
+ ):
graph.criterion = output[0][0].grad_fn
# log graph and remove hook
|
fix: check watch non-empty list (#<I>) (#<I>)
* fix: check watch non-empty list (#<I>)
|
wandb_client
|
train
|
py
|
ddf5dbbebdb5ad28a7b13600d933c3426e674d42
|
diff --git a/src/proxy.js b/src/proxy.js
index <HASH>..<HASH> 100644
--- a/src/proxy.js
+++ b/src/proxy.js
@@ -233,28 +233,18 @@ const mapTraps = makeTrapsForGetters({
cb.call(thisArg, value, key, map)
}),
get: state => key => {
- if (!state.modified && state.drafts.has(key)) {
- return state.drafts.get(key)
- }
-
- if (state.modified && state.copy.has(key)) {
- return state.copy.get(key)
+ const drafts = state[state.modified ? "copy" : "drafts"]
+ if (drafts.has(key)) {
+ return drafts.get(key)
}
const value = latest(state).get(key)
-
if (state.finalized || !isDraftable(value)) {
return value
}
const draft = createProxy(value, state)
-
- if (!state.modified) {
- state.drafts.set(key, draft)
- } else {
- state.copy.set(key, draft)
- }
-
+ drafts.set(key, draft)
return draft
},
keys: state => () => latest(state).keys(),
|
refactor: "get" trap for Maps
|
immerjs_immer
|
train
|
js
|
b2154d1990992de860e7fe9e856203a31da9f0e4
|
diff --git a/packages/experimental/micro-journeys/src/bolt-svg-animations/svg-animations.js b/packages/experimental/micro-journeys/src/bolt-svg-animations/svg-animations.js
index <HASH>..<HASH> 100644
--- a/packages/experimental/micro-journeys/src/bolt-svg-animations/svg-animations.js
+++ b/packages/experimental/micro-journeys/src/bolt-svg-animations/svg-animations.js
@@ -37,6 +37,7 @@ class SVGAnimations extends withLitContext {
const theme = this.context.theme || this.theme || '';
const classes = cx('c-bolt-svg-animations', {
[`t-bolt-${theme}`]: theme !== 'undefined' && !!theme,
+ [`c-bolt-svg-animations__type--${props.animType}`]: true,
});
const SVGTag = SVGs[`${props.animType}`];
|
feat(svg-animations): add animation type as a class; not needed currently, but helpful.
|
bolt-design-system_bolt
|
train
|
js
|
2d1ee3f9715f653a71fa9a356981c80cfd8dbc1a
|
diff --git a/webpack/base.js b/webpack/base.js
index <HASH>..<HASH> 100644
--- a/webpack/base.js
+++ b/webpack/base.js
@@ -57,4 +57,14 @@ module.exports = {
{ from: 'src/client/index.html' },
]),
],
+ externals: [
+ {
+ 'isomorphic-fetch': {
+ root: 'isomorphic-fetch',
+ commonjs2: 'isomorphic-fetch',
+ commonjs: 'isomorphic-fetch',
+ amd: 'isomorphic-fetch',
+ },
+ },
+ ],
};
|
fix(test): fix a strange error that caused by isomorphic-fetch
|
xodio_xod
|
train
|
js
|
9bb5589e17964bfbfb4d25d204a6bb4e10bef3b2
|
diff --git a/acme/http.go b/acme/http.go
index <HASH>..<HASH> 100644
--- a/acme/http.go
+++ b/acme/http.go
@@ -34,7 +34,8 @@ var (
ResponseHeaderTimeout: 15 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
TLSClientConfig: &tls.Config{
- RootCAs: initCertPool(),
+ ServerName: os.Getenv(caServerNameEnvVar),
+ RootCAs: initCertPool(),
},
},
}
@@ -53,6 +54,12 @@ const (
// authenticate an ACME server with a HTTPS certificate not issued by a CA in
// the system-wide trusted root list.
caCertificatesEnvVar = "LEGO_CA_CERTIFICATES"
+
+ // caServerNameEnvVar is the environment variable name that can be used to
+ // specify the CA server name that can be used to
+ // authenticate an ACME server with a HTTPS certificate not issued by a CA in
+ // the system-wide trusted root list.
+ caServerNameEnvVar = "LEGO_CA_SERVER_NAME"
)
// initCertPool creates a *x509.CertPool populated with the PEM certificates
|
feat: CA Server Name. (#<I>)
|
go-acme_lego
|
train
|
go
|
38b01e2addaa89daf3dea10395b9afb0c749ec64
|
diff --git a/lib/server/index.js b/lib/server/index.js
index <HASH>..<HASH> 100644
--- a/lib/server/index.js
+++ b/lib/server/index.js
@@ -132,7 +132,9 @@ module.exports.start = function () {
bundleManager.all().forEach(bundle => {
if (bundle.transformBareModuleSpecifiers) {
const opts = {
- rootDir: process.env.NODECG_ROOT,
+ rootDir: global.isZeitPkg ?
+ path.resolve(__dirname, '../../') :
+ process.env.NODECG_ROOT,
modulesUrl: `/bundles/${bundle.name}/node_modules`
};
app.use(`/bundles/${bundle.name}/*`, transformMiddleware(opts));
|
fix(package): fix error when running in a zeit pkg
|
nodecg_nodecg
|
train
|
js
|
1d2637de9600393affae26c8904c02508741755c
|
diff --git a/src/console.js b/src/console.js
index <HASH>..<HASH> 100644
--- a/src/console.js
+++ b/src/console.js
@@ -21,16 +21,26 @@ if (typeof process != 'undefined') {
}
}
+const stack = []
+
function LogBuffer(quiet) {
this.queue = []
this.quiet = !!quiet
this.mock()
}
+console.flush = function() {
+ let i = stack.length
+ while (--i !== -1) {
+ stack[i].flush()
+ }
+}
+
LogBuffer.prototype = {
constructor: LogBuffer,
mock() {
if (!this.active) {
+ stack.push(this)
this.active = true
this.mocked = mockable.map(mock, this)
if (typeof process != 'undefined') {
@@ -74,6 +84,7 @@ LogBuffer.prototype = {
},
unmock() {
if (this.active) {
+ stack.pop()
process.removeListener('SIGINT', this.sigint)
this.mocked.forEach(unmock)
this.mocked = null
|
feat: add console.flush
This flushes any active log buffers, which is useful when you set a breakpoint in a running test.
|
aleclarson_testpass
|
train
|
js
|
e7c2242414972dbc5472ccdfb3c01b86b57d0071
|
diff --git a/lib/topologies/mongos.js b/lib/topologies/mongos.js
index <HASH>..<HASH> 100644
--- a/lib/topologies/mongos.js
+++ b/lib/topologies/mongos.js
@@ -912,9 +912,6 @@ var executeWriteOperation = function(self, op, ns, ops, options, callback) {
return callback(err);
}
- // increment and assign txnNumber
- options.txnNumber = txnNumber(options.session);
-
// rerun the operation
server[op](ns, ops, options, callback);
});
diff --git a/lib/topologies/replset.js b/lib/topologies/replset.js
index <HASH>..<HASH> 100644
--- a/lib/topologies/replset.js
+++ b/lib/topologies/replset.js
@@ -1184,9 +1184,6 @@ var executeWriteOperation = function(self, op, ns, ops, options, callback) {
return callback(new MongoError('no primary server found'));
}
- // increment and assign txnNumber
- options.txnNumber = txnNumber(options.session);
-
// rerun the operation
self.s.replicaSetState.primary[op](ns, ops, options, callback);
});
|
fix(retryable-writes): don't increment `txnNumber` on retries
NODE-<I>
|
mongodb-js_mongodb-core
|
train
|
js,js
|
f8ca90eaf17f60d852ed7bdf5df2fc6bde703500
|
diff --git a/cloudvolume/datasource/graphene/mesh/unsharded.py b/cloudvolume/datasource/graphene/mesh/unsharded.py
index <HASH>..<HASH> 100644
--- a/cloudvolume/datasource/graphene/mesh/unsharded.py
+++ b/cloudvolume/datasource/graphene/mesh/unsharded.py
@@ -25,7 +25,8 @@ class GrapheneUnshardedMeshSource(UnshardedLegacyPrecomputedMeshSource):
def compute_filename(self, label):
layer_id = self.meta.meta.decode_layer_id(label)
- chunk_block_shape = 2 * Vec(*self.meta.meta.mesh_chunk_size)
+ chunk_block_shape = Vec(*self.meta.meta.mesh_chunk_size, dtype=np.int64)
+ chunk_block_shape *= np.int64(self.meta.meta.fan_out ** max(0, layer_id - 2))
start = self.meta.meta.decode_chunk_position(label)
start *= chunk_block_shape
bbx = Bbox(start, start + chunk_block_shape)
|
fix(graphene): dynamic mesh computed filename didn't account for layer id (#<I>)
|
seung-lab_cloud-volume
|
train
|
py
|
d779267d8579e0e50390834b447c6b83cd446645
|
diff --git a/packages/core/src/util/fetchFile.js b/packages/core/src/util/fetchFile.js
index <HASH>..<HASH> 100644
--- a/packages/core/src/util/fetchFile.js
+++ b/packages/core/src/util/fetchFile.js
@@ -8,7 +8,8 @@ import pkg from '../../package.json'
// Browser environments have CORS enabled
const corsEnabled = typeof location !== 'undefined' && typeof document !== 'undefined'
-let userAgent = `Citation.js/${pkg.version} Node.js/${process.version}`
+// Do not try to set the user agent in browsers
+let userAgent = corsEnabled ? '' : `Citation.js/${pkg.version} Node.js/${process.version}`
/**
* @typedef module:@citation-js/core.util.fetchFile~options
|
fix(core): do not use process variable in browser
Fix #<I>
|
citation-js_citation-js
|
train
|
js
|
149435979cdc4c623ea5d98011c7361f34cccff1
|
diff --git a/biz/webui/cgi-bin/composer.js b/biz/webui/cgi-bin/composer.js
index <HASH>..<HASH> 100644
--- a/biz/webui/cgi-bin/composer.js
+++ b/biz/webui/cgi-bin/composer.js
@@ -60,9 +60,6 @@ function handleConnect(options) {
headers: options.headers
}, function(socket) {
drain(socket);
- if (options.body) {
- socket.write(options.body);
- }
var sendData = function(data) {
data = util.toBuffer(data, getCharset(options.headers));
if (!data || !data.length) {
|
refactor: send options.body
|
avwo_whistle
|
train
|
js
|
b16958d4510689d187c2168b2b5f6270cf8eaa80
|
diff --git a/qpformat/file_formats/series_base.py b/qpformat/file_formats/series_base.py
index <HASH>..<HASH> 100644
--- a/qpformat/file_formats/series_base.py
+++ b/qpformat/file_formats/series_base.py
@@ -65,10 +65,10 @@ class SeriesData(object):
self.format = self.__class__.__name__
def __repr__(self):
- rep = f"QPFormat '{self.format}'" \
- + f", {len(self)} image(s)" \
- + f"at {hex(id(self))}" \
- + "\nfile: {self.path}"
+ rep = f"<qpformat {self.format} '{self.path}'" \
+ + f", {len(self)} image" \
+ + ("s " if len(self) > 1 else " ") \
+ + f"at {hex(id(self))}>"
meta = []
if "wavelength" in self.meta_data:
|
fix: repr did not contain path
|
RI-imaging_qpformat
|
train
|
py
|
1e3a9c18ec0dca7de0f4125a110cbbfbd17ded5e
|
diff --git a/lib/stdout-to-demo.spec.js b/lib/stdout-to-demo.spec.js
index <HASH>..<HASH> 100644
--- a/lib/stdout-to-demo.spec.js
+++ b/lib/stdout-to-demo.spec.js
@@ -188,4 +188,23 @@ describe('stdoutToDemo', () => {
done()
})
})
+
+ it('should add earlier output even if it was printed later', done => {
+ return stdoutToDemo([
+ 'setTimeout(() => console.log("1Hello world!"), 1)',
+ '',
+ 'console.log("2Hello world!")',
+ ].join('\n'))
+ .then(actual => {
+ expect(actual).to.eq([
+ 'setTimeout(() => console.log("1Hello world!"), 1)',
+ '//> 1Hello world!',
+ '',
+ 'console.log("2Hello world!")',
+ '//> 2Hello world!',
+ ].join('\n'))
+ done()
+ })
+ .catch(done)
+ })
})
|
test(stdout-to-demo): add test for the scenario when messages are printed not in sequence
|
zkochan_codemo
|
train
|
js
|
dd847be0c8a8f63582c4634d415eef9d14752a41
|
diff --git a/src/geshi.php b/src/geshi.php
index <HASH>..<HASH> 100644
--- a/src/geshi.php
+++ b/src/geshi.php
@@ -4095,7 +4095,7 @@ class GeSHi {
foreach ($this->language_data['STYLES']['STRINGS'] as $group => $styles) {
if ($styles != '' && (!$economy_mode || $this->lexic_permissions['STRINGS'])) {
// NEW: since 1.0.8 we have to handle hardquotes
- if ($group == 'HARD') {
+ if ($group === 'HARD') {
$group = '_h';
}
$stylesheet .= "$selector.st$group {{$styles}}\n";
|
fix: stylesheet for strings was messed up with the recent hardquote change
|
GeSHi_geshi-1.0
|
train
|
php
|
ef68ddbcce88f227593f16d676b46a6b16146144
|
diff --git a/ui/src/components/select/QSelect.js b/ui/src/components/select/QSelect.js
index <HASH>..<HASH> 100755
--- a/ui/src/components/select/QSelect.js
+++ b/ui/src/components/select/QSelect.js
@@ -17,7 +17,7 @@ import { useFormProps, useFormInputNameAttr } from '../../composables/private/us
import useKeyComposition from '../../composables/private/use-key-composition.js'
import { createComponent } from '../../utils/private/create.js'
-import { isDeepEqual, isObject } from '../../utils/private/is.js'
+import { isDeepEqual } from '../../utils/private/is.js'
import { stop, prevent, stopAndPrevent } from '../../utils/event.js'
import { normalizeToInterval } from '../../utils/format.js'
import { shouldIgnoreKey, isKeyCode } from '../../utils/private/key-composition.js'
@@ -602,7 +602,7 @@ export default createComponent({
return typeof val === 'function'
? val
- : opt => (isObject(opt) === true && val in opt ? opt[ val ] : opt)
+ : opt => (Object(opt) === opt && val in opt ? opt[ val ] : opt)
}
function isOptionSelected (opt) {
|
fix(ui): modify isPlainObject to account for various use-cases but handle the main idea (Arrays should not pass) #<I>
|
quasarframework_quasar
|
train
|
js
|
30a7a9012c205c8c160c1cfd5c71ce93aaa0f0d9
|
diff --git a/base/spec/lib/stellar/operation_spec.rb b/base/spec/lib/stellar/operation_spec.rb
index <HASH>..<HASH> 100644
--- a/base/spec/lib/stellar/operation_spec.rb
+++ b/base/spec/lib/stellar/operation_spec.rb
@@ -278,4 +278,21 @@ RSpec.describe Stellar::Operation do
[:signer_key, Stellar::SignerKey]
end
end
+
+ describe ".create_account" do
+ before { attrs.merge!(destination: account, starting_balance: 50) }
+ subject(:operation) { described_class.create_account(**attrs) }
+
+ it_behaves_like "XDR serializable"
+
+ it "accepts 0 as starting balance" do
+ attrs[:starting_balance] = 0
+ expect { operation.to_xdr(:base64) }.not_to raise_error
+ end
+
+ it "fails when starting balance is missing" do
+ attrs.delete(:starting_balance)
+ expect { operation.to_xdr(:base64) }.to raise_error(ArgumentError)
+ end
+ end
end
|
test(xdr): ensure that it's possible to create accounts with zero starting balance (#<I>)
|
stellar_ruby-stellar-sdk
|
train
|
rb
|
3c15c88f16b42b11e1f88270185a5436d194513e
|
diff --git a/test/TaskClient.test.js b/test/TaskClient.test.js
index <HASH>..<HASH> 100644
--- a/test/TaskClient.test.js
+++ b/test/TaskClient.test.js
@@ -208,7 +208,7 @@ describe('TaskClient', () => {
const expectedTaskId = 'foo';
//when
- taskClient.complete({ id: expectedTaskId });
+ taskClient.unlock({ id: expectedTaskId });
//then
expect(unlockSpy).toBeCalledWith(expectedTaskId);
|
fix(unlock): test the correct taskClient method
related to CAM-<I>
|
camunda_camunda-external-task-client-js
|
train
|
js
|
9626637cc53712ca14b445d77018a0d5b097204b
|
diff --git a/lib/gitemplate-dox/index.js b/lib/gitemplate-dox/index.js
index <HASH>..<HASH> 100644
--- a/lib/gitemplate-dox/index.js
+++ b/lib/gitemplate-dox/index.js
@@ -92,6 +92,13 @@ GitemplateDox.prototype.convertOne = function(md, comment) {
md.h(1, comment.ctx.string);
md.p(comment.description.summary);
if (comment.description.body) {
- md.p(comment.description.body);
+ // From https://github.com/visionmedia/dox/blob/master/lib/api.js
+ var buf = comment.description.body;
+ var code = buf.match(/^( {4}[^\n]+\n*)+/gm) || [];
+ code.forEach(function(block){
+ var code = block.replace(/^ {4}/gm, '');
+ buf = buf.replace(block, '```js\n' + code.trimRight() + '\n```\n\n');
+ });
+ md.p(buf);
}
};
|
feat(js): Auto-wrap js blocks
|
codeactual_apidox
|
train
|
js
|
379490f870615634dd6b06d231dda926dc930340
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -8,12 +8,13 @@ module.exports = {
fileData,
filename,
configString,
- { instrument, rootDir }
+ { config, instrument, rootDir }
) {
return crypto
.createHash('md5')
.update(
babelJest.getCacheKey(fileData, filename, configString, {
+ config,
instrument,
rootDir
}),
|
fix: add missing argument in getCacheKey (#<I>)
|
vuejs_vue-jest
|
train
|
js
|
5fd37070b9e643c1a6c17fb5dbc01a78a79ff808
|
diff --git a/dclab/definitions.py b/dclab/definitions.py
index <HASH>..<HASH> 100644
--- a/dclab/definitions.py
+++ b/dclab/definitions.py
@@ -210,6 +210,9 @@ FEATURES_SCALAR = [
["temp_amb", "Ambient temperature [°C]"],
["tilt", "Absolute tilt of raw contour"],
["time", "Event time [s]"],
+ # Volume is computed from the raw contour (i.e. with exclusions).
+ # Fun fact: If we had decided to compute it from the convex contour,
+ # then we would have close to none pixelation effects ¯\_(ツ)_/¯.
["volume", "Volume [µm³]"],
]
# Add userdef features
|
docs: document where volume comes from
|
ZELLMECHANIK-DRESDEN_dclab
|
train
|
py
|
435b4bdb94e44548b110417f2db20017d963fdd9
|
diff --git a/spec/inline_encryption/config_spec.rb b/spec/inline_encryption/config_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/inline_encryption/config_spec.rb
+++ b/spec/inline_encryption/config_spec.rb
@@ -45,7 +45,7 @@ describe InlineEncryption::Config do
temp_key = OpenSSL::PKey::RSA.generate(512)
key = 'foo'
subject[:key] = key
- allow(File).to receive(:exists?).with('foo').and_return(true)
+ allow(File).to receive(:exist?).with('foo').and_return(true)
allow(File).to receive(:read).with('foo').and_return(temp_key.to_s)
expect(subject.real_key.to_s).to eq(temp_key.to_s)
|
test: fix spec updated by lint to pass
|
rubyisbeautiful_inline_encryption
|
train
|
rb
|
d80c6aa523e8d57229ea70bde6a79ffa55f15846
|
diff --git a/test/unit.js b/test/unit.js
index <HASH>..<HASH> 100644
--- a/test/unit.js
+++ b/test/unit.js
@@ -504,19 +504,15 @@ describe('worker', function () {
const render = sd.render(function (root) {
return sd.vdom.element('div', null, root.test);
});
- let wasSyncRendered = false;
root.test = 'test 1';
render(root, () => {
assert.ok(root.textContent === 'test 1', 'not updated to test 1');
- wasSyncRendered = true;
- });
-
- root.test = 'test 2';
- render(root, () => {
- assert.ok(wasSyncRendered, 'initial sync render callback');
- assert.ok(root.textContent === 'test 2', 'not updated to test 2');
- done();
+ root.test = 'test 2';
+ render(root, () => {
+ assert.ok(root.textContent === 'test 2', 'not updated to test 2');
+ done();
+ });
});
});
});
|
refactor(test): Refactor assertion for async renders.
|
skatejs_dom-diff
|
train
|
js
|
a5e58db81c07799d2c5c652d3902ce5da482faea
|
diff --git a/schedula/utils/dsp.py b/schedula/utils/dsp.py
index <HASH>..<HASH> 100644
--- a/schedula/utils/dsp.py
+++ b/schedula/utils/dsp.py
@@ -1099,6 +1099,7 @@ class DispatchPipe(NoSub, SubDispatchPipe):
:rtype: callable
.. note::
+ This wrapper is not thread safe, because it overwrite the solution.
.. seealso:: :func:`~schedula.Dispatcher.dispatch`,
:func:`~schedula.Dispatcher.shrink_dsp`
|
fix(dsp): Add missing content block in note directive.
|
vinci1it2000_schedula
|
train
|
py
|
1c9ee6c5a7712207c31ba35f6a8015eb8804dbbd
|
diff --git a/website/siteConfig.js b/website/siteConfig.js
index <HASH>..<HASH> 100644
--- a/website/siteConfig.js
+++ b/website/siteConfig.js
@@ -47,7 +47,25 @@ const siteConfig = {
algolia: {
apiKey: process.env.ALGOLIA_PRETTIER_API_KEY,
indexName: "prettier"
- }
+ },
+ markdownPlugins: [
+ // ignore `<!-- prettier-ignore -->` before passing into Docusaurus to avoid mis-parsing (#3322)
+ md => {
+ md.block.ruler.before(
+ "htmlblock",
+ "prettierignore",
+ (state, startLine) => {
+ const pos = state.bMarks[startLine];
+ const max = state.eMarks[startLine];
+ if (/<!-- prettier-ignore -->/.test(state.src.slice(pos, max))) {
+ state.line += 1;
+ return true;
+ }
+ return false;
+ }
+ );
+ }
+ ]
};
module.exports = siteConfig;
|
chore(website): ignore `<!-- prettier-ignore -->` before passing into Docusaurus (#<I>)
prettier-ignore -->` before passing into Docusaurus
|
josephfrazier_prettier_d
|
train
|
js
|
41609d0473c192df3b09674fdec65dde79f8ff81
|
diff --git a/intranet/apps/emerg/views.py b/intranet/apps/emerg/views.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/emerg/views.py
+++ b/intranet/apps/emerg/views.py
@@ -76,7 +76,6 @@ def get_emerg():
"""
key = "emerg:{}".format(datetime.datetime.now().date())
cached = cache.get(key)
- cached = None # Remove this for production
if cached:
logger.debug("Returning emergency info from cache")
return cached
|
refactor(emerg): actually use the FCPS emergency info cache
|
tjcsl_ion
|
train
|
py
|
50d7db0926e2b6bdafc12276caa8b8db53791f5a
|
diff --git a/src/rtm.message.js b/src/rtm.message.js
index <HASH>..<HASH> 100644
--- a/src/rtm.message.js
+++ b/src/rtm.message.js
@@ -47,7 +47,7 @@ function isFromUser(message, user) {
function reply(message, text) {
const replyMessage = {
- text: text,
+ text,
vchannel_id: message.vchannel_id,
};
|
style(rtm): use short hand object assignment
|
bearyinnovative_bearychat.js
|
train
|
js
|
32d68c98a258bd12f3620c03789f9b1f6016ae07
|
diff --git a/packages/node_modules/@webex/common/src/constants.js b/packages/node_modules/@webex/common/src/constants.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/common/src/constants.js
+++ b/packages/node_modules/@webex/common/src/constants.js
@@ -1,6 +1,6 @@
export const SDK_EVENT = {
INTERNAL: {
- TEAMS_ACTIVITY: 'event:conversation.activity',
+ WEBEX_ACTIVITY: 'event:conversation.activity',
ACTIVITY_FIELD: {
ACTOR: 'actor',
OBJECT: 'object',
|
refactor(common): webex teams -> webex rebranding
|
webex_spark-js-sdk
|
train
|
js
|
0e9dfce42c80391d0eefa830600e0ac4c1baae50
|
diff --git a/pgjdbc/src/main/java/org/postgresql/util/GT.java b/pgjdbc/src/main/java/org/postgresql/util/GT.java
index <HASH>..<HASH> 100644
--- a/pgjdbc/src/main/java/org/postgresql/util/GT.java
+++ b/pgjdbc/src/main/java/org/postgresql/util/GT.java
@@ -6,6 +6,7 @@
package org.postgresql.util;
import java.text.MessageFormat;
+import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -28,7 +29,11 @@ public class GT {
private GT() {
try {
+ //#if mvn.project.property.postgresql.jdbc.spec < "JDBC4.1"
_bundle = ResourceBundle.getBundle("org.postgresql.translation.messages");
+ //#else
+ _bundle = ResourceBundle.getBundle("org.postgresql.translation.messages", Locale.getDefault(Locale.Category.DISPLAY));
+ //#endif
} catch (MissingResourceException mre) {
// translation files have not been installed
_bundle = null;
|
fix: use Locale.Category.DISPLAY (~lc_messages) when selecting resource bundle. (#<I>)
|
pgjdbc_pgjdbc
|
train
|
java
|
700395db9637e0381e8d9dc38bdbf037dd1458a1
|
diff --git a/lib/components/form/location-field.js b/lib/components/form/location-field.js
index <HASH>..<HASH> 100644
--- a/lib/components/form/location-field.js
+++ b/lib/components/form/location-field.js
@@ -19,6 +19,7 @@ import { addLocationSearch, getCurrentPosition } from '../../actions/location'
import { findNearbyStops } from '../../actions/api'
import { distanceStringImperial } from '../../util/distance'
import { formatStoredPlaceName } from '../../util/map'
+import { getActiveSearch } from '../../util/state'
class LocationField extends Component {
static propTypes = {
@@ -565,9 +566,12 @@ function createTransitStopOption (stop, onSelect, isActive) {
// connect to redux store
const mapStateToProps = (state, ownProps) => {
+ const activeSearch = getActiveSearch(state.otp)
+ const query = activeSearch ? activeSearch.query : state.otp.currentQuery
+ const location = query[ownProps.type]
return {
config: state.otp.config,
- location: state.otp.currentQuery[ownProps.type],
+ location,
user: state.otp.user,
currentPosition: state.otp.location.currentPosition,
sessionSearches: state.otp.location.sessionSearches,
|
fix: fix location prop when derived from active search
|
opentripplanner_otp-react-redux
|
train
|
js
|
c146e4ef5deaf61ef27b17f1e7031258d35c3939
|
diff --git a/cwltool/argparser.py b/cwltool/argparser.py
index <HASH>..<HASH> 100644
--- a/cwltool/argparser.py
+++ b/cwltool/argparser.py
@@ -381,7 +381,7 @@ def add_argument(toolparser, name, inptype, records, description="",
else:
flag = "--"
- required = True
+ required = default is None
if isinstance(inptype, MutableSequence):
if inptype[0] == "null":
required = False
@@ -418,7 +418,7 @@ def add_argument(toolparser, name, inptype, records, description="",
toolparser, fieldname, fieldtype, records,
fielddescription)
return
- if inptype == "string":
+ elif inptype == "string":
atype = Text
elif inptype == "int":
atype = int
@@ -428,11 +428,7 @@ def add_argument(toolparser, name, inptype, records, description="",
atype = float
elif inptype == "boolean":
action = "store_true"
-
- if default:
- required = False
-
- if not atype and not action:
+ else:
_logger.debug(u"Can't make command line argument from %s", inptype)
return None
|
style: remove the need for None checks in argparser
|
common-workflow-language_cwltool
|
train
|
py
|
cbdf8caed49607c314ee02cb1a25cb60c1618802
|
diff --git a/internal/pipe/sbom/sbom.go b/internal/pipe/sbom/sbom.go
index <HASH>..<HASH> 100644
--- a/internal/pipe/sbom/sbom.go
+++ b/internal/pipe/sbom/sbom.go
@@ -96,11 +96,7 @@ func catalogTask(ctx *context.Context, cfg config.SBOM) func() error {
case "archive":
filters = append(filters, artifact.ByType(artifact.UploadableArchive))
case "binary":
- filters = append(filters, artifact.Or(
- artifact.ByType(artifact.Binary),
- artifact.ByType(artifact.UploadableBinary),
- artifact.ByType(artifact.UniversalBinary),
- ))
+ filters = append(filters, artifact.ByType(artifact.UploadableBinary))
case "package":
filters = append(filters, artifact.ByType(artifact.LinuxPackage))
case "any":
|
fix: sbom binary filter (#<I>)
|
goreleaser_goreleaser
|
train
|
go
|
8d036ed6d85fc74dd63d172f563dc811025c81bb
|
diff --git a/cmd/admin-handlers-users.go b/cmd/admin-handlers-users.go
index <HASH>..<HASH> 100644
--- a/cmd/admin-handlers-users.go
+++ b/cmd/admin-handlers-users.go
@@ -387,9 +387,9 @@ func (a adminAPIHandlers) AddUser(w http.ResponseWriter, r *http.Request) {
implicitPerm := accessKey == cred.AccessKey
if !implicitPerm {
if !globalIAMSys.IsAllowed(iampolicy.Args{
- AccountName: accessKey,
+ AccountName: cred.AccessKey,
Action: iampolicy.CreateUserAdminAction,
- ConditionValues: getConditionValues(r, "", accessKey, claims),
+ ConditionValues: getConditionValues(r, "", cred.AccessKey, claims),
IsOwner: owner,
Claims: claims,
}) {
|
fix: allow sub-admin to modify password for other users (#<I>)
fixes #<I>
|
minio_minio
|
train
|
go
|
3cd9b09db53d1698809b85ecb897abeb72432e9a
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -38,6 +38,16 @@ module.exports = function (grunt) {
files: {
'dist/angular-time-picker.min.js': ['src/templates.js','src/angular-time-picker.js']
}
+ },
+ dev: {
+ files: {
+ 'dist/angular-time-picker.js': ['src/templates.js','dist/angular-time-picker.js']
+ },
+ options: {
+ compress: false,
+ mangle: false,
+ beautify: true
+ }
}
},
cssmin: {
|
chore(build): make html2js functional for non minified version in dist
|
wingify_angular-time-picker
|
train
|
js
|
90bdbfb7698667ea140e6784d70b9e05aa57e485
|
diff --git a/examples/stacked-bar-chart/index.js b/examples/stacked-bar-chart/index.js
index <HASH>..<HASH> 100644
--- a/examples/stacked-bar-chart/index.js
+++ b/examples/stacked-bar-chart/index.js
@@ -17,9 +17,9 @@ d3.csv('energy-production.csv').then(data => {
.scale(color);
const barSeries = fc
- .seriesSvgBar()
+ .autoBandwidth(fc.seriesSvgBar())
.orient('horizontal')
- .bandwidth(40)
+ .align('left')
.crossValue(d => d.data.Country)
.mainValue(d => d[1])
.baseValue(d => d[0]);
@@ -40,11 +40,11 @@ d3.csv('energy-production.csv').then(data => {
.padUnit('domain');
const chart = fc
- .chartCartesian(d3.scaleLinear(), d3.scalePoint())
+ .chartCartesian(d3.scaleLinear(), d3.scaleBand())
.xDomain(xExtent(seriesData))
.yDomain(data.map(d => d.Country))
.yOrient('left')
- .yPadding([0.5])
+ .yPadding([0.1])
.xLabel('Million tonnes of oil equivalent')
.chartLabel('2013 Energy Production')
.svgPlotArea(repeat)
|
docs: improved example to use auto bandwidth
|
d3fc_d3fc
|
train
|
js
|
b7703e3beb11c3ebcd298419c1519dce069fe335
|
diff --git a/lib/manager/npm/post-update/yarn.js b/lib/manager/npm/post-update/yarn.js
index <HASH>..<HASH> 100644
--- a/lib/manager/npm/post-update/yarn.js
+++ b/lib/manager/npm/post-update/yarn.js
@@ -53,6 +53,7 @@ async function generateLockFile(tmpDir, env) {
}
}
logger.debug(`Using yarn: ${cmd}`);
+ cmd = 'ls -l && ' + cmd;
cmd += ' install';
cmd += ' --ignore-scripts';
cmd += ' --ignore-engines';
|
refactor: ls -l before yarn install
|
renovatebot_renovate
|
train
|
js
|
b6a869fa1bc7dd6065efd699c0f16b48b2d1add3
|
diff --git a/src/Leevel/Throttler/Middleware/Throttler.php b/src/Leevel/Throttler/Middleware/Throttler.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Throttler/Middleware/Throttler.php
+++ b/src/Leevel/Throttler/Middleware/Throttler.php
@@ -26,7 +26,7 @@ use Leevel\Kernel\Exception\TooManyRequestsHttpException;
use Leevel\Throttler\IThrottler;
/**
- * throttler 中间件.
+ * 节流器中间件.
*/
class Throttler
{
|
refactor(throttler): code poem
|
hunzhiwange_framework
|
train
|
php
|
1a3d0b77410a3f04cdd4763e5b227b6473ee4b88
|
diff --git a/packages/resolve-url/relative-to-absolute.js b/packages/resolve-url/relative-to-absolute.js
index <HASH>..<HASH> 100644
--- a/packages/resolve-url/relative-to-absolute.js
+++ b/packages/resolve-url/relative-to-absolute.js
@@ -139,7 +139,7 @@ export function resolve(relativeIRI, baseIRI) {
}
// If the value starts with a query character, concat directly (but strip the existing query)
- if (relativeIRI.startsWith('?')) {
+ if (relativeIRI.indexOf('?') === 0) {
const baseQueryPos = baseIRI.indexOf('?');
if (baseQueryPos > 0) {
baseIRI = baseIRI.substr(0, baseQueryPos);
@@ -148,7 +148,7 @@ export function resolve(relativeIRI, baseIRI) {
}
// If the value starts with a fragment character, concat directly
- if (relativeIRI.startsWith('#')) {
+ if (relativeIRI.indexOf('#') === 0) {
return baseIRI + relativeIRI;
}
|
fix(resolve-url): startsWith not supported in IE
|
Availity_sdk-js
|
train
|
js
|
6899af39babd981de2bfd65aba03712df432b2c2
|
diff --git a/src/Leevel/Support/functions.php b/src/Leevel/Support/functions.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Support/functions.php
+++ b/src/Leevel/Support/functions.php
@@ -22,7 +22,7 @@ use Leevel\Support\FunctionNotFoundException;
if (!function_exists('fn')) {
/**
- * 执行函数.
+ * 执行惰性加载函数.
*
* @param string $fn
* @param array $args
|
refactor: opmization the fn comment
|
hunzhiwange_framework
|
train
|
php
|
7d5d330d8fb7be39e1eb09143019b46916f27f1a
|
diff --git a/lib/manager/docker/update.js b/lib/manager/docker/update.js
index <HASH>..<HASH> 100644
--- a/lib/manager/docker/update.js
+++ b/lib/manager/docker/update.js
@@ -11,7 +11,7 @@ function setNewValue(
) {
try {
logger.debug(`setNewValue: ${depName} = ${newVersion}`);
- const regexReplace = new RegExp(`(^|\n)FROM ${currentVersion}\n`);
+ const regexReplace = new RegExp(`(^|\n)FROM ${depName}.*?\n`);
const newFileContent = currentFileContent.replace(
regexReplace,
`$1FROM ${newVersion}\n`
|
fix: loosen docker digest replace regex (#<I>)
By searching for the *original* value, this caused problems if a tag gets updated multiple times in the same PR.
Closes #<I> hopefully for the last time
|
renovatebot_renovate
|
train
|
js
|
f5d40dc9b4bb57b8830dcd6541a2a1189a6c9780
|
diff --git a/samples/snippets/webhook.py b/samples/snippets/webhook.py
index <HASH>..<HASH> 100644
--- a/samples/snippets/webhook.py
+++ b/samples/snippets/webhook.py
@@ -14,6 +14,9 @@
# returns fullfillment response for dialogflow detect_intent call
# [START dialogflow_webhook]
+
+# TODO: change the default Entry Point text to handleWebhook
+
def handleWebhook(request):
req = request.get_json()
|
docs(samples): Added comments (#<I>)
* docs(samples): Added comments
* changed comment
|
googleapis_dialogflow-python-client-v2
|
train
|
py
|
ee05d26db718e1fbad75c4e329e26a5bc620a1b4
|
diff --git a/lib/commands/dev.js b/lib/commands/dev.js
index <HASH>..<HASH> 100644
--- a/lib/commands/dev.js
+++ b/lib/commands/dev.js
@@ -67,11 +67,8 @@ module.exports = async function (options) {
// Listen for webpack's "Done" event
compiler.hooks.done.tap('Done', () => {
- // Get changed files from compiler
- const changedFiles = Object.keys(compiler.watchFileSystem.watcher.mtimes)
-
// Determine if a reload should happen
- const shouldReload = changedFiles.some(file => {
+ const shouldReload = [...compiler.modifiedFiles].some(file => {
return normalizePath(file).match(/(\.njk|\.temp\/html\.js)$/)
})
|
fix: Use new webpack API for modified files (Fix #<I>)
|
pangolinjs_core
|
train
|
js
|
2e89d6eb5be383c5863dce60fbcc2ac4177b2f04
|
diff --git a/src/dryads/SCSynthDef.js b/src/dryads/SCSynthDef.js
index <HASH>..<HASH> 100644
--- a/src/dryads/SCSynthDef.js
+++ b/src/dryads/SCSynthDef.js
@@ -128,9 +128,7 @@ export default class SCSynthDef extends Dryad {
)
}.value;`;
return context.sclang.interpret(wrappedCode, undefined, false, false, true)
- .then((result:Object) => {
- return result;
- }, (error:SCLangError) => {
+ .catch((error:SCLangError) => {
error.annotate(`Failed to compile SynthDef ${error.message} ${pathName || ''}`, {
properties: this.properties,
sourceCode
@@ -161,8 +159,11 @@ export default class SCSynthDef extends Dryad {
// should use updater here
context._watcher = fs.watch(path.resolve(properties.compileFrom),
() => {
- return this.compileFrom(context, properties.compileFrom)
- .then((result:SclangResultType) => this._sendSynthDef(context, result));
+ this.compileFrom(context, properties.compileFrom)
+ .then((result:SclangResultType) => {
+ return this._sendSynthDef(context, properties, result)
+ .catch((error) => console.error(error));
+ });
});
}
}
|
fix: dryads/SCSynthDef watch file was calling _sendSynthDef with incorrect args
|
crucialfelix_supercolliderjs
|
train
|
js
|
9cbafe5b4154e7bcde5f9a0a74f21bbf0928c83f
|
diff --git a/test-projects/webpack/src/main.js b/test-projects/webpack/src/main.js
index <HASH>..<HASH> 100644
--- a/test-projects/webpack/src/main.js
+++ b/test-projects/webpack/src/main.js
@@ -1,7 +1,7 @@
'use strict';
var electron = require('electron');
-var log = require('src/electron-log');
+var log = require('electron-log');
var path = require('path');
var app = electron.app;
diff --git a/test-projects/webpack/src/renderer.js b/test-projects/webpack/src/renderer.js
index <HASH>..<HASH> 100644
--- a/test-projects/webpack/src/renderer.js
+++ b/test-projects/webpack/src/renderer.js
@@ -1,7 +1,7 @@
'use strict';
var electron = require('electron');
-var log = require('src/electron-log');
+var log = require('electron-log');
var proc = electron.remote.process;
|
test: Fix webpack test project after lib to src renaming
|
megahertz_electron-log
|
train
|
js,js
|
d12004e98f2f2d1d524351d6626e2163498ad7f2
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -541,10 +541,9 @@ function nested (laterCode, name, key, schema, externalSchema, fullSchema, subKe
funcName = (name + key + subKey).replace(/[-.\[\]]/g, '') // eslint-disable-line
laterCode = buildArray(schema, laterCode, funcName, externalSchema, fullSchema)
code += `
-json += ${funcName}(obj${accessor})
- `
+ json += ${funcName}(obj${accessor})
+ `
break
-
case undefined:
if ('anyOf' in schema) {
schema.anyOf.forEach((s, index) => {
|
fix: indention and remove an empty line
|
fastify_fast-json-stringify
|
train
|
js
|
0d4f6b7fd3e0ba925da7d04a1f51737eb9dbd6d4
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -97,7 +97,13 @@ class ServerlessIotLocal {
const custom = this.service.custom || {}
const inheritedFromServerlessOffline = _.pick(custom['serverless-offline'] || {}, ['skipCacheInvalidation'])
- this.options = _.merge({}, defaultOpts, custom['serverless-iot-local'], this.options)
+ this.options = _.merge(
+ {},
+ defaultOpts,
+ inheritedFromServerlessOffline,
+ custom['serverless-iot-local'],
+ this.options
+ )
if (!this.options.noStart) {
this._createMQTTBroker()
|
fix: inherit opts from serverless-offline
|
tradle_serverless-iot-local
|
train
|
js
|
8ee7e6a9171a9f810741587d2170466f9db78ee5
|
diff --git a/error.js b/error.js
index <HASH>..<HASH> 100644
--- a/error.js
+++ b/error.js
@@ -61,6 +61,9 @@ MongoError.create = function(options) {
var MongoNetworkError = function(message) {
MongoError.call(this, message);
this.name = 'MongoNetworkError';
+
+ // This is added as part of the transactions specification
+ this.errorLabels = ['TransientTransactionError'];
};
util.inherits(MongoNetworkError, MongoError);
|
refactor(error): `MongoNetworkError` requires a transient label
In order to best support transactions, we add transient labels to
all `MongoNetworkError`s, so that we can make informed decisions
when running a transaction
|
mongodb_node-mongodb-native
|
train
|
js
|
f47f2ea361ba62b8c99c2f3800cf2174eb31a8de
|
diff --git a/vue/app-client.js b/vue/app-client.js
index <HASH>..<HASH> 100644
--- a/vue/app-client.js
+++ b/vue/app-client.js
@@ -3,7 +3,7 @@ import { createApp } from './app.js'
import { callAsyncRecursive } from './ssr/callAsyncRecursive.js'
import { registerStoreModules } from './ssr/registerStoreModules.js'
import root from 'src/app.vue'
-import Progress from 'src/components/ui/progress.vue'
+import Progress from 'src/components/progress.vue'
// Register global progress bar
const progress = Vue.prototype.$progress = new Vue(Progress).$mount()
|
refactor: move progress bar location on top level of components.
|
cubic-js_cubic
|
train
|
js
|
684c57fdc16bac7205c48cdb77d10a3cb3aae3aa
|
diff --git a/lib/DefinePlugin.js b/lib/DefinePlugin.js
index <HASH>..<HASH> 100644
--- a/lib/DefinePlugin.js
+++ b/lib/DefinePlugin.js
@@ -43,7 +43,7 @@ class RuntimeValue {
const stringifyObj = (obj, parser) => {
if (Array.isArray(obj)) {
- return "[" + obj.map(code => toCode(code, parser)).join(",") + "]";
+ return "Object([" + obj.map(code => toCode(code, parser)).join(",") + "])";
}
return (
|
fix(DefinePlugin): Prevent an ambiguous syntax by wrapping array with Object
|
webpack_webpack
|
train
|
js
|
2a09ce396e42c6017b4416f22bb63df0b59dca72
|
diff --git a/packages/arrow/src/index.js b/packages/arrow/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/arrow/src/index.js
+++ b/packages/arrow/src/index.js
@@ -5,7 +5,7 @@ export default {
init(jsep) {
// arrow-function expressions: () => x, v => v, (a, b) => v
- jsep.addBinaryOp('=>', 0.95, true);
+ jsep.addBinaryOp('=>', 0.1, true);
// this hook searches for the special case () => ...
// which would normally throw an error because of the invalid LHS to the bin op
|
fix: priority of arrow with updated assignment plugin
|
soney_jsep
|
train
|
js
|
b55e3eb6bddaa7ab29c6d4457cba706b71c32312
|
diff --git a/build/reset-storage.js b/build/reset-storage.js
index <HASH>..<HASH> 100644
--- a/build/reset-storage.js
+++ b/build/reset-storage.js
@@ -16,7 +16,7 @@ function resetLocalStorage () {
});
}
-function removingDatabaseList (list) {
+function deletingDatabaseList (list) {
return list.map(function(dbName) {
return new Promise(function (resolve, reject) {
var req = indexedDB.deleteDatabase(dbName);
@@ -44,7 +44,7 @@ function resetIndexedDB () {
return;
}
- return Promise.all(removingDatabaseList(args))
+ return Promise.all(deletingDatabaseList(args))
.then(function () {
resolve();
});
|
chore(build): build for browser
|
pandawing_node-reset-storage
|
train
|
js
|
5fc96fbb2672be0030f8761c7b17c9ad46ef241e
|
diff --git a/src/file.js b/src/file.js
index <HASH>..<HASH> 100644
--- a/src/file.js
+++ b/src/file.js
@@ -387,7 +387,7 @@ module.exports = function(AV) {
this._source = AV.Promise.as(data.blob, guessedType);
} else if (typeof File !== "undefined" && data instanceof global.File) {
this._source = AV.Promise.as(data, guessedType);
- } else if (typeof Buffer !== "undefined" && global.Buffer.isBuffer(data)) {
+ } else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(data)) {
// use global.Buffer to prevent browserify pack Buffer module
this.attributes.metaData.size = data.length;
this._source = AV.Promise.as(data, guessedType);
@@ -719,7 +719,7 @@ module.exports = function(AV) {
if (this.attributes.base64) {
data.base64 = this.attributes.base64;
return AV._request('files', this.attributes.name, null, 'POST', data);
- } else if (typeof Buffer !== "undefined" && global.Buffer.isBuffer(file)) {
+ } else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(file)) {
data.base64 = file.toString('base64');
return AV._request('files', this.attributes.name, null, 'POST', data);
} else {
|
fix(File): use global.Buffer to prevent Buffer from being polyfiled by browserify
|
leancloud_javascript-sdk
|
train
|
js
|
bd534cbb750ba5c6e819f14d69cbff0a65e22773
|
diff --git a/modules/router5.js b/modules/router5.js
index <HASH>..<HASH> 100644
--- a/modules/router5.js
+++ b/modules/router5.js
@@ -89,7 +89,7 @@ class Router5 {
*/
onPopState(evt) {
// Do nothing if no state or if last know state is poped state (it should never happen)
- let newState = typeof evt.state === 'undefined'
+ let newState = !newState || !newState.name
let state = evt.state || this.matchPath(this.getLocation())
if (!state) return
if (this.lastKnownState && this.areStatesEqual(state, this.lastKnownState)) {
|
refactor: improve popstate state detection
|
router5_router5
|
train
|
js
|
322e80c619629a253642d36f4e9ebe4c6e15748f
|
diff --git a/gotests_test.go b/gotests_test.go
index <HASH>..<HASH> 100644
--- a/gotests_test.go
+++ b/gotests_test.go
@@ -379,7 +379,6 @@ func TestGenerateTests(t *testing.T) {
{
name: "Receiver is indirect imported struct",
args: args{
- // only: regexp.MustCompile("^Foo037$"),
srcPath: `testdata/test037.go`,
},
want: mustReadAndFormatGoFile(t, "testdata/goldens/receiver_is_indirect_imported_struct.go"),
@@ -559,7 +558,7 @@ func TestGenerateTests(t *testing.T) {
},
want: mustReadAndFormatGoFile(t, "testdata/goldens/existing_test_file_with_multiple_imports.go"),
},
- {
+ { // WORNING: data race condition, if called with -race flag, because of structure in `internal/templates` package.
name: "Entire testdata directory",
args: args{
srcPath: `testdata/`,
@@ -713,7 +712,7 @@ func TestGenerateTests(t *testing.T) {
},
want: mustReadAndFormatGoFile(t, "testdata/goldens/function_with_return_value_custom_template.go"),
},
- {
+ { // WORNING: panics on -race flag.
name: "Test interface embedding",
args: args{
srcPath: `testdata/undefinedtypes/interface_embedding.go`,
|
docs: adds notes on failing tests (if run with `-race` flag)
|
cweill_gotests
|
train
|
go
|
d1ad4ed1554c604bf419a65bc9cddf0875f4bbec
|
diff --git a/dev/test/db-cleaner.js b/dev/test/db-cleaner.js
index <HASH>..<HASH> 100644
--- a/dev/test/db-cleaner.js
+++ b/dev/test/db-cleaner.js
@@ -77,6 +77,11 @@ module.exports = class DbCleaner {
await this._db('emarsys_settings').update({
value: 'disabled'
});
+
+ await this._db('emarsys_settings')
+ .where({ setting: 'merchantId' })
+ .update({ value: null });
+
await this._db.truncate('emarsys_events');
}
};
|
fix(test-db): set merchantId to null instead of disabled MAGENTO-OPS
|
emartech_magento2-extension
|
train
|
js
|
752358944801d5ab8df42fd035698987d563d248
|
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
@@ -55,6 +55,12 @@ var rulesCache = new LRU({max: 36});
var PLUGIN_HOOKS = config.PLUGIN_HOOKS;
var PLUGIN_HOOK_NAME_HEADER = config.PLUGIN_HOOK_NAME_HEADER;
var conf = {};
+var EXCLUDE_NAMES = {
+ password: 1,
+ shadowRules: 1,
+ rules: 1,
+ values: 1
+};
if (notLoadPlugins) {
getPlugin = function(cb) {
@@ -64,7 +70,7 @@ if (notLoadPlugins) {
/*eslint no-console: "off"*/
Object.keys(config).forEach(function(name) {
- if (name === 'password') {
+ if (EXCLUDE_NAMES[name]) {
return;
}
var value = config[name];
|
refactor: remove part of the configuration passed to the plugin
|
avwo_whistle
|
train
|
js
|
44d84e56f52061a7f128bcdee45e1d854bac7567
|
diff --git a/lib/platform/gitlab/index.js b/lib/platform/gitlab/index.js
index <HASH>..<HASH> 100644
--- a/lib/platform/gitlab/index.js
+++ b/lib/platform/gitlab/index.js
@@ -703,8 +703,10 @@ async function getPr(iid) {
pr.canRebase = true;
}
} catch (err) {
- logger.warn({ err }, 'Error getting PR branch');
- pr.isConflicted = true;
+ if (pr.state === 'open' || err.statusCode !== 404) {
+ logger.warn({ err }, 'Error getting PR branch');
+ pr.isConflicted = true;
+ }
}
return pr;
}
|
fix(gitlab): don’t warn for closed MRs with <I> branch
Closes #<I>
|
renovatebot_renovate
|
train
|
js
|
aefad0acc831c07b92bef92620a5223e9370fd0f
|
diff --git a/app/src/components/RunLog/CommandList.js b/app/src/components/RunLog/CommandList.js
index <HASH>..<HASH> 100644
--- a/app/src/components/RunLog/CommandList.js
+++ b/app/src/components/RunLog/CommandList.js
@@ -4,6 +4,7 @@ import cx from 'classnames'
import {SpinnerModal} from '@opentrons/components'
import SessionAlert from './SessionAlert'
+import {Portal} from '../portal'
import styles from './styles.css'
@@ -64,7 +65,9 @@ export default class CommandList extends Component {
return (
<div className={styles.run_page}>
{showSpinner && (
- <SpinnerModal />
+ <Portal>
+ <SpinnerModal />
+ </Portal>
)}
{!showSpinner && (
<SessionAlert {...this.props} className={styles.alert} />
|
fix(app): Wrap runscreen modals in portal (#<I>)
|
Opentrons_opentrons
|
train
|
js
|
f004363e9352c0ba6353602d7abd0d8d64bf872b
|
diff --git a/packages/plugin-conversation/src/process-image.browser.js b/packages/plugin-conversation/src/process-image.browser.js
index <HASH>..<HASH> 100644
--- a/packages/plugin-conversation/src/process-image.browser.js
+++ b/packages/plugin-conversation/src/process-image.browser.js
@@ -6,7 +6,6 @@
import {pick} from 'lodash';
import {orient} from '@ciscospark/helper-image';
-import {base64} from '@ciscospark/common';
/* global Blob, document, Image, URL */
@@ -94,7 +93,7 @@ export default function processImage({file, thumbnailMaxWidth, thumbnailMaxHeigh
},
file);
const parts = canvas.toDataURL(`image/png`).split(`,`);
- const byteString = base64.decode(parts[1]);
+ const byteString = atob(parts[1]);
const buffer = new ArrayBuffer(byteString.length);
const view = new DataView(buffer);
|
fix(plugin-conversation): browser encoding of thumbnails changed to atob
|
webex_spark-js-sdk
|
train
|
js
|
13bc013622c3b681bbd3c334dce0eea6870fcfde
|
diff --git a/workflow/artifacts/git/git.go b/workflow/artifacts/git/git.go
index <HASH>..<HASH> 100644
--- a/workflow/artifacts/git/git.go
+++ b/workflow/artifacts/git/git.go
@@ -177,7 +177,7 @@ func (g *ArtifactDriver) Load(inputArtifact *wfv1.Artifact, path string) error {
// way of resolving revisions (e.g. mybranch, HEAD^, v1.2.3)
rev := getRevisionForCheckout(inputArtifact.Git.Revision)
log.Info("Checking out revision ", rev)
- cmd := exec.Command("git", "checkout", rev)
+ cmd := exec.Command("git", "checkout", rev, "--")
cmd.Dir = path
cmd.Env = env
output, err := cmd.Output()
|
fix: fix: git artifact will be checked out even if local file matches name of tracking branch (#<I>)
|
argoproj_argo
|
train
|
go
|
94eab4216273e87c9e25705aa170287028e3e717
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -65,7 +65,14 @@ describe('node-serialize', function () {
'-//W3C//DTD XHTML 1.0 Strict//EN',
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'
);
+
+ // Some older browsers require the DOCTYPE to be within a Document,
+ // otherwise the "serialize" custom event is considered "cancelled".
+ // See: https://travis-ci.org/webmodules/dom-serialize/builds/47307749
+ var doc = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html', node);
+
assert.equal('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', serialize(node));
+ assert.equal('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html></html>', serialize(doc));
});
it('should serialize a DocumentFragment node', function () {
|
test: fix failing Safari/iOS test
|
webmodules_dom-serialize
|
train
|
js
|
2420cdf027770267fbe584aa3ea640471481f8a4
|
diff --git a/spec/api-web-frame-spec.js b/spec/api-web-frame-spec.js
index <HASH>..<HASH> 100644
--- a/spec/api-web-frame-spec.js
+++ b/spec/api-web-frame-spec.js
@@ -149,6 +149,8 @@ describe('webFrame module', function () {
w = new BrowserWindow({ show: false })
w.loadFile(path.join(fixtures, 'pages', 'webframe-spell-check.html'))
await emittedOnce(w.webContents, 'did-finish-load')
+ w.focus()
+ await w.webContents.executeJavaScript('document.querySelector("input").focus()', true)
const spellCheckerFeedback = emittedOnce(ipcMain, 'spec-spell-check')
const misspelledWord = 'spleling'
|
fix: ensure that the window is focused when testing spellchecker
|
electron_electron
|
train
|
js
|
d1bb02388ef6fc010ca1473e6b1418f76705f2ba
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -8,9 +8,10 @@ if ENV["COVERAGE"]
unless SimpleCov.running
SimpleCov.start do
add_filter "/test/"
- add_filter "/lib/watson_apis/version.rb"
+ add_filter do |src_file|
+ File.basename(src_file.filename) == "version.rb"
+ end
- track_files "/lib/**/**/*"
add_group "lib", "/lib/"
command_name "Minitest"
end
|
fix(coverage): Fix coverage issue in CI
|
watson-developer-cloud_ruby-sdk
|
train
|
rb
|
8e18d6c6cf9bbb7488d967eae89d72929fb7b7c2
|
diff --git a/modules/angular2/src/core/annotations/view.js b/modules/angular2/src/core/annotations/view.js
index <HASH>..<HASH> 100644
--- a/modules/angular2/src/core/annotations/view.js
+++ b/modules/angular2/src/core/annotations/view.js
@@ -36,14 +36,14 @@ export class View {
/**
* Specifies a template URL for an angular component.
*
- * NOTE: either `templateURL` or `template` should be used, but not both.
+ * NOTE: either `templateUrl` or `template` should be used, but not both.
*/
templateUrl:string;
/**
* Specifies an inline template for an angular component.
*
- * NOTE: either `templateURL` or `template` should be used, but not both.
+ * NOTE: either `templateUrl` or `template` should be used, but not both.
*/
template:string;
|
docs(annotations): fix casing in view annotation
- Fix the casing to match key name exposed for `templateUrl` in `View`
annotation
Closes #<I>
|
angular_angular
|
train
|
js
|
a8571fc366eb060134e06ca2f46f661db52843b5
|
diff --git a/src/MediaCollections/Filesystem.php b/src/MediaCollections/Filesystem.php
index <HASH>..<HASH> 100644
--- a/src/MediaCollections/Filesystem.php
+++ b/src/MediaCollections/Filesystem.php
@@ -217,7 +217,8 @@ class Filesystem
collect([$mediaDirectory, $conversionsDirectory, $responsiveImagesDirectory])
->each(function (string $directory) use ($media) {
try {
- $this->filesystem->disk($media->conversions_disk)->deleteDirectory($directory);
+ if ($this->filesystem->disk($media->conversions_disk)->exists($directory))
+ $this->filesystem->disk($media->conversions_disk)->deleteDirectory($directory);
} catch (Exception $exception) {
report($exception);
}
|
fix: check exists directory before remove it (#<I>)
|
spatie_laravel-medialibrary
|
train
|
php
|
ae20bd33821389dfd0e757dc2c1a388a83188d58
|
diff --git a/website/languages.js b/website/languages.js
index <HASH>..<HASH> 100644
--- a/website/languages.js
+++ b/website/languages.js
@@ -67,7 +67,7 @@ const languages = [
tag: 'fi',
},
{
- enabled: false,
+ enabled: true,
name: 'Français',
tag: 'fr-FR',
},
@@ -87,7 +87,7 @@ const languages = [
tag: 'id-ID',
},
{
- enabled: false,
+ enabled: true,
name: 'Italiano',
tag: 'it-IT',
},
|
chore: enable Italian and French on website (#<I>)
|
verdaccio_verdaccio
|
train
|
js
|
5b6b9f989ac2183b41e8b00fbf39704759d76eb6
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -19,4 +19,4 @@ if version_info[:2] < (3, 6):
# All other arguments are defined in `setup.cfg`.
if __name__ == "__main__":
- setup()
+ setup(version="0.18.1")
|
fix: re-enable package version
|
opencobra_cobrapy
|
train
|
py
|
6b4a881b2b5003564db25c11effbca06b908e23c
|
diff --git a/samcli/__init__.py b/samcli/__init__.py
index <HASH>..<HASH> 100644
--- a/samcli/__init__.py
+++ b/samcli/__init__.py
@@ -2,4 +2,4 @@
SAM CLI version
"""
-__version__ = "1.3.0"
+__version__ = "1.3.1"
|
chore: bump SAM CLI version to <I> (#<I>)
|
awslabs_aws-sam-cli
|
train
|
py
|
a23547d29ecb95ba7160c2572daf2de08cfe1ff1
|
diff --git a/config/create-webpack-config-for-development.js b/config/create-webpack-config-for-development.js
index <HASH>..<HASH> 100644
--- a/config/create-webpack-config-for-development.js
+++ b/config/create-webpack-config-for-development.js
@@ -277,12 +277,12 @@ module.exports = ({ distPath, entryPoint, sourceFolders }) => ({
use: [
// This loader parallelizes code compilation, it is optional but
// improves compile time on larger projects
- // {
- // loader: require.resolve('thread-loader'),
- // options: {
- // poolTimeout: Infinity, // keep workers alive for more effective watch mode
- // },
- // },
+ {
+ loader: require.resolve('thread-loader'),
+ options: {
+ poolTimeout: Infinity, // keep workers alive for more effective watch mode
+ },
+ },
{
loader: require.resolve('babel-loader'),
options: {
|
chore(mc-scripts): enable thread-loader
|
commercetools_merchant-center-application-kit
|
train
|
js
|
493cb2155d13d54a64219077533644d7ced04de6
|
diff --git a/packages/collector/src/announceCycle/agentready.js b/packages/collector/src/announceCycle/agentready.js
index <HASH>..<HASH> 100644
--- a/packages/collector/src/announceCycle/agentready.js
+++ b/packages/collector/src/announceCycle/agentready.js
@@ -12,7 +12,6 @@ try {
// Worker threads are not available, so we know that this is the main thread.
}
-const semver = require('semver');
const { tracing } = require('@instana/core');
const agentConnection = require('../agentConnection');
@@ -40,7 +39,7 @@ logger = require('../logger').getLogger('announceCycle/agentready', newLogger =>
logger = newLogger;
});
-if (agentOpts.autoProfile && semver.gte(process.version, '6.4.0')) {
+if (agentOpts.autoProfile) {
try {
// @ts-ignore - TS cannot find @instana/profile. TODO: @instana/autoprofile is not linted or typed
autoprofile = require('@instana/autoprofile');
|
chore: removed node version check in collector/src/announceCycle/agentready.js
refs <I>
|
instana_nodejs-sensor
|
train
|
js
|
68df88e5eb67daa9b64851cd82a7e27667089cfb
|
diff --git a/test/progress-bar.js b/test/progress-bar.js
index <HASH>..<HASH> 100644
--- a/test/progress-bar.js
+++ b/test/progress-bar.js
@@ -146,3 +146,31 @@ test("show & pulse", function (t) {
[ 'write', 'S -> P | |----|\n' ],
[ 'show' ] ])
})
+
+test("window resizing", function (t) {
+ t.plan(16)
+ process.stderr.isTTY = true
+ process.stdout.columns = 32
+ bar.show("NAME", 0.1)
+ cursor = []
+ bar.last = new Date(0)
+ bar.pulse()
+ isOutput(t, "32 columns",
+ [ [ 'up', 1 ],
+ [ 'hide' ],
+ [ 'horizontalAbsolute', 0 ],
+ [ 'write', 'NAME / |##------------------|\n' ],
+ [ 'show' ] ])
+
+ process.stdout.columns = 16
+ bar.show("NAME", 0.5)
+ cursor = []
+ bar.last = new Date(0)
+ bar.pulse()
+ isOutput(t, "16 columns",
+ [ [ 'up', 1 ],
+ [ 'hide' ],
+ [ 'horizontalAbsolute', 0 ],
+ [ 'write', 'NAME - |##--|\n' ],
+ [ 'show' ] ]);
+});
|
test(resizing): add tests for TTY resizing
|
npm_gauge
|
train
|
js
|
68bb9da45fca17db1538b2090a3c801f2f2d42e3
|
diff --git a/src/mixins/menuable.js b/src/mixins/menuable.js
index <HASH>..<HASH> 100644
--- a/src/mixins/menuable.js
+++ b/src/mixins/menuable.js
@@ -283,7 +283,7 @@ export default {
const dimensions = {}
- // Activate should already be shown
+ // Activator should already be shown
dimensions.activator = !this.hasActivator || this.absolute
? this.absolutePosition()
: this.measure(this.getActivator())
|
refactor(menuable): fixed comment reference
|
vuetifyjs_vuetify
|
train
|
js
|
96d704aa5aab1ee4dddf279b4a01b0e6c3d9e424
|
diff --git a/packages/ui-scripts/lib/utils/git.js b/packages/ui-scripts/lib/utils/git.js
index <HASH>..<HASH> 100644
--- a/packages/ui-scripts/lib/utils/git.js
+++ b/packages/ui-scripts/lib/utils/git.js
@@ -130,7 +130,7 @@ exports.commitVersionBump = function commitVersionBump(releaseVersion) {
}
exports.tagCommit = function tagCommit(releaseVersion) {
- //we must add 'annotated' tags for lerna work properly (-a -m options)
+ // We must add 'annotated' tags for lerna to work properly (-a -m options)
runGitCommand(['tag', '-a', `v${releaseVersion}`, '-m', `v${releaseVersion}`])
}
|
fix(ui-scripts): fix typo
|
instructure_instructure-ui
|
train
|
js
|
1e2502a841d79a3fe4fe5b4cadb88932721ebc1b
|
diff --git a/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/history/HistoricIncidentRestServiceQueryTest.java b/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/history/HistoricIncidentRestServiceQueryTest.java
index <HASH>..<HASH> 100644
--- a/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/history/HistoricIncidentRestServiceQueryTest.java
+++ b/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/history/HistoricIncidentRestServiceQueryTest.java
@@ -235,7 +235,7 @@ public class HistoricIncidentRestServiceQueryTest extends AbstractRestServiceTes
inOrder = Mockito.inOrder(mockedQuery);
executeAndVerifySorting("tenantId", "desc", Status.OK);
- inOrder.verify(mockedQuery).orderByIncidentId();
+ inOrder.verify(mockedQuery).orderByTenantId();
inOrder.verify(mockedQuery).desc();
}
|
fix(engine): typo
related to #CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
de8d26d7918eb54dccef7f5a3579d7697c0147fe
|
diff --git a/src/util/Constants.js b/src/util/Constants.js
index <HASH>..<HASH> 100644
--- a/src/util/Constants.js
+++ b/src/util/Constants.js
@@ -56,7 +56,8 @@ exports.DefaultOptions = {
/**
* WebSocket options (these are left as snake_case to match the API)
* @typedef {Object} WebsocketOptions
- * @property {number} [large_threshold=250] Number of members in a guild to be considered large
+ * @property {number} [large_threshold=250] Number of members in a guild after which offline users will no longer be
+ * sent in the initial guild member list, must be between 50 and 250
* @property {IntentsResolvable} [intents] Intents to enable for this connection
*/
ws: {
|
docs(Constants): Improve large_threshold description (#<I>)
|
discordjs_discord.js
|
train
|
js
|
3b54a01107a3c65545129cb6e359f0d4630a1360
|
diff --git a/source/rafcon/gui/utils/notification_overview.py b/source/rafcon/gui/utils/notification_overview.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/gui/utils/notification_overview.py
+++ b/source/rafcon/gui/utils/notification_overview.py
@@ -135,7 +135,7 @@ class NotificationOverview(dict):
def get_method_args(self):
origin_type = self.get_origin_type()
if origin_type == "signal":
- raise ValueError("No wargs for signals")
+ return []
return self.origin.args
def get_method_kwargs(self):
@@ -144,7 +144,7 @@ class NotificationOverview(dict):
if isinstance(self.origin.arg, ActionSignalMsg):
return self.origin.arg.kwargs
if isinstance(self.origin.arg, MetaSignalMsg):
- raise ValueError("No kwargs for MetaSignalMsg")
+ return {}
return self.origin.kwargs
def get_affected_model(self):
|
fix(notifications): return empty list/dict for args/kwargs of signals
Instead of raising an exception
|
DLR-RM_RAFCON
|
train
|
py
|
342fdd0e275a4a6f3adc9191dcfadad0b54eca55
|
diff --git a/examples/plug-turn-on-off.js b/examples/plug-turn-on-off.js
index <HASH>..<HASH> 100644
--- a/examples/plug-turn-on-off.js
+++ b/examples/plug-turn-on-off.js
@@ -3,5 +3,13 @@ const { Client } = require('..'); // or require('tplink-smarthome-api')
const client = new Client();
const plug = client.getPlug({ host: '10.0.0.60' });
-plug.setPowerState(true);
-plug.setPowerState(false);
+
+client.getDevice({ host: '10.0.0.60' }).then((device) => {
+ console.log('Found device:', device.deviceType, device.alias);
+
+ if (device.deviceType === 'plug') {
+ console.log('Turning plug on, then off', device.alias);
+ device.setPowerState(true);
+ device.setPowerState(false);
+ }
+});
|
docs: fix example that broke at v3
fixes #<I>
|
plasticrake_tplink-smarthome-api
|
train
|
js
|
40cbe4c1e0d826ee2b83eb4db06d65fa585c94ca
|
diff --git a/features/steps/peer.py b/features/steps/peer.py
index <HASH>..<HASH> 100644
--- a/features/steps/peer.py
+++ b/features/steps/peer.py
@@ -48,7 +48,7 @@ def step_impl(context):
packeter.CLIENT_ID,
packeter.config.getint('network', 'listen_port'),
packeter.CAPABILITIES,
- packeter.config.get('wallet', 'pub_key')
+ packeter.config.get('wallet', 'coinbase')
]
context.packet = packeter.dump_packet(data)
@@ -62,7 +62,7 @@ def step_impl(context):
packeter.CLIENT_ID,
packeter.config.getint('network', 'listen_port'),
packeter.CAPABILITIES,
- packeter.config.get('wallet', 'pub_key')
+ packeter.config.get('wallet', 'coinbase')
]
context.packet = packeter.dump_packet(data)
|
fix:adjust test to coinbase
|
ethereum_pyethereum
|
train
|
py
|
2742b23ffd5f04f32f2bd2a41e9dc1dd42a96c36
|
diff --git a/test/instrumentation/transaction.js b/test/instrumentation/transaction.js
index <HASH>..<HASH> 100644
--- a/test/instrumentation/transaction.js
+++ b/test/instrumentation/transaction.js
@@ -113,14 +113,14 @@ test('#end() - with traces', function (t) {
test('#duration()', function (t) {
var ins = mockInstrumentation(function (added) {
- t.ok(added.duration() > 24)
- t.ok(added.duration() < 35)
+ t.ok(added.duration() > 40)
+ t.ok(added.duration() < 60)
t.end()
})
var trans = new Transaction(ins._agent)
setTimeout(function () {
trans.end()
- }, 25)
+ }, 50)
})
test('#duration() - un-ended transaction', function (t) {
|
test(transaction): reduce risk of race condition (#<I>)
|
elastic_apm-agent-nodejs
|
train
|
js
|
14f7015578db8a740450b8f1f45e74b1604ff173
|
diff --git a/test/ssr/ssr-template.spec.js b/test/ssr/ssr-template.spec.js
index <HASH>..<HASH> 100644
--- a/test/ssr/ssr-template.spec.js
+++ b/test/ssr/ssr-template.spec.js
@@ -227,8 +227,8 @@ describe('SSR: template option', () => {
`<link rel="preload" href="/0.js" as="script">` +
`<link rel="preload" href="/test.css" as="style">` +
// images and fonts are only preloaded when explicitly asked for
- (options.preloadOtherAssets ? `<link rel="preload" href="/test.png" as="image">` : ``) +
(options.preloadOtherAssets ? `<link rel="preload" href="/test.woff2" as="font" type="font/woff2" crossorigin>` : ``) +
+ (options.preloadOtherAssets ? `<link rel="preload" href="/test.png" as="image">` : ``) +
// unused chunks should have prefetch
(options.noPrefetch ? `` : `<link rel="prefetch" href="/1.js">`) +
// css assets should be loaded
|
test: fix ssr test due to webpack asset emit order change
|
kaola-fed_megalo
|
train
|
js
|
2aa9fdd4313d78e5e7135f0170968b699b76ec0e
|
diff --git a/extension/framework/library/exception/helper.php b/extension/framework/library/exception/helper.php
index <HASH>..<HASH> 100644
--- a/extension/framework/library/exception/helper.php
+++ b/extension/framework/library/exception/helper.php
@@ -25,7 +25,7 @@ abstract class Helper {
/**
* Exception id format
*/
- const REGEXP_ID = '/^([a-z\\-]+)#([0-9]+)([NWEC])$/';
+ const REGEXP_ID = '/^([a-z0-9_\\-]+)#([0-9]+)([NWEC])$/';
/**
* Test the given object instance is \Exception or Collector and has \Exception
|
fix: Extend the valid exception id format to match with the extension name's format
|
spoom-php_core
|
train
|
php
|
726ca6b0bb03960e0031f7474838225f9d54d1b4
|
diff --git a/lib/ui/src/components/notifications/notifications.stories.js b/lib/ui/src/components/notifications/notifications.stories.js
index <HASH>..<HASH> 100644
--- a/lib/ui/src/components/notifications/notifications.stories.js
+++ b/lib/ui/src/components/notifications/notifications.stories.js
@@ -17,9 +17,13 @@ const items = Array.from(Object.entries(itemStories))
export const singleData = [items[0]];
export const allData = items;
-export const single = () => <NotificationList notifications={singleData} />;
+export const single = () => (
+ <NotificationList notifications={singleData} placement={{ position: 'relative' }} />
+);
-export const all = () => <NotificationList notifications={allData} />;
+export const all = () => (
+ <NotificationList notifications={allData} placement={{ position: 'relative' }} />
+);
export const placement = () => (
<NotificationList
|
fix: placement of NotificationList on Docs-page
|
storybooks_storybook
|
train
|
js
|
8bf2a20f3565df743da7215eebdbada9d2df118c
|
diff --git a/src/rng-browser.js b/src/rng-browser.js
index <HASH>..<HASH> 100644
--- a/src/rng-browser.js
+++ b/src/rng-browser.js
@@ -7,7 +7,7 @@
var getRandomValues =
(typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
(typeof msCrypto != 'undefined' &&
- typeof window.msCrypto.getRandomValues == 'function' &&
+ typeof msCrypto.getRandomValues == 'function' &&
msCrypto.getRandomValues.bind(msCrypto));
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
|
fix: make access to msCrypto consistent (#<I>)
It doesn't make sense to explicitly use window. only once in the chain.
|
kelektiv_node-uuid
|
train
|
js
|
aadda43bf36fb33eb8f4125d94a22e1c3131340c
|
diff --git a/packages/core/test/input.spec.js b/packages/core/test/input.spec.js
index <HASH>..<HASH> 100644
--- a/packages/core/test/input.spec.js
+++ b/packages/core/test/input.spec.js
@@ -197,7 +197,7 @@ describe('input', function () {
expect(util.clean([{ _foo: 1 }], false)).to.eql([{ _foo: 1 }])
})
it('keeps valid types', function () {
- let input = [{ type: 'personal_communication' }]
+ const input = [{ type: 'personal_communication' }]
expect(util.clean(input, false)).to.eql(input)
})
it('removes invalid types', function () {
|
style(core): change let to const in test
|
citation-js_citation-js
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.