commit stringlengths 40 40 | subject stringlengths 1 3.25k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | old_contents stringlengths 0 26.3k | lang stringclasses 3
values | proba float64 0 1 | diff stringlengths 0 7.82k |
|---|---|---|---|---|---|---|---|
ef061a78ea16b9e055c569d82f07af3335b0cfe7 | Add searchUserPassword to secret data | src/middleware/errorHandler.js | src/middleware/errorHandler.js | const Sentry = require('@sentry/node');
const express = require('@feathersjs/express');
const { Configuration } = require('@hpi-schul-cloud/commons');
const jwt = require('jsonwebtoken');
const OpenApiValidator = require('express-openapi-validator');
const reqlib = require('app-root-path').require;
const { SilentErro... | JavaScript | 0 | @@ -2465,16 +2465,40 @@
_csrf',%0A
+%09%09'searchUserPassword',%0A
%09%5D.map((
|
58fea1db510efbb6a3a74f4b62cbdd212db72616 | Set default value for getComputedStyle transitionProperty. | src/modifiers/computeStyles.js | src/modifiers/computeStyles.js | // @flow
import type {
PositioningStrategy,
Offsets,
Modifier,
ModifierArguments,
Rect,
Window,
} from '../types';
import { type BasePlacement, top, left, right, bottom } from '../enums';
import getOffsetParent from '../dom-utils/getOffsetParent';
import getWindow from '../dom-utils/getWindow';
import getDo... | JavaScript | 0 | @@ -3071,16 +3071,21 @@
Property
+ = ''
%7D = get
|
81445eb1764e7ece14e7482c8a7102b6bfc587d5 | fix run-sequence call | Gulpfile.js | Gulpfile.js | var gulp = require('gulp')
var babel = require('gulp-babel')
var rjs = require('requirejs')
var fs = require('fs')
var mkdirp = require('mkdirp')
var del = require('del')
var runseq = require('run-sequence')
gulp.task('clean-lib', function (cb) {
del('lib', cb)
})
gulp.task('babel', function () {
ret... | JavaScript | 0.000158 | @@ -1211,29 +1211,24 @@
nction (
+cb
) %7B%0A
-return
runseq('
@@ -1253,16 +1253,20 @@
', 'rjs'
+, cb
)%0A%7D)%0A%0Agu
|
acbdd519cfbd45088aa171d25cbdcdd6cde7809f | Use method from user model for generating token | src/modules/auth/controller.js | src/modules/auth/controller.js | import passport from 'koa-passport'
import jwt from 'jsonwebtoken'
import config from '../../../config'
/**
* @apiDefine TokenError
* @apiError Unauthorized Invalid JWT token
*
* @apiErrorExample {json} Unauthorized-Error:
* HTTP/1.1 401 Unauthorized
* {
* "status": 401,
* "error": "Unautho... | JavaScript | 0.000001 | @@ -32,76 +32,8 @@
ort'
-%0Aimport jwt from 'jsonwebtoken'%0Aimport config from '../../../config'
%0A%0A/*
@@ -1046,38 +1046,8 @@
80%22%0A
- * %22username%22: %22foo%22%0A
*
@@ -1641,46 +1641,27 @@
n =
-jwt.sign(%7B id: user.id %7D, config.t
+user.generateT
oken
+(
)%0A%0A
|
fee97d8b02a6e1ff7b6e8ef45c94c7f360529ebd | add build task | Gulpfile.js | Gulpfile.js | var nodemon = require("gulp-nodemon"),
gulp = require("gulp"),
ts = require("gulp-typescript"),
path = require('path');
tsProject = ts.createProject("tsconfig.json");
var paths = {
src : "./src",
bin : "./bin"
}
gulp.task("typescript", () => {
return gulp.src("./src/**/*.ts")
.pipe(tsP... | JavaScript | 0.000029 | @@ -877,15 +877,13 @@
sk(%22
-default
+build
%22, %5B
@@ -917,12 +917,69 @@
return;%0A%7D);%0A
+%0Agulp.task(%22default%22, %5B%22build%22%5D, () =%3E %7B%0A return;%0A%7D);%0A
|
c76018f24c6e3548f1e44457b19e442bd0e28e95 | remove raw loader | webpack.config.js | webpack.config.js | module.exports = {
entry: './index.js',
output: {
path: './dist/',
filename: 'instantsearch.js',
library: 'instantsearch',
libraryTarget: 'umd'
},
module: {
loaders: [{
test: /\.js$/, exclude: /node_modules/, loader: 'babel'
}, {
test: /\.html$/, exclude: /node_modules/, load... | JavaScript | 0 | @@ -256,79 +256,8 @@
el'%0A
- %7D, %7B%0A test: /%5C.html$/, exclude: /node_modules/, loader: 'raw'%0A
|
9ae54d6b6302281005166916f76d31866ab6b3c4 | Add Web font to cache | webpack.config.js | webpack.config.js | 'use strict'
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin')
const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const PreloadWebpackPlu... | JavaScript | 0 | @@ -3744,16 +3744,78 @@
?sv=5',%0A
+ 'https://fonts.googleapis.com/css?family=Ubuntu:300',%0A
|
76eef469d130274d98502fd5cacfde42ad515da9 | use faster source map | webpack.config.js | webpack.config.js | const path = require("path")
module.exports = {
context: path.join(__dirname, "src"),
devtool: "inline-source-map",
entry: {
bundle: "./index",
synth: "./synth"
},
output: {
path: path.join(__dirname, "static"),
filename: "[name].js",
publicPath: "static"
},
module: {
preLoaders: ... | JavaScript | 0.000001 | @@ -94,16 +94,29 @@
vtool: %22
+cheap-module-
inline-s
|
0e4919886e9637fefd8bf153796d24009b5ff5b3 | fix some codeclimate issues | webpack.config.js | webpack.config.js | const autoprefixer = require('autoprefixer');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');
const url = require('url');
const webpack = require('webpack');
const BundleTracker = require('webpack-bundle-tracker');
const resolve = path.resolve.bind(path, __dirname);
cons... | JavaScript | 0.019189 | @@ -2152,33 +2152,32 @@
-'
sourceMap': true
@@ -2161,33 +2161,32 @@
sourceMap
-'
: true%0A
@@ -2294,33 +2294,32 @@
-'
sourceMap': true
@@ -2307,25 +2307,24 @@
sourceMap
-'
: true,%0A
@@ -2339,17 +2339,15 @@
-'
plugins
-'
: fu
@@ -2352,17 +2352,16 ... |
783a752cea39f399b78009833c9687d1f48df0d7 | Fix webpack build issue | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const paths = {
DIST: path.resolve(__dirname, 'dist'),
SRC: path.resolve(__dirname, 'src'),
JS: path.resolve(__dirname, 'src/js'),
};
let config = {
mode:
process.env.NOD... | JavaScript | 0 | @@ -532,17 +532,16 @@
cPath: '
-/
',%0A %7D
@@ -949,32 +949,174 @@
%0A %7D,%0A
+ %7B%0A test: /%5C.mjs$/,%0A include: /node_modules/,%0A type: 'javascript/auto'%0A %7D,%0A
%5D,%0A %7D
|
5adba97d83c13527d5e1316c553e94441851c69d | change devtool for webpack | webpack.config.js | webpack.config.js | // Module dependencies
var fs = require('fs');
var path = require('path');
var webpack = require('webpack');
var autoprefixer = require('autoprefixer');
module.exports = {
devtool: 'cheap-module-source-map',
entry: [
'./index'
],
output: {
path: path.join(__dirname, 'dist'),
... | JavaScript | 0 | @@ -191,15 +191,8 @@
eap-
-module-
sour
|
e3243a6e4d909e10914fc2b6866d88a432c3e681 | Update webpack.config | webpack.config.js | webpack.config.js | const webpack = require('webpack')
const path = require('path')
function _isVendor (module) {
return module.context && module.context.indexOf('node_modules') !== -1 // TODO: indexOf & check what is module & context objs
}
module.exports = {
entry: {
app: './src/index.js'
},
output: {
path: path.resolv... | JavaScript | 0.000001 | @@ -132,21 +132,22 @@
ntext.in
-dexOf
+cludes
('node_m
@@ -158,70 +158,8 @@
es')
- !== -1 // TODO: indexOf & check what is module & context objs
%0A%7D%0A%0A
@@ -398,267 +398,8 @@
: %5B%0A
- // new webpack.optimize.CommonsChunkPlugin(%7B%0A // name: 'common',%0A // minChunks: function (module, count) ... |
f8c26ef22dfbc1c2600003818af2aed812815130 | Fix webpack build (higlight.js issue) | webpack.config.js | webpack.config.js | const path = require('path');
const merge = require('webpack-merge');
const webpack = require('webpack');
// Webpack plugins
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanPlugin = require('clean-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
// Read `pa... | JavaScript | 0 | @@ -1350,32 +1350,199 @@
,%0A module: %7B%0A
+ // see: https://github.com/isagalaev/highlight.js/issues/895 and%0A // https://github.com/webpack/webpack/issues/1721%0A noParse: %5B /autoit%5C.js$/ %5D,%0A
// Loade
|
5842ee1a8cb7fd95c99da0044b8c5f45e19b2ea8 | fix some deprecation warnings with webpack | webpack.config.js | webpack.config.js | const path = require('path');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const webpack = require('webpack');
module.exports = {
entry: ["./public/scripts.js", "bootstrap-loader"],
output: {
path: path.join(__dirname, 'public/dist'),
filename: "bundle.js"
},
module... | JavaScript | 0.000009 | @@ -761,38 +761,32 @@
fallback
-Loader
: %22style-loader%22
@@ -799,38 +799,35 @@
-loader
+use
: %5B%22css-loader?m
@@ -1035,14 +1035,8 @@
back
-Loader
: %22s
@@ -1069,22 +1069,19 @@
-loader
+use
: %5B%22css-
|
4687603e633192d80eee007d64d26c07132faae2 | remove deprecated code from webpack config | webpack.config.js | webpack.config.js | const path = require('path')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = {
entry: path.resolve(__dirname, 'src', 'index.js'),
output: {
path: path.resolve(__dirname, 'src', 'public'),
filename: 'bundle.js'
},
module: {
loaders: [
// Babel Loader
{
... | JavaScript | 0.000002 | @@ -25,73 +25,8 @@
th')
-%0Aconst ExtractTextPlugin = require('extract-text-webpack-plugin')
%0A%0Amo
@@ -355,162 +355,8 @@
es'%0A
- %7D,%0A // Sass Loader%0A %7B%0A loader: ExtractTextPlugin.extract('css-loader?sourceMap', 'sass-loader?sourceMap'),%0A test: /%5C.scss$/%0A
@@ -644,... |
954313b72283d10910221774dfd8f5f78f8a446f | Fix webpack exclude for Windows | webpack.config.js | webpack.config.js | // @ts-check
const path = require('path');
const webpack = require('webpack');
/** @type {webpack.Configuration} */
const shared = {
mode: 'production',
watchOptions: {
ignored: ['BookReader/**', 'node_modules/**', 'tests/**']
},
target: ['web', 'es5'],
module: {
rules: [
{
test: /\.... | JavaScript | 0.000001 | @@ -349,18 +349,21 @@
_modules
-%5C/
+%5B/%5C%5C%5D
(?!(lit-
@@ -383,10 +383,13 @@
tml)
-%5C/
+%5B/%5C%5C%5D
).*/
|
974e328d7ac5c9aebf17bbdd8afce1a575d429af | fix for clicking on nodes | data/infobar.js | data/infobar.js | (function(global){
const oriMapViewBox = document.querySelector('#mapcanvas').getAttribute('viewBox');
// update info when clicking on a node in the graph visualization
document.querySelector('#content').addEventListener('click', function(event){
if (event.target.mozMatchesSelector('.node')){
updateInfo(a... | JavaScript | 0 | @@ -238,24 +238,89 @@
ion(event)%7B%0A
+ // click could happen on .node or an element inside of .node%0A
if (even
@@ -353,21 +353,163 @@
r('.node
+, .node *
'))%7B%0A
+ var node = event.target;%0A while(node.mozMatchesSelector('.node *'))%7B%0A node = node.parentElement;%0A %7... |
79c6b9376186574f5c65a508f3c2b8a229293798 | Fix z-index issues due to CSS minifiers | webpack.config.js | webpack.config.js | "use strict";
/* global __dirname */
var webpack = require('webpack');
var webpackPostcssTools = require('webpack-postcss-tools');
var CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin;
var NgAnnotatePlugin = require('ng-annotate-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');... | JavaScript | 0.000001 | @@ -2235,17 +2235,36 @@
der?
-sourceMap
+-restructuring&compatibility
!css
@@ -7036,32 +7036,57 @@
/css'%5D%0A %7D
+,%0A compress: false
%0A %7D,%0A%0A //
|
676d841affc12d9639b0d48489f9343266dbb29c | add webpack NamedModulesPlugin plugin in development | webpack.config.js | webpack.config.js | const path = require('path');
const getRepositoryName = require('git-repo-name').sync;
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const O... | JavaScript | 0 | @@ -1585,24 +1585,60 @@
ntPlugin(),%0A
+ new webpack.NamedModulesPlugin(),%0A
new OpenBr
|
f3f537b3b1d3f959d7fa1c444f78da061596ccca | Clean up Webpack configuration | webpack.config.js | webpack.config.js | const webpack = require('webpack'),
path = require('path');
module.exports = {
entry: './app/Main.js',
output: {
path: './public',
filename: 'js/bundle.js',
publicPath: 'http://www.daviepoplarcapital.com/public'
},
devServer: {
inline: true,
contentBase: './',
port: 8100
},
mo... | JavaScript | 0.000002 | @@ -237,84 +237,8 @@
%7D,%0A
- devServer: %7B%0A inline: true,%0A contentBase: './',%0A port: 8100%0A %7D,%0A
mo
@@ -289,16 +289,17 @@
/%5C.js$/
+i
,%0A
@@ -418,22 +418,242 @@
%0A %7D
+, %7B
%0A
-%5D
+ test: /%5C.(jpe?g%7Cpng%7Cgif%7Csvg)$/i,%0A loader: 'file-loader?name=/i... |
3b71cf7e5d3086604b0ed161cac70a6ff34248e8 | Add support for uglifying and tree shaking | webpack.config.js | webpack.config.js | const webpack = require('webpack');
const fs = require('fs');
const path = require('path');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const ROOT_PATH = path.resolve(__dirname);
const DEVELOPMENT = process.env.NODE_ENV === 'development';
const PRODUCTION = process.env.NODE_ENV === 'production';
... | JavaScript | 0 | @@ -601,16 +601,177 @@
es.css')
+,%0A new webpack.optimize.UglifyJsPlugin(%7B%0A comments: false,%0A mangle: true,%0A compress: %7B%0A warnings: true %0A %7D%0A %7D)%0A
%5D%0A : %5B
@@ -1334,16 +1334,36 @@
'es2015'
+, %7B modules: false %7D
%5D%0A
|
2d4e80d90754add819c678174ada35b17c0daf87 | Fix error in config. | webpack.config.js | webpack.config.js | var webpack = require('webpack');
var port = JSON.parse(process.env.npm_package_config_port || 3000),
subdomain = JSON.parse(process.env.npm_package_config_subdomain),
url = subdomain ?
'https://' + subdomain + '.localtunnel.me' :
'http://localhost:' + port;
module.exports = {
devtool: 'eval',
... | JavaScript | 0 | @@ -111,16 +111,59 @@
domain =
+ process.env.npm_package_config_subdomain ?
JSON.pa
@@ -207,16 +207,23 @@
bdomain)
+ : null
,%0A ur
|
9ce686ef22dbca44bf091215047da7f4ea81a088 | Remove minification for now | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
module.exports = [{
entry: path.join(__dirname, 'src', 'Flatline.ts'),
output: {
path: path.join(__dirname, 'build'),
filename: "flatline-browser.min.js",
library: "Flatline",
libraryTarget: "var"
},
resol... | JavaScript | 0 | @@ -561,32 +561,34 @@
,%0A plugins: %5B
+/*
%0A new web
@@ -763,32 +763,34 @@
false%0A %7D)
+*/
%0A %5D%0A%7D, %7B%0A
|
3fd331ef4938f648e88108bdff72d1cfe7d3bbe2 | Enable React hot reloading again | webpack.config.js | webpack.config.js | var webpack = require("webpack");
var path = require('path');
var currentEnv = process.env['NODE_ENV'];
var env = {
production: currentEnv === 'production',
development: currentEnv === 'development',
test: currentEnv === 'test'
};
var addDevServerEntryPoint = function (entryPoint) {
if (currentEnv !== 'produ... | JavaScript | 0 | @@ -1254,24 +1254,34 @@
v.production
+ === false
) %7B%0A jsxLoa
@@ -1422,16 +1422,28 @@
_dirname
+ + '/client'
,%0A%0A f
|
c8ed77892f051b99d0ab9f415193b461270150f6 | Change webpack-dev-server port | webpack.config.js | webpack.config.js | var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var ManifestPlugin = require('webpack-manifest-plugin');
var OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const isProduction = process.argv.indexOf('-p') !== -1;
mo... | JavaScript | 0.000001 | @@ -2991,17 +2991,17 @@
port: 80
-8
+9
0,%0A
|
b6b018a625c84c84c41cb00157a1fe6ae264230d | convert tabs to spaces | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
const entryDir = path.resolve(__dirname, "src");
const outputDir = path.resolve(__dirname, "dist")
const config = {
devtool: 'sourcemap',
entry: entryDir + '/index.js',
output: {
path: outputDir,
filename: 'localStorageDB.min.js'
},
module:... | JavaScript | 0.999944 | @@ -4,17 +4,16 @@
st path
-
= requir
@@ -104,13 +104,13 @@
me,
-%22src%22
+'src'
);%0Ac
@@ -154,15 +154,16 @@
me,
-%22
+'
dist
-%22)
+');
%0A%0Aco
@@ -177,17 +177,18 @@
fig = %7B%0A
-%09
+
devtool:
@@ -201,18 +201,18 @@
cemap',%0A
-%0A%09
+
entry: e
@@ -234,18 +234,18 @@
ex.js',%0A
-%0A%09
+
outp... |
61998c569842681a4a3d3a5691f48bcd5bd8332a | fix important typo | webpack.config.js | webpack.config.js | const path = require("path");
const merge = require("webpack-merge");
const { dev, loaders, plugins, utils, optimize } = require("./config/parts");
const PATHS = {
template: path.join(__dirname, "client", "index.pug"),
client: path.join(__dirname, "client"),
app: path.join(__dirname, "client", "js"),
style: pa... | JavaScript | 0.999998 | @@ -4424,32 +4424,33 @@
(%7B additionalMod
+u
les: ADDITIONAL_
|
68db67c08c2aaedd57c464d5aa0fc77c657ba970 | Enable deprecation warnings | webpack.config.js | webpack.config.js | const { resolve } = require('path');
const IS_PROD = process.env.NODE_ENV === 'production';
const IS_DEV = process.env.NODE_ENV === 'development';
// See: https://github.com/webpack/loader-utils/issues/56
process.noDeprecation = true;
let config = {
devtool: 'cheap-module-eval-source-map',
cache: true,
perfor... | JavaScript | 0.000004 | @@ -146,97 +146,8 @@
';%0A%0A
-// See: https://github.com/webpack/loader-utils/issues/56%0Aprocess.noDeprecation = true;%0A%0A
let
@@ -295,17 +295,16 @@
'src'),%0A
-%0A
entry:
@@ -682,16 +682,31 @@
,%0A %7D,%0A%0A
+ plugins: %5B%5D,%0A
module
@@ -728,32 +728,16 @@
%5B%5D,%0A %7D,
-%0A%0A plugins: %5B%5D... |
98733cfb88ae30d5aec561142d30f5df88d8ac54 | Use cache: true for faster subsequent builds | webpack.config.js | webpack.config.js | "use strict"
const webpack = require("webpack")
const ExtractTextPlugin = require("extract-text-webpack-plugin")
const CopyWebpackPlugin = require("copy-webpack-plugin")
const WebpackNotifierPlugin = require("webpack-notifier")
module.exports = {
entry: [
"./web/static/js/polyfills/array.find",
"./web/stati... | JavaScript | 0.000219 | @@ -242,16 +242,31 @@
rts = %7B%0A
+ cache: true,%0A
entry:
|
2a1e60ce81b8d073554845151ea4e7ed810fcaa8 | remove comment | webpack.config.js | webpack.config.js | var webpack = require('webpack');
var path = require('path');
var commonPlugin = new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.bundle.js');
module.exports = {
entry: {
js: './client/index.js',
html: './client/index.html',
vendor: [ 'react' ]
},
devtool: 'source-map',
output: {
path... | JavaScript | 0 | @@ -435,28 +435,8 @@
: %5B%0A
- // Javascript%0A
|
4286da8c3332be0852d7daef87880394a25abbda | Fix typo | webpack.config.js | webpack.config.js | const webpack = require("webpack");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const failPlugin = require("webpack-fail-plugin");
const uglifySaveLicense = require("uglify-save-license");
const isProduction = process.env.NODE_ENV === "production";
let common = {
devtool: isProduction
? false
... | JavaScript | 0.999999 | @@ -690,17 +690,17 @@
de
-l
+v
elopment
|
eacf75d1b84cc75d25a0b860d2ed36cf0ea5a925 | update publicPath | webpack.config.js | webpack.config.js | const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const HTMLPlugin = require('html-webpack-plugin');
const SWPrecachePlugin = require('sw-precache-webpack-plugin');
const extractCSS = new ExtractTextPlugin('stylesheets... | JavaScript | 0 | @@ -869,13 +869,9 @@
h: '
-/dist
+.
/',%0A
|
bc11865d02abacdb699940fb5ad76eb16d5287f4 | Fix dev server in config | webpack.config.js | webpack.config.js | const path = require('path');
const pack = require('./package');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const inProduction = process.env.NODE_ENV === 'production';
const cssProdLoader = ExtractTextP... | JavaScript | 0.000001 | @@ -2265,17 +2265,18 @@
evServer
-:
+ =
%7B%0A c
|
843be5b18f19ab95432b3616ee1e8c400afc8889 | Add sourcemaps. | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const packageData = require('./package.json');
module.exports = {
entry: {
admin: ['./admin/assets/admin.js', './admin/assets/admin.css'],
vendor: ['semantic-ui-css', 'semantic... | JavaScript | 0 | @@ -461,16 +461,41 @@
')%0A %7D,%0A
+ devtool: 'source-map',%0A
module
@@ -793,16 +793,83 @@
ze: true
+, sourceMap: !%5B'test', 'production'%5D.includes(process.env.NODE_ENV)
%7D%0A
@@ -1485,24 +1485,97 @@
lse,%0A %7D
+,%0A sourceMap: !%5B'test', 'production'%5D.includes(process.env.NODE_ENV)
... |
bcd9a8dba257078d3e438a6e1293c1a0b179a74f | Drop imports | webpack.config.js | webpack.config.js | const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const merge = require('webpack-merge');
const webpack = require('webpack');
const NpmInstallPlugin = require('npm-install-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const ExtractTextPlugin = requir... | JavaScript | 0 | @@ -225,134 +225,8 @@
');%0A
-const CleanWebpackPlugin = require('clean-webpack-plugin');%0Aconst ExtractTextPlugin = require('extract-text-webpack-plugin');%0A
cons
|
3e4600e069a2e9e6c61465ad802549a20afe8729 | Fix bug | webpack.config.js | webpack.config.js | 'use strict';
var path = require('path');
var isProduction = process.env.NODE_ENV === 'production';
var outputPath = path.join(__dirname, isProduction ? '.tmp' : 'build', 'scripts');
var plugins = [];
if (isProduction) {
plugins.push(new webpack.optimize.UglifyJsPlugin({}))
}
module.exports = {
context: __dirnam... | JavaScript | 0.000001 | @@ -436,30 +436,30 @@
tion ? '
-.tmp' : 'build
+build' : '.tmp
',%0A
|
c56b54eddddd75f1eabfccda5166165d6b44cd82 | Load babel-polyfill in the bundle entry, before index.js | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
let og_image_url = process.env.RIOT_OG_IMAGE_URL;
if (!og_image_url) og_image_url = 'https://riot.im/app/themes/riot/img/logos/ri... | JavaScript | 0 | @@ -377,40 +377,30 @@
-main: %5B%0A // Load this
+// Load babel-polyfill
fir
@@ -460,22 +460,22 @@
- //
+// are
potenti
@@ -479,16 +479,23 @@
ntially
+loaded
before b
@@ -517,21 +517,28 @@
- '
+%22bundle%22: %5B%22
babel-po
@@ -547,39 +547,10 @@
fill
-',%0A %5... |
e1879292f8b4b8e0206b46934ca3e59bd695b1d3 | remove 'min' from asset filename when building dev bundle | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
const WebpackAssetsManifest = require('webpack-assets-manifest');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const TerserJSPlugin = require("terser-webpack-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpa... | JavaScript | 0 | @@ -1957,20 +1957,16 @@
'%5Bname%5D.
-min.
js',%0A
|
daa89751125bd9d00502f80fbae96fcd032092e2 | Unify the library name and export the amd name | webpack.config.js | webpack.config.js | var version = require('./package.json').version;
module.exports = {
entry: './lib',
output: {
filename: './dist/index.js',
library: ['jupyter', 'services'],
libraryTarget: 'umd',
publicPath: 'https://npmcdn.com/jupyter-js-services@' + version + '/dist/'
},
devtool: 'sour... | JavaScript | 0.998659 | @@ -154,17 +154,16 @@
ry:
-%5B
'jupyter
', '
@@ -162,12 +162,12 @@
yter
-', '
+-js-
serv
@@ -175,9 +175,8 @@
ces'
-%5D
,%0A
@@ -203,16 +203,46 @@
'umd',%0A
+ umdNamedDefine: true,%0A
|
42efda98eccf509be8ceb1f5bf2254b9094025e0 | Update webpack.config.js for webpack v2 | webpack.config.js | webpack.config.js | const path = require("path");
module.exports = {
devtool: 'source-map',
entry: "./web/js/index.jsx",
output: {
path: path.resolve(__dirname, "public"),
filename: "bundle.js",
publicPath: "bundle.js",
},
module: {
preLoaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
... | JavaScript | 0.000001 | @@ -236,17 +236,12 @@
-preLoader
+rule
s: %5B
@@ -241,32 +241,56 @@
ules: %5B%0A %7B%0A
+ enforce: %22pre%22,%0A
test: /%5C
@@ -366,38 +366,103 @@
der%22
+,
%0A
-%7D
+ options: %7B
%0A
-%5D,%0A
-loaders: %5B
+ configFile: '.eslintrc',%0A fix: true,%0A %7... |
e249dd5ba330ab7b63f2271a7c696f2e89d7764f | add UglifyJsPlugin settings | webpack.config.js | webpack.config.js | var HtmlWebpackPlugin = require('html-webpack-plugin');
var webpack = require('webpack');
module.exports = {
entry: {
'entry': './src/entry.js',
'vendor': './src/vendor.js',
},
resolve: {
root: __dirname,
},
output: {
path: './build',
filename: '[name]-[hash].js'
},
module: {
preL... | JavaScript | 0 | @@ -1329,16 +1329,169 @@
%7D),%0A
+ new webpack.optimize.UglifyJsPlugin(%7B%0A beautify: false,%0A mangle: false,%0A compress: %7B screw_ie8: true %7D,%0A comments: false,%0A %7D)%0A
%5D,%0A j
|
39fc22c072b4d2ba3bda351e2c74aa7cd2b27d65 | add extensions to webpack.config.js | webpack.config.js | webpack.config.js | const cssnext = require('postcss-cssnext');
const precss = require('precss');
const path = require('path');
module.exports = {
entry: './main.js',
output: {
path: path.join(__dirname, 'dist'),
filename: 'index.js',
publicPath: '/dist/'
},
module: {
loaders: [
{
test: /\.jsx?$/,
... | JavaScript | 0.000001 | @@ -251,16 +251,60 @@
/'%0A %7D,%0A
+ extensions: %5B%0A %22%22, %22.js%22, %22.jsx%22,%0A %5D,%0A
module
|
232153ddc200bfe483bafa7be0814a20aa7c82e7 | Modify webpack.config.js to fix issue of reloading bundle | webpack.config.js | webpack.config.js | var webpack = require('webpack');
var path = require('path');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
devtool: 'source-map',
watch: false,
entry: {
js: ['./index.ts'],
css: './scss/themes/default/proteic.scss'
},
output: {
library... | JavaScript | 0.000001 | @@ -201,93 +201,39 @@
ry:
-%7B%0A js: %5B'./index.ts'%5D,%0A css: './scss/themes/default/proteic.scss'%0A %7D
+%5B'./src/core.ts', './index.ts'%5D
,%0A
@@ -300,14 +300,15 @@
ist/
-%5Bname%5D
+proteic
.js'
@@ -546,17 +546,16 @@
%7B
-
%0A
@@ -577,17 +577,16 @@
/%5C.ts$/,
-
%0A ... |
57745f2ec7f65560bf124e16344f32a6d189aa05 | remove publicPath from webpack config | webpack.config.js | webpack.config.js | /* global __dirname */
module.exports = {
entry: __dirname + '/scripts/src/index.js',
output: {
path: __dirname + '/scripts/dist',
publicPath: '/scripts/dist/',
filename: 'bundle.js'
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' }
]
},
ext... | JavaScript | 0.000001 | @@ -136,42 +136,8 @@
t',%0A
- publicPath: '/scripts/dist/',%0A
|
5730a22f1212b08fceb1c281219a79c2ec6ea063 | remove useless .js | webpack.config.js | webpack.config.js | module.exports = require('./webpack.make.js')({})
| JavaScript | 0.000012 | @@ -37,11 +37,8 @@
make
-.js
')(%7B
|
cd615a03ca111c3fb72e8f46fad163eba8727160 | fix exception on FF where focusedNode can be "document", in which focusedNode.tagName is undefined, refs #16730 !strict | Viewport.js | Viewport.js | define([
"dojo/Evented",
"dojo/on",
"dojo/domReady",
"dojo/sniff", // has("ie"), has("ios")
"dojo/window" // getBox()
], function(Evented, on, domReady, has, winUtils){
// module:
// dijit/Viewport
/*=====
return {
// summary:
// Utility singleton to watch for viewport resizes, avoiding duplicate notif... | JavaScript | 0.000183 | @@ -1881,16 +1881,39 @@
dNode &&
+ focusedNode.tagName &&
focused
|
e673b04e9d06c09721ec08c73436d7448e8f62af | Remove references from reference list. | src/article/shared/ReferenceListComponent.js | src/article/shared/ReferenceListComponent.js | import { Component } from 'substance'
import { Button } from '../../kit'
export default class ReferenceListComponent extends Component {
getInitialState () {
let bibliography = this._getBibliography()
return {
hidden: (bibliography.length === 0)
}
}
render ($$) {
const RefComponent = this.... | JavaScript | 0 | @@ -1606,32 +1606,9 @@
() %7B
- // eslint-disable-line
%0A
+
@@ -1686,39 +1686,16 @@
rence) %7B
- // eslint-disable-line
%0A con
@@ -1876,104 +1876,127 @@
e) %7B
- // eslint-disable-line%0A console.error('TODO: implement ReferenceListComponent._editR
+%0A const api = this.context.api%0A const col... |
7e038b3dea7552f8e8850ca8c01555315463988a | update webpack config | webpack.config.babel.js | webpack.config.babel.js |
import { resolve } from 'path';
import webpack from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
const backendServerPort = process.env.BACKEND_SERVER_PORT || 3001;
const isDev = process.env.NODE_ENV !== 'production';
const PROJECT_PATH ... | JavaScript | 0.000001 | @@ -2123,24 +2123,34 @@
ugins: %5B%0A%09%09%09
+!isDev &&
new webpack.
@@ -2474,16 +2474,32 @@
%09%7D),%0A%09%09%5D
+.filter(Boolean)
,%0A%09%09reso
|
04739a4b35d5a73e86382a953d84fd2fa9d75dae | Add `performance` option | webpack.config.babel.js | webpack.config.babel.js | import {resolve} from 'path';
import {
DefinePlugin,
LoaderOptionsPlugin,
HotModuleReplacementPlugin,
NamedModulesPlugin,
NoErrorsPlugin,
optimize,
} from 'webpack';
import HTMLPlugin from 'html-webpack-plugin';
import CopyPlugin from 'copy-webpack-plugin';
import ExtractTextPlugin, {extract} from 'extract-... | JavaScript | 0.000255 | @@ -3116,16 +3116,61 @@
%0A %7D,%0A
+ performance: %7B%0A hints: !dev,%0A %7D,%0A
%7D;%0A%7D%0A%0A
|
80000a315352b5562df866032113c5337957b225 | rename webpack-alias to state | webpack/webpack.base.js | webpack/webpack.base.js | var path = require('path');
var autoprefixer = require('autoprefixer');
module.exports = {
entry: {
app: [path.resolve(__dirname, '../src/main.js')]
},
output: {
path: path.resolve(__dirname, '../build'),
publicPath: '/',
filename: '[name].[hash].js',
sourceMapFilename: '[name].[hash].js.ma... | JavaScript | 0.999258 | @@ -650,16 +650,72 @@
onents')
+,%0A 'state': path.resolve(__dirname, '../src/state')
%0A %7D%0A
|
2ae0d2014725bbf984137629587ba0be707fbc22 | Update version.js | website/data/version.js | website/data/version.js | export default '1.7.2'
| JavaScript | 0.000001 | @@ -17,7 +17,7 @@
1.7.
-2
+3
'%0A
|
9e13485b0cbb4e649415b55a647a07a9f68e78fd | Add some tests | tests/lib/rules/sort-styles.js | tests/lib/rules/sort-styles.js | /**
* @fileoverview Require StyleSheet object keys to be sorted
* @author Mats Byrkjeland
*/
'use strict';
// ------------------------------------------------------------------------------
// Requirements
// ------------------------------------------------------------------------------
const rule = require('../..... | JavaScript | 0.000004 | @@ -3201,24 +3201,868 @@
%7D%5D,%0A %7D,%0A
+ %7B%0A code: %60%0A const styles = StyleSheet.create(%7B%0A 'b': %7B%7D,%0A 'a': %7B%7D,%0A %7D)%0A %60,%0A errors: %5B%7B%0A message: 'Expected class names to be in ascending order. %5C'a%5C' should be before %5... |
cf6048aebd5a2e51f60e73364f3344102d60d7a5 | Change security test | tests/security-service-spec.js | tests/security-service-spec.js | 'use strict';
describe('securityService', function () {
beforeEach(module('ngSecurity'));
var $cookies,
$security;
beforeEach(inject(function ($injector) {
$cookies = $injector.get('$cookies');
$security = $injector.get('$security');
}));
it('should authenticate without user object', function... | JavaScript | 0.000001 | @@ -18,24 +18,32 @@
scribe('
+Service:
security
Service'
@@ -34,23 +34,16 @@
security
-Service
', funct
|
2187ab5d0d692bc48bf6c2c67413779a0c55a8df | Fix typos | controllers/auth.js | controllers/auth.js | // Load required packages
var User = require('../models/user');
var dbHelper = require('./dbHelper');
var jwt = require('jsonwebtoken'); // used to create, sign, and verify tokens
/* Generates JWT For User
* Returns result code and standard information
* containing messages and jwt.
*/
exports.generateToken = funct... | JavaScript | 0.999999 | @@ -275,19 +275,19 @@
ges and
-jwt
+JWT
.%0A */%0Aex
@@ -1119,10 +1119,10 @@
or t
-e
h
+e
tok
@@ -1898,19 +1898,19 @@
decoded
-jwt
+JWT
and con
@@ -2677,10 +2677,11 @@
l);%0A %7D%0A
-
%7D;
+%0A
|
0122f3eb4c9b4d1e2633b74c2d35262ae565a64a | remove senseless test in core scrolling | tests/unit/core/core_scroll.js | tests/unit/core/core_scroll.js | /*
* mobile core unit tests
*/
(function($){
var libName = "jquery.mobile.core",
scrollTimeout = 20, // TODO expose timing as an attribute
scrollStartEnabledTimeout = 150;
module(libName, {
setup: function(){
$("<div id='scroll-testing' style='height: 1000px'></div>").appendTo("body");
},
teardown... | JavaScript | 0 | @@ -950,159 +950,8 @@
);%0A%0A
-%09test( %22silent scroll is async%22, function()%7B%0A%09%09scrollUp();%0A%09%09ok($(window).scrollTop() != 0, %22scrolltop position should not be zero%22);%0A%09%09start();%0A%09%7D);%0A%0A
%09asy
|
5426cda258c25e483959b26c5ca82e46f704dd87 | fix legacy options normalizer, set lagacy warn to shout once | core/loadOptions.js | core/loadOptions.js | 'use strict';
var fs = require('fs');
var deepExtend = require('deep-extend');
var path = require('path');
var configUtils = require('./lib/configUtils');
var utils = require('./lib/utils');
var colors = require('colors'); // jshint ignore:line
var silent;
var legacyOptionsWarn = function(path, oldStruct, newStruct)... | JavaScript | 0 | @@ -311,24 +311,163 @@
newStruct)%7B%0A
+ // Shout warn message only once%0A if (global.legacyOptionsWarnOnce && global.legacyOptionsWarnOnce.indexOf(oldStruct) %3E -1) return;%0A%0A
var msg
@@ -512,16 +512,17 @@
in
+%60
' + path
.bol
@@ -521,17 +521,13 @@
path
-.bold
+ '
+%60
, pl
@@ -864,16 +864... |
106d0c0f3d824631fc6decd139dd9d6e7d3aca88 | Complete fake database service with missing stubs | tools/fake-database-service.js | tools/fake-database-service.js | 'use strict';
function FakeDatabaseService() {
}
module.exports = FakeDatabaseService;
FakeDatabaseService.prototype = {
run: function(query, callback) {
return callback(null, {});
},
createTable: function(targetTableName, query, callback) {
return callback(null, {});
},
getCol... | JavaScript | 0.000002 | @@ -295,32 +295,543 @@
l, %7B%7D);%0A %7D,%0A%0A
+ createTableIfNotExists: function(targetTableName, outputQuery, callback) %7B%0A return callback(null, true);%0A %7D,%0A%0A setUpdatedAtForSources: function(analysis, callback) %7B%0A return callback(null);%0A %7D,%0A%0A registerAnalysis... |
e4132c897f11457581538fe53a96103940b912b1 | Switch later in ATS | web/config.js | web/config.js | /*
* So, you are on of those few people actually reading the config file. Great!
* You are now able to optimise ETS2 Local Radio for you.
* As always, have fun, and when something breaks, try reverting to the default :-)
* This config file will reset every new version, so please make a backup of your changes.
*
*... | JavaScript | 0 | @@ -836,17 +836,17 @@
%22ats%22: 4
-0
+3
00%0A %7D
|
2b466a9015c000987cb5332b9c9210b122917047 | Fix yet another self-test broken by d4d349ca96 | tools/tests/deploy-settings.js | tools/tests/deploy-settings.js | var _ = require('underscore');
var selftest = require('../selftest.js');
var testUtils = require('../test-utils.js');
var utils = require('../utils.js');
var Sandbox = selftest.Sandbox;
var httpHelpers = require('../http-helpers.js');
// Poll the given app looking for the correct settings. Throws an error
// if the se... | JavaScript | 0 | @@ -450,56 +450,127 @@
time
-r = setTimeout(selftest.markStack(function () %7B%0A
+outDate = new Date(new Date().valueOf() + timeoutSecs * 1000);%0A while (true) %7B%0A if (new Date() %3E= timeoutDate) %7B%0A
@@ -639,49 +639,12 @@
;%0A
-%7D), timeoutSecs * 1000);%0A while (true) %7B
+ %7D%0A
%0A
@... |
4cdb4b4cd70f94548c72c87228f4668e086587a6 | remove console logs | desktop/components/add_to_calendar/react.js | desktop/components/add_to_calendar/react.js | import PropTypes from 'prop-types'
import React, { Component } from 'react'
import AddToCalendarView from 'desktop/components/add_to_calendar/index.coffee'
export default class AddToCalendar extends Component {
static propTypes = {
el: PropTypes.node,
event: PropTypes.object.isRequired
}
state = {
i... | JavaScript | 0.000002 | @@ -527,70 +527,8 @@
%7D)
-%0A console.log(%22*****%22, this.view)%0A console.log(this)
%0A%0A
|
1d72ad613a65ffa86169684c16e374b4d4a8cfb8 | clean up the `getReporter` call | reporters/index.js | reporters/index.js | 'use strict';
var getReporter = require('jscs/lib/cli-config').getReporter;
var PluginError = require('gulp-util').PluginError;
var through = require('through2');
exports.failReporter = require('./fail');
exports.loadReporter = function (reporter) {
// we want the function
if (typeof reporter === 'function') return... | JavaScript | 0.000025 | @@ -568,25 +568,22 @@
ry %7B%0A%09%09%09
-var rpt =
+return
getRepo
@@ -600,37 +600,15 @@
ter)
-;%0A%09%09%09return rpt.writer %7C%7C rpt
+.writer
;%0A%09%09
|
abfad73d4c7c50802d82fb59f4226d36bd94970d | Improve output (a) Create the string from stringify without first and last bracet (b) Allow pretty as a queryparameter (c) Allow quiet operation, for example when using res directly to push a file | reptiles-server.js | reptiles-server.js | var clues = require('clues');
module.exports = function(api,options) {
api = api || {};
options = options || {};
function stringifyError(e) {
var message = {
message : (!options.debug && e.stack) ? 'Internal Error' : e.message,
ref : e.ref,
error : true
};
if (options.debug) {
... | JavaScript | 0.000301 | @@ -24,16 +24,261 @@
ues');%0A%0A
+function jsonReplacer(key, value) %7B%0A if (value && typeof value.solve === 'function') %7B%0A var facts = %5B%5D,d;%0A for (d in value.facts) facts.push(d);%0A return %7B'clues':true,logic:Object.keys(value.logic),facts:facts%7D;%0A %7D%0A return value;%0A%7D%0A%0A
mod... |
9b710f254c7342e0dd678fd993288fdf5a34abcb | Use jsdoc documentation on value property | test-support/page-object/properties/value.js | test-support/page-object/properties/value.js | import { findElementWithAssert, map } from '../helpers';
/**
* Gets the value of the matched element
*
* @example
*
* var page = PageObject.create({
* search: value('input')
* });
*
* assert.equal(page.search, 'search term');
*
* @param {string} selector - CSS selector of the element to check
* @... | JavaScript | 0 | @@ -95,16 +95,29 @@
element
+ or elements:
%0A *%0A * @
@@ -130,17 +130,52 @@
e%0A *%0A *
-
+// %3Cinput value=%22Lorem ipsum%22%3E%0A *%0A *
var pag
@@ -207,37 +207,301 @@
*
- search: value('input'
+value: PageObject.value('input')%0A * %7D);%0A *%0A * // returns 'Lorem ipsum'%0A * page.value%0A *%0A * @e... |
76bf12e0deae45344cf8f7f400b12d6ce0e4a097 | fix to require.build.js | requirejs.build.js | requirejs.build.js | ({
//The top level directory that contains your app. If this option is used
//then it assumed your scripts are in a subdirectory under this path.
//This option is not required. If it is not specified, then baseUrl
//below is the anchor point for finding things. If this option is specified,
//then all the... | JavaScript | 0.000001 | @@ -464,16 +464,18 @@
ory.%0A
+//
appDir:
@@ -1567,16 +1567,19 @@
.js',%0A
+ //
modules
@@ -1584,16 +1584,19 @@
es: %5B%0A
+ //
//Ju
@@ -1666,16 +1666,19 @@
into%0A
+ //
//a
@@ -1751,16 +1751,19 @@
r any%0A
+ //
//of
@@ -1837,16 +1837,19 @@
n the%0A
+ //
//bu
@@ -1904,16 +19... |
ad919238673dcde9d21631b484d67caa3957d220 | comment out logging in publish | routes/activity.js | routes/activity.js | //'use strict';
// Deps
var util = require( 'util' );
var parseString = require('xml2js').parseString;
var underscore = require('underscore');
var request = require('request');
var webpush = require('web-push');
// VAPID keys should only be generated only once.
var vapidKeys = webpush.generateVAPIDKeys();
//var twi... | JavaScript | 0 | @@ -5621,32 +5621,34 @@
e main app.%0A
+//
console.log( 're
|
9555adf84864bf451deb692f00036f4d8254432b | Add test to make sure the category changes on toggle | test/components/idea_submission_form_test.js | test/components/idea_submission_form_test.js | import React from "react"
import { mount } from "enzyme"
import { expect } from "chai"
import sinon from "sinon"
import IdeaSubmissionForm from "../../web/static/js/components/idea_submission_form"
describe("IdeaSubmissionForm component", () => {
let wrapper
const onSubmitIdeaStub = () => {}
const onToggleActi... | JavaScript | 0 | @@ -3131,21 +3131,531 @@
alse)%0A %7D)
+%0A%0A it(%22toggles the state of categories between prior selection and 'action-item'%22, () =%3E %7B%0A const onToggleActionItemSpy = sinon.spy()%0A wrapper = mount(%3CIdeaSubmissionForm onIdeaSubmission=%7BonSubmitIdeaStub%7D onToggleActionItem=%7BonToggleActi... |
f62ec15cce3e9b1a98270ddad81cfd00f487cbe9 | Fix typo | routes/api/auth.js | routes/api/auth.js | var express = require('express');
var router = express.Router();
var jwt = require('jsonwebtoken');
var secretKey = require('../../config/secretKey');
var User = require('../../model/user');
router.post('/login_local', function(req, res, next) {
User.findOne({'local.id' : req.body.id },
function(err, user) {
... | JavaScript | 0.999999 | @@ -498,9 +498,10 @@
rify
-P
+_p
assw
|
4315279e74a0591ccd9ad43290fa7d711d3db448 | fix starttime > endtime | routes/bookings.js | routes/bookings.js | var express = require('express');
var helper = require('../helper.js');
var bookings = helper.db.collection('bookings');
var gadgets = helper.db.collection('gadgets');
var router = express.Router();
/* all bookings */
router.get('/', helper.ensureAuthenticated, function(req, res) {
var find = {};
if(req.session... | JavaScript | 0 | @@ -1914,16 +1914,102 @@
te(end);
+%0A%09 %0A%09 if( start %3E end )%7B%0A%09%09tmp_start = start;%0A%09%09start = end;%0A%09%09end = tmp_start;%0A%09 %7D
%0A%0A
|
e4c1db216d1e65193f7ef92ef1f69a2d7ca3ff18 | Fix bug where behaviour was incorrect for GET/messages without offset supplied | routes/messages.js | routes/messages.js | const express = require('express');
const Q = require('Q')
const router = express.Router();
const winston = require('winston')
const utils = require('../utilities.js')
const messageManager = require('../bin/message-manager/message-manager')
router.get('/', function (req, res, next) {
// If the GET param 'offset'... | JavaScript | 0 | @@ -368,16 +368,17 @@
ffset =
+(
req.quer
@@ -393,10 +393,17 @@
==
-%7B%7D
+undefined
? 0
@@ -421,16 +421,17 @@
y.offset
+)
%0A%0A util
|
814947e84a55a47a076be389579e458c556ec259 | Refactor and improve test systems | test/services/helpers/services/testSystem.js | test/services/helpers/services/testSystem.js | let createdSystemIds = [];
const createTestSystem = app => ({ url, type = 'moodle' }) => app.service('systems').create({ url, type })
.then((system) => {
createdSystemIds.push(system._id.toString());
return system;
});
const cleanup = app => () => {
const ids = createdSystemIds;
createdSystemIds = [];
retur... | JavaScript | 0 | @@ -57,22 +57,41 @@
=%3E
-(
+async (options =
%7B url
+: ''
, type
- =
+:
'mo
@@ -101,16 +101,40 @@
e' %7D) =%3E
+ %7B%0A%09const system = await
app.ser
@@ -160,45 +160,18 @@
ate(
-%7B url, type %7D)%0A%09.then((system) =%3E %7B%0A%09
+options);%0A
%09cre
@@ -213,17 +213,16 @@
ing());%0A
-%09
%09return
... |
79d93038744af7c7924fec76204cf25a5adc2641 | fix testing foreal | ui/src/components/SoundWave.js | ui/src/components/SoundWave.js | /**
* Responsible for creating soundwave
*/
export class SoundWave {
/**
* Creates a soundwave based off the loudness of the user
* @param {Object} canvas - A canvas to draw the soundwave on
* @param {Object} stream - stream the soundwave will be created off
* @private {Object} Allows for the st... | JavaScript | 0 | @@ -1345,90 +1345,8 @@
');%0A
- const context = new (window.AudioContext %7C%7C window.webkitAudioContext)();%0A
@@ -1365,16 +1365,21 @@
lyser =
+this.
context.
@@ -1419,16 +1419,21 @@
ource =
+this.
context.
|
724fc43b8d429c9826a690203c1bcc5a5e9cdf90 | check error message in test | test/services/passwordRecovery/index.test.js | test/services/passwordRecovery/index.test.js | const assert = require('assert');
const { expect } = require('chai');
const appPromise = require('../../../src/app');
const testObjects = require('../helpers/testObjects')(appPromise);
const passwordRecovery = require('../../../src/services/passwordRecovery/model');
const PORT = 0;
describe('passwordRecovery service... | JavaScript | 0 | @@ -287,16 +287,21 @@
describe
+.only
('passwo
@@ -2842,16 +2842,24 @@
pect(err
+.message
).equal(
|
3f7395b4b6f4b1b2c8cba752c35c4a9a987b9ee4 | support files with length = 0 | index.js | index.js | var bncode = require('bncode')
var path = require('path')
var Rusha = require('rusha-browserify') // Fast SHA1 (works in browser)
/**
* Parse a torrent. Throws an exception if the torrent is missing required fields.
* @param {Buffer|Object} torrent
* @return {Object} parsed torrent
*/
module.exports = fun... | JavaScript | 0.998163 | @@ -775,24 +775,31 @@
ensure(
+typeof
file.length,
@@ -793,24 +793,37 @@
file.length
+ === 'number'
, 'info.file
|
f89fdb907b158830d5bce23d46f8c5160ee46c66 | fix for member expression `this` references | index.js | index.js | var falafel = require('falafel');
var concat = require('concat-stream');
var duplexer = require('duplexer');
var through = require('through');
module.exports = function (file, opts) {
if (typeof file === 'object') {
opts = file;
file = undefined;
}
if (!opts) opts = {};
var outputFn = o... | JavaScript | 0.000001 | @@ -1592,24 +1592,132 @@
tExpression'
+%0A && (node.type !== 'MemberExpression'%0A %7C%7C node.parent.type !== 'CallExpression'%0A )
) %7B%0A
|
eef422bc95cb113c1574b5797b9666140c2e6757 | Fix validation continues on fkey error | index.js | index.js | 'use strict';
var aws = require('aws-sdk');
var Q = require('q');
var request = require('request');
var Upload = require('./lib/upload');
var Logger = require('./lib/logger');
require('node-env-file')('.env');
exports.handler = function(event, context) {
// exit if event not from a datapackage.zip put or copy
... | JavaScript | 0.000005 | @@ -2187,16 +2187,48 @@
d.errors
+ && upload.meta.validation.valid
) %7B%0A
|
dfcac17be31a57319b59bb34b275635c4f304e69 | Double equal should be triple equal | index.js | index.js | 'use strict';
function injectDefaultOptions(options) {
options = options || {};
options.prefix = options.prefix || '#{';
options.suffix = options.suffix || '}';
options.configFile = options.configFile || process.cwd() + '/config.json';
options.preserveUnknownTokens = options.preserveUnknownTokens || false;
... | JavaScript | 0.999999 | @@ -2017,16 +2017,17 @@
Value ==
+=
'string
|
26971ca252fedf6525a7bf40eb2de562a09fb5e0 | add in missing module.exports | index.js | index.js | require('./dist/hapi-i18next');
| JavaScript | 0.000001 | @@ -1,8 +1,25 @@
+module.exports =
require(
|
7493eb78d4b06bc4af96e46a41dc61cffb47982a | handle when a source errors in an uncapped stream - should still end | index.js | index.js |
/*
all pull streams have these states:
{
START: {
read: READING,
abort: ABORTING
},
READY: {
read: READING,
abort: ABORTING
},
READING: {
cb: READY,
err: ERROR,
end: END
},
ABORTING: {
cb: END
},
ERROR: {},
END: {}
}
this module takes a collection of pull-streams,... | JavaScript | 0 | @@ -1112,16 +1112,26 @@
0 &&
+ (abort %7C%7C
capped)
%7B%0A
@@ -1126,16 +1126,17 @@
capped)
+)
%7B%0A
@@ -1167,16 +1167,29 @@
true)%0A
+ return%0A
%7D%0A%0A
@@ -1855,16 +1855,90 @@
already%0A
+ if(l %3E inputs.length) throw new Error('this should never happen')%0A
@@ -2105... |
23dab97fbb746fa461756570a486c11a213c9a02 | correct replay.initdata | index.js | index.js | /*jshint esversion: 6 */
const bindings = require('bindings')('storm-replay');
const fs = require('fs');
const version = require('./package.json').version;
/*
* Buffer Helper Functions
*/
function checkOffset (offset, ext, length) {
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint');... | JavaScript | 0.000003 | @@ -815,9 +815,9 @@
init
-D
+d
ata'
|
bbfe8aca683cb208ae0f5d77ec0ee577380d8d64 | Update route-match-examples.js | tests/dummy/snippets/route-match-examples.js | tests/dummy/snippets/route-match-examples.js | // Matches any transition that ends up in the route named 'foo', no
// matter where it came from.
this.transition(
this.toRoute('foo'),
this.use('toLeft')
);
// This is equivalent to the previous example, but showing a more
// generic form that lets you provide an arbitrary test.
this.transition(
this.toRoute(fu... | JavaScript | 0.000002 | @@ -486,16 +486,17 @@
This wil
+l
match a
|
bd6064071baa3ec2fbac858991a6545a11bb806e | Fix URL.resolve() deprecation error | index.js | index.js | 'use strict';
var resolveurl = require('url').resolve;
var compileurl = require('path-to-regexp').compile;
var Promise = require('bluebird');
var request = require('superagent');
var assert = require('assert');
var get = require('lodash.get');
var set = require('lodash.set');
module.exports = ... | JavaScript | 0.000109 | @@ -12,26 +12,26 @@
';%0A%0Avar
-resolveurl
+%7B URL %7D
= requi
@@ -43,16 +43,8 @@
rl')
-.resolve
;%0Ava
@@ -953,19 +953,22 @@
l =
-resolveurl(
+(new URL(url,
opti
@@ -978,22 +978,23 @@
.baseUrl
-, url)
+)).href
;%0A%09%09%7D ca
|
06831afb64e8ce9feeaacabdb82e478d0d8828c1 | Make hasSibling and hasTile check 9x faster | index.js | index.js | // a tile is an array [x,y,z]
var bboxPolygon = require('turf-bbox-polygon');
function tileToGeoJSON (tile) {
var bbox = [tile2lon(tile[0],tile[2]), tile2lat(tile[1],tile[2]), tile2lon(tile[0]+1,tile[2]), tile2lat(tile[1]+1,tile[2])];
var poly = bboxPolygon(bbox);
return poly;
}
function tile2lon(x, z) {
... | JavaScript | 0 | @@ -1685,25 +1685,24 @@
hasSiblings
-
(tile, tiles
@@ -1709,31 +1709,8 @@
) %7B%0A
- var hasAll = true;%0A
@@ -1751,41 +1751,48 @@
-siblings.forEach(function(sibling
+for (var i = 0; i %3C siblings.length; i++
) %7B%0A
@@ -1801,16 +1801,17 @@
if
+
(!hasTil
@@ -1830,33 +1830,21 @@
ling
-))... |
8b961cc97b507074f3c29c90e851eb2dda9493a0 | exit if loading local api-meta fails | index.js | index.js | #!/usr/bin/env node
"use strict";
var resolve = require("resolve"),
fs = require("fs"),
path = require("path"),
workingDir = process.cwd(),
localApiMeta;
try {
localApiMeta = requireLocal("api-meta/src/cli");
} catch (error) {
logError();
}
localApiMeta.run();
function requireLocal (id) {
var localPath = r... | JavaScript | 0.000001 | @@ -242,16 +242,33 @@
rror();%0A
+%09process.exit();%0A
%7D%0A%0Alocal
|
fe2b5288c9cf351c88124a4f76c58611e11554cd | Use acorn-node's default ecmaVersion. | index.js | index.js | var parse = require('acorn').parse;
module.exports = function (src) {
// If src is a Buffer, esprima will just stringify it, so we beat them to
// the punch. This avoids the problem where we're using esprima's range
// indexes -- which are meant for a UTF-16 string -- in a buffer that
// contains UTF-8... | JavaScript | 0 | @@ -423,22 +423,16 @@
e(src, %7B
-%0A
range:
@@ -439,37 +439,8 @@
true
-,%0A ecmaVersion: 2019%0A
%7D);
|
a37ac10e2d98b5ad097f267175cf2cb04d0e9f90 | fix regexp | index.js | index.js | module.exports = asString
module.exports.add = append
function asString(fonts) {
var href = getHref(fonts)
return '<link href="' + href + '" rel="stylesheet" type="text/css">'
}
function asElement(fonts) {
var href = getHref(fonts)
var link = document.createElement('link')
link.setAttribute('href', href)
... | JavaScript | 0.998076 | @@ -549,16 +549,17 @@
ce(/%5Cs+/
+g
, '+')%0A
|
632f1f47e27a88800a294e735351a6c5d90e91b4 | removes semicolon | index.js | index.js |
'use strict'
const Promise = require('bluebird')
const Through2 = require('through2')
const ReadFile = require('fs').createReadStream
const ForEach = [].forEach
/* MODULE */
function Punc(filePath, options){
if (!filePath) throw new Error('Punc: file path not given.')
if (!options) {
options = { encodi... | JavaScript | 0.999677 | @@ -661,17 +661,16 @@
ody = ''
-;
%0A let d
|
16ad275e543cf63a382afa3103db992fd5acd72a | Improve message sending options. | index.js | index.js | exports = module.exports = (function () {
var request = require('request');
function Slackman (opts) {
this.hook = opts.hook || '';
this.debug = opts.debug || false;
}
Slackman.prototype.send = function (msg) {
var that = this;
this.debug ? console.log('Sending message ' + msg) : 0;
request({
metho... | JavaScript | 0.000005 | @@ -168,16 +168,170 @@
false;%0A
+%09%09this.username = opts.username %7C%7C 'Slackman';%0A%09%09this.message = opts.message %7C%7C 'Hello! I am the Slackman!';%0A%09%09this.channel = opts.channel %7C%7C '#general';%0A
%09%7D%0A%0A%09Sla
@@ -350,16 +350,23 @@
ype.send
+Message
= funct
@@ -370,19 +370,20 @@
nctio... |
bd5d15063b3790a21720bc602c15a61f2ed65060 | Fix LICENSE release before taken | index.js | index.js | var extend = require('extend'),
EventEmitter = require('events').EventEmitter,
ginga = require('ginga'),
semaphore = require('./semaphore'),
levelErrors = require('level-errors'),
Codec = require('level-codec'),
Queue = require('./queue'),
error = requir... | JavaScript | 0 | @@ -1611,16 +1611,58 @@
on(cb)%7B%0A
+ if(self._released) %0A return;%0A
if
|
9cf00f001bcb875a1e7e915f79e2a9bf51b4d8ea | Fix indentation of spaces | index.js | index.js | 'use strict';
var fs = require('fs');
var path = require('path');
var Readable = require('stream').Readable;
var glob = require('glob');
var dargs = require('dargs');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');
var md5Hex = require('md5-hex');
var spawn = require('win-spawn');
var gutil = require('g... | JavaScript | 0.000004 | @@ -1257,18 +1257,17 @@
%5Cn' +%0A%09%09
-
+%09
'This wi
@@ -1309,18 +1309,17 @@
s 2.0'%0A%09
-
+%09
));%0A%09%7D%0A%0A
@@ -5715,18 +5715,17 @@
(err) %7B%0A
-
+%09
var mess
@@ -5776,18 +5776,17 @@
, err);%0A
-
+%09
process.
@@ -5819,10 +5819,9 @@
');%0A
-
+%09
this
|
83fcd05390f6a85077a0275d64cb6523d04842f8 | allow .body | index.js | index.js | /*global window*/
var extend = require("xtend")
var once = require("once")
var messages = {
"0": "Internal XMLHttpRequest Error",
"4": "4xx Client Error",
"5": "5xx Server Error"
}
var _window = typeof window === "undefined" ? {} : window
var XHR = _window.XMLHttpRequest || noop
var XDR = "withCredentials... | JavaScript | 0.00003 | @@ -1317,16 +1317,32 @@
hr.send(
+options.body %7C%7C
options.
|
cd3bb50b53ca187a7fc4ffd9006315faba7cb270 | fix lint errors | utilities/get-component-doc.js | utilities/get-component-doc.js | /* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
/* eslint-disable import/no-mutable-exports */
let getComponentDocFn = function () {};
const baseURL = 'https://react.lightningdesignsystem.com';
if (process.env.NODE_... | JavaScript | 0.000037 | @@ -414,17 +414,20 @@
aseURL +
-
+%0A%09%09%09
(jsonDoc
@@ -453,12 +453,16 @@
ug'%5D
- ? '
+%0A%09%09%09%09? %60
/com
@@ -473,12 +473,10 @@
nts/
-' +
+$%7B
json
@@ -490,17 +490,23 @@
l-slug'%5D
-
+%7D%60%0A%09%09%09%09
: '')%7D%60;
@@ -591,22 +591,17 @@
propName
-%0A%09%09%09%09%09
+
? %60$%7Bcom
@@ -632,... |
3f54457ac49c1a3d2045b4c910d97ed3822bc426 | Make TestUsersUnsubscribe forward compatible with future dependencies (#11695) | tests/unit/amo/pages/TestUsersUnsubscribe.js | tests/unit/amo/pages/TestUsersUnsubscribe.js | import { waitFor } from '@testing-library/react';
import { encode } from 'universal-base64url';
import {
abortUnsubscribeNotification,
finishUnsubscribeNotification,
getUnsubscribeKey,
unsubscribeNotification,
UNSUBSCRIBE_NOTIFICATION,
} from 'amo/reducers/users';
import { extractId } from 'amo/pages/UsersUn... | JavaScript | 0 | @@ -90,16 +90,68 @@
4url';%0A%0A
+import %7B CLIENT_APP_FIREFOX %7D from 'amo/constants';%0A
import %7B
@@ -1607,16 +1607,49 @@
etadata(
+%7B clientApp: CLIENT_APP_FIREFOX %7D
).store;
|
ee2349eec929fe4b597834e7dbcc9f6aace0f170 | Remove junk | index.js | index.js | /**
* Module dependencies
*/
var soap = require('soap')
, _ = require('underscore');
var endpoint = 'http://v3.core.com.productserve.com/ProductServeService.wsdl';
/**
* AffiliateWindow
*/
var AffiliateWindow = module.exports = function AffiliateWindow (opts) {
if (!(this instanceof AffiliateWindow)) return n... | JavaScript | 0.00005 | @@ -2695,34 +2695,4 @@
%0A%7D;%0A
-%0A sName: ''%0A %7D%0A %7D%0A%7D;%0A
|
89fd70bde193e458d2ccb21fbc00c2b2fd5c6aeb | Fix syntax error | index.js | index.js | /* jshint node: true */
'use strict';
module.exports = {
name: 'ember-cli-pickadate',
included: function(app) {
this._super.included(app);
app.import('bower_components/pickadate/lib/picker.js');
app.import('bower_components/pickadate/lib/picker.date.js');
app.import('bower_components/pickadate/lib... | JavaScript | 0.000585 | @@ -556,11 +556,8 @@
%0A %7D%0A%7D;%0A
-%7D;%0A
|
9a69d051d33be7c91a2e9564552d9ce289989b1f | Clean index.js, remove unneeded functions. | index.js | index.js | 'use strict';
var open = require('open');
var through = require('through2');
var gutil = require('gulp-util');
var log = gutil.log;
var colors = gutil.colors;
var PLUGIN_NAME = 'gulp-open';
// The acceptable uri formats for opening
var ACCEPTABLE_URI_FORMATS = ['/', 'file://', 'http://', 'https://'];
module.export... | JavaScript | 0 | @@ -110,29 +110,8 @@
);%0A%0A
-var log = gutil.log;%0A
var
@@ -170,121 +170,8 @@
';%0A%0A
-// The acceptable uri formats for opening%0Avar ACCEPTABLE_URI_FORMATS = %5B'/', 'file://', 'http://', 'https://'%5D;%0A%0A
modu
@@ -196,16 +196,12 @@
ion(
-src,
opt
+s
) %7B%0A
@@ -210,22 +210,24 @@
opt
+s
= opt
+s
... |
7dc2f892b9087e3cb1b25ef1b91dddaca8a615ab | Add multicast-dns options | index.js | index.js | #!/usr/bin/env node
function usage () {/*
Usage
bonjour-publish --host=127.0.0.1 --port=8088 --type=some "title of the server"
Options
--host | -H Host which your server listens
--port | -P Port which your server listens
--type | -T Type of interface provided by your server
--multicast ... | JavaScript | 0.000001 | @@ -433,12 +433,12 @@
ort
-%7C -U
+
|
f0dcd983496621f1c3f17aa717216bb9be099f47 | set undefined correctly | index.js | index.js | const pathname = require('pathname-match')
const urlencode = require('urlencode')
const wayfarer = require('wayfarer')
const methods = require('methods')
const assert = require('assert')
module.exports = serverRouter
// Server router
// str -> fn -> any
function serverRouter (opts, routes) {
if (!routes) {
rout... | JavaScript | 0.000239 | @@ -401,16 +401,17 @@
Thunk =
+(
opts.thu
@@ -420,11 +420,41 @@
%7C%7C
-tru
+opts.thunk === undefined) %7C%7C fals
e%0A%0A
|
8efd7757e9888ed422a40f9a71147a4657dd0b7e | Allow constructor to be called as a function | index.js | index.js | var Through = require('through2');
var Revisioner = require('./revisioner');
var RevAll = (function () {
var RevAll = function (options) {
this.revisioner = new Revisioner(options);
};
RevAll.prototype.revision = function () {
var revisioner = this.revisioner;
// Feed the RevA... | JavaScript | 0.000006 | @@ -137,16 +137,116 @@
tions) %7B
+%0A %0A if (!(this instanceof RevAll)) %7B%0A return new RevAll(options);%0A %7D
%0A%0A
|
88d07c758bc0fa9a07987fc41dd5c11c10c0dbf1 | remove wport from docs | index.js | index.js | // this is a webpack config that takes a number of options
// to let you build different style bundles
// based on the webpack react example
var fs = require('fs');
var path = require('path');
var webpack = require('webpack');
var ReactStylePlugin = require('react-style-webpack-plugin');
var ExtractTextPlugin = requir... | JavaScript | 0 | @@ -570,24 +570,74 @@
ypoint file%0A
+// wport: port for webpack-dev-server to run on%0A
// mode: m
|
4f3fd3f1aa3ae270a224d191be1d934d14747e0d | Add domain to metadata for aggregation result | index.js | index.js | import { linear } from "d3-scale";
import accessor from "column-accessor";
import { extent } from "d3-arrays";
function filter(data, predicates){
predicates.forEach(function (predicate){
var column = predicate.column;
if("min" in predicate){
var min = predicate.min;
data = data.filter(function (d... | JavaScript | 0 | @@ -2825,32 +2825,74 @@
= binAccessor;%0A%0A
+ metadata%5Bdimension.column%5D = %7B%0A%0A
// The s
@@ -2922,16 +2922,29 @@
d for a
+Histogram or
HeatMap
@@ -2966,16 +2966,18 @@
to use.%0A
+
@@ -3056,49 +3056,201 @@
-metadata%5Bdimension.column%5D = %7B step: step
+ step: step... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.