commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
cb92521b4c237e8a6d7b26f0fe02c26b10187c3a
modifyurl@2ch.user.js
modifyurl@2ch.user.js
// ==UserScript== // @id Modify URL @2ch // @name Modify URL @2ch // @version 0.0.5 // @namespace curipha // @author curipha // @description Modify "ttp://" text to anchor and redirect URIs to direct link. // @include http://*.2ch.net/* // @include http://*.bbs...
// ==UserScript== // @id Modify URL @2ch // @name Modify URL @2ch // @version 0.0.6 // @namespace curipha // @author curipha // @description Modify "ttp://" text to anchor and redirect URIs to direct link. // @include http://*.2ch.net/* // @include http://*.bbs...
Fix the potential XSS in URI-like strings with <, > and "
Fix the potential XSS in URI-like strings with <, > and "
JavaScript
unlicense
curipha/userscripts,curipha/userscripts
--- +++ @@ -1,7 +1,7 @@ // ==UserScript== // @id Modify URL @2ch // @name Modify URL @2ch -// @version 0.0.5 +// @version 0.0.6 // @namespace curipha // @author curipha // @description Modify "ttp://" text to anchor and redirect URIs to direct link. @@ -23,7 +...
c515c365778b609c1e54a24bc670f23d3ef2fac4
lib/message.js
lib/message.js
/** * Creates an instance of `Message`. * * This class is used as a mock when testing Crane handlers, substituted in * place of a `Message` from the underlying message queue adapter. * * @constructor * @api protected */ function Message(cb) { this.queue = '/'; this.headers = {}; this.__cb = cb; } Message...
/** * Creates an instance of `Message`. * * This class is used as a mock when testing Crane handlers, substituted in * place of a `Message` from the underlying message queue adapter. * * @constructor * @api protected */ function Message(cb) { this.topic = '/'; this.headers = {}; this.__cb = cb; } Message...
Set topic rather than queue.
Set topic rather than queue.
JavaScript
mit
jaredhanson/chai-crane-handler
--- +++ @@ -8,7 +8,7 @@ * @api protected */ function Message(cb) { - this.queue = '/'; + this.topic = '/'; this.headers = {}; this.__cb = cb; } @@ -19,6 +19,6 @@ /** - * Expose `Response`. + * Expose `Message`. */ -module.exports = Response; +module.exports = Message;
1dabed199a7087054b64896d523983f1539802af
prepublish.js
prepublish.js
'use strict'; var fs = require('fs'); var visitors = require('react-tools/vendor/fbtransform/visitors'); var jstransform = require('jstransform'); var visitorList = visitors.getAllVisitors(); var getJsName = function(filename) { var dot = filename.lastIndexOf("."); var baseName = filename.substring(0, dot); ...
'use strict'; var fs = require('fs'); var visitors = require('react-tools/vendor/fbtransform/visitors'); var jstransform = require('jstransform'); var visitorList = visitors.getAllVisitors(); var getJsName = function(filename) { var dot = filename.lastIndexOf("."); var baseName = filename.substring(0, dot); ...
Replace .jsx requires in .js to be able to require e.g. timeago
Replace .jsx requires in .js to be able to require e.g. timeago
JavaScript
mit
sloria/react-components,quicktoolbox/react-components,sloria/react-components,redsunsoft/react-components,jepezi/react-components,jepezi/react-components,Khan/react-components,redsunsoft/react-components,jepezi/react-components,vasanthk/react-components,sloria/react-components,vasanthk/react-components,quicktoolbox/rea...
--- +++ @@ -21,6 +21,7 @@ var js = fs.readFileSync(src, {encoding: 'utf8'}); var transformed = jstransform.transform(visitorList, js).code; + transformed = transformed.replace('.jsx', '.js'); fs.writeFileSync(dest, transformed); }
3e1f0ab719845969ae82f73713374cd15342d51d
src/Node/Encoding.js
src/Node/Encoding.js
/* global exports */ /* global Buffer */ "use strict"; // module Node.Encoding exports.byteLength = function (str) { return function (enc) { return Buffer.byteLength(str, enc); }; };
/* global exports */ /* global Buffer */ "use strict"; // module Node.Encoding exports.byteLengthImpl = function (str) { return function (enc) { return Buffer.byteLength(str, enc); }; };
Fix foreign import declaration for byteLength
Fix foreign import declaration for byteLength
JavaScript
mit
purescript-node/purescript-node-buffer
--- +++ @@ -4,8 +4,8 @@ // module Node.Encoding -exports.byteLength = function (str) { - return function (enc) { - return Buffer.byteLength(str, enc); +exports.byteLengthImpl = function (str) { + return function (enc) { + return Buffer.byteLength(str, enc); }; };
5d03539ad1fb34c246b3d7f729256c4370f1ad6d
javascript/mailblock.js
javascript/mailblock.js
(function($) { $(document).ready(function(){ showHideButton(); $('.cms-tabset-nav-primary li').on('click', showHideButton); function showHideButton() { if ($('#Root_Mailblock_set').is(':visible')) { $('#Form_EditForm_action_mailblockTestEmail').show(); } else { $('#Form_EditForm_action_mailb...
(function($) { $(document).ready(function(){ showHideButton(); $('.cms-tabset-nav-primary li').on('click', showHideButton); function showHideButton() { if ($('#Root_Mailblock_set').is(':visible')) { $('#Form_EditForm_action_mailblockTestEmail').show(); ...
Replace all tabs with spaces.
Replace all tabs with spaces.
JavaScript
bsd-3-clause
signify-nz/silverstripe-mailblock,signify-nz/silverstripe-mailblock
--- +++ @@ -1,16 +1,15 @@ (function($) { - $(document).ready(function(){ - - showHideButton(); - $('.cms-tabset-nav-primary li').on('click', showHideButton); - - function showHideButton() { - if ($('#Root_Mailblock_set').is(':visible')) { - $('#Form_EditForm_action_mailblockTestEmail').show(); - } - el...
fed9ff29a9a2390146666ec19119836fa91cd96a
examples/starters/list/js/controllers.js
examples/starters/list/js/controllers.js
angular.module('listExample.controllers', []) // Controller that fetches a list of data .controller('MovieIndexCtrl', function($scope, MovieService) { // "MovieService" is a service returning mock data (services.js) // the returned data from the service is placed into this // controller's scope so the templ...
angular.module('listExample.controllers', []) // Controller that fetches a list of data .controller('MovieIndexCtrl', function($scope, MovieService,$timeout) { // "MovieService" is a service returning mock data (services.js) // the returned data from the service is placed into this // controller's scope so ...
Add 3 movies in example, looks better
Add 3 movies in example, looks better
JavaScript
mit
Jeremy017/ionic,Jeremy017/ionic,lutrosis81/manup-app,gyx8899/ionic,Gregcop1/ionic,blueElix/ionic,Kryz/ionic,ddddm/ionic,yalishizhude/ionic,nelsonsozinho/ionic,cnbin/ionic,chrisbautista/ionic,thebigbrain/ionic,Jandersolutions/ionic,chinakids/ionic,abcd-ca/ionic,brant-hwang/ionic,Urigo/meteor-ionic,Xeeshan94/ionic,janij/...
--- +++ @@ -2,7 +2,7 @@ // Controller that fetches a list of data -.controller('MovieIndexCtrl', function($scope, MovieService) { +.controller('MovieIndexCtrl', function($scope, MovieService,$timeout) { // "MovieService" is a service returning mock data (services.js) // the returned data from the servi...
af892e2365daa6b213c89b3bacdfaf4da777d1d6
src/js/Enemy.js
src/js/Enemy.js
'use strict'; /** * @description Enemy class => objects the player should avoid * @constructor * @param {number} x position of the enemy on the 'x' axis * @param {number} y position of the enemy on the 'y' axis * @param {number} speed speed factor of the enemy */ var Enemy = function (x,...
'use strict'; /** * @description Enemy class => objects the player should avoid * @constructor * @param {number} x position of the enemy on the 'x' axis * @param {number} y position of the enemy on the 'y' axis * @param {number} speed speed factor of the enemy */ var Enemy = function (x,...
Update the enemy bounds in the enemy class
Update the enemy bounds in the enemy class
JavaScript
mit
zakhttp/super-mario-frogger,zakhttp/super-mario-frogger
--- +++ @@ -24,7 +24,7 @@ Enemy.prototype.update = function (dt, bounds) { // Restrict the enemy back and forth mouvement to the bound of the screen - this.speed = this.x < bounds.right && this.x > bounds.left ? this.speed : -this.speed; + this.speed = this.x < bounds.right - 10 && this.x > bounds.lef...
d7991bc3af6d3bce7ae1fec107e8497c4b1e25f1
js/components/player.js
js/components/player.js
import React from 'react'; module.exports = React.createClass({ getInitialState: function getInitialState() { return { isPlayingStream: typeof window.orientation === 'undefined', // Should return true if not mobile nowPlayingLabel: 'Offline', }; }, setPlayerState: function setPlayerState() {...
import React from 'react'; module.exports = React.createClass({ getInitialState: function getInitialState() { return { isPlayingStream: typeof window.orientation === 'undefined', // Should return true if not mobile nowPlayingLabel: 'Offline', }; }, onPlayClicked: function onPlayClicked() { ...
Add click listener to play buttotn.
Add click listener to play buttotn.
JavaScript
mit
frequencyasia/website,frequencyasia/website
--- +++ @@ -6,6 +6,10 @@ isPlayingStream: typeof window.orientation === 'undefined', // Should return true if not mobile nowPlayingLabel: 'Offline', }; + }, + + onPlayClicked: function onPlayClicked() { + this.setState({ isPlayingStream: !this.state.isPlayingStream }); }, setPlayerStat...
768f4bf499d00c6a801b018b6a1c656c5800076c
nodejs/lib/hoptoad.js
nodejs/lib/hoptoad.js
var Hoptoad = require('hoptoad-notifier').Hoptoad , env = require('../environment') , shouldReport = env.hoptoad && env.hoptoad.reportErrors; if(shouldReport) Hoptoad.key = env.hoptoad.apiKey; process.addListener('uncaughtException', function(err) { if(shouldReport) Hoptoad.notify(err, function(){}); }); ...
var Hoptoad = require('hoptoad-notifier').Hoptoad , env = require('../environment') , shouldReport = env.hoptoad && env.hoptoad.reportErrors; if(shouldReport) Hoptoad.key = env.hoptoad.apiKey; process.addListener('uncaughtException', function(err) { if(shouldReport) Hoptoad.notify(err, function(){}); con...
Print out uncaught exceptions. Node stops doing this when you add an uncaught exception handler.
Print out uncaught exceptions. Node stops doing this when you add an uncaught exception handler.
JavaScript
mit
iFixit/wompt.com,iFixit/wompt.com,Wompt/wompt.com,iFixit/wompt.com,Wompt/wompt.com,Wompt/wompt.com,iFixit/wompt.com
--- +++ @@ -9,6 +9,8 @@ process.addListener('uncaughtException', function(err) { if(shouldReport) Hoptoad.notify(err, function(){}); + console.error("~~~ Error ~~~ " + Date()) + console.error(err.stack); }); Hoptoad.expressErrorNotifier = function(err,req,res,next){
e0860e4491a2519493426cb1cfdbcca8071467e9
validators/json/load.js
validators/json/load.js
const utils = require('../../utils') const load = (files, jsonFiles, jsonContentsDict, annexed, dir) => { let issues = [] // Read JSON file contents and parse for issues const readJsonFile = (file, annexed, dir) => utils.files .readFile(file, annexed, dir) .then(contents => utils.json.parse(file...
const utils = require('../../utils') class JSONParseError extends Error { constructor(message) { super(message) this.name = 'JSONParseError' } } const load = (files, jsonFiles, jsonContentsDict, annexed, dir) => { let issues = [] // Read JSON file contents and parse for issues const readJsonFile = ...
Reimplement early exit for JSON parse errors.
Reimplement early exit for JSON parse errors.
JavaScript
mit
nellh/bids-validator,Squishymedia/bids-validator,Squishymedia/BIDS-Validator,nellh/bids-validator,nellh/bids-validator
--- +++ @@ -1,4 +1,11 @@ const utils = require('../../utils') + +class JSONParseError extends Error { + constructor(message) { + super(message) + this.name = 'JSONParseError' + } +} const load = (files, jsonFiles, jsonContentsDict, annexed, dir) => { let issues = [] @@ -15,11 +22,13 @@ // Abor...
754bd76e3f18246b4b3cf161755fb9919571cc19
app/util.js
app/util.js
function randomFrom(array) { return array[Math.floor(Math.random()*array.length)] } function filter_available(item) { return !item.unreleased } var language_map = { "en_US": "en", "fr_FR": "fr", "ja_JP": "ja", "fr_CA": "fr-ca", "es_ES": "es", "es_MX": "es-mx" } String.prototype.format = function(scop...
function randomFrom(array) { return array[Math.floor(Math.random()*array.length)] } function filter_available(item) { return !item.unreleased } var language_map = { "en_US": "en-us", "fr_FR": "fr", "ja_JP": "ja", "fr_CA": "fr-ca", "es_ES": "es", "es_MX": "es-mx" } String.prototype.format = function(s...
Change en_US code from "en" to "en-us" for consistency
Change en_US code from "en" to "en-us" for consistency
JavaScript
mit
DeviPotato/splat2-calc,DeviPotato/splat2-calc
--- +++ @@ -7,7 +7,7 @@ } var language_map = { - "en_US": "en", + "en_US": "en-us", "fr_FR": "fr", "ja_JP": "ja", "fr_CA": "fr-ca",
fea368f1da1c6c3a58ad7bbcf6193d56c5592e68
app/Resources/appify.js
app/Resources/appify.js
/* * This is a template used when TiShadow "appifying" a titanium project. * See the README. */ var TiShadow = require("/api/TiShadow"); var Compression = require('ti.compression'); // Need to unpack the bundle on a first load; var path_name = "{{app_name}}".replace(/ /g,"_"); var target = Ti.Filesystem.getFile(T...
/* * This is a template used when TiShadow "appifying" a titanium project. * See the README. */ Titanium.App.idleTimerDisabled = true; var TiShadow = require("/api/TiShadow"); var Compression = require('ti.compression'); // Need to unpack the bundle on a first load; var path_name = "{{app_name}}".replace(/ /g,"_...
Disable idleTimer on iOS for appified apps
Disable idleTimer on iOS for appified apps
JavaScript
apache-2.0
titanium-forks/dbankier.TiShadow,r8o8s1e0/TiShadow,HazemKhaled/TiShadow,FokkeZB/TiShadow,emilyvon/TiShadow,HazemKhaled/TiShadow,r8o8s1e0/TiShadow,Biotelligent/TiShadow,r8o8s1e0/TiShadow,Biotelligent/TiShadow,HazemKhaled/TiShadow,FokkeZB/TiShadow,emilyvon/TiShadow,emilyvon/TiShadow,titanium-forks/dbankier.TiShadow,titan...
--- +++ @@ -2,6 +2,8 @@ * This is a template used when TiShadow "appifying" a titanium project. * See the README. */ + +Titanium.App.idleTimerDisabled = true; var TiShadow = require("/api/TiShadow"); var Compression = require('ti.compression');
c140b8c985cfc05ce8ae1326e470d9f4e1231a54
lib/metalsmith-metafiles.js
lib/metalsmith-metafiles.js
"use strict"; var MetafileMatcher = require('./metafile-matcher'); // Not needed in Node 4.0+ if (!Object.assign) Object.assign = require('object-assign'); class MetalsmithMetafiles { constructor(options) { options = options || {}; this._initMatcherOptions(options); this._initMatchers(); } _initM...
"use strict"; var MetafileMatcher = require('./metafile-matcher'); // Not needed in Node 4.0+ if (!Object.assign) Object.assign = require('object-assign'); class MetalsmithMetafiles { constructor(options) { options = options || {}; this._initMatcherOptions(options); this._initMatchers(); } _initM...
Remove arrow function to remain compatible with older Node versions
Remove arrow function to remain compatible with older Node versions
JavaScript
mit
Ajedi32/metalsmith-metafiles
--- +++ @@ -27,7 +27,9 @@ } _initMatchers() { - this._matchers = this._matcherOptions.map((options) => new MetafileMatcher(options)); + this._matchers = this._matcherOptions.map(function(options) { + return new MetafileMatcher(options); + }); } // Main interface
14b04b085f0688c37580b7622ef36b062e4d0bcf
app/routes/ember-cli.js
app/routes/ember-cli.js
import Route from '@ember/routing/route'; export default Route.extend({ titleToken() { return 'Ember CLI'; } });
import Route from '@ember/routing/route'; export default Route.extend({ title() { return 'Ember CLI - Ember API Documentation'; } });
Update to return the title Function
Update to return the title Function
JavaScript
mit
ember-learn/ember-api-docs,ember-learn/ember-api-docs
--- +++ @@ -1,7 +1,7 @@ import Route from '@ember/routing/route'; export default Route.extend({ - titleToken() { - return 'Ember CLI'; + title() { + return 'Ember CLI - Ember API Documentation'; } });
1623ae966b9823088e65870104d9e37d714b23c0
src/reactize.js
src/reactize.js
var Turbolinks = require("exports?this.Turbolinks!turbolinks"); /* Disable the Turbolinks page cache to prevent Tlinks from storing versions of * pages with `react-id` attributes in them. When popping off the history, the * `react-id` attributes cause React to treat the old page like a pre-rendered * page and break...
var Turbolinks = require("exports?this.Turbolinks!turbolinks"); // Disable the Turbolinks page cache to prevent Tlinks from storing versions of // pages with `react-id` attributes in them. When popping off the history, the // `react-id` attributes cause React to treat the old page like a pre-rendered // page and break...
Standardize on “//“ for all JS comments
Standardize on “//“ for all JS comments
JavaScript
apache-2.0
ssorallen/turbo-react,ssorallen/turbo-react,ssorallen/turbo-react
--- +++ @@ -1,10 +1,9 @@ var Turbolinks = require("exports?this.Turbolinks!turbolinks"); -/* Disable the Turbolinks page cache to prevent Tlinks from storing versions of - * pages with `react-id` attributes in them. When popping off the history, the - * `react-id` attributes cause React to treat the old page like ...
fd20009fcf17de391b398cbb7ce746144fc610c6
js/Search.spec.js
js/Search.spec.js
import React from 'react' import { shallow } from 'enzyme' import { shallowToJson } from 'enzyme-to-json' import Search from './Search' import ShowCard from './ShowCard' import preload from '../public/data.json' test('Search snapshot test', () => { const component = shallow(<Search />) const tree = shallowToJson(c...
import React from 'react' import { shallow } from 'enzyme' import { shallowToJson } from 'enzyme-to-json' import Search from './Search' import ShowCard from './ShowCard' import preload from '../public/data.json' test('Search snapshot test', () => { const component = shallow(<Search />) const tree = shallowToJson(c...
Add test for the search field.
Add test for the search field.
JavaScript
mit
dianafisher/FEM-complete-intro-to-react,dianafisher/FEM-complete-intro-to-react
--- +++ @@ -12,6 +12,18 @@ }) test('Search should render a ShowCard for each show', () => { - const component = shallow(<Search />) + const component = shallow(<Search />) expect(component.find(ShowCard).length).toEqual(preload.shows.length) }) + +test('Search should render correct amount of shows based o...
fdcfa64c627f9522db5f176cc103171df839cad1
ember-cli-build.js
ember-cli-build.js
/* eslint-env node */ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { var app = new EmberAddon(defaults, { // Add options here }); /* This build file specifies the options for the dummy test app of this addon, located in `/tests/dummy` This...
/* eslint-env node */ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function (defaults) { var app = new EmberAddon(defaults, { 'ember-cli-babel': { includePolyfill: true } }); /* This build file specifies the options for the dummy test app of this addon, ...
Fix broken test by including babel polyfill on dummy app
Fix broken test by including babel polyfill on dummy app
JavaScript
mit
scottwernervt/ember-cli-group-by,scottwernervt/ember-cli-group-by
--- +++ @@ -1,17 +1,19 @@ /* eslint-env node */ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); -module.exports = function(defaults) { +module.exports = function (defaults) { var app = new EmberAddon(defaults, { - // Add options here + 'ember-cli-babel': { + includePolyfill: true +...
0d7cfde7c85bf6c8275b7db45cc2f2faf911fb41
js/application.js
js/application.js
;(function(){ var G = dijkstra.hexGrid(2); var view = new dijkstra.GraphView(G, document.getElementById('graph'), { placement: function(position){ return { 'x': 100 * position.x, 'y': 100 * position.y }}, radius: 20, between: 0.3, vertex: { ...
;(function(){ var G = dijkstra.hexGrid(2); var view = new dijkstra.GraphView(G, document.getElementById('graph'), { placement: function(position){ return { 'x': 100 * position.x, 'y': 100 * position.y }}, radius: 20, between: 0.3, vertex: { ...
Use charCode instead of keyCode
Use charCode instead of keyCode
JavaScript
mit
dvberkel/Dijkstra,dvberkel/Dijkstra
--- +++ @@ -33,7 +33,7 @@ loop(); document.body.addEventListener('keypress', function(event){ - if (event.keyCode == 32) { + if (event.charCode == 32) { algorithm.step(); } });
62bc1ec26ad607e42a2495257b3e0156830b42dd
app/templates/src/main/webapp/scripts/app/account/settings/_settings.controller.js
app/templates/src/main/webapp/scripts/app/account/settings/_settings.controller.js
'use strict'; angular.module('<%=angularAppName%>') .controller('SettingsController', function ($scope, Principal, Auth) { $scope.success = null; $scope.error = null; Principal.identity().then(function(account) { $scope.settingsAccount = account; }); $scope.save...
'use strict'; angular.module('<%=angularAppName%>') .controller('SettingsController', function ($scope, Principal, Auth) { $scope.success = null; $scope.error = null; Principal.identity(true).then(function(account) { $scope.settingsAccount = account; }); $scope....
Refresh data for the user settings page when it is being accessed
Refresh data for the user settings page when it is being accessed Fix #1281
JavaScript
apache-2.0
vivekmore/generator-jhipster,deepu105/generator-jhipster,dynamicguy/generator-jhipster,mosoft521/generator-jhipster,pascalgrimaud/generator-jhipster,ziogiugno/generator-jhipster,atomfrede/generator-jhipster,siliconharborlabs/generator-jhipster,wmarques/generator-jhipster,duderoot/generator-jhipster,maniacneron/generato...
--- +++ @@ -4,7 +4,7 @@ .controller('SettingsController', function ($scope, Principal, Auth) { $scope.success = null; $scope.error = null; - Principal.identity().then(function(account) { + Principal.identity(true).then(function(account) { $scope.settingsAccount = acco...
6ce99ce4acbed8c57b672706c4b26dfc063bb04b
extensionloader.js
extensionloader.js
/* Load a block from github.io. Accepts a url as a parameter which can include url parameters e.g. https://megjlow.github.io/extension2.js?name=SUN&ip=10.0.0.1 */ new (function() { var ext = this; var descriptor = { blocks: [ [' ', 'Load extension block %s', 'loadBlock', 'url', 'url'], ], ur...
/* Load a block from github.io. Accepts a url as a parameter which can include url parameters e.g. https://megjlow.github.io/extension2.js?name=SUN&ip=10.0.0.1 */ new (function() { var ext = this; var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = decodeURIComponent(document.currentScript...
Allow a block to be specified for loading
Allow a block to be specified for loading
JavaScript
mit
megjlow/megjlow.github.io
--- +++ @@ -5,6 +5,23 @@ new (function() { var ext = this; + + var getUrlParameter = function getUrlParameter(sParam) { + var sPageURL = decodeURIComponent(document.currentScript.src.split("?")[1]), + sURLVariables = sPageURL.split('&'), + sParameterName, + i; + + for (i = 0; i ...
997ef4147d96618cd4f1c57289e98004b7b7eb7d
extra/_buildAll.js
extra/_buildAll.js
const childProcess = require("child_process"); const fs = require("fs"); if (process.argv.length !== 3) { throw new Error("Requires the base path as argument."); } const basePath = process.argv[2]; if (!basePath.match(/[\\\/]$/)) { throw new Error("Path must end with a slash - any slash will do."); } else if ...
const childProcess = require("child_process"); const fs = require("fs"); if (process.argv.length !== 3) { throw new Error("Requires the base path as argument."); } const basePath = process.argv[2]; if (!basePath.match(/[\\\/]$/)) { throw new Error("Path must end with a slash - any slash will do."); } else if ...
Stop relying on `ts-node` from the global scope
Stop relying on `ts-node` from the global scope
JavaScript
lgpl-2.1
WoltLab/WCF,WoltLab/WCF,SoftCreatR/WCF,WoltLab/WCF,SoftCreatR/WCF,SoftCreatR/WCF,SoftCreatR/WCF,WoltLab/WCF
--- +++ @@ -39,7 +39,7 @@ }); } - childProcess.execSync(`ts-node syncTemplates.ts ${path}`, { + childProcess.execSync(`npx ts-node syncTemplates.ts ${path}`, { stdio: [0, 1, 2] });
275dc5b09b27d5441814aa423cddaa7472344dbf
src/hooks/usePopover.js
src/hooks/usePopover.js
import React, { useState, useCallback, useRef } from 'react'; /** * Hook which manages popover position over a DOM element. * Pass a ref created by React.createRef. Receive callbacks, */ export const usePopover = () => { const [visibilityState, setVisibilityState] = useState(false); const ref = useRef(React.cre...
import React, { useState, useCallback, useRef } from 'react'; import { useNavigationFocus } from './useNavigationFocus'; /** * Hook which manages popover position over a DOM element. * Pass a ref created by React.createRef. Receive callbacks, */ export const usePopover = navigation => { const [visibilityState, se...
Add use of navigation focus custom hook in usePopOver hook
Add use of navigation focus custom hook in usePopOver hook
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
--- +++ @@ -1,15 +1,18 @@ import React, { useState, useCallback, useRef } from 'react'; +import { useNavigationFocus } from './useNavigationFocus'; /** * Hook which manages popover position over a DOM element. * Pass a ref created by React.createRef. Receive callbacks, */ -export const usePopover = () => { ...
0087fa9db21bf615d3c57480c89a706c8d8e75bf
lib/jsdom/level2/languages/javascript.js
lib/jsdom/level2/languages/javascript.js
var Context = process.binding('evals').Context, // TODO: Remove .Script when bumping req'd node version to >= 5.0 Script = process.binding('evals').NodeScript || process.binding('evals').Script; exports.javascript = function(element, code, filename) { var document = element.ownerDocument, window = docu...
var vm = require('vm'); exports.javascript = function(element, code, filename) { var document = element.ownerDocument, window = document.parentWindow; if (window) { var ctx = window.__scriptContext; if (!ctx) { window.__scriptContext = ctx = vm.createContext({}); ctx.__proto__ = window; ...
Use vm instead of evals binding
Use vm instead of evals binding
JavaScript
mit
iizukanao/jsdom,aduyng/jsdom,jeffcarp/jsdom,jeffcarp/jsdom,tmpvar/jsdom,Zirro/jsdom,evdevgit/jsdom,susaing/jsdom,sebmck/jsdom,Zirro/jsdom,Ye-Yong-Chi/jsdom,mbostock/jsdom,zaucy/jsdom,beni55/jsdom,kesla/jsdom,darobin/jsdom,cpojer/jsdom,mbostock/jsdom,Sebmaster/jsdom,snuggs/jsdom,AshCoolman/jsdom,szarouski/jsdom,janusnic...
--- +++ @@ -1,6 +1,4 @@ -var Context = process.binding('evals').Context, - // TODO: Remove .Script when bumping req'd node version to >= 5.0 - Script = process.binding('evals').NodeScript || process.binding('evals').Script; +var vm = require('vm'); exports.javascript = function(element, code, filename) { ...
dcbba806e6d933f714fec77c1b37c485a43a9e00
tests/unit/controllers/submit-test.js
tests/unit/controllers/submit-test.js
import { moduleFor, test } from 'ember-qunit'; moduleFor('controller:submit', 'Unit | Controller | submit', { // Specify the other units that are required for this test. // needs: ['controller:foo'] needs: [ 'validator:presence', 'validator:length', 'validator:format', 'service:...
import { moduleFor, test } from 'ember-qunit'; moduleFor('controller:submit', 'Unit | Controller | submit', { // Specify the other units that are required for this test. // needs: ['controller:foo'] needs: [ 'validator:presence', 'validator:length', 'validator:format', 'service:...
Add tests for some submit controller actions.
Add tests for some submit controller actions.
JavaScript
apache-2.0
baylee-d/ember-preprints,caneruguz/ember-preprints,baylee-d/ember-preprints,CenterForOpenScience/ember-preprints,CenterForOpenScience/ember-preprints,laurenrevere/ember-preprints,laurenrevere/ember-preprints,caneruguz/ember-preprints
--- +++ @@ -9,6 +9,24 @@ 'validator:format', 'service:metrics' ], +test('editLicense sets basicsLicense and licenseValid', function(assert) { + const ctrl = this.subject(); + assert.equal(ctrl.get('basicsLicense.copyrightHolders'), null); + assert.equal(ctrl.get('basicsLicense.licenseT...
c8e2d1ac9ed72967aa8f8210f8c05f2af8044cab
tests/dummy/app/components/froala-editor.js
tests/dummy/app/components/froala-editor.js
import FroalaEditorComponent from 'ember-froala-editor/components/froala-editor'; export default FroalaEditorComponent.extend({ // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects options: { key: 'Tvywseoh1irkdyzdhvlvC8ehe==' } });
import FroalaEditorComponent from 'ember-froala-editor/components/froala-editor'; export default FroalaEditorComponent.extend({ // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects options: { key: '3C3B6eF5B4A3E3E2C2C6D6A3D3xg1kemB-22B-16rF-11dyvwtvze1zdA1H-8vw==' } });
Update editor key for docs site
Update editor key for docs site
JavaScript
mit
froala/ember-froala-editor,froala/ember-froala-editor,Panman8201/ember-froala-editor,Panman8201/ember-froala-editor
--- +++ @@ -3,6 +3,6 @@ export default FroalaEditorComponent.extend({ // eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects options: { - key: 'Tvywseoh1irkdyzdhvlvC8ehe==' + key: '3C3B6eF5B4A3E3E2C2C6D6A3D3xg1kemB-22B-16rF-11dyvwtvze1zdA1H-8vw==' } });
8ddadad76536c0445c1da4cd203646509dc30cfd
contribs/gmf/src/proj/epsg21781projection.js
contribs/gmf/src/proj/epsg21781projection.js
goog.provide('gmf.proj.EPSG21781'); goog.require('ol.proj'); if (typeof proj4 == 'function') { proj4.defs('EPSG:21781', '+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 ' + '+k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel' + '+towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs');...
goog.provide('gmf.proj.EPSG21781'); goog.require('ol.proj'); if (typeof proj4 == 'function') { proj4.defs('EPSG:21781', '+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 ' + '+k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel ' + '+towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs')...
Add missing space in proj definition
Add missing space in proj definition
JavaScript
mit
Jenselme/ngeo,kalbermattenm/ngeo,ger-benjamin/ngeo,pgiraud/ngeo,camptocamp/ngeo,ger-benjamin/ngeo,pgiraud/ngeo,Jenselme/ngeo,ger-benjamin/ngeo,Jenselme/ngeo,camptocamp/ngeo,adube/ngeo,camptocamp/ngeo,adube/ngeo,camptocamp/ngeo,adube/ngeo,kalbermattenm/ngeo,kalbermattenm/ngeo,adube/ngeo,camptocamp/ngeo,Jenselme/ngeo,pgi...
--- +++ @@ -5,7 +5,7 @@ if (typeof proj4 == 'function') { proj4.defs('EPSG:21781', '+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 ' + - '+k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel' + + '+k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel ' + '+towgs84=674.374,15.056,405.346,0,0...
5b0082d9aaa6ae25e2ed7a0049b1829b3a9aa242
src/patch_dns_lookup.js
src/patch_dns_lookup.js
// Patch DNS.lookup to resolve all hosts added via Replay.localhost as 127.0.0.1 const DNS = require('dns'); const Replay = require('./'); const originalLookup = DNS.lookup; DNS.lookup = function(domain, options, callback) { if (typeof domain === 'string' && typeof options === 'object' && typeof callback ...
// Patch DNS.lookup to resolve all hosts added via Replay.localhost as 127.0.0.1 const DNS = require('dns'); const Replay = require('./'); const originalLookup = DNS.lookup; DNS.lookup = function(domain, options, callback) { if (typeof domain === 'string' && typeof options === 'object' && typeof callback ...
Support |all| option when shimming DNS.lookup
Support |all| option when shimming DNS.lookup Before, clients attempting an "all" style address lookup, such as the SQL Server database module tedious does in its connector.js when provided a hostname, were liable to error out due to treating the argument as an array when Replay was supplying a string. This might have...
JavaScript
mit
assaf/node-replay
--- +++ @@ -10,7 +10,10 @@ typeof callback === 'function' && Replay.isLocalhost(domain)) { const family = options.family || 4; const ip = (family === 6) ? '::1' : '127.0.0.1'; - callback(null, ip, family); + if (options.all) + callback(null, [ip], family); + else + callback(null, i...
cf06f9680d8494204db1b70fab4f859f91ca684e
graphql/database/charities/__tests__/CharityModel.test.js
graphql/database/charities/__tests__/CharityModel.test.js
/* eslint-env jest */ import tableNames from '../../tables' import Charity from '../CharityModel' jest.mock('../../database') describe('CharityModel', () => { it('implements the name property', () => { expect(Charity.name).toBeDefined() }) it('implements the hashKey property', () => { expect(Charity.h...
/* eslint-env jest */ import uuid from 'uuid/v4' import tableNames from '../../tables' import Charity from '../CharityModel' jest.mock('../../database') describe('CharityModel', () => { it('implements the name property', () => { expect(Charity.name).toBeDefined() }) it('implements the hashKey property', ...
Test using an existing ID.
Test using an existing ID.
JavaScript
mpl-2.0
gladly-team/tab,gladly-team/tab,gladly-team/tab
--- +++ @@ -1,4 +1,6 @@ /* eslint-env jest */ + +import uuid from 'uuid/v4' import tableNames from '../../tables' import Charity from '../CharityModel' @@ -24,5 +26,14 @@ expect(charity.name).toEqual('something') }) + it('create with existing id', async () => { + const someId = uuid() + const ch...
6e853e6d2eba890ddff29b71a21130e145c747fb
html/directives/validateBitcoinAddress.js
html/directives/validateBitcoinAddress.js
angular.module('app').directive("validateBitcoinAddress", function() { return { require: 'ngModel', link: function(scope, ele, attrs, ctrl) { ctrl.$parsers.unshift(function(value) { // test and set the validity after update. var valid = window.bitcoinAdd...
angular.module('app').directive("validateBitcoinAddress", function() { return { require: 'ngModel', link: function(scope, ele, attrs, ctrl) { ctrl.$parsers.unshift(function(value) { var valid = window.bitcoinAddress.validate(value); ctrl.$setValidity('val...
Clean up comments and validity check
Clean up comments and validity check
JavaScript
mit
atsuyim/OpenBazaar,must-/OpenBazaar,must-/OpenBazaar,saltduck/OpenBazaar,NolanZhao/OpenBazaar,NolanZhao/OpenBazaar,tortxof/OpenBazaar,tortxof/OpenBazaar,must-/OpenBazaar,blakejakopovic/OpenBazaar,habibmasuro/OpenBazaar,bankonme/OpenBazaar,blakejakopovic/OpenBazaar,rllola/OpenBazaar,rllola/OpenBazaar,mirrax/OpenBazaar,b...
--- +++ @@ -4,21 +4,14 @@ link: function(scope, ele, attrs, ctrl) { ctrl.$parsers.unshift(function(value) { - - // test and set the validity after update. var valid = window.bitcoinAddress.validate(value); ctrl.$setValidity('validateBitcoinAddre...
246825583b1c778e56bad458f3e4283c9b1c5df6
es2015/total-replies.js
es2015/total-replies.js
"use strict"; let replyCount = 21; let message = `This topic has a total of replies`;
"use strict"; let replyCount = 21; let message = `This topic has a total of ${replyCount} replies`;
Complete the code to use the variable replyCount from inside the template string
Complete the code to use the variable replyCount from inside the template string
JavaScript
mit
var-bin/reactjs-training,var-bin/reactjs-training,var-bin/reactjs-training
--- +++ @@ -1,4 +1,4 @@ "use strict"; let replyCount = 21; -let message = `This topic has a total of replies`; +let message = `This topic has a total of ${replyCount} replies`;
5a14bf458e67d893cefe99e7515fdb3b904ab556
src/interfaces/i-tracker-manager.js
src/interfaces/i-tracker-manager.js
'use strict'; const EventEmitter = require('events'); /** * Tracker Manager * @interface */ class ITrackerManager extends EventEmitter { constructor() { super(); if (this.constructor === ITrackerManager) { throw new TypeError('Can not create new instance of interface'); } } /** * Include tracker in...
'use strict'; const EventEmitter = require('events'); /** * Tracker Manager * @interface */ class ITrackerManager extends EventEmitter { constructor() { super(); if (this.constructor === ITrackerManager) { throw new TypeError('Can not create new instance of interface'); } } /** * Include tracker in...
Change interface for make change in implementation
Change interface for make change in implementation
JavaScript
mit
reeFridge/tracker-proxy
--- +++ @@ -18,7 +18,7 @@ /** * Include tracker in search * @param {ITracker} tracker - * @return {number|undefined} Index of tracker in array + * @return {string|undefined} UID of tracker in list */ include(tracker) { throw new TypeError('Method "include" is not implemented.'); @@ -26,10 +26,10 @@ ...
733b66e5733800e4abc8dbcf358b3af20e424313
app/components/popover-confirm.js
app/components/popover-confirm.js
import Ember from 'ember'; export default Ember.Component.extend({ classNames: ['popover-confirm'], iconClass: function () { var filename = this.get('filename'), regex, extension; if (filename) { regex = /\.([0-9a-z]+)$/i; extension = filename.match(/\.([0-...
import Ember from 'ember'; export default Ember.Component.extend({ classNames: ['popover-confirm'], iconClass: function () { var filename = this.get('filename'), regex, match, extension; if (filename) { regex = /\.([0-9a-z]+)$/i; match = filename.match(/\.(...
Fix generating icon name for files without extension
Fix generating icon name for files without extension
JavaScript
mit
cowbell/sharedrop,umeshjakhar/sharedrop,cowbell/sharedrop,rogervaas/sharedrop,umeshjakhar/sharedrop,rogervaas/sharedrop
--- +++ @@ -5,12 +5,16 @@ iconClass: function () { var filename = this.get('filename'), - regex, extension; + regex, match, extension; if (filename) { regex = /\.([0-9a-z]+)$/i; - extension = filename.match(/\.([0-9a-z]+)$/i)[1]; - if...
c118153f2f48a271cb8d4859e5c65e22cd59ee5f
app/components/repos-list-item.js
app/components/repos-list-item.js
import Ember from 'ember'; import Polling from 'travis/mixins/polling'; import { colorForState } from 'travis/utils/helpers'; export default Ember.Component.extend(Polling, { routing: Ember.inject.service('-routing'), tagName: 'li', pollModels: 'repo', classNames: ['repo'], classNameBindings: ['selected'], ...
import Ember from 'ember'; import Polling from 'travis/mixins/polling'; import { colorForState } from 'travis/utils/helpers'; export default Ember.Component.extend(Polling, { routing: Ember.inject.service('-routing'), tagName: 'li', pollModels: 'repo', classNames: ['repo'], classNameBindings: ['selected'], ...
Remove click handler overriding default link behavior
Remove click handler overriding default link behavior An [issue](https://github.com/travis-ci/travis-ci/issues/5181) was reported in which the repository sidebar links were not functioning properly. I've tracked it down to the fact that a click handler was registered and automatically performing a redirect to the repo...
JavaScript
mit
fauxton/travis-web,fotinakis/travis-web,travis-ci/travis-web,travis-ci/travis-web,travis-ci/travis-web,travis-ci/travis-web,fotinakis/travis-web,fauxton/travis-web,fauxton/travis-web,fauxton/travis-web,fotinakis/travis-web,fotinakis/travis-web
--- +++ @@ -23,10 +23,5 @@ scrollTop: 0 }, 200); } - }, - - click() { - this.scrollTop(); - return this.get('routing').transitionTo('repo', this.get('repo.slug').split('/')); } });
8aa9ed0a01065affb26bd069fc4afbdcfd9a7cf3
tasks/appium.js
tasks/appium.js
/* * grunt-appium * https://github.com/hungrydavid/grunt-appium * * Copyright (c) 2015 David Adams * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { // Please see the Grunt documentation for more information regarding task // creation: http://gruntjs.com/creating-tasks ...
/* * grunt-appium * https://github.com/hungrydavid/grunt-appium * * Copyright (c) 2015 David Adams * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { // Please see the Grunt documentation for more information regarding task // creation: http://gruntjs.com/creating-tasks ...
Make task async and only quit once process exits
Make task async and only quit once process exits
JavaScript
mit
hungrydavid/grunt-appium
--- +++ @@ -18,13 +18,14 @@ var options = this.options({}); var appiumPath = require.resolve('appium'); var spawn = require('child_process').spawn; + var done = this.async(); var child = spawn('node', [appiumPath], function (err) { console.log(err); }); process.on('exit',...
8920390d8a84fdaf0d887a7fccd023ce0855e4bb
components/app/common/Browser.js
components/app/common/Browser.js
import React from 'react'; function Browser() { return ( <div className="c-browser"> <h3>Browser not supported</h3> <p>The browser you are using is out-of-date and not supported by our site.</p> <h4>For the most secure and best experience, we recommend these browsers.</h4> <ul> ...
import React from 'react'; function Browser() { return ( <div className="c-browser"> <h3>Browser not supported</h3> <p>The browser you are using is out-of-date and not is supported by our site.</p> <h4>For the most secure and best experience, we recommend these browsers.</h4> <ul> ...
Fix spelling error in browser change modal
Fix spelling error in browser change modal
JavaScript
mit
resource-watch/resource-watch,resource-watch/resource-watch,resource-watch/resource-watch,resource-watch/resource-watch
--- +++ @@ -4,7 +4,7 @@ return ( <div className="c-browser"> <h3>Browser not supported</h3> - <p>The browser you are using is out-of-date and not supported by our site.</p> + <p>The browser you are using is out-of-date and not is supported by our site.</p> <h4>For the most secure and...
308f844589596950fc43b2699bdd33d79f67bcb4
postinstall.js
postinstall.js
'use strict'; var fs = require('fs'); var cp = require('child_process'); var assert = require('assert'); var partialDependencies = { "concat-stream": "^1.4.7", "os-shim": "^0.1.2" }; var fullDependencies = { "concat-stream": "^1.4.7", "os-shim": "^0.1.2", "try-thread-sleep": "^1.0.0" }; var REQUIRES_UPDATE...
'use strict'; var fs = require('fs'); var cp = require('child_process'); var assert = require('assert'); var partialDependencies = { "concat-stream": "^1.4.7", "os-shim": "^0.1.2" }; var fullDependencies = { "concat-stream": "^1.4.7", "os-shim": "^0.1.2", "try-thread-sleep": "^1.0.0" }; var REQUIRES_UPDATE...
Add quotes around the npm_execpath
Add quotes around the npm_execpath [fixes #19]
JavaScript
mit
ForbesLindesay/spawn-sync,terabyte/spawn-sync,bcoe/spawn-sync,tmagiera/spawn-sync
--- +++ @@ -33,7 +33,7 @@ } if (REQUIRES_UPDATE && __dirname.indexOf('node_modules') !== -1) { fs.writeFileSync(__dirname + '/package.json', JSON.stringify(pkg, null, ' ')); - cp.exec((process.env.npm_execpath || 'npm') + ' install --production', { + cp.exec((('"' + process.env.npm_execpath + '"') || 'npm') +...
48e5053047d6b48c40a55a69b9f945658b4ef438
lib/Middleware.js
lib/Middleware.js
export default class Middleware { /** * Constructor */ constructor(key, value) { key = key.toLowerCase(); // In case of simple middleware if (key == "middleware") { return this.simpleMiddleware(value); } if (OPTIONS[key]) { return OPTIONS[key].init(value); } } /** *...
export default class Middleware { /** * Constructor */ constructor(key, value) { key = key.toLowerCase(); // In case of simple middleware if (key == "middleware") { return this.simpleMiddleware(value); } if (OPTIONS[key]) { return { key: key, value: OPTIONS[key...
Add the key and value in option
Add the key and value in option
JavaScript
mit
ArthurMialon/StarterApiNodejs
--- +++ @@ -12,7 +12,10 @@ } if (OPTIONS[key]) { - return OPTIONS[key].init(value); + return { + key: key, + value: OPTIONS[key].init(value) + }; } }
46f8795db8215e2a470b54cfe1e94ebb1888460e
closure/testing/test/arithmetic_es6module_test.js
closure/testing/test/arithmetic_es6module_test.js
// Copyright 2016 The Closure Rules Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
// Copyright 2016 The Closure Rules Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
Remove use of the import 'goog:...' pattern
Remove use of the import 'goog:...' pattern Support for this is soon to be removed. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177366930
JavaScript
apache-2.0
jart/rules_closure,jart/rules_closure,jart/rules_closure,gramic/rules_closure,gramic/rules_closure,bazelbuild/rules_closure,gramic/rules_closure,gramic/rules_closure,jart/rules_closure,jart/rules_closure,bazelbuild/rules_closure,bazelbuild/rules_closure,bazelbuild/rules_closure
--- +++ @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import 'goog:goog.testing.asserts'; -import 'goog:goog.testing.jsunit'; +goog.require('goog.testing.asserts'); +goog.require('goog.testing.jsunit'); import { add } from '/closure/...
ab7e76c25376e82ca3559b6a088ea213ae227a6e
src/resources/basefield.js
src/resources/basefield.js
export class Basefield { id = ''; label = ''; columns = 8; index = undefined; parent = undefined; init(id = '', {label = '', columns = 8, parent, index} = {}) { this.id = id; this.label = label; this.columns = columns; this.index = index; this.parent = parent; return this; } bi...
export class Basefield { id = ''; label = ''; columns = 8; index = undefined; parent = undefined; init(id = '', {label = '', columns = 8, parent, index} = {}) { this.id = id; this.label = label; this.columns = columns; this.index = index; this.parent = parent; return this; } bi...
Fix not being able to delete first item of list
Fix not being able to delete first item of list
JavaScript
mit
apinf/openapi-designer,apinf/open-api-designer,apinf/open-api-designer,apinf/openapi-designer
--- +++ @@ -21,7 +21,7 @@ } delete() { - if (this.parent && this.index) { + if (this.parent && typeof this.index === 'number') { this.parent.deleteChild(this.index); } }
204c213882920d4666fb962d8c3bb39ce2fcf988
lib/apply-data.js
lib/apply-data.js
import { handleSuccess, handleFailure } from './assert-promise'; function applyData(object, data) { return new Ember.RSVP.Promise(function(resolve, reject) { if (typeof data === 'function') { var newObject = data.call(object, object); if (!newObject.then) { return resolve(newObject); }...
import { handleSuccess, handleFailure } from './assert-promise'; function applyData(object, data) { return new Ember.RSVP.Promise(function(resolve, reject) { if (typeof data === 'function') { var newObject = data.call(object, object); if (!newObject.then) { return resolve(newObject); }...
Allow `{local: true, id: 123}` specification for relationships (inside `data` hash)
Allow `{local: true, id: 123}` specification for relationships (inside `data` hash)
JavaScript
mit
runtrizapps/ember-testing-grate
--- +++ @@ -14,7 +14,7 @@ } } - var key, val, promiseList = []; + var key, val, related, promiseList = []; for (key in data) { if (data.hasOwnProperty(key)) { @@ -23,10 +23,15 @@ if (typeof val === 'function') { val = val.call(object, object.get(key)); - ...
8dcb43a4272563971cd22f32106731519451f83a
desktop/app/components/tasks/directive.js
desktop/app/components/tasks/directive.js
angular.module('MainApp') .directive('uaf', () => { // uaf = Update after find return (scope, el, attrs) => { scope.$watch('tasks', (newVal) => { el[0].children[0].children[0].innerHTML = newVal[attrs.uaf]; }, true); }; });
angular.module('MainApp') .directive('uaf', () => // uaf = Update after find (scope, el, attrs) => { scope.$watch('tasks', (newVal) => { el[0].children[0].children[0].innerHTML = newVal[attrs.uaf]; }, true); } );
Fix eslint errors - 6
Fix eslint errors - 6
JavaScript
mit
mkermani144/wanna,mkermani144/wanna
--- +++ @@ -1,8 +1,8 @@ angular.module('MainApp') - .directive('uaf', () => { // uaf = Update after find - return (scope, el, attrs) => { + .directive('uaf', () => // uaf = Update after find + (scope, el, attrs) => { scope.$watch('tasks', (newVal) => { el[0].children[0].children[0].innerHTML...
d90c82cea8abeace95e5b97cc0e51debe0b63225
packages/lesswrong/lib/collections/tagRels/views.js
packages/lesswrong/lib/collections/tagRels/views.js
import { TagRels } from './collection.js'; import { ensureIndex } from '../../collectionUtils'; TagRels.addView('postsWithTag', terms => { return { selector: { tagId: terms.tagId, baseScore: {$gt: 0}, }, } }); TagRels.addView('tagsOnPost', terms => { return { selector: { postId: te...
import { TagRels } from './collection.js'; import { ensureIndex } from '../../collectionUtils'; TagRels.addView('postsWithTag', terms => { return { selector: { tagId: terms.tagId, baseScore: {$gt: 0}, }, sort: {baseScore: -1}, } }); TagRels.addView('tagsOnPost', terms => { return { s...
Sort tags by descending relevance
Sort tags by descending relevance
JavaScript
mit
Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2
--- +++ @@ -7,6 +7,7 @@ tagId: terms.tagId, baseScore: {$gt: 0}, }, + sort: {baseScore: -1}, } }); @@ -16,6 +17,7 @@ postId: terms.postId, baseScore: {$gt: 0}, }, + sort: {baseScore: -1}, } });
df3fd41acf43fe5b0401ecb60ae090541c575d59
lib/mainWindow.js
lib/mainWindow.js
import { screen } from 'electron'; /** * Create main window's settings. * @param {Object} rawopts - Configuration options for main window. * @return {Object} The main window configuration. */ function mainWindow(rawopts) { const { width, height } = screen.getPrimaryDisplay().workAreaSize; const opts = Object.a...
import { screen } from 'electron'; /** * Create main window's settings. * @param {Object} rawopts - Configuration options for main window. * @return {Object} The main window configuration. */ function mainWindow(rawopts) { const { width, height } = screen.getPrimaryDisplay().workAreaSize; const opts = Object.a...
Hide main window until ready
Hide main window until ready
JavaScript
mit
JamenMarz/cluster,JamenMarz/vint
--- +++ @@ -17,6 +17,7 @@ mainWindow._default = { center: true, autoHideMenuBar: true, + show: false, };
c32995e50fc10e50e6808d5f5df51dd203c8a613
src/utils/getUsers.js
src/utils/getUsers.js
import axios from 'axios'; function getUsers() { return axios({ url: '/api/users', timeout: 20000, method: 'get', responseType: 'json' }) .then(function (res) { return res.data; }) } export default getUsers;
import axios from 'axios'; function getUsers() { return axios({ url: '/api/users', timeout: 20000, method: 'get', responseType: 'json' }) .then(function (res) { return res.data; }) } export default getUsers;
Set up getUser axios to get all users
Set up getUser axios to get all users
JavaScript
mit
Keitarokido/tiles,Keitarokido/tiles
8941d15ae95988becf61ba2d05a4eca140dd2486
test/of_test.js
test/of_test.js
import check from './support/check'; describe('of operator', () => { it('turns into an `in` operator', () => { check(` a of b `, ` a in b; `); }); it('works in an expression context', () => { check(` a(b, c.d of e) `, ` a(b, c.d in e); `); }); it('works with ...
import check from './support/check'; describe('of operator', () => { it('turns into an `in` operator', () => { check(` a of b `, ` a in b; `); }); it('works in an expression context', () => { check(` a(b, c.d of e) `, ` a(b, c.d in e); `); }); it('works with ...
Add another test for double negation of `of`.
Add another test for double negation of `of`.
JavaScript
mit
eventualbuddha/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate,eventualbuddha/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate
--- +++ @@ -24,4 +24,15 @@ !(a in b); `); }); + + it('can be double negated', () => { + check(` + unless a not of b + c + `, ` + if (a in b) { + c; + } + `); + }); });
ebf95a31b0ba193817a28ec16468ef7809ec6953
cronjobs.js
cronjobs.js
var fs = require('fs'); var cronJob = require('cron').CronJob; var config = require('./config'); var data = require('./data'); function init() { writeJSON(); } module.exports = init; function writeJSON() { write(); new cronJob('*/5 * * * *', write, null, true); function write() { data.che...
var fs = require('fs'); var cronJob = require('cron').CronJob; var config = require('./config'); var data = require('./data'); function init() { writeJSON(); } module.exports = init; function writeJSON() { write(); new cronJob('*/5 * * * *', write, null, true); function write() { data.che...
Increase the amount of data points
Increase the amount of data points
JavaScript
mit
cdnperf/cdnperf,bebraw/cdnperf,bebraw/cdnperf,cdnperf/cdnperf
--- +++ @@ -17,7 +17,7 @@ new cronJob('*/5 * * * *', write, null, true); function write() { - data.checks(config.pingdom, 5, function(err, data) { + data.checks(config.pingdom, 50, function(err, data) { fs.writeFile('./public/data.json', JSON.stringify(data), function(err) { ...
5016ab3b206d1a53fce943d07b0402df7a145aed
server/db/controllers/getMatchesGivenSelfAndOffset.js
server/db/controllers/getMatchesGivenSelfAndOffset.js
const db = require('../db.js'); module.exports = (self, offSet) => { const queryStr = `SELECT teach.teach_id FROM ( ( SELECT users_languages_levels.user AS teach_id FROM users_languages_levels INNER JOIN languages_levels ...
const db = require('../db.js'); module.exports = (self, offSet) => { const queryStr = `SELECT teach.teach_id FROM ( ( SELECT users_languages_levels.user AS teach_id FROM users_languages_levels INNER JOIN languages_levels ...
Add limit and offset in query string
Add limit and offset in query string
JavaScript
mit
VictoriousResistance/iDioma,VictoriousResistance/iDioma
--- +++ @@ -4,27 +4,29 @@ const queryStr = `SELECT teach.teach_id FROM ( ( SELECT users_languages_levels.user AS teach_id FROM users_languages_levels - INNER JOIN languages_levels - ON users_languages_levels.languag...
217c40ac2ca61f4a14f41a1a5b3d4f7983910b46
harmless-ransom-note.js
harmless-ransom-note.js
// Harmless Ransom Note /* Rules: Takes two parameters First will be the note we want to write as a string. The second will be the magazine text we have available to make the note out of as a string The purpose of the algorithm is to see if we have enough words in the magazine text to write our note If...
// Harmless Ransom Note /* Rules: Takes two parameters First will be the note we want to write as a string. The second will be the magazine text we have available to make the note out of as a string The purpose of the algorithm is to see if we have enough words in the magazine text to write our note If...
Add pseudocode in notes, begin skeleton of function
Add pseudocode in notes, begin skeleton of function
JavaScript
mit
benjaminhyw/javascript_algorithms
--- +++ @@ -10,3 +10,21 @@ NOTE: If one word is used 2 (or more) times in the note, but only seen once (or less) in magazine text then it fails. */ + +/* PSEUDOCODE + + 1) Turn the note into an array of words + 2) Turn the mag into an array of words + 3) Organize each new array alphabetically + 4) Look at t...
3a4bba37b5f2e46fc8484a9ad1a5142bf9adc183
src/templates/blog-post.js
src/templates/blog-post.js
import React from "react"; import { graphql, Link } from "gatsby"; import Layout from "../app/layout"; import "./blog-post.scss"; export const BLOG_POST_QUERY = graphql` query BlogPostTemplate($slug: String!) { markdownRemark(fields: { slug: { eq: $slug } }) { id excerpt html fields { ...
import React from "react"; import { graphql, Link } from "gatsby"; import Layout from "../app/layout"; import "prismjs/themes/prism-solarizedlight.css"; import "./blog-post.scss"; export const BLOG_POST_QUERY = graphql` query BlogPostTemplate($slug: String!) { markdownRemark(fields: { slug: { eq: $slug } }) { ...
Add styles for code blocks
Add styles for code blocks
JavaScript
mit
yanglinz/personal-site,yanglinz/personal-site
--- +++ @@ -3,6 +3,7 @@ import Layout from "../app/layout"; +import "prismjs/themes/prism-solarizedlight.css"; import "./blog-post.scss"; export const BLOG_POST_QUERY = graphql`
422c9f3f7f937e06179c9aedabda1bedb61a1e2c
js/views/Value.js
js/views/Value.js
jsio('from shared.javascript import Class, bind') jsio('import ui.Component') exports = Class(ui.Component, function(supr){ this._domTag = 'span' this._className = 'Value' this.init = function(jsArgs, viewArgs) { supr(this, 'init') this._itemIds = jsArgs[0] this._property = viewArgs[0] } this._crea...
jsio('from shared.javascript import Class, bind') jsio('import ui.Component') exports = Class(ui.Component, function(supr){ this._domTag = 'span' this._className = 'Value' this.init = function(jsArgs, viewArgs) { supr(this, 'init') this._itemIds = jsArgs[0] this._property = viewArgs[0] } this._crea...
Fix linebreaks only for string values
Fix linebreaks only for string values
JavaScript
mit
marcuswestin/Focus
--- +++ @@ -33,8 +33,10 @@ this.setValue = function(value) { if (typeof value == 'undefined') { return } - value = value.replace(/\n/g, '<br />') - value = value.replace(/ $/, '&nbsp;') + if (typeof value == 'string') { + value = value.replace(/\n/g, '<br />') + value = value.replace(/ $/, '&nbsp;') + ...
0e34b6069f2f4e70620eeb40fa44f19e1a93f5e0
datasets.js
datasets.js
/** * Different datasets the tool can use * * The first-level keys are country names, in English, * as they will appear in the app * * The second level names are database identifiers. * These ids are used in the url, so should be as short as possible * * The name of a database will be visible in the app, and m...
/** * Different datasets the tool can use * * The first-level keys are country names, in English, * as they will appear in the app * * The second level names are database identifiers. * These ids are used in the url, so should be as short as possible * * The name of a database will be visible in the app, and m...
Enable the Norwegian kindergartens again (not yet visible due to lack of data in the right repo)
Enable the Norwegian kindergartens again (not yet visible due to lack of data in the right repo)
JavaScript
bsd-3-clause
POI-Importer/POI-Importer.github.io,POI-Importer/POI-Importer.github.io
--- +++ @@ -27,12 +27,12 @@ "name": "Stazioni di servizo", } }, -/* "Norway" : + "Norway" : { "NO_kg": { - "url": "http://obtitus.github.io/barnehagefakta_osm_data/POI-Importer-data/dataset.json", - "name": "Barnehagefakta fra Utdanningsdirektoratet", + "url": "datasets/norge-barnehagefakta/", ...
050a474b6f5e000584bf5a1a8f41e3d9750faf3d
tasks/load-options.js
tasks/load-options.js
/* * grunt-load-options * https://github.com/chriszarate/grunt-load-options * * Copyright (c) 2013 Chris Zarate * Licensed under the MIT license. */ 'use strict'; var requireDirectory = require('require-directory'); module.exports = function(grunt) { grunt.initConfig(requireDirectory(module, './grunt/options...
/* * grunt-load-options * https://github.com/chriszarate/grunt-load-options * * Copyright (c) 2013 Chris Zarate * Licensed under the MIT license. */ 'use strict'; var requireDirectory = require('require-directory'); module.exports = function(grunt) { // Load config options. var options = requireDirectory(...
Resolve options expressed as functions.
Resolve options expressed as functions.
JavaScript
mit
chriszarate/grunt-load-options
--- +++ @@ -11,7 +11,18 @@ var requireDirectory = require('require-directory'); module.exports = function(grunt) { - grunt.initConfig(requireDirectory(module, './grunt/options')); + + // Load config options. + var options = requireDirectory(module, './grunt/options'); + + // Resolve options expressed as funct...
3fc6e2976b46dfaa6dc6768884f8c7a959c12996
client/shared/services/metaDataService.js
client/shared/services/metaDataService.js
'use strict'; export default class metaDataService { constructor() { this.pageTitle = ''; } getPageTitle() { return this.pageTitle; } setPageTitle(newTitle) { this.pageTitle = newTitle; } }
'use strict'; export default class metaDataService { constructor($location) { this.pageTitle = ''; this.address = `http://${$location.host()}/`; } getPageTitle() { return this.pageTitle; } setPageTitle(newTitle) { this.pageTitle = newTitle; } } metaDataService...
Add site address to metadata service
Add site address to metadata service
JavaScript
mit
flareair/board_of_shame,flareair/board_of_shame,flareair/board_of_shame
--- +++ @@ -1,8 +1,9 @@ 'use strict'; export default class metaDataService { - constructor() { + constructor($location) { this.pageTitle = ''; + this.address = `http://${$location.host()}/`; } getPageTitle() { @@ -13,3 +14,5 @@ this.pageTitle = newTitle; } } + +met...
4c869f1077036ededd6c755a600b9200997f56bb
src/widgets/index.js
src/widgets/index.js
// Lazy-loaded modules are assumed on the hosting domain, // so we override the constant at runtime. // __webpack_public_path__ = process.env.NODE_ENV === "production" // ? "https://example.com" // : "http://localhost:3000"; import { camelCase } from "lodash"; (async () => { // For minority of browers, bring in...
import { camelCase } from "lodash"; (async () => { // For minority of browers, bring in heavier polyfills. if (!Object.assign || !Array.from || !window.location.origin) { await import("../polyfills"); } // Iterable list of widget scripts const containers = [...document.querySelectorAll("[data-my-widget]...
Remove __webpack_public_path__ for a "gotcha"
Remove __webpack_public_path__ for a "gotcha"
JavaScript
mit
ericclemmons/performant-3rd-party-widgets,ericclemmons/performant-3rd-party-widgets
--- +++ @@ -1,9 +1,3 @@ -// Lazy-loaded modules are assumed on the hosting domain, -// so we override the constant at runtime. -// __webpack_public_path__ = process.env.NODE_ENV === "production" -// ? "https://example.com" -// : "http://localhost:3000"; - import { camelCase } from "lodash"; (async () => {
765578bfcb878b4fc7668b08ce2fe6fb12721592
helpers/unixToDate.js
helpers/unixToDate.js
module.exports = (function(){ return function unixToDate(unixTime) { console.log(unixTime) var date = new Date(Number(unixTime)); var year = date.getFullYear(); var month; var day; if (date.getMonth().toString().length === 1) { month = "0" + (date.getMonth() + 1).toString(); } else { month = (date...
module.exports = function(unixTime) { var date = new Date(Number(unixTime)) var year = date.getFullYear() var month = constructMonth(date) var day = constructDay(date) return year + '-' + month + '-' + day } function constructMonth(date) { var month = (date.getMonth() + 1).toString() return padFormatting(month...
Refactor date conversion into smaller, more modular methods
Refactor date conversion into smaller, more modular methods
JavaScript
mit
capsul/capsul-api
--- +++ @@ -1,23 +1,22 @@ -module.exports = (function(){ - return function unixToDate(unixTime) { - console.log(unixTime) - var date = new Date(Number(unixTime)); - var year = date.getFullYear(); - var month; - var day; +module.exports = function(unixTime) { + var date = new Date(Number(unixTime)) + var year = d...
277eeede63ec0ec591eaa934c2ace2df13592e77
test/special/index.js
test/special/index.js
'use strict'; var _ = require('lodash'); var fs = require('fs'); var hljs = require('../../build'); var jsdom = require('jsdom').jsdom; var utility = require('../utility'); describe('special cases tests', function() { before(function(done) { var filename = utility.buildPath('fixtures', 'index.ht...
'use strict'; var _ = require('lodash'); var bluebird = require('bluebird'); var hljs = require('../../build'); var jsdomEnv = bluebird.promisify(require('jsdom').env); var readFile = bluebird.promisify(require('fs').readFile); var utility = require('../utility'); describe('special cases tests', function(...
Use promises for special case tests
Use promises for special case tests I'm not too sure what is causing tests to fail because locally they pass and on travis `class` is turning into `undefined`.
JavaScript
bsd-3-clause
aurusov/highlight.js,teambition/highlight.js,Sannis/highlight.js,MakeNowJust/highlight.js,carlokok/highlight.js,bluepichu/highlight.js,StanislawSwierc/highlight.js,carlokok/highlight.js,palmin/highlight.js,teambition/highlight.js,carlokok/highlight.js,isagalaev/highlight.js,dbkaplun/highlight.js,tenbits/highlight.js,hi...
--- +++ @@ -1,33 +1,34 @@ 'use strict'; -var _ = require('lodash'); -var fs = require('fs'); -var hljs = require('../../build'); -var jsdom = require('jsdom').jsdom; -var utility = require('../utility'); +var _ = require('lodash'); +var bluebird = require('bluebird'); +var hljs = require...
97f6eb7ce14fe5baa6533216fa04717e69e7f44b
test/support/index.js
test/support/index.js
var root = null; if (typeof window === 'undefined') { root = global; root.tryc = require('../../'); } else { root = window; root.tryc = require('tryc'); root.__karma__.start = function() { root.__karma__.info({ total: 1 }); root.__karma__.result({ success: true }); root.__karma__.complete(); };...
var root = null; var completed = null; var tests = []; if (typeof window === 'undefined') { root = global; root.tryc = require('../../'); completed = function(){}; } else { root = window; root.tryc = require('tryc'); root.__karma__.start = function() {}; completed = function() { root.__karma__.info(...
Fix issues with the custom test runner
Fix issues with the custom test runner
JavaScript
mit
vesln/tryc
--- +++ @@ -1,12 +1,17 @@ var root = null; +var completed = null; +var tests = []; if (typeof window === 'undefined') { root = global; root.tryc = require('../../'); + completed = function(){}; } else { root = window; root.tryc = require('tryc'); - root.__karma__.start = function() { + root.__karm...
7326ec30d95f8a80b6011aca31f3d57f589309fe
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var uglify = require('gulp-uglify'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var minify = require('gulp-minify-css'); var del = require('del'); var lint = require('gulp-jshint'); gulp.task('lint', function() { return gulp.src('private/scripts/**/*.js') ...
var gulp = require('gulp'); var uglify = require('gulp-uglify'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var minify = require('gulp-minify-css'); var del = require('del'); var lint = require('gulp-jshint'); gulp.task('lint', function() { return gulp.src('private/scripts/**/*.js') ...
Use gulp as a listener
Use gulp as a listener
JavaScript
agpl-3.0
blagae/webcomicvault
--- +++ @@ -37,4 +37,13 @@ .pipe(gulp.dest('public/images')); }); -gulp.task('default', gulp.series('lint', 'clean', gulp.parallel('styles', 'scripts', 'images'))); +gulp.task('default', gulp.series(//'lint', // fail early + 'clean', + gulp.parallel('styles', 'scripts', 'images', + function(...
f506d6f9e71821fe808d2b77d2b5c886591383ed
lib/plugin/theme/renderable/collection.js
lib/plugin/theme/renderable/collection.js
"use strict"; const Renderable = require('./renderable'); class Collection extends Renderable {} Collection.Instance = require('./collectionInstance'); /* const Registry = require('../../../util/registry'); class Collection extends Renderable { addElement(data, element) { if (!data.elementRegistry) { da...
"use strict"; const Renderable = require('./renderable'); class Collection extends Renderable {} Collection.Instance = require('./collectionInstance'); module.exports = Collection;
Remove accidental inclusion of commented-out code
Remove accidental inclusion of commented-out code
JavaScript
mit
coreyp1/defiant,coreyp1/defiant
--- +++ @@ -5,57 +5,5 @@ class Collection extends Renderable {} Collection.Instance = require('./collectionInstance'); -/* -const Registry = require('../../../util/registry'); - -class Collection extends Renderable { - addElement(data, element) { - if (!data.elementRegistry) { - data.elementRegistry = ne...
ff4845f9cd7591fafffe0316b4c80948fbe80008
gulpfile.js
gulpfile.js
const gulp = require('gulp'); const sweetjs = require("gulp-sweetjs"); const sourcemaps = require('gulp-sourcemaps'); const concat = require('gulp-concat-util'); // Macro packages. const match = "sparkler/macros"; const lambda = "lambda-chop/macros"; const bdd = "sweet-bdd"; gulp.task('default', function() { consol...
const gulp = require('gulp'); const sweetjs = require("gulp-sweetjs"); const sourcemaps = require('gulp-sourcemaps'); const concat = require('gulp-concat-util'); // Macro packages. const match = "sparkler/macros"; const lambda = "lambda-chop/macros"; const bdd = "sweet-bdd"; gulp.task('default', function() { consol...
Add lambda-match to plugins macros.
Internal: Add lambda-match to plugins macros.
JavaScript
isc
hagb4rd/tennu,LordWingZero/tennu,Tennu/tennu
--- +++ @@ -25,7 +25,7 @@ } pipeline("lib", "lib", [match, lambda]); - pipeline("plugin", "tennu_plugins", [match]); + pipeline("plugin", "tennu_plugins", [match, lambda]); pipeline("test", "test", [bdd]); gulp.src("src/bin/**/*.sjs")
eba98196b93eaba09ba8d64a6a7e70ab832ded1c
lib/git-manager.js
lib/git-manager.js
var GithubApi = require('github'), config = require('../config'), Promise = require('promise'), github = new GithubApi({ debug: config.debug, version: '3.0.0' }); github.authenticate({ type: 'oauth', token: config.github.token }); module.exports = { github: github, getAllPulls:...
var GithubApi = require('github'), config = require('../config'), Promise = require('promise'), github = new GithubApi({ debug: config.debug, version: '3.0.0' }); github.authenticate({ type: 'oauth', token: config.github.token }); module.exports = { github: github, getAllPulls:...
Change a variable name for clarity
Change a variable name for clarity
JavaScript
mit
iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher
--- +++ @@ -14,7 +14,7 @@ module.exports = { github: github, getAllPulls: function() { - var p = Promise.denodeify(github.pullRequests.getAll); - return p({ user: config.repo.owner, repo: config.repo.name }); + var getAllPulls = Promise.denodeify(github.pullRequests.getAll); + return getA...
3f1d2eec28ec703569637e1d148fb7b668ee1e41
lib/git-wrapper.js
lib/git-wrapper.js
var Q = require('q'); var _ = require('lodash'); var spawn = require('child_process').spawn; module.exports = function(args, options) { var deferred = Q.defer(); options = options || {}; var defaults = { cwd: process.cwd(), verbose: false }; options = _.extend({}, defaults, options)...
var Q = require('q'); var _ = require('lodash'); var spawn = require('child_process').spawn; module.exports = function(args, options) { var deferred = Q.defer(); options = options || {}; var defaults = { cwd: process.cwd(), verbose: false }; options = _.extend({}, defaults, options)...
Fix early cache resolve bug
Fix early cache resolve bug
JavaScript
mit
crowdtap/parachute
--- +++ @@ -28,8 +28,10 @@ deferred.notify(data.toString()); }); + // TODO: Why does this return non-error output? + // i.e. Cloning into... child.stderr.on('data', function(data) { - deferred.reject(data.toString()); + deferred.notify(data.toString()); }); return deferred.promise;
eeb287f6029c7116b81ac81af76e055b2e3efa85
commands/misc.js
commands/misc.js
/* Miscellaneous commands */ Settings.addPermissions(['pick', 'randomanswer']); exports.commands = { choose: 'pick', pick: function (arg, by, room, cmd) { var choices = arg.split(","); choices = choices.filter(function (i) {return (toId(i) !== '');}); if (choices.length < 2) return this.pmReply(this.trad('er...
/* Miscellaneous commands */ Settings.addPermissions(['pick', 'randomanswer', 'usage', 'help']); exports.commands = { choose: 'pick', pick: function (arg, by, room, cmd) { var choices = arg.split(","); choices = choices.filter(function (i) {return (toId(i) !== '');}); if (choices.length < 2) return this.pmRe...
Add usage and help commands
Add usage and help commands
JavaScript
mit
ateck5/le_spatula,sama2/Pokemon-Showdown-Node-Bot,awolffromspace/PC-Battle-Server-Bot,TheFenderStory/Mambot,Ecuacion/Espaol-Bot,abulechu/Pokemon-Showdown-Node-Bot,Robophill/Pokemon-Showdown-Node-Bot,Flareninja/Pokemon-Showdown-Node-Bot,Ecuacion/Pokemon-Showdown-Node-Bot,TheFenderStory/Pokemon-Showdown-Node-Bot,Freigeis...
--- +++ @@ -2,7 +2,7 @@ Miscellaneous commands */ -Settings.addPermissions(['pick', 'randomanswer']); +Settings.addPermissions(['pick', 'randomanswer', 'usage', 'help']); exports.commands = { choose: 'pick', @@ -27,5 +27,16 @@ var answers = this.trad('answers'); text += (answers[rand] || answers[0]); ...
28aed7e4779ad302b0b25b2d321a975179a24602
test/validation_test.js
test/validation_test.js
'use strict'; const assert = require('assert'); const Event = require('../db/models/Event'); describe('Validation of User records', () => { it('should require a name for every event', () => { const validationEvt = new Event({ name: undefined }), validationResult = validationEvt.validateSync(), ...
'use strict'; const assert = require('assert'); const Event = require('../db/models/Event'); describe('Validation of User records', () => { // Tests that records for which no `name` property is defined are marked invalid // and return a validation fallback message: it('should require a name for every event', ...
Write test to catch invalid inserts
test: Write test to catch invalid inserts
JavaScript
mit
IsenrichO/react-timeline,IsenrichO/react-timeline
--- +++ @@ -5,6 +5,8 @@ describe('Validation of User records', () => { + // Tests that records for which no `name` property is defined are marked invalid + // and return a validation fallback message: it('should require a name for every event', () => { const validationEvt = new Event({ name: undefined...
5f32e2d1ee4cb89dc50b4bcd5126258cbe6f2107
test/common/cycle.js
test/common/cycle.js
'use strict'; /* global describe, it */ let assert = require('assert'); let Cycle = require('../../src/cycle'); describe('Cycle', function () { describe('API', function () { it('should have `applyToDOM`', function () { assert.strictEqual(typeof Cycle.applyToDOM, 'function'); }); it('should have `r...
'use strict'; /* global describe, it */ let assert = require('assert'); let Cycle = require('../../src/cycle'); describe('Cycle', function () { describe('API', function () { it('should have `applyToDOM`', function () { assert.strictEqual(typeof Cycle.applyToDOM, 'function'); }); it('should have `r...
Add test case for svg() (like h() is)
Add test case for svg() (like h() is)
JavaScript
mit
bzalasky/cycle-core,Widdershin/cycle-core,secobarbital/cycle-core,beni55/cycle-core,gdseller/cycle-core,Amirus/cycle-core,secobarbital/cycle-core,richardTowers/cycle-core,beni55/cycle-core,ccapndave/cycle-core,Iced-Tea/cycle-core,Widdershin/cycle-core,Iced-Tea/cycle-core,Amirus/cycle-core
--- +++ @@ -24,5 +24,9 @@ it('should have a shortcut to virtual-hyperscript', function () { assert.strictEqual(typeof Cycle.h, 'function'); }); + + it('should have a shortcut to virtual-dom\'s svg', function () { + assert.strictEqual(typeof Cycle.svg, 'function'); + }); }); });
5116c1dd1c7a9e993d0c4b86a67d58520386fb56
test/detect/index.js
test/detect/index.js
'use strict'; var bluebird = require('bluebird'); var fs = bluebird.promisifyAll(require('fs')); var hljs = require('../../build'); var path = require('path'); var utility = require('../utility'); function testAutoDetection(language) { var languagePath = utility.buildPath('detect', language); it(`...
'use strict'; let bluebird = require('bluebird'); let fs = bluebird.promisifyAll(require('fs')); let hljs = require('../../build'); let path = require('path'); let utility = require('../utility'); function testAutoDetection(language) { let languagePath = utility.buildPath('detect', language); it(`...
Use let in the detect test suite
Use let in the detect test suite
JavaScript
bsd-3-clause
bluepichu/highlight.js,bluepichu/highlight.js,MakeNowJust/highlight.js,isagalaev/highlight.js,highlightjs/highlight.js,highlightjs/highlight.js,teambition/highlight.js,Sannis/highlight.js,carlokok/highlight.js,MakeNowJust/highlight.js,palmin/highlight.js,sourrust/highlight.js,bluepichu/highlight.js,StanislawSwierc/high...
--- +++ @@ -1,13 +1,13 @@ 'use strict'; -var bluebird = require('bluebird'); -var fs = bluebird.promisifyAll(require('fs')); -var hljs = require('../../build'); -var path = require('path'); -var utility = require('../utility'); +let bluebird = require('bluebird'); +let fs = bluebird.promisifyA...
78f8be18c8042305c401f1ac47e4ba5a3c2105f8
ui/protractor.conf.js
ui/protractor.conf.js
const protractor = require('protractor') const phantomjs = require('phantomjs-prebuilt') exports.config = { framework: 'mocha', plugins: [{ package: 'aurelia-protractor-plugin' }, { package: 'protractor-console', logLevels: ['debug', 'info', 'warning', 'severe'] }], capabilities: { 'browserN...
const phantomjs = require('phantomjs-prebuilt') exports.config = { framework: 'mocha', plugins: [{ package: 'aurelia-protractor-plugin' }, { package: 'protractor-console', logLevels: ['debug', 'info', 'warning', 'severe'] }], capabilities: { 'browserName': 'phantomjs', 'phantomjs.binary....
Remove not-needed option. The aurelia plugin already takes care of this.
Remove not-needed option. The aurelia plugin already takes care of this.
JavaScript
mit
jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr
--- +++ @@ -1,4 +1,3 @@ -const protractor = require('protractor') const phantomjs = require('phantomjs-prebuilt') exports.config = { @@ -22,10 +21,6 @@ baseUrl: 'http://localhost:3000', specs: ['test/e2e*.spec.js'], - onPrepare: () => { - protractor.ignoreSynchronization = true - }, - mochaOpts: {...
880c178a446d61d77ba512e027e2cd076d412df8
api/lib/log/logger.js
api/lib/log/logger.js
// TODO: To decide and adopt to some logging utility like winston var util = require('util'); module.exports = { info: function(message,context) { if(context) { console.log(message, util.format('%j', context)); } else { console.log(message); } }, error: function(message, error) {...
// TODO: To decide and adopt to some logging utility like winston var util = require('util'); module.exports = { info: function(message,context) { var logItem = { timestamp: new Date(), source: 'autoscaler:apiserver', text: message, log_level: 'info', data: context === null ? {} : ...
Prepare log output as parseable JSON data
Prepare log output as parseable JSON data
JavaScript
apache-2.0
cloudfoundry-incubator/app-autoscaler,pradyutsarma/app-autoscaler,qibobo/app-autoscaler,pradyutsarma/app-autoscaler,qibobo/app-autoscaler,pradyutsarma/app-autoscaler,cloudfoundry-incubator/app-autoscaler,cloudfoundry-incubator/app-autoscaler,qibobo/app-autoscaler,qibobo/app-autoscaler,cloudfoundry-incubator/app-autosca...
--- +++ @@ -2,16 +2,24 @@ var util = require('util'); module.exports = { - info: function(message,context) { - if(context) { - console.log(message, util.format('%j', context)); - } - else { - console.log(message); - } - + info: function(message,context) { + var logItem = { + t...
cb192f3b98bcfc5d8363924c5be1f2be37a2dbb5
admin/scripts/default.js
admin/scripts/default.js
$(document).ready(function () { /*Navigation initialization*/ var navigation = $('#navigation'); var navShown = false; $('#nav-controller').on('click', function () { if (navShown) { navigation.removeClass('show-nav'); navigation.addClass('hide-nav'); navShown...
$(document).ready(function () { /*Navigation initialization*/ var navigation = $('#navigation'); var navShown = false; var navController = $('#nav-controller'); if (navController) { navController.on('click', function () { if (navShown) { navigation.removeClass('s...
Resolve all the JS errors
Resolve all the JS errors
JavaScript
mit
UoG-Libraries/Adshow,UoG-Libraries/Adshow,UoG-Libraries/Adshow
--- +++ @@ -3,17 +3,20 @@ /*Navigation initialization*/ var navigation = $('#navigation'); var navShown = false; - $('#nav-controller').on('click', function () { - if (navShown) { - navigation.removeClass('show-nav'); - navigation.addClass('hide-nav'); - navSh...
10be5cde2d00aee7a8aaf248f978476d92f73581
app/js/service/router.js
app/js/service/router.js
define([ 'flight/lib/component', 'director' ], function(defineComponent, Router) { 'use strict'; function RouterService() { this.gotoPost = function(id) { this.trigger(document, 'service.fetchPost', { "id": id }); }; this.gotoPosts = func...
define([ 'flight/lib/component', 'director' ], function(defineComponent, Router) { 'use strict'; function RouterService() { this.gotoPost = function(id) { this.trigger(document, 'service.fetchPost', { "id": id }); }; this.gotoPosts = func...
Set post page as the default page
Set post page as the default page
JavaScript
mit
unitedstackfront/ued,unitedstackfront/ued
--- +++ @@ -19,12 +19,15 @@ this.routers = { '/post/:id': this.gotoPost.bind(this), '/posts': this.gotoPosts.bind(this), - '(.*)': this.gotoPosts.bind(this) + '/': this.gotoPosts.bind(this) }; this.router = Router...
d76797c3ac220189e303670312bb6571ef096b22
packages/create-graphql/src/utils.js
packages/create-graphql/src/utils.js
import shell from 'shelljs'; import chalk from 'chalk'; import ora from 'ora'; import spawn from 'cross-spawn-promise'; const tic = chalk.green('✓'); const tac = chalk.red('✗'); const installYeoman = async () => { const spinner = ora('Installing Yeoman...'); spinner.start(); let command = 'yarn'; let args =...
import shell from 'shelljs'; import chalk from 'chalk'; import ora from 'ora'; import spawn from 'cross-spawn-promise'; const tic = chalk.green('✓'); const tac = chalk.red('✗'); const installYeoman = async () => { const spinner = ora('Installing Yeoman...'); spinner.start(); const command = 'npm'; const arg...
Remove the yarn checking, as yarn itself is not stable yet and a lot of people are using old versions.
Remove the yarn checking, as yarn itself is not stable yet and a lot of people are using old versions.
JavaScript
mit
graphql-community/create-graphql,lucasbento/create-graphql
--- +++ @@ -11,14 +11,8 @@ spinner.start(); - let command = 'yarn'; - let args = ['global', 'add', 'yo']; - - if (!shell.which('npm')) { - command = 'npm'; - args = ['install', '-g', 'yo']; - } - + const command = 'npm'; + const args = ['install', '-g', 'yo']; const options = { shell: true,...
cd0c283d607b5ac4af377d9a05a99218c5ae7091
assets/js/modules/idea-hub/datastore/base.js
assets/js/modules/idea-hub/datastore/base.js
/** * `modules/idea-hub` base data store * * Site Kit by Google, Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LIC...
/** * `modules/idea-hub` base data store * * Site Kit by Google, Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LIC...
Add ownerID in settingSlugs for idea hub.
Add ownerID in settingSlugs for idea hub.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
--- +++ @@ -24,7 +24,7 @@ const baseModuleStore = Modules.createModuleStore( 'idea-hub', { storeName: MODULES_IDEA_HUB, - settingSlugs: [ 'tosAccepted' ], + settingSlugs: [ 'tosAccepted', 'ownerID' ], } ); export default baseModuleStore;
eb530d7da6d372703d54f6648cdf5000949d71a9
Ship/CommandSource.js
Ship/CommandSource.js
class CommandSource { constructor(messageSource,botUsername){ this.botUsername = botUsername; this.bindings = {}; messageSource.on("text",this.handle.bind(this)); } addCommand(name,command){ if(name in this.bindings){ throw `Error: A command is already bound to ${name}`; } this.bind...
class CommandSource { constructor(messageSource,botUsername){ this.botUsername = botUsername; this.bindings = {}; messageSource.on("text",this.handle.bind(this)); } addCommand(name,command){ if(name in this.bindings){ throw `Error: A command is already bound to ${name}`; } this.bind...
Fix bot failing to respond to command with it's username
Fix bot failing to respond to command with it's username Fix #5
JavaScript
mit
severnbronies/Sail
--- +++ @@ -22,10 +22,10 @@ let commandName = tokens.shift(); let atAt = commandName.indexOf("@"); if(atAt !== -1){ - let commandName = commandName.substr(0,atAt); - if (commanName.substr(atAt+1) !== this.botUsername){ + if (commandName.substr(atAt+1) !== this.botUsername){ retu...
7c014584f848d9f7df9470ee796aaa32317a82de
db/users.js
db/users.js
var records = [ { id: 1, username: 'jack', password: 'secret', displayName: 'Jack', emails: [ { value: 'jack@example.com' } ] } , { id: 2, username: 'jill', password: 'birthday', displayName: 'Jill', emails: [ { value: 'jill@example.com' } ] } ]; exports.findByUsername = function(username, cb) { process.nextTi...
require('dotenv').load() var records = [ { id: 1, username: 'jack', password: 'secret', displayName: 'Jack', emails: [ { value: 'jack@example.com' } ] } , { id: 2, username: 'jill', password: 'birthday', displayName: 'Jill', emails: [ { value: 'jill@example.com' } ] } ]; if (process.env.shared_secret != null &&...
Support for shared secrets for authentication.
Support for shared secrets for authentication. Provide an enviroment variable "shared_secret" and you will be able to authenticate with any username that is not matched in the "database." Optionally, provide "shared_username" to set the username explicitly; otherwise, "community" will be used.
JavaScript
unlicense
community-lands/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station,community-lands/community-lands-monitoring-station,community-lands/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station
--- +++ @@ -1,16 +1,37 @@ +require('dotenv').load() + var records = [ { id: 1, username: 'jack', password: 'secret', displayName: 'Jack', emails: [ { value: 'jack@example.com' } ] } , { id: 2, username: 'jill', password: 'birthday', displayName: 'Jill', emails: [ { value: 'jill@example.com' } ] } ]; +if (...
297c33b3f790fdbdec51891451703724ca1a2614
core/client/components/gh-activating-list-item.js
core/client/components/gh-activating-list-item.js
var ActivatingListItem = Ember.Component.extend({ tagName: 'li', classNameBindings: ['active'], active: false }); export default ActivatingListItem;
var ActivatingListItem = Ember.Component.extend({ tagName: 'li', classNameBindings: ['active'], active: false, unfocusLink: function () { this.$('a').blur(); }.on('click') }); export default ActivatingListItem;
Fix active menu state on settings navigation
Fix active menu state on settings navigation closes #4622 - unfocus ActivatingListItem link when clicked
JavaScript
mit
panezhang/Ghost,beautyOfProgram/Ghost,jaswilli/Ghost,qdk0901/Ghost,rchrd2/Ghost,schematical/Ghost,icowan/Ghost,singular78/Ghost,NamedGod/Ghost,GroupxDev/javaPress,Bunk/Ghost,jomahoney/Ghost,SachaG/bjjbot-blog,bisoe/Ghost,kwangkim/Ghost,daihuaye/Ghost,ngosinafrica/SiteForNGOs,ASwitlyk/Ghost,prosenjit-itobuz/Ghost,BayPhi...
--- +++ @@ -1,7 +1,11 @@ var ActivatingListItem = Ember.Component.extend({ tagName: 'li', classNameBindings: ['active'], - active: false + active: false, + + unfocusLink: function () { + this.$('a').blur(); + }.on('click') }); export default ActivatingListItem;
7c4fb497c6ce67bc80b989e9ce386563d2809ac8
diogenes.js
diogenes.js
(function(window, Object) { var diogenes = {}; diogenes.Game = function(canvas, width, height, screen, items, characters, player) { // Canvas context this.ctx = canvas.getContext('2d'); // Dimension this.width = width; this.height = height; // Objects this.screen = screen; this....
Implement some constructors and animation loop
Implement some constructors and animation loop Implement Game, Screen and Item constructors. Implement DrawableEntity and InteractiveEntity prototypes. Implement the animation loop.
JavaScript
mit
jghinestrosa/diogenes
--- +++ @@ -0,0 +1,93 @@ +(function(window, Object) { + + var diogenes = {}; + + diogenes.Game = function(canvas, width, height, screen, items, characters, player) { + + // Canvas context + this.ctx = canvas.getContext('2d'); + + // Dimension + this.width = width; + this.height = height; + + // Ob...
8df9abb705e05391a592a379b9ddbc6d27b3d1cf
packages/react-jsx-highcharts/src/components/PlotBandLine/usePlotBandLineLifecycle.js
packages/react-jsx-highcharts/src/components/PlotBandLine/usePlotBandLineLifecycle.js
import React, { useRef, useEffect, useState } from 'react'; import uuid from 'uuid/v4'; import { attempt } from 'lodash-es'; import useModifiedProps from '../UseModifiedProps'; import useAxis from '../UseAxis'; export default function usePlotBandLine(props, plotType) { const { id = uuid, children, ...rest } = props;...
import React, { useRef, useEffect, useState } from 'react'; import uuid from 'uuid/v4'; import { attempt } from 'lodash-es'; import useModifiedProps from '../UseModifiedProps'; import useAxis from '../UseAxis'; export default function usePlotBandLine(props, plotType) { const { id = uuid, children, ...rest } = props;...
Revert "Fix plotline getting removed when children present"
Revert "Fix plotline getting removed when children present" This reverts commit d8dd4d977c3dcec578e083a2cd5beca4b9873e5c.
JavaScript
mit
whawker/react-jsx-highcharts,whawker/react-jsx-highcharts
--- +++ @@ -23,17 +23,13 @@ id: myId, ...rest }; - - if(plotbandline) axis.removePlotBandOrLine(idRef.current); setPlotbandline(axis.addPlotBandOrLine(opts, plotType)); } - }); - useEffect(() => { return () => { attempt(axis.removePlotBandOrLine, idRef.current...
8bc84bd260f674c6707db51f961056847e332e5e
core/client/components/gh-upload-modal.js
core/client/components/gh-upload-modal.js
import ModalDialog from 'ghost/components/gh-modal-dialog'; import upload from 'ghost/assets/lib/uploader'; var UploadModal = ModalDialog.extend({ layoutName: 'components/gh-modal-dialog', didInsertElement: function () { this._super(); upload.call(this.$('.js-drop-zone'), {fileStorage: this.ge...
import ModalDialog from 'ghost/components/gh-modal-dialog'; import upload from 'ghost/assets/lib/uploader'; var UploadModal = ModalDialog.extend({ layoutName: 'components/gh-modal-dialog', didInsertElement: function () { this._super(); upload.call(this.$('.js-drop-zone'), {fileStorage: this.ge...
Fix button class on upload modal
Fix button class on upload modal no issue - this makes sure that the cancel button on the upload modal gets the correct class
JavaScript
mit
johnnymitch/Ghost,ManRueda/Ghost,r14r/fork_nodejs_ghost,ckousik/Ghost,thomasalrin/Ghost,singular78/Ghost,ballPointPenguin/Ghost,tanbo800/Ghost,JohnONolan/Ghost,carlyledavis/Ghost,laispace/laiblog,schneidmaster/theventriloquist.us,hyokosdeveloper/Ghost,achimos/ghost_as,achimos/ghost_as,etdev/blog,epicmiller/pages,nmukh/...
--- +++ @@ -13,7 +13,7 @@ func: function () { // The function called on rejection return true; }, - buttonClass: true, + buttonClass: 'btn btn-default', text: 'Cancel' // The reject button text }, accept: {
69420c72b6f9adabc6bbe027c24d4313efea534c
protractor.conf.js
protractor.conf.js
require("./server") exports.config = { directConnect: true, specs: 'tests/e2e/*.js', baseUrl: 'http://localhost:1234', framework: 'jasmine2', jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, } };
ci = process.env.CI !== undefined if (!ci) require("./server") exports.config = { directConnect: !ci, specs: 'tests/e2e/*.js', baseUrl: (ci ? 'http://pollsapiclient.herokuapp.com' : 'http://localhost:1234'), framework: 'jasmine2', sauceUser: 'vincenzchianese', sauceKey : 'ebcc4534-bdcc-4ad5-8fd2-31ea2a1...
Set up data for saucelabs
Set up data for saucelabs
JavaScript
mit
XVincentX/pollsApiClient,XVincentX/pollsApiClient
--- +++ @@ -1,10 +1,15 @@ -require("./server") +ci = process.env.CI !== undefined + +if (!ci) + require("./server") exports.config = { - directConnect: true, + directConnect: !ci, specs: 'tests/e2e/*.js', - baseUrl: 'http://localhost:1234', + baseUrl: (ci ? 'http://pollsapiclient.herokuapp.com' : 'http://l...
7162d926443cc62dd0f4a93691de5f7a08d47d11
eln/libs.js
eln/libs.js
export {default as OCLE} from 'https://www.lactame.com/lib/openchemlib-extended/1.13.0/openchemlib-extended.js'; export {default as SD} from 'https://www.lactame.com/lib/spectra-data/3.1.0/spectra-data.min.js'; export {default as CCE} from 'https://www.lactame.com/lib/chemcalc-extended/1.27.0/chemcalc-extended.js'; ex...
export {default as OCLE} from 'https://www.lactame.com/lib/openchemlib-extended/1.13.0/openchemlib-extended.js'; export {default as SD} from 'https://www.lactame.com/lib/spectra-data/3.1.0/spectra-data.min.js'; export {default as CCE} from 'https://www.lactame.com/lib/chemcalc-extended/1.27.0/chemcalc-extended.js'; ex...
Update elnPlugin to version to 0.1.2
Update elnPlugin to version to 0.1.2
JavaScript
mit
cheminfo-js/visualizer-helper,cheminfo-js/visualizer-helper
--- +++ @@ -2,4 +2,4 @@ export {default as OCLE} from 'https://www.lactame.com/lib/openchemlib-extended/1.13.0/openchemlib-extended.js'; export {default as SD} from 'https://www.lactame.com/lib/spectra-data/3.1.0/spectra-data.min.js'; export {default as CCE} from 'https://www.lactame.com/lib/chemcalc-extended/1.27...
258e9170038e3c55481447c1460413af710c21a8
public/js/app/fields/CreateAttachmentView.js
public/js/app/fields/CreateAttachmentView.js
define(["app/app"], function(App) { "use strict"; App.CreateAttachmentView = Ember.View.extend({ tagName: 'input', type: 'file', attributeBindings: ['type'], change: function(event) { if (event.target.files.length > 0) { // Send the file object to controller var newFile = eve...
define(["app/app"], function(App) { "use strict"; App.CreateAttachmentView = Ember.View.extend({ tagName: 'input', type: 'file', multiple: true, attributeBindings: ['type', 'multiple'], change: function(event) { if (event.target.files.length > 0) { // Send the file object(s) to c...
Enable multiple file upload for attachments
Enable multiple file upload for attachments Fixes #130.
JavaScript
mit
davidmz/pepyatka-html,SiTLar/pepyatka-html,pepyatka/pepyatka-html,dsumin/freefeed-html,FreeFeed/freefeed-html,dsumin/freefeed-html,davidmz/pepyatka-html,FreeFeed/freefeed-html,epicmonkey/pepyatka-html,SiTLar/pepyatka-html,pepyatka/pepyatka-html,epicmonkey/pepyatka-html
--- +++ @@ -4,13 +4,16 @@ App.CreateAttachmentView = Ember.View.extend({ tagName: 'input', type: 'file', - attributeBindings: ['type'], + multiple: true, + attributeBindings: ['type', 'multiple'], change: function(event) { if (event.target.files.length > 0) { - // Send the f...
b56c5ecd849d23519a063bc2396f8e7811d0f2ad
data/settings.js
data/settings.js
var settings = { "endpoints": [ { "name": "World Cup", "url": "https://worldcup-graphql.now.sh/", "auth": '', "verb": 'POST', "accept": '*/*', "contentType": 'application/json', "useIntrospectionQuery": true, "re...
var settings = { "endpoints": [ { "name": "Space X", "url": "https://api.spacex.land/graphql/", "auth": '', "verb": 'POST', "accept": '*/*', "contentType": 'application/json', "useIntrospectionQuery": true, "requ...
Change endpoint to Space X
fix: Change endpoint to Space X
JavaScript
mit
Brbb/graphql-rover,Brbb/graphql-rover
--- +++ @@ -1,8 +1,8 @@ var settings = { "endpoints": [ { - "name": "World Cup", - "url": "https://worldcup-graphql.now.sh/", + "name": "Space X", + "url": "https://api.spacex.land/graphql/", "auth": '', "verb": 'POST', ...
26a1d68fe2dec24e18f4cad4db176ab0d849fb2a
src/SourceBrowser.Site/Scripts/search.js
src/SourceBrowser.Site/Scripts/search.js
$("#search-form").submit(function (event) { var query = $("#search-box").val(); var path = window.location.pathname; //Split path, removing empty entries var splitPath = path.split('/'); splitPath = splitPath.filter(function (v) { return v !== '' }); if (splitPath.length <= 1) { search...
$("#search-form").submit(function (event) { var query = $("#search-box").val(); var path = window.location.pathname; //Split path, removing empty entries var splitPath = path.split('/'); splitPath = splitPath.filter(function (v) { return v !== '' }); if (splitPath.length <= 1) { search...
Remove old logging statements. Set up structure to build HTML
Remove old logging statements. Set up structure to build HTML
JavaScript
mit
AmadeusW/SourceBrowser,AmadeusW/SourceBrowser,AmadeusW/SourceBrowser,CodeConnect/SourceBrowser,CodeConnect/SourceBrowser
--- +++ @@ -11,19 +11,15 @@ else if (splitPath.length >= 2) { var username = splitPath[1]; - console.log(username); var repository = splitPath[2]; - console.log(repository); searchRepository(username, repository, query); } - console.log(splitPath.length); ...
05300b58009a287abd2e30747d43b052da2c0695
e2e/conf.js
e2e/conf.js
'use strict'; exports.config = { seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar', capabilities: { 'browserName': 'phantomjs' }, framework: 'jasmine2', onPrepare: function() { var SpecReporter = require('jasmine-spec-reporter'); jasmine.getEnv().addRep...
'use strict'; exports.config = { seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar', capabilities: { 'browserName': 'chrome' }, framework: 'jasmine2', onPrepare: function() { var SpecReporter = require('jasmine-spec-reporter'); jasmine.getEnv().addReport...
Switch back to chrome for tests, as phantomjs is not reliable
[e2e] Switch back to chrome for tests, as phantomjs is not reliable
JavaScript
mit
solarnz/ec2pric.es,solarnz/ec2pric.es,solarnz/ec2pric.es
--- +++ @@ -3,7 +3,7 @@ exports.config = { seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar', capabilities: { - 'browserName': 'phantomjs' + 'browserName': 'chrome' }, framework: 'jasmine2', onPrepare: function() {
9ff4d5ee986e9a821d910c13e78e39623b2fe7b1
web_external/model.js
web_external/model.js
isic.Model = girder.Model.extend({ urlRoot: function () { return this.resourceName; } });
isic.Model = girder.Model.extend({ urlRoot: function () { return this.resourceName; }, // "girder.Model.destroy" doesn't trigger many of the proper Backbone events destroy: Backbone.Model.prototype.destroy });
Use Backbone destroy, instead of Girder's method
Use Backbone destroy, instead of Girder's method
JavaScript
apache-2.0
ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive
--- +++ @@ -1,5 +1,8 @@ isic.Model = girder.Model.extend({ urlRoot: function () { return this.resourceName; - } + }, + + // "girder.Model.destroy" doesn't trigger many of the proper Backbone events + destroy: Backbone.Model.prototype.destroy });
3e9c692ef04e33826b4ed31d63651aa6f6aa6516
server/controllers/sampleCtrl.js
server/controllers/sampleCtrl.js
'use strict' /** * Sample API controller. Can safely be removed. */ const Sample = require('../models').sample.Sample const co = require('co') module.exports = { getData: co.wrap(getData), postData: co.wrap(postData) } function * getData (req, res, next) { try { const doc = yield Sample.findById(req.par...
'use strict' /** * Sample API controller. Can safely be removed. */ const Sample = require('../models').sample.Sample const co = require('co') module.exports = { getData: co.wrap(getData), postData: co.wrap(postData) } function * getData (req, res, next) { try { let doc = {} if (process.env.NODE_MOC...
Support for startMock mode in getData
Support for startMock mode in getData
JavaScript
mit
KTH/lms-export-results
--- +++ @@ -14,7 +14,12 @@ function * getData (req, res, next) { try { - const doc = yield Sample.findById(req.params.id) + let doc = {} + if (process.env.NODE_MOCK) { + doc = yield {_id: 0, name: 'mockdata'} + } else { + doc = yield Sample.findById(req.params.id) + } if (!doc) {...
2848d099199c841f64c7c66ce33775e0bc25bc59
test/torpedo-build-test.js
test/torpedo-build-test.js
var fs = require('fs') , path = require('path') , expect = require('chai').expect , shell = require('shelljs') , glob = require('glob') , _ = require('lodash') function read(filename) { return fs.readFileSync(filename, 'utf8') } function fixture(name) { return read('test/fixtures/' + name + '.html') } ...
var fs = require('fs') , path = require('path') , expect = require('chai').expect , shell = require('shelljs') , glob = require('glob') , _ = require('lodash') function read(filename) { return fs.readFileSync(filename, 'utf8') } function fixture(name) { return read('test/fixtures/' + name + '.html') } ...
Fix tests to delete the _site directory after running.
Fix tests to delete the _site directory after running.
JavaScript
mit
philipwalton/ingen
--- +++ @@ -13,18 +13,8 @@ return read('test/fixtures/' + name + '.html') } -function readGenerated(filename, destination) { - var loc = path.resolve(destination || '_site', filename) - return read(loc, 'utf8').trim() -} - -function readExpected(filename) { - var loc = path.resolve('../expected', filename) -...
20d900a89125cf0141e31b14f43ff65265aab505
js/utils.js
js/utils.js
function numberToString(number) { var r = Math.round(number * 1000) / 1000; return ""+r; } function addCommas(nStr) { nStr += ''; x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } return x1 ...
function numberToString(number) { var r = Math.round(number * 1000) / 1000; return ""+r; } /** * There are some difficulties with locales with this script's number * output (when number > 1e21) and Clicker Heroes' input formatting. * This function makes sure there are no decimal points in the output. */ f...
Make sure there are no decimal points in the (pasteable) level change output.
Make sure there are no decimal points in the (pasteable) level change output.
JavaScript
mit
Beskhue/ClickerHeroesCalculator,Beskhue/ClickerHeroesCalculator
--- +++ @@ -1,6 +1,22 @@ function numberToString(number) { var r = Math.round(number * 1000) / 1000; return ""+r; +} + +/** + * There are some difficulties with locales with this script's number + * output (when number > 1e21) and Clicker Heroes' input formatting. + * This function makes sure there are no...
be3aac36283d562d94f358e81de722e1854f56b7
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); gulp.task('default', ['sass'], function () { //gulp.src('./node_modules/font-awesome/fonts/**/*.{eot,svg,ttf,woff,woff2}') // .pipe(gulp.dest('./styles/warriormachines_2016/theme/gulp-generated/fonts')); }); gulp.task('sass', funct...
'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); gulp.task('default', ['sass', 'fonts'], function () { }); gulp.task('sass', function () { return gulp.src('./styles/warriormachines_2016/theme/sass/app.scss') .pipe(sass().on('error', sass.logError)) .pipe(gulp.dest('./st...
Use gulp to generate one app.css, and separate 'fonts' task
Use gulp to generate one app.css, and separate 'fonts' task
JavaScript
mit
WarriorMachines/warriormachines-phpbb,WarriorMachines/warriormachines-phpbb,WarriorMachines/warriormachines-phpbb
--- +++ @@ -3,17 +3,21 @@ var gulp = require('gulp'); var sass = require('gulp-sass'); -gulp.task('default', ['sass'], function () { - //gulp.src('./node_modules/font-awesome/fonts/**/*.{eot,svg,ttf,woff,woff2}') - // .pipe(gulp.dest('./styles/warriormachines_2016/theme/gulp-generated/fonts')); +gulp.tas...
e1be3b7fdd59ba71c3e2d5ffd626fd7877431401
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var gutil = require('gulp-util'); var webpack = require('webpack'); var WebpackDevServer = require('webpack-dev-server'); var webpackConfig = require('./webpack.config.js'); var open = require('gulp-open'); var mocha = require('gulp-mocha'); // default task is browser test gulp.task('defaul...
var gulp = require('gulp'); var gutil = require('gulp-util'); var webpack = require('webpack'); var WebpackDevServer = require('webpack-dev-server'); var webpackConfig = require('./webpack.config.js'); var open = require('gulp-open'); var mocha = require('gulp-mocha'); // default task is browser test gulp.task('defaul...
Enable automatic browser reload in browser-test task
Enable automatic browser reload in browser-test task
JavaScript
mit
hnakamur/solve-quadratic-equation.js,hnakamur/solve-quadratic-equation.js
--- +++ @@ -24,7 +24,7 @@ if (err) throw new gutil.PluginError('webpack-dev-server', err); gulp.src('./test/index.html') - .pipe(open('', {url: 'http://localhost:8080/test/index.html'})); + .pipe(open('', {url: 'http://localhost:8080/webpack-dev-server/test/index.html'})); }); });
7513968732441a2bd3ecd720d821e12a1311a38b
installer/js/setup/repositories/RepositoryList.js
installer/js/setup/repositories/RepositoryList.js
import React, { Component, PropTypes } from 'react'; import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow } from 'material-ui/Table'; import { getRepositories } from '../../installer/github'; import Repository from './Repository'; import Pagination from './Pagination'; const accessToken = window.local...
import React, { Component, PropTypes } from 'react'; import Progress from 'material-ui/CircularProgress'; import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow } from 'material-ui/Table'; import { getRepositories } from '../../installer/github'; import Repository from './Repository'; import Pagination f...
Add a loader while loading repositories
Add a loader while loading repositories
JavaScript
mit
marmelab/sedbot.js
--- +++ @@ -1,4 +1,5 @@ import React, { Component, PropTypes } from 'react'; +import Progress from 'material-ui/CircularProgress'; import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow } from 'material-ui/Table'; import { getRepositories } from '../../installer/github'; @@ -24,7 +25,7 @@ com...
2664f207be053a02a4c9866c8794b95901fe4aaa
lib/main.js
lib/main.js
/* See license.txt for terms of usage */ "use strict"; const { Cu, Ci } = require("chrome"); const { Firebug } = require("./firebug.js"); const { Trace } = require("./trace.js"); const { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {}); // Entry points of the extension. Both 'main' and 'onUn...
/* See license.txt for terms of usage */ "use strict"; const { Cu, Ci } = require("chrome"); const { Firebug } = require("./firebug.js"); const { Trace } = require("./trace.js"); const { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {}); // The application (singleton) var firebug; // Entry p...
Fix undefined variable in onUnload
Fix undefined variable in onUnload
JavaScript
bsd-3-clause
firebug/firebug.next,bmdeveloper/firebug.next,bmdeveloper/firebug.next,vlajos/firebug.next,vlajos/firebug.next,firebug/firebug.next
--- +++ @@ -7,6 +7,9 @@ const { Trace } = require("./trace.js"); const { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {}); +// The application (singleton) +var firebug; + // Entry points of the extension. Both 'main' and 'onUnload' methods are // exported from this module and executed a...
7930c5a16744f6464a126ebe739704dadeca9382
lib/main.js
lib/main.js
"use babel"; export default { config: { executable: { type: "string", default: "gfortran" }, gfortran_flags: { type: "string", default: "-Wall -Wextra" }, }, activate: () => { require("atom-package-deps").install("lint...
"use babel"; export default { config: { executable: { type: "string", default: "gfortran" }, gfortran_flags: { type: "string", default: "-Wall -Wextra" }, }, activate: () => { require("atom-package-deps").install("lint...
Support all the fortran grammars
Support all the fortran grammars
JavaScript
mit
Luthaf/linter-gfortran
--- +++ @@ -22,7 +22,12 @@ const tmpdir = require('tmp').dirSync().name; return { name: "gfortran", - grammarScopes: ["source.fortran.free"], + grammarScopes: [ + "source.fortran.free", + "source.fortran.fixed", + "sourc...
27ad5450c62de6fee222e6298901b3101a097930
src/transform-data.js
src/transform-data.js
"use strict" /** * Inverts the data from the deepstream structure to reduce nesting. * * { _v: 1, _d: { name: 'elasticsearch' } } -> { name: 'elasticsearch', __ds = { _v: 1 } } * * @param {String} value The data to save * * @private * @returns {Object} data */ module.exports.transformValueForStorage = functi...
"use strict" /** * Inverts the data from the deepstream structure to reduce nesting. * * { _v: 1, _d: { name: 'elasticsearch' } } -> { name: 'elasticsearch', __ds = { _v: 1 } } * * @param {String} value The data to save * * @private * @returns {Object} data */ module.exports.transformValueForStorage = functi...
Clone data to avoid mutations to effect rest of workflow
Clone data to avoid mutations to effect rest of workflow
JavaScript
mit
hoxton-one/deepstream.io-storage-rethinkdb
--- +++ @@ -11,6 +11,7 @@ * @returns {Object} data */ module.exports.transformValueForStorage = function ( value ) { + value = JSON.parse( JSON.stringify( value ) ) var data = value._d delete value._d data.__ds = value
0b8d55b196164dc7dfdef644ee95806f2d5dac59
packages/kolibri-tools/jest.conf/setup.js
packages/kolibri-tools/jest.conf/setup.js
import 'intl'; import 'intl/locale-data/jsonp/en.js'; import * as Aphrodite from 'aphrodite'; import * as AphroditeNoImportant from 'aphrodite/no-important'; import Vue from 'vue'; import VueMeta from 'vue-meta'; import VueRouter from 'vue-router'; import Vuex from 'vuex'; import { i18nSetup } from 'kolibri.utils.i18n...
import 'intl'; import 'intl/locale-data/jsonp/en.js'; import * as Aphrodite from 'aphrodite'; import * as AphroditeNoImportant from 'aphrodite/no-important'; import Vue from 'vue'; import VueMeta from 'vue-meta'; import VueRouter from 'vue-router'; import Vuex from 'vuex'; import { i18nSetup } from 'kolibri.utils.i18n...
Add extra logging for node promises
Add extra logging for node promises
JavaScript
mit
indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,learningequality/kolibri
--- +++ @@ -33,3 +33,9 @@ global.document.body.append(csrf); Object.defineProperty(window, 'scrollTo', { value: () => {}, writable: true }); + +// Uncomment to see better errors from Node +process.on('unhandledRejection', (reason, p) => { + console.log('Unhandled Rejection at: Promise', p, 'reason:', reason); + ...
1242956b0fc4ef7300c78c50c087d30a60b963d4
source/configuration.js
source/configuration.js
const fs = require("fs"); const path = require("path"); function getValue(obj, pathArr, def) { let nextPath = pathArr.shift(); if (nextPath) { return (pathArr.length > 0) ? (obj.hasOwnProperty(nextPath) ? getValue(obj[nextPath], pathArr, def) : def) : obj[nextPath] || def; }...
const fs = require("fs"); const path = require("path"); const fileExists = require("file-exists"); function getValue(obj, pathArr, def) { let nextPath = pathArr.shift(); if (nextPath) { return (pathArr.length > 0) ? (obj.hasOwnProperty(nextPath) ? getValue(obj[nextPath], pathArr, def) : de...
Create config.json if not exists
Create config.json if not exists
JavaScript
mit
buttercup-pw/buttercup-server
--- +++ @@ -1,5 +1,7 @@ const fs = require("fs"); const path = require("path"); + +const fileExists = require("file-exists"); function getValue(obj, pathArr, def) { let nextPath = pathArr.shift(); @@ -9,6 +11,14 @@ obj[nextPath] || def; } return obj || def; +} + +function placeConfig(...
1da816b0cbe307f3cb8ea74dc368e460d7eb16c2
packages/workflow/tests/dummy/config/environment.js
packages/workflow/tests/dummy/config/environment.js
/* eslint-env node */ 'use strict'; module.exports = function(environment) { let ENV = { modulePrefix: 'dummy', environment, rootURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contro...
/* eslint-env node */ 'use strict'; module.exports = function(environment) { let ENV = { modulePrefix: 'dummy', environment, rootURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contro...
Remove empty block for eslint happiness
Remove empty block for eslint happiness
JavaScript
mit
cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack
--- +++ @@ -43,9 +43,5 @@ ENV.APP.rootElement = '#ember-testing'; } - if (environment === 'production') { - - } - return ENV; };
ade9f35525d169ada126e66ced7be3e51ba5a4ef
src/helpers.js
src/helpers.js
"use strict"; // Bind event listeners to target. export function on (target, eventName, listener, capture = false) { return target.addEventListener(eventName, listener, capture); } // Unbind event listeners export function off (target, eventName, listener, capture = false) { target.removeEventListener(eventName, ...
"use strict"; // Bind event listeners to target. export function on (el, events, cb, capture = false) { events.split(' ').map(event => { if (event) el.addEventListener(event, cb, capture); }); } // Unbind event listeners export function off (el, events, cb, capture = false) { events.split(' ').map(event => ...
Add support to bind to multiple events in one call.
Add support to bind to multiple events in one call.
JavaScript
mit
Andreyco/react-video,Andreyco/react-video
--- +++ @@ -1,24 +1,32 @@ "use strict"; // Bind event listeners to target. -export function on (target, eventName, listener, capture = false) { - return target.addEventListener(eventName, listener, capture); +export function on (el, events, cb, capture = false) { + events.split(' ').map(event => { + if (even...
ccfc6e5850fa6de5b821a292eab02c9755bd2062
src/number.js
src/number.js
'use strict'; var card = require('creditcards').card; module.exports = function ($parse) { return { restrict: 'A', require: ['ngModel', 'ccNumber'], controller: function () { var expectedType; this.expect = function (type) { expectedType = type; }; }, compile: function ...
'use strict'; var card = require('creditcards').card; module.exports = function ($parse) { return { restrict: 'A', require: ['ngModel', 'ccNumber'], controller: function () { this.type = null; }, compile: function (element, attributes) { attributes.$set('pattern', '[0-9]*'); r...
Remove dead code from ccNumber controller
Remove dead code from ccNumber controller
JavaScript
mit
SimeonC/angular-credit-cards,matiasarayac/angular-credit-cards,Noxwille/angular-credit-cards,bendrucker/angular-credit-cards,antoinepairet/angular-credit-cards,dingels35/angular-credit-cards,dribehance/angular-credit-cards,aspone/angular-credit-cards,robertbaker/angular-credit-cards
--- +++ @@ -7,10 +7,7 @@ restrict: 'A', require: ['ngModel', 'ccNumber'], controller: function () { - var expectedType; - this.expect = function (type) { - expectedType = type; - }; + this.type = null; }, compile: function (element, attributes) { attributes.$...
ad45bd67ba40b86954e5649f04ef5c42258bf6d4
packages/ember-runtime/tests/array/invoke-test.js
packages/ember-runtime/tests/array/invoke-test.js
import EmberObject from '../../lib/system/object'; import { AbstractTestCase } from 'internal-test-helpers'; import { runArrayTests } from '../helpers/array'; class InvokeTests extends AbstractTestCase { '@test invoke should call on each object that implements'() { let cnt, ary, obj; function F(amt) { ...
import { Object as EmberObject, NativeArray } from '../../index'; import { AbstractTestCase } from 'internal-test-helpers'; import { runArrayTests } from '../helpers/array'; class InvokeTests extends AbstractTestCase { '@test invoke should call on each object that implements'() { let cnt, ary, obj; function...
Add failing tests for `A().invoke()` not returning an `A`.
Add failing tests for `A().invoke()` not returning an `A`.
JavaScript
mit
bekzod/ember.js,knownasilya/ember.js,GavinJoyce/ember.js,kellyselden/ember.js,Turbo87/ember.js,elwayman02/ember.js,jaswilli/ember.js,cibernox/ember.js,kellyselden/ember.js,qaiken/ember.js,twokul/ember.js,qaiken/ember.js,mike-north/ember.js,stefanpenner/ember.js,asakusuma/ember.js,emberjs/ember.js,xiujunma/ember.js,twok...
--- +++ @@ -1,4 +1,4 @@ -import EmberObject from '../../lib/system/object'; +import { Object as EmberObject, NativeArray } from '../../index'; import { AbstractTestCase } from 'internal-test-helpers'; import { runArrayTests } from '../helpers/array'; @@ -28,6 +28,33 @@ obj.invoke('foo', 2); this.assert....