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 |
|---|---|---|---|---|---|---|---|---|---|---|
9c448e669a966c307bc1218d58300c3a46bcec43 | src/js/model/refugee-constants.js | src/js/model/refugee-constants.js |
var moment = require('moment');
// NOTE: month indices are zero-based
module.exports.DATA_START_YEAR = 2012;
module.exports.DATA_START_MONTH = 0;
module.exports.DATA_START_MOMENT = moment([
module.exports.DATA_START_YEAR,
module.exports.DATA_START_MONTH]).startOf('month');
module.exports.DATA_END_YEAR = 2016;
m... |
var moment = require('moment');
// NOTE: month indices are zero-based
module.exports.DATA_START_YEAR = 2012;
module.exports.DATA_START_MONTH = 0;
module.exports.DATA_START_MOMENT = moment([
module.exports.DATA_START_YEAR,
module.exports.DATA_START_MONTH]).startOf('month');
module.exports.DATA_END_YEAR = 2016;
m... | Extend visualisation period to March | Extend visualisation period to March
| JavaScript | mit | lucified/lucify-asylum-countries,lucified/lucify-asylum-countries,lucified/lucify-asylum-countries,lucified/lucify-asylum-countries | ---
+++
@@ -10,7 +10,7 @@
module.exports.DATA_START_MONTH]).startOf('month');
module.exports.DATA_END_YEAR = 2016;
-module.exports.DATA_END_MONTH = 1;
+module.exports.DATA_END_MONTH = 2;
module.exports.DATA_END_MOMENT = moment([
module.exports.DATA_END_YEAR,
module.exports.DATA_END_MONTH]).endOf('month')... |
62ce6e6f8111497d5bee0cc3bd44c4a1902eb317 | src/lib/control/typeahead/normalizer/TypeaheadNormalizer.js | src/lib/control/typeahead/normalizer/TypeaheadNormalizer.js | /**
* @requires javelin-install
* @provides javelin-typeahead-normalizer
* @javelin
*/
/**
* @group control
*/
JX.install('TypeaheadNormalizer', {
statics : {
normalize : function(str) {
return ('' + str)
.toLowerCase()
.replace(/[^a-z0-9 ]/g, '')
.replace(/ +/g, ' ')
... | /**
* @requires javelin-install
* @provides javelin-typeahead-normalizer
* @javelin
*/
/**
* @group control
*/
JX.install('TypeaheadNormalizer', {
statics : {
/**
* Normalizes a string by lowercasing it and stripping out extra spaces
* and punctuation.
*
* @param string
* @return s... | Use Punctuation Blacklist for Typeahead Normalizer | Use Punctuation Blacklist for Typeahead Normalizer
Summary:
This changes the Typeahead normalizer to use a punctuation blacklist instead of stripping all non-alphanumeric characters. As the normalizer stands now, any international characters (e.g. Japanese characters) are stripped.
Reviewers: epriestley, jg
Test Pla... | JavaScript | bsd-3-clause | phacility/javelin,phacility/javelin,phacility/javelin,phacility/javelin,phacility/javelin | ---
+++
@@ -4,16 +4,22 @@
* @javelin
*/
-
/**
* @group control
*/
JX.install('TypeaheadNormalizer', {
statics : {
+ /**
+ * Normalizes a string by lowercasing it and stripping out extra spaces
+ * and punctuation.
+ *
+ * @param string
+ * @return string Normalized string.
+ ... |
23e1f61e01d8f6d8fb3760bcd01bc50b17cdeaf7 | dashboard/app/scripts/collections/user-request-collection.js | dashboard/app/scripts/collections/user-request-collection.js | /*jshint -W106*/
/*global define*/
define(['underscore', 'backbone', 'models/user-request-model'], function(_, Backbone, UserRequestModel) {
'use strict';
var UserRequestCollection = Backbone.Collection.extend({
url: function() {
return '/api/v2/cluster/' + this.cluster + '/request';
... | /*jshint -W106*/
/*global define*/
define(['underscore', 'backbone', 'models/user-request-model'], function(_, Backbone, UserRequestModel) {
'use strict';
var UserRequestCollection = Backbone.Collection.extend({
url: function() {
return '/api/v2/cluster/' + this.cluster + '/request' + this... | Set page_size and state on collection requests | Set page_size and state on collection requests
| JavaScript | mit | SUSE/calamari-clients,ceph/calamari-clients,ceph/calamari-clients,ceph/romana,SUSE/romana,GregMeno/test,SUSE/calamari-clients,SUSE/romana,ceph/romana,SUSE/calamari-clients,SUSE/romana,GregMeno/test,ceph/romana,ceph/calamari-clients,SUSE/calamari-clients,SUSE/romana,SUSE/calamari-clients,ceph/romana,ceph/romana,ceph/cal... | ---
+++
@@ -6,13 +6,25 @@
var UserRequestCollection = Backbone.Collection.extend({
url: function() {
- return '/api/v2/cluster/' + this.cluster + '/request';
+ return '/api/v2/cluster/' + this.cluster + '/request' + this.params;
+ },
+ parse: function(resp) {
+ ... |
1a9d382e09906e5b6e05ded1b391f337e9a8f69d | app/controllers/dashboard/session-manager/session/entries/new.js | app/controllers/dashboard/session-manager/session/entries/new.js | import { inject as service } from '@ember/service';
import Controller from '@ember/controller';
import { task, timeout } from 'ember-concurrency';
export default Controller.extend({
flashMessages: service(),
searchGroup: task(function* (term){
yield timeout(600);
let kindOptions = {
'Chorus': 32,
... | import { inject as service } from '@ember/service';
import Controller from '@ember/controller';
import { task, timeout } from 'ember-concurrency';
export default Controller.extend({
flashMessages: service(),
searchGroup: task(function* (term){
yield timeout(600);
let kindOptions = {
'Chorus': 32,
... | Include exempt groups in search | Include exempt groups in search
| JavaScript | bsd-2-clause | barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web | ---
+++
@@ -14,7 +14,7 @@
let kindInt = kindOptions[kindModel];
let groups = yield this.get('store').query('group', {
'nomen__icontains': term,
- 'status': 10,
+ 'status__gt': 0,
'page_size': 1000,
'kind': kindInt,
}); |
9067165f7c34b397f227f76c042bbac248b55b52 | app/models/experiment-schema.server.model.js | app/models/experiment-schema.server.model.js | 'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
MediaSchema = require('./media.server.model').schema,
_ = require('lodash');
/**
* ExperimentSchema Schema
*/
var ExperimentSchemaSchema = new Schema({
trialCount: {
type: Number,
required: true... | 'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
MediaSchema = require('./media.server.model').schema,
_ = require('lodash');
/**
* ExperimentSchema Schema
*/
var ExperimentSchemaSchema = new Schema({
structure: {},
sensors: [String],
trialCount: ... | Return structure and sensors with ExperimentSchema | Return structure and sensors with ExperimentSchema
| JavaScript | mit | brennon/eim,brennon/eim,brennon/eim,brennon/eim | ---
+++
@@ -12,6 +12,8 @@
* ExperimentSchema Schema
*/
var ExperimentSchemaSchema = new Schema({
+ structure: {},
+ sensors: [String],
trialCount: {
type: Number,
required: true
@@ -37,10 +39,17 @@
var selectedMedia = _.sample(this.mediaPool, this.trialCount);
+ var schemaSubset = {
+ _i... |
23223ca4b00a8cab8c2afe164fa86d45e8bc5bcf | src/common/components/GroupItem.js | src/common/components/GroupItem.js | import { List } from 'material-ui/List';
import React from 'react';
import { Link } from 'react-router';
import MemberItem from './MemberItem';
export default class GroupItem extends React.Component {
static propTypes = {
id: React.PropTypes.string,
isAdmin: React.PropTypes.bool,
isMember:... | import { List } from 'material-ui/List';
import Subheader from 'material-ui/Subheader';
import React from 'react';
import { Link } from 'react-router';
import MemberItem from './MemberItem';
export default class GroupItem extends React.Component {
static propTypes = {
id: React.PropTypes.string,
i... | Use subheaders in member list | Use subheaders in member list
| JavaScript | agpl-3.0 | strekmann/nidarholmjs,strekmann/nidarholmjs,strekmann/nidarholmjs,strekmann/nidarholmjs | ---
+++
@@ -1,4 +1,5 @@
import { List } from 'material-ui/List';
+import Subheader from 'material-ui/Subheader';
import React from 'react';
import { Link } from 'react-router';
@@ -15,9 +16,9 @@
renderHeader() {
if (this.props.isAdmin) {
- return <h2><Link to={`/group/${this.props.id}`... |
976953f7392ac8d42105fc43a98be05dbd29d37d | src/components/MainHeader/index.js | src/components/MainHeader/index.js | import MainHeader from './MainHeader'
import Logo from './Logo'
import LogoText from './LogoText'
import Navbar from './Navbar'
import NavbarMenu from './NavbarMenu'
import SidebarToggle from './SidebarToggle'
import ControlSidebarToggle from './ControlSidebarToggle'
import Messages from './Messages'
import MessageItem... | import MainHeader from './MainHeader'
import Logo from './Logo'
import LogoText from './LogoText'
import Navbar from './Navbar'
import NavbarMenu from './NavbarMenu'
import SidebarToggle from './SidebarToggle'
import ControlSidebarToggle from './ControlSidebarToggle'
import Messages from './Messages'
import MessageItem... | Change way of exports MainHeader Components | Change way of exports MainHeader Components
For: https://github.com/falmar/react-adm-lte/issues/2
| JavaScript | mit | falmar/react-adm-lte | ---
+++
@@ -18,24 +18,24 @@
import UserFooter from './UserFooter'
import UserFooterItem from './UserFooterItem'
-export default {
- MainHeader,
- Logo,
- LogoText,
- Navbar,
- NavbarMenu,
- SidebarToggle,
- ControlSidebarToggle,
- Messages,
- MessageItem,
- Notifications,
- NotificationItem,
- Tasks,
... |
79e420facbf85e450abe75e73ab50966d3a0d8fd | app/assets/javascripts/whitehall.js | app/assets/javascripts/whitehall.js | jQuery(document).ready(function($) {
$(".flash.notice, .flash.alert").flashNotice();
// This is useful for toggling CSS helpers
// whilst developing.. cmd+G
var cmdDown = false;
$('body').keydown(function(event) {
if (event.keyCode == '91') {
cmdDown = true;
}
if (cmdDown && event.keyCode =... | jQuery(document).ready(function($) {
$(".flash.notice, .flash.alert").flashNotice();
// This is useful for toggling CSS helpers
// whilst developing.. cmd+G
var cmdDown = false;
$('body').keydown(function(event) {
if (event.keyCode == '91') {
cmdDown = true;
}
if (cmdDown && event.keyCode =... | Allow de-select on single selects with a blank option. | Allow de-select on single selects with a blank option.
| JavaScript | mit | ggoral/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,alphagov/whitehall,alphagov/whitehall,askl56/whitehall,ggoral/whitehall,ggoral/whitehall,askl56/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,robinwhittleton/whitehall,alphagov/whitehall,alphagov/whiteh... | ---
+++
@@ -18,7 +18,7 @@
}
});
- $(".chzn-select").chosen();
+ $(".chzn-select").chosen({allow_single_deselect: true});
$("#completed_fact_check_requests").markLinkedAnchor();
|
1de53839f2cd6677b4851328727c79268ebaa278 | app/feeds/new/add-operator/route.js | app/feeds/new/add-operator/route.js | import Ember from 'ember';
export default Ember.Route.extend({
createFeedFromGtfsService: Ember.inject.service('create-feed-from-gtfs'),
beforeModel: function(transition) {
var controller = this;
var feedModel = this.get('createFeedFromGtfsService').feedModel;
var url = feedModel.get('url');
var ad... | import Ember from 'ember';
export default Ember.Route.extend({
createFeedFromGtfsService: Ember.inject.service('create-feed-from-gtfs'),
beforeModel: function(transition) {
var controller = this;
var feedModel = this.get('createFeedFromGtfsService').feedModel;
var url = feedModel.get('url');
var ad... | Allow additional response states (queued, downloading, processing) | Allow additional response states (queued, downloading, processing)
| JavaScript | mit | transitland/feed-registry,transitland/feed-registry | ---
+++
@@ -15,7 +15,7 @@
feedModel.set('operators_in_feed', response.feed.operators_in_feed);
response.operators.map(function(operator){feedModel.addOperator(operator)});
return feedModel;
- } else if (response.status == 'processing') {
+ } else {
transition.abort();
... |
f243ee0236cc8899c1286e853603777a3940c2c3 | blueprints/ember-cli-paint/index.js | blueprints/ember-cli-paint/index.js | 'use strict';
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addPackagesToProject([
{ name: 'liquid-fire', target: '0.15.0' }
]).then(function() {
return this.addBowerPackagesToProject([
{ name: 'paint', target: '0.6.10' },
{ name:... | 'use strict';
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addPackagesToProject([
{ name: 'liquid-fire', target: '0.17.1' },
{ name: 'ember-rl-dropdown', target: 'git+https://git@github.com/alphasights/ember-rl-dropdown.git' },
{ name: 'ember-... | Add rl-dropdown and tooltipster addons to afterInstall hook | Add rl-dropdown and tooltipster addons to afterInstall hook
| JavaScript | mit | alphasights/ember-cli-paint,alphasights/ember-cli-paint | ---
+++
@@ -5,7 +5,9 @@
afterInstall: function() {
return this.addPackagesToProject([
- { name: 'liquid-fire', target: '0.15.0' }
+ { name: 'liquid-fire', target: '0.17.1' },
+ { name: 'ember-rl-dropdown', target: 'git+https://git@github.com/alphasights/ember-rl-dropdown.git' },
+ { name... |
88a1f0ad4fe017951e6ee12d2ffd06b9faa63852 | src/core/texture.js | src/core/texture.js | let gpu = null;
module.exports = class Texture {
/**
* @desc WebGl Texture implementation in JS
* @constructor Texture
* @param {Object} texture
* @param {Array} size
* @param {Array} dimensions
* @param {Object} webGl
*/
constructor(texture, size, dimensions, webGl) {
this.texture = texture;
... | let gpu = null;
module.exports = class Texture {
/**
* @desc WebGl Texture implementation in JS
* @constructor Texture
* @param {Object} texture
* @param {Array} size
* @param {Array} dimensions
* @param {Object} webGl
*/
constructor(texture, size, dimensions, webGl) {
this.texture = texture;
... | Throw error if GPU object not passed | Throw error if GPU object not passed
| JavaScript | mit | abhisheksoni27/gpu.js,gpujs/gpu.js,gpujs/gpu.js | ---
+++
@@ -28,6 +28,7 @@
*
*/
toArray(gpu) {
+ if(!gpu) throw new Error('You need to pass the GPU object for toArray to work.');
const copy = gpu.createKernel(function(x) {
return x[this.thread.z][this.thread.y][this.thread.x];
}).setDimensions(this.dimensions); |
1007897ded24181fe74d7ee6e11c101afbd68bca | redux/main.js | redux/main.js | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
// import {createStore} from 'redux';
// ReactDOM.render(<App />, document.getElementById('app'));
const counter = (state = 0, action) => {
switch(action.type) {
case 'INCREMENT':
return state + 1;
case 'DECREMENT':
... | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
// import {createStore} from 'redux';
// ReactDOM.render(<App />, document.getElementById('app'));
const counter = (state = 0, action) => {
switch(action.type) {
case 'INCREMENT':
return state + 1;
case 'DECREMENT':
... | Create our own createStore and fix typo | Redux: Create our own createStore and fix typo
| JavaScript | mit | gongmingqm10/EggHead,gongmingqm10/EggHead,gongmingqm10/EggHead,gongmingqm10/EggHead | ---
+++
@@ -22,7 +22,7 @@
const getState = () => state;
- const = (action) => {
+ const dispatch = (action) => {
state = render(state, action);
listeners.forEach(listener => listener());
}; |
553838d49c22388ce2d7bffcfe5647c7ffb8c702 | modes/fast.js | modes/fast.js | var VML = require('./vml');
var Canvas = require('./canvas');
//var Flash = require('./flash');
var hasCanvas = function(){
var canvas = document.createElement('canvas');
return canvas && !!canvas.getContext;
};
/*
var hasFlash = function(){
var flash = navigator.plugins && navigator.plugins['Shockwave Flash'];... | var VML = require('./vml');
var Canvas = require('./canvas');
var Base = require('./canvas/base');
//var Flash = require('./flash');
/*
var hasFlash = function(){
var flash = navigator.plugins && navigator.plugins['Shockwave Flash'];
try {
flash = flash ? flash.description :
new ActiveXObject('ShockwaveFlash.S... | Use an existing check for canvas capabilities | Use an existing check for canvas capabilities
This results in better compatability with jsdom, allows usage in newer
Jest.
| JavaScript | mit | sebmarkbage/art,sebmarkbage/art | ---
+++
@@ -1,13 +1,7 @@
var VML = require('./vml');
var Canvas = require('./canvas');
+var Base = require('./canvas/base');
//var Flash = require('./flash');
-
-var hasCanvas = function(){
-
- var canvas = document.createElement('canvas');
- return canvas && !!canvas.getContext;
-
-};
/*
var hasFlash = functi... |
b9b4fe4916b07ddffbdb05f781dc5ba3a32812a3 | test/karma.conf.js | test/karma.conf.js | module.exports = function(config){
config.set({
basePath : '../',
files : [
'app/bower_components/angular/angular.js',
'app/bower_components/angular-route/angular-route.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'app/js/**/*.js',
'test/unit/**/*.js'
],
... | module.exports = function(config){
config.set({
basePath : '../',
files : [
'app/bower_components/angular/angular.js',
'app/bower_components/angular-route/angular-route.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'app/js/**/*.js',
'test/unit/**/*.js'
],
... | Set defaults for karma server | Set defaults for karma server
| JavaScript | mit | double16/switchmin-ng,double16/switchmin-ng | ---
+++
@@ -16,8 +16,8 @@
frameworks: ['jasmine'],
browsers : ['PhantomJS'],
- hostname: process.env.IP,
- port: process.env.PORT,
+ hostname: process.env.IP || 'localhost',
+ port: process.env.PORT || '9876',
plugins : [
'karma-chrome-launcher', |
b8acc48fd3764fad74b9a53a9eb5ab91522a4eb0 | packages/@angular/cli/blueprints/ng/files/__path__/app/app.component.ts | packages/@angular/cli/blueprints/ng/files/__path__/app/app.component.ts | import { Component } from '@angular/core';
@Component({
selector: '<%= prefix %>-root',<% if (inlineTemplate) { %>
template: `
<h1>
{{title}}
</h1><% if (routing) { %>
<router-outlet></router-outlet><% } %>
`,<% } else { %>
templateUrl: './app.component.html',<% } %><% if (inlineStyle) { %>
... | import { Component } from '@angular/core';
@Component({
selector: '<%= prefix %>-root',<% if (inlineTemplate) { %>
template: `
<h1>
Welcome to {{title}}!!
</h1><% if (routing) { %>
<router-outlet></router-outlet><% } %>
`,<% } else { %>
templateUrl: './app.component.html',<% } %><% if (inline... | Make generated inline template conform to test case | fix(@angular/cli): Make generated inline template conform to test case
The generated app component spec checks for the string "Welcome to {{title}}!!", which is only output by the generated `app.component.htm`l file, not the generated inline template in `app.component.ts` when the `--inline-template` option is passed ... | TypeScript | mit | geofffilippi/angular-cli,pedroapy/angular-cli,beeman/angular-cli,catull/angular-cli,garoyeri/angular-cli,catull/angular-cli,beeman/angular-cli,maxime1992/angular-cli,beeman/angular-cli,hansl/angular-cli,manekinekko/angular-cli,garoyeri/angular-cli,nwronski/angular-cli,DevIntent/angular-cli,angular/angular-cli,angular/a... | ---
+++
@@ -4,7 +4,7 @@
selector: '<%= prefix %>-root',<% if (inlineTemplate) { %>
template: `
<h1>
- {{title}}
+ Welcome to {{title}}!!
</h1><% if (routing) { %>
<router-outlet></router-outlet><% } %>
`,<% } else { %> |
bd0b09e0c24d7ec00f4181661c1644ebc5891d82 | src/app/router.animations.ts | src/app/router.animations.ts | /**
* Code is from https://medium.com/google-developer-experts/
* angular-supercharge-your-router-transitions-using-new-animation-features-v4-3-3eb341ede6c8
*/
import {
sequence,
trigger,
stagger,
animate,
style,
group,
query,
transition,
keyframes,
animateChild } from '@angular/animations';
exp... | /**
* Code is from https://medium.com/google-developer-experts/
* angular-supercharge-your-router-transitions-using-new-animation-features-v4-3-3eb341ede6c8
*/
import {
sequence,
trigger,
stagger,
animate,
style,
group,
query,
transition,
keyframes,
animateChild } from '@angular/animations';
exp... | Change transition default animation from slide to fade | Change transition default animation from slide to fade
| TypeScript | mit | sebastienbarbier/sebastienbarbier.com,sebastienbarbier/sebastienbarbier.com,sebastienbarbier/sebastienbarbier.com,sebastienbarbier/sebastienbarbier.com | ---
+++
@@ -17,19 +17,19 @@
export const routerTransition = trigger('routerTransition', [
transition('* => *', [
query(':enter, :leave', style({ position: 'fixed', width: '100%' }), {optional: true}),
- query(':enter', style({ transform: 'translateX(100%)' }), {optional: true}),
+ query(':enter', style... |
9fcd52394dd4478df3506c49587aedf646403fbd | static/js/common.ts | static/js/common.ts | /// <reference path="./typings/index.d.ts"/>
requirejs.config({
"baseUrl": "/js/",
"paths": {
"bootstrap": "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min",
"chartjs": "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.6/Chart.min",
"es6-shim": "https:... | /// <reference path="./typings/index.d.ts"/>
requirejs.config({
"baseUrl": "/js/",
"paths": {
"bootstrap": "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min",
"chartjs": "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.6/Chart.min",
"es6-shim": "https:... | Add kute, kute-jquery, and kute-svg | Add kute, kute-jquery, and kute-svg
| TypeScript | mit | crossroads-education/eta-front,crossroads-education/eta-front | ---
+++
@@ -10,6 +10,9 @@
"jquery-bez": "https://cdn.jsdelivr.net/jquery.bez/1.0.11/jquery.bez.min",
"jquery-noisy": "https://cdnjs.cloudflare.com/ajax/libs/noisy/1.2/jquery.noisy.min",
"jquery-ui": "https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min",
+ "kute": "ht... |
a75469eeb366388ed114e796992686685e9d67e3 | src/app/header/header.component.ts | src/app/header/header.component.ts | import { Component, EventEmitter, Output, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class HeaderComponent {
@Output() navToggled = new EventEmi... | import { Component, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class HeaderComponent {
@Output() navToggled = new EventEmi... | Change order of imports in header class for better logical ordering. | Change order of imports in header class for better logical ordering.
| TypeScript | mit | auth0-blog/ng2-dinos,auth0-blog/ng2-dinos,kmaida/ng2-dinos,kmaida/ng2-dinos,kmaida/ng2-dinos,auth0-blog/ng2-dinos | ---
+++
@@ -1,4 +1,4 @@
-import { Component, EventEmitter, Output, ViewEncapsulation } from '@angular/core';
+import { Component, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'app-header', |
3c0c8e9afbe0a8c3e4615a1540d3365ffb554ea5 | appsrc/reducers/system.ts | appsrc/reducers/system.ts |
import os from "../util/os";
import {app} from "../electron";
import {handleActions} from "redux-actions";
import {
IAction,
ILanguageSniffedPayload,
IFreeSpaceUpdatedPayload,
} from "../constants/action-types";
import {ISystemState} from "../types";
const initialState = {
appVersion: app.getVersion(),
os... |
import os from "../util/os";
import {app} from "../electron";
import {handleActions} from "redux-actions";
import {
IAction,
ILanguageSniffedPayload,
IFreeSpaceUpdatedPayload,
} from "../constants/action-types";
import {ISystemState} from "../types";
const initialState = {
appVersion: app.getVersion(),
os... | Fix sniffed language reducer (need object rest spread real bad..) | :bug: Fix sniffed language reducer (need object rest spread real bad..)
| TypeScript | mit | itchio/itch,itchio/itchio-app,itchio/itch,leafo/itchio-app,itchio/itch,leafo/itchio-app,itchio/itch,itchio/itchio-app,itchio/itch,itchio/itchio-app,leafo/itchio-app,itchio/itch | ---
+++
@@ -31,7 +31,7 @@
export default handleActions<ISystemState, any>({
LANGUAGE_SNIFFED: (state: ISystemState, action: IAction<ILanguageSniffedPayload>) => {
- const sniffedLanguage = action.payload;
+ const sniffedLanguage: string = action.payload.lang;
return Object.assign({}, state, {sniffedL... |
95fc6bf1d3e0713db8cde9ea82028e87a4cc73a2 | src/dockerValidatorSettings.ts | src/dockerValidatorSettings.ts | import { ValidationSeverity } from './dockerValidator';
export interface ValidatorSettings {
deprecatedMaintainer?: ValidationSeverity;
directiveCasing?: ValidationSeverity;
instructionCasing?: ValidationSeverity;
} | /* --------------------------------------------------------------------------------------------
* Copyright (c) Remy Suen. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ----------------------------------------------------------------------------... | Add a missing license header | Add a missing license header
Signed-off-by: Remy Suen <553f7e7fc51e9ff47ae89d5a0ebd06651241b998@gmail.com>
| TypeScript | mit | rcjsuen/dockerfile-language-server-nodejs,rcjsuen/dockerfile-language-server-nodejs | ---
+++
@@ -1,3 +1,7 @@
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Remy Suen. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ----------------------------------------------... |
7290d82d052af5187c3d7accd423da74804e63ee | index.d.ts | index.d.ts | declare const _fetch: typeof fetch;
declare module 'fetch-retry' {
type RequestDelayFunction = ((
attempt: number,
error: Error | null,
response: Response | null
) => number);
type RequestRetryOnFunction = ((
attempt: number,
error: Error | null,
response: Response | null
) => boolean)... | declare const _fetch: typeof fetch;
declare module 'fetch-retry' {
type RequestDelayFunction = ((
attempt: number,
error: Error | null,
response: Response | null
) => number);
type RequestRetryOnFunction = ((
attempt: number,
error: Error | null,
response: Response | null
) => boolean)... | Fix type by removing unnecessary type | Fix type by removing unnecessary type
| TypeScript | mit | jonbern/fetch-retry,jonbern/fetch-retry | ---
+++
@@ -19,6 +19,6 @@
retryOn?: number[] | RequestRetryOnFunction;
}
- function fetchBuilder(fetch: typeof _fetch): ((input: RequestInfo, options?: IRequestInitWithRetry | undefined) => Promise<Response>);
+ function fetchBuilder(fetch: typeof _fetch): ((input: RequestInfo, init?: IRequestInitWithRetr... |
f72634441cde10626729ecbc6e93ebaa77c10af3 | src/api/index.ts | src/api/index.ts | import { Controller, Get } from 'routing-controllers';
@Controller()
export default class IndexController {
@Get('/health')
public health() {
return { status: 'OK' };
}
}
| import { Controller, Get } from 'routing-controllers';
@Controller()
export default class IndexController {
@Get('/health')
public health() {
return { status: 'OK' };
}
// Loader.io only
@Get('/loaderio-deb75e3581d893735fd6e5050757bdb2')
public loaderio() {
return true;
}
}
| Add Loader IO route verification | Add Loader IO route verification
| TypeScript | mit | rafaell-lycan/sabesp-mananciais-api,rafaell-lycan/sabesp-mananciais-api | ---
+++
@@ -6,4 +6,10 @@
public health() {
return { status: 'OK' };
}
+
+ // Loader.io only
+ @Get('/loaderio-deb75e3581d893735fd6e5050757bdb2')
+ public loaderio() {
+ return true;
+ }
} |
60d39ef5769e0b07de918dc958e38d557855c2b1 | src/app/cardsView/services/base-card.service.ts | src/app/cardsView/services/base-card.service.ts | /**
* Created by wiekonek on 13.12.16.
*/
import {Http, RequestOptions, URLSearchParams} from "@angular/http";
import {Observable} from "rxjs";
import {AppAuthenticationService} from "../../app-authentication.service";
import {PaginateResponse} from "./paginate-response";
import {Card} from "../../card/card";
export... | /**
* Created by wiekonek on 13.12.16.
*/
import {Http, RequestOptions, URLSearchParams} from "@angular/http";
import {Observable} from "rxjs";
import {AppAuthenticationService} from "../../app-authentication.service";
import {PaginateResponse} from "./paginate-response";
import {Card} from "../../card/card";
export... | Create new instance of UrlSearchParams in base _get method. | Create new instance of UrlSearchParams in base _get method.
| TypeScript | mit | JiraGoggles/jiragoggles-frontend,JiraGoggles/jiragoggles-frontend,JiraGoggles/jiragoggles-frontend,JiraGoggles/jiragoggles-frontend | ---
+++
@@ -12,7 +12,8 @@
constructor(protected http: Http, protected pluginAuth: AppAuthenticationService) {}
protected _get<T>(path: string, params?: URLSearchParams): Observable<T> {
- let req = new RequestOptions({search: this.pluginAuth.RequestOptionsWithPluginAuthentication.search});
+ let req = new... |
f2eecc84dc64051ecf78ebc2395b4e652c1ece2e | src/configuration/registered-type-definition.ts | src/configuration/registered-type-definition.ts | import {remove, includedIn, flow, map, forEach, cond, identity, isNot, empty} from 'tsfun';
/**
* TypeDefinition, as used in TypeRegistry
*
* @author Daniel de Oliveira
*/
export interface RegisteredTypeDefinition {
color?: string,
parent: string,
extends?: string;
description: {[language: string]... | import {remove, includedIn, flow, map, forEach, cond, identity, isNot, empty} from 'tsfun';
/**
* TypeDefinition, as used in TypeRegistry
*
* @author Daniel de Oliveira
*/
export interface RegisteredTypeDefinition {
color?: string,
parent: string,
extends?: string;
description: {[language: string]... | Add allowed field name positionValues | Add allowed field name positionValues
| TypeScript | apache-2.0 | dainst/idai-components-2,dainst/idai-components-2,dainst/idai-components-2 | ---
+++
@@ -22,6 +22,7 @@
valuelistId?: string;
inputType?: string;
+ positionValues?: string; // TODO review
}
@@ -41,7 +42,7 @@
type.fields,
Object.values,
map(Object.keys),
- map(remove(includedIn(['valuelistId', 'inputType']))),
+ ma... |
0d4b857999f676ffea9f8de29b10d7a6ecb72a62 | packages/internal-test-helpers/lib/ember-dev/run-loop.ts | packages/internal-test-helpers/lib/ember-dev/run-loop.ts | // @ts-ignore
import { cancelTimers, end, getCurrentRunLoop, hasScheduledTimers } from '@ember/runloop';
export function setupRunLoopCheck(hooks: NestedHooks) {
hooks.afterEach(function() {
let { assert } = QUnit.config.current;
if (getCurrentRunLoop()) {
assert.ok(false, 'Should not be in a run loop ... | // @ts-ignore
import { cancelTimers, end, getCurrentRunLoop, hasScheduledTimers } from '@ember/runloop';
export function setupRunLoopCheck(hooks: NestedHooks) {
hooks.afterEach(function(assert) {
if (getCurrentRunLoop() || hasScheduledTimers()) {
let done = assert.async();
// use a setTimeout to allo... | Allow runloop to settle via autorun in tests. | Allow runloop to settle via autorun in tests.
| TypeScript | mit | sly7-7/ember.js,GavinJoyce/ember.js,givanse/ember.js,kellyselden/ember.js,sandstrom/ember.js,emberjs/ember.js,miguelcobain/ember.js,sandstrom/ember.js,mixonic/ember.js,mfeckie/ember.js,sly7-7/ember.js,knownasilya/ember.js,givanse/ember.js,intercom/ember.js,cibernox/ember.js,intercom/ember.js,cibernox/ember.js,miguelcob... | ---
+++
@@ -2,19 +2,31 @@
import { cancelTimers, end, getCurrentRunLoop, hasScheduledTimers } from '@ember/runloop';
export function setupRunLoopCheck(hooks: NestedHooks) {
- hooks.afterEach(function() {
- let { assert } = QUnit.config.current;
+ hooks.afterEach(function(assert) {
+ if (getCurrentRunLoop(... |
528b8a735468c25190ff74cb575d2db78091ce30 | app/upload/upload.component.ts | app/upload/upload.component.ts | import { Component } from 'angular2/core';
import { UploadFileSelect } from './upload-file-select.directive';
import { UploadService } from './upload.service';
import { MimeTypeService } from '../../util/mime-type.service';
import { HTTP_PROVIDERS } from 'angular2/http';
@Component({
template: '<input type="file" up... | import {Component} from 'angular2/core';
import {UploadFileSelect} from './upload-file-select.directive';
import {UploadService} from './upload.service';
import {MimeTypeService} from '../../util/mime-type.service';
import {HTTP_PROVIDERS} from 'angular2/http';
import {FileUpload} from './file-upload.component';
@Comp... | Reformat imports, inject service, add fileUpload directive | Reformat imports, inject service, add fileUpload directive
| TypeScript | agpl-3.0 | PRX/publish.prx.org,PRX/publish.prx.org,PRX/publish.prx.org,PRX/publish.prx.org | ---
+++
@@ -1,13 +1,20 @@
-import { Component } from 'angular2/core';
-import { UploadFileSelect } from './upload-file-select.directive';
-import { UploadService } from './upload.service';
-import { MimeTypeService } from '../../util/mime-type.service';
-import { HTTP_PROVIDERS } from 'angular2/http';
+import {Compon... |
5b4981f2339665a01c37826b7aab80757422f0ed | lib/msal-angular/src/msal.redirect.component.ts | lib/msal-angular/src/msal.redirect.component.ts | /*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* This is a dedicated redirect component to be added to Angular apps to
* handle redirects when using @azure/msal-angular.
* Import this component to use redirects in your app.
*/
import { Component, OnInit... | /*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* This is a dedicated redirect component to be added to Angular apps to
* handle redirects when using @azure/msal-angular.
* Import this component to use redirects in your app.
*/
import { Component, OnInit... | Add log message to MsalRedirectComponent | Add log message to MsalRedirectComponent
| TypeScript | mit | AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication... | ---
+++
@@ -21,6 +21,7 @@
constructor(private authService: MsalService) { }
ngOnInit(): void {
+ this.authService.getLogger().verbose("MsalRedirectComponent activated");
this.authService.handleRedirectObservable().subscribe();
}
|
d3f6b0e980acfbf6dc6d016a466e19c88cfdf33d | src/tasks/daily_verses.ts | src/tasks/daily_verses.ts | import { Client, TextChannel } from 'discord.js';
import * as cron from 'node-cron';
import * as moment from 'moment';
import 'moment-timezone';
import GuildPreference from '../models/guild_preference';
import { DailyVerseRouter } from '../routes/resources/daily_verse';
import Context from '../models/context';
import ... | import { Client, TextChannel } from 'discord.js';
import * as cron from 'node-cron';
import * as moment from 'moment';
import 'moment-timezone';
import GuildPreference from '../models/guild_preference';
import { DailyVerseRouter } from '../routes/resources/daily_verse';
import Context from '../models/context';
import ... | Fix a bug where preferences weren't accessible for automatic daily verses. | Fix a bug where preferences weren't accessible for automatic daily verses.
| TypeScript | mpl-2.0 | BibleBot/BibleBot,BibleBot/BibleBot,BibleBot/BibleBot | ---
+++
@@ -22,7 +22,8 @@
try {
bot.guilds.fetch(guildPref.guild).then((guild) => {
const chan = guild.channels.resolve(guildPref.dailyVerseChannel);
- const ctx = new Context('auto', bot, (chan as TextChannel), guil... |
d13cbba50f9c1f043e003a1988b0d4458b268a81 | components/model/model.ts | components/model/model.ts | import { ModelFactory } from './model-service';
export { Model } from './model-service';
export const ModelModule = angular.module( 'gj.Model', [] )
.factory( 'Model', ModelFactory )
.name
;
| import { ModelFactory } from './model-service';
export { Model } from './model-service';
export default angular.module( 'gj.Model', [] )
.factory( 'Model', ModelFactory )
.name
;
| Update Model to not export a const module. | Update Model to not export a const module.
| TypeScript | mit | gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib | ---
+++
@@ -1,7 +1,7 @@
import { ModelFactory } from './model-service';
export { Model } from './model-service';
-export const ModelModule = angular.module( 'gj.Model', [] )
+export default angular.module( 'gj.Model', [] )
.factory( 'Model', ModelFactory )
.name
; |
2ed692e8701bc3365096fe8afc89d43fbb65b3f7 | packages/web-client/app/routes/card-pay/base.ts | packages/web-client/app/routes/card-pay/base.ts | import Route from '@ember/routing/route';
import '../../css/card-pay/balances.css';
import * as short from 'short-uuid';
export default class CardPayTabBaseRoute extends Route {
queryParams = {
flow: {
refreshModel: true,
},
workflowPersistenceId: {
refreshModel: true,
},
};
model(par... | import Route from '@ember/routing/route';
import '../../css/card-pay/balances.css';
import * as short from 'short-uuid';
export default class CardPayTabBaseRoute extends Route {
queryParams = {
flow: {
refreshModel: true,
},
workflowPersistenceId: {
refreshModel: true,
},
};
model(par... | Update guard since create-merchant flow has persistence now | Update guard since create-merchant flow has persistence now
| TypeScript | mit | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | ---
+++
@@ -14,7 +14,11 @@
model(params: any, transition: any) {
if (params.flow && !params.workflowPersistenceId) {
// TODO: remove me once all flows have persistence support
- if (params.flow !== 'deposit' && params.flow !== 'issue-prepaid-card')
+ if (
+ params.flow !== 'deposit' &&... |
ed03f81c35a126d95690fac6c7bcde6f8b0a1bd2 | index.d.ts | index.d.ts | import * as tinymce from 'tinymce';
declare module 'tinymce' {
export interface Settings extends tinymce.Settings {
[key: string]: any,
}
export function init(settings: Settings): Promise<tinymce.Editor[]>;
export const shopifyConfig: Settings;
}
export * from 'tinymce';
| import * as tinymce from 'tinymce';
declare module 'tinymce' {
export interface ShopifySettings extends tinymce.Settings {
[key: string]: any,
}
export function init(settings: ShopifySettings): Promise<tinymce.Editor[]>;
export const shopifyConfig: ShopifySettings;
}
export * from 'tinymce';
| Fix the issue where Settings recursively references itself as a base type | Fix the issue where Settings recursively references itself as a base type
| TypeScript | lgpl-2.1 | Shopify/tinymce | ---
+++
@@ -1,13 +1,13 @@
import * as tinymce from 'tinymce';
declare module 'tinymce' {
- export interface Settings extends tinymce.Settings {
+ export interface ShopifySettings extends tinymce.Settings {
[key: string]: any,
}
- export function init(settings: Settings): Promise<tinymce.Editor[]>;
+ ... |
8d3c2715db74cae24bff16ff9a068b0af8d194f3 | packages/@orbit/integration-tests/test/support/jsonapi.ts | packages/@orbit/integration-tests/test/support/jsonapi.ts | import { Orbit } from '@orbit/core';
export function jsonapiResponse(
_options: any,
body?: any,
timeout?: number
): Promise<Response> {
let options: any;
let response: Response;
if (typeof _options === 'number') {
options = { status: _options };
} else {
options = _options || {};
}
options.... | import { Orbit } from '@orbit/core';
export function jsonapiResponse(
_options: unknown,
body?: unknown,
timeout?: number
): Promise<Response> {
let options: any;
let response: Response;
if (typeof _options === 'number') {
options = { status: _options };
} else {
options = _options || {};
}
... | Fix typing / linting issues in @orbit/integration-tests | Fix typing / linting issues in @orbit/integration-tests
| TypeScript | mit | orbitjs/orbit.js,orbitjs/orbit.js | ---
+++
@@ -1,8 +1,8 @@
import { Orbit } from '@orbit/core';
export function jsonapiResponse(
- _options: any,
- body?: any,
+ _options: unknown,
+ body?: unknown,
timeout?: number
): Promise<Response> {
let options: any;
@@ -38,7 +38,7 @@
}
}
-function statusText(code: number): string {
+functio... |
2f1f9f0513a3d7206d71f478a1671be31eb5099b | packages/@glimmer/manager/lib/internal/defaults.ts | packages/@glimmer/manager/lib/internal/defaults.ts | import { buildCapabilities } from '../util/capabilities';
import type { CapturedArguments as Arguments, HelperCapabilities } from '@glimmer/interfaces';
type FnArgs<Args extends Arguments = Arguments> =
| [...Args['positional'], Args['named']]
| [...Args['positional']];
type AnyFunction = (...args: any[]) => unk... | import { buildCapabilities } from '../util/capabilities';
import type {
CapturedArguments as Arguments,
HelperCapabilities,
HelperManagerWithValue,
} from '@glimmer/interfaces';
type FnArgs<Args extends Arguments = Arguments> =
| [...Args['positional'], Args['named']]
| [...Args['positional']];
type AnyFun... | Add explicit return types, planning for a lint to enforce this later | Add explicit return types, planning for a lint to enforce this later
| TypeScript | mit | glimmerjs/glimmer-vm,glimmerjs/glimmer-vm,tildeio/glimmer,tildeio/glimmer,glimmerjs/glimmer-vm,tildeio/glimmer | ---
+++
@@ -1,6 +1,10 @@
import { buildCapabilities } from '../util/capabilities';
-import type { CapturedArguments as Arguments, HelperCapabilities } from '@glimmer/interfaces';
+import type {
+ CapturedArguments as Arguments,
+ HelperCapabilities,
+ HelperManagerWithValue,
+} from '@glimmer/interfaces';
ty... |
365a9ecd1a15977ac66ecd9ca6c35529ba7cff5d | web/resources/js/tab-anchor.ts | web/resources/js/tab-anchor.ts | // Show appropriate pill based on #anchor in URL
import {Tab} from 'bootstrap';
function navigateToAnchorTab() {
const hash = window.location.hash;
if (hash) {
const element: Element | null = document.querySelector(`ul.nav a[href="${hash}"]`);
if (element === null) return;
new Tab(elem... | // Show appropriate pill based on #anchor in URL
import {Tab} from 'bootstrap';
function navigateToAnchorTab() {
const hash = window.location.hash;
if (hash) {
const element: Element | null = document.querySelector(`ul.nav a[href="${hash}"]`);
if (element === null) return;
new Tab(elem... | Add helpful comment to event listener | Add helpful comment to event listener
| TypeScript | apache-2.0 | agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft | ---
+++
@@ -24,6 +24,8 @@
navigateToAnchorTab();
for (const el of document.querySelectorAll<HTMLAnchorElement>('.nav-tabs a')) {
+ // `new Tab(element)` already implicitly happens due to the respective
+ // `data-` attributes being present
el.addEventListener('click', updateLocation... |
1bc4fca216d199ab42855f6f4ef6991bad4dafdf | core/store/modules/checkout/types/CheckoutState.ts | core/store/modules/checkout/types/CheckoutState.ts | export default interface CategoryState {
order: any,
personalDetails: {
firstName: string,
lastName: string,
emailAddress: string,
password: string,
createAccount: boolean
},
shippingDetails: {
firstName: string,
lastName: string,
country: string,
streetAddress: string,
a... | export default interface CheckoutState {
order: any,
personalDetails: {
firstName: string,
lastName: string,
emailAddress: string,
password: string,
createAccount: boolean
},
shippingDetails: {
firstName: string,
lastName: string,
country: string,
streetAddress: string,
a... | Fix checkout export state name. | Fix checkout export state name.
| TypeScript | mit | pkarw/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront | ---
+++
@@ -1,4 +1,4 @@
-export default interface CategoryState {
+export default interface CheckoutState {
order: any,
personalDetails: {
firstName: string, |
e3f41705f5ed9aad93c9f0aec2d03af56c2a78da | app/src/app/locales/locales-list/locales-list.component.ts | app/src/app/locales/locales-list/locales-list.component.ts | import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { LocalesService } from './../services/locales.service';
@Component({
selector: 'locales-list',
templateUrl: './locales-list.component.html'
})
export class LocalesListComponent implements OnInit {
... | import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { LocalesService } from './../services/locales.service';
@Component({
selector: 'locales-list',
templateUrl: './locales-list.component.html'
})
export class LocalesListComponent implements OnInit {
... | Fix locales list not subscribed | Fix locales list not subscribed
| TypeScript | mit | anthonynsimon/parrot,anthonynsimon/parrot,anthonynsimon/parrot,anthonynsimon/parrot,todes1/parrot,todes1/parrot,todes1/parrot,todes1/parrot,todes1/parrot,todes1/parrot,anthonynsimon/parrot,anthonynsimon/parrot | ---
+++
@@ -14,6 +14,10 @@
constructor(private localesService: LocalesService, private router: ActivatedRoute) { }
ngOnInit() {
+ this.localesService.locales.subscribe(
+ locales => { this.locales = locales }
+ );
+
this.router.params
.map(params => params['p... |
8a80de30174351df3ce8e6d0ce8657a2694eb0f1 | packages/common/exceptions/http.exception.ts | packages/common/exceptions/http.exception.ts | export class HttpException extends Error {
public readonly message: any;
/**
* Base Nest application exception, which is handled by the default Exceptions Handler.
* If you throw an exception from your HTTP route handlers, Nest will map them to the appropriate HTTP response and send to the client.
*
* ... | export class HttpException extends Error {
public readonly message: any;
/**
* Base Nest application exception, which is handled by the default Exceptions Handler.
* If you throw an exception from your HTTP route handlers, Nest will map them to the appropriate HTTP response and send to the client.
*
* ... | Add typing target for getErrorString | Add typing target for getErrorString | TypeScript | mit | kamilmysliwiec/nest,kamilmysliwiec/nest | ---
+++
@@ -31,7 +31,7 @@
return this.status;
}
- private getErrorString(target) {
+ private getErrorString(target: string | object) {
if (typeof target === 'string') {
return target;
} |
4e7f67c48475148fdb4ae20aefbe83f895739ee4 | src/actions/connectAccount.ts | src/actions/connectAccount.ts | import { CONNECT_ACCOUNT_REQUEST, CONNECT_ACCOUNT_SUCCESS } from '../constants';
import { AccountInfo } from '../types';
export interface ConnectAccountRequest {
type: CONNECT_ACCOUNT_REQUEST;
}
export interface ConnectAccountSuccess {
type: CONNECT_ACCOUNT_SUCCESS;
data: AccountInfo;
}
export type ConnectAcco... | import {
CONNECT_ACCOUNT_REQUEST,
CONNECT_ACCOUNT_SUCCESS,
CONNECT_ACCOUNT_FAILURE
} from '../constants';
import { AccountInfo } from '../types';
export interface ConnectAccountRequest {
type: CONNECT_ACCOUNT_REQUEST;
}
export interface ConnectAccountFailure {
type: CONNECT_ACCOUNT_FAILURE;
}
export interf... | Add action creator for failed account connection. | Add action creator for failed account connection.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -1,8 +1,16 @@
-import { CONNECT_ACCOUNT_REQUEST, CONNECT_ACCOUNT_SUCCESS } from '../constants';
+import {
+ CONNECT_ACCOUNT_REQUEST,
+ CONNECT_ACCOUNT_SUCCESS,
+ CONNECT_ACCOUNT_FAILURE
+} from '../constants';
import { AccountInfo } from '../types';
export interface ConnectAccountRequest {
type: ... |
abc0354a20d9c351684ce330a74a3ae7e7ab6f33 | after_prepare/ionic-minify.ts | after_prepare/ionic-minify.ts | #!/usr/bin/env node
import * as path from 'path';
import {Minifier} from 'ionic-minify';
let config: IMConfig = require("../minify-conf.json");
let cmd: string = process.env.CORDOVA_CMDLINE;
let rootDir: string = process.argv[2];
let minify: boolean = config.alwaysRun || (cmd.indexOf("--release") > -1... | #!/usr/bin/env node
import * as path from 'path';
import {Minifier} from 'ionic-minify';
let config: IMConfig = require("../minify-conf.json");
let cmd: string = process.env.CORDOVA_CMDLINE;
let rootDir: string = process.argv[2];
let minify: boolean = config.alwaysRun || (cmd.indexOf("--minify") > -1)... | Change trigger flag to --minify | Change trigger flag to --minify
- --release flag was breaking the android build in latest build tools
so it's now replaced by the --minify flag.
See #13 for more information.
Thanks to @aaronksaunders for spotting this.
| TypeScript | mit | Kurtz1993/ionic-minify,Kurtz1993/ionic-minify | ---
+++
@@ -6,7 +6,7 @@
let config: IMConfig = require("../minify-conf.json");
let cmd: string = process.env.CORDOVA_CMDLINE;
let rootDir: string = process.argv[2];
-let minify: boolean = config.alwaysRun || (cmd.indexOf("--release") > -1);
+let minify: boolean = config.alwaysRun || (cmd.indexO... |
a51d3b3fc99bb7e41a021979eb5e958bf0c8fcbd | src/dependument.ts | src/dependument.ts | /// <reference path="../typings/node/node.d.ts" />
import * as fs from 'fs';
export class Dependument {
private source: string;
private output: string;
constructor(options: any) {
if (!options) {
throw new Error("No options provided");
}
if (!options.source) {
throw new Error("No sourc... | /// <reference path="../typings/node/node.d.ts" />
import * as fs from 'fs';
export class Dependument {
private source: string;
private output: string;
constructor(options: any) {
if (!options) {
throw new Error("No options provided");
}
if (!options.source) {
throw new Error("No sourc... | Write the data that we read from the file | Write the data that we read from the file
| TypeScript | unlicense | Jameskmonger/dependument,dependument/dependument,Jameskmonger/dependument,dependument/dependument | ---
+++
@@ -24,23 +24,23 @@
}
public process() {
- this.readInfo(() => {
- this.writeOutput();
+ this.readInfo((info: string) => {
+ this.writeOutput(info);
});
}
- private readInfo(success: () => any) {
- fs.readFile(this.source, (err, data) => {
+ private readInfo(success: (in... |
847d01925cd01bd65fba99800cdd225ce0f76e12 | client/test/buildEncounter.ts | client/test/buildEncounter.ts | import { PromptQueue } from "../Commands/Prompts/PromptQueue";
import { Encounter } from "../Encounter/Encounter";
import { DefaultRules, IRules } from "../Rules/Rules";
import { StatBlockTextEnricher } from "../StatBlock/StatBlockTextEnricher";
export function buildStatBlockTextEnricher(rules: IRules) {
return ne... | import { PromptQueue } from "../Commands/Prompts/PromptQueue";
import { Encounter } from "../Encounter/Encounter";
import { SpellLibrary } from "../Library/SpellLibrary";
import { DefaultRules, IRules } from "../Rules/Rules";
import { StatBlockTextEnricher } from "../StatBlock/StatBlockTextEnricher";
export function b... | Use an actual SpellLibrary in test StatBlockTextEnricher | Use an actual SpellLibrary in test StatBlockTextEnricher
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -1,10 +1,11 @@
import { PromptQueue } from "../Commands/Prompts/PromptQueue";
import { Encounter } from "../Encounter/Encounter";
+import { SpellLibrary } from "../Library/SpellLibrary";
import { DefaultRules, IRules } from "../Rules/Rules";
import { StatBlockTextEnricher } from "../StatBlock/StatBlock... |
32fa0e0fc5eab2d496e06e6d68a0a96765de0446 | source/services/test/test.module.ts | source/services/test/test.module.ts | import './chaiMoment';
export * from './mockPromise';
export * from './angularFixture';
| import './chaiMoment';
import async from './async';
export { async };
export * from './mockPromise';
export * from './angularFixture';
| Make sure that async is exported as async | Make sure that async is exported as async
The async function is the default export of the async module, so we need to export it on the test module as a named export "async"
| TypeScript | mit | RenovoSolutions/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities | ---
+++
@@ -1,4 +1,6 @@
import './chaiMoment';
+import async from './async';
+export { async };
export * from './mockPromise';
export * from './angularFixture'; |
cc0389f69d0331eb92baca5133baea32eb96eb97 | components/HorizontalRule.tsx | components/HorizontalRule.tsx | import { Fragment } from "react"
const HorizontalRule = () => (
<Fragment>
<hr></hr>
<style jsx>{`
hr {
margin: 8px 0;
height: 1px;
border: 0;
background-image: linear-gradient(
to left,
rgba(84, 84, 88, 0.35),
rgba(84, 84, 88, 1),
... | import { Fragment } from "react"
const HorizontalRule = () => (
<Fragment>
<hr></hr>
<style jsx>{`
hr {
margin: 8px 0;
height: 1px;
border: 0;
background-image: linear-gradient(
to left,
rgba(84, 84, 88, 0.35),
rgba(84, 84, 88, 1),
... | Update `HorizonalRule` to be hairline height | Update `HorizonalRule` to be hairline height
| TypeScript | mit | JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk | ---
+++
@@ -16,6 +16,18 @@
);
}
+ @media (min-resolution: 2dppx) {
+ hr {
+ height: 0.5px;
+ }
+ }
+
+ @media (min-resolution: 3dppx) {
+ hr {
+ height: calc(1/3)px;
+ }
+ }
+
@media (prefers-color-scheme: light) {
hr ... |
76306b854c1584ae348f0ff3d0c0de9c3d5d5d63 | src/System/es6-template-string.d.ts | src/System/es6-template-string.d.ts | declare module "es6-template-string"
{
/**
* Provides the functionality to process es6 template-strings.
*/
interface IES6Template
{
/**
* Renders an es6 template-string.
*
* @param template
* The template to render.
*
* @param context
... | declare module "es6-template-string"
{
/**
* Provides the functionality to process es6 template-strings.
*/
interface IES6Template
{
/**
* Renders an es6 template-string.
*
* @param template
* The template to render.
*
* @param context
... | Refactor the types of `es6-template-string` | Refactor the types of `es6-template-string`
| TypeScript | mit | manuth/MarkdownConverter,manuth/MarkdownConverter,manuth/MarkdownConverter | ---
+++
@@ -17,7 +17,7 @@
* @returns
* The rendered text.
*/
- render(template: string, context?: Record<string, unknown>): string;
+ render(template: string, context?: any): string;
/**
* Compiles a template.
@@ -42,7 +42,7 @@
* @returns
... |
d67452313913b0cf34d49c902e4c05237c3685fb | src/import-dotx/import-dotx.spec.ts | src/import-dotx/import-dotx.spec.ts | import { expect } from "chai";
import { ImportDotx } from "./import-dotx";
describe("ImportDotx", () => {
describe("#constructor", () => {
it("should create", () => {
const file = new ImportDotx();
expect(file).to.deep.equal({ currentRelationshipId: 1 });
});
});
... | import { expect } from "chai";
import { ImportDotx } from "./import-dotx";
describe("ImportDotx", () => {
describe("#constructor", () => {
it("should create", () => {
const file = new ImportDotx();
expect(file).to.deep.equal({});
});
});
// describe("#extract", ()... | Fix tests - No longer uses dummy variable | Fix tests - No longer uses dummy variable
| TypeScript | mit | dolanmiu/docx,dolanmiu/docx,dolanmiu/docx | ---
+++
@@ -7,7 +7,7 @@
it("should create", () => {
const file = new ImportDotx();
- expect(file).to.deep.equal({ currentRelationshipId: 1 });
+ expect(file).to.deep.equal({});
});
});
|
cd13a6da67a8fa2ee8605a4c718de812f8322292 | src/js/bootstrap.ts | src/js/bootstrap.ts | import 'materialize-css';
import 'angular2-materialize';
import { AnimationBuilder } from 'css-animator/builder';
AnimationBuilder.defaults.fixed = true;
| import * as Hammer from 'hammerjs';
(window as any).Hammer = Hammer;
import { AnimationBuilder } from 'css-animator/builder';
import 'materialize-css';
import 'angular2-materialize';
AnimationBuilder.defaults.fixed = true;
| Resolve missing hammerjs for materialize. | Resolve missing hammerjs for materialize.
| TypeScript | mit | fabianweb/hue,fabiandev/angular2-quiz-app,fabiandev/angular2-quiz-app,fabiandev/angular2-quiz-app,fabianweb/hue,fabianweb/hue | ---
+++
@@ -1,5 +1,8 @@
+import * as Hammer from 'hammerjs';
+(window as any).Hammer = Hammer;
+
+import { AnimationBuilder } from 'css-animator/builder';
import 'materialize-css';
import 'angular2-materialize';
-import { AnimationBuilder } from 'css-animator/builder';
AnimationBuilder.defaults.fixed = true; |
0283879bc6ab00875c620c3020d8a773854169af | src/api/timeEntries.ts | src/api/timeEntries.ts | import {
TimeEntriesPagenationParameters,
TimeEntry
} from '../models/timeEntries.models';
// Admin permissions required.
export class TimeEntriesAPI {
harvest;
baseUrl: string;
constructor(harvest) {
this.baseUrl = '/v2/time_entries';
this.harvest = harvest;
}
public get(id) {
return this.... | import {
TimeEntriesPagenationParameters,
TimeEntry,
TimeEntryCreateFromDuration,
TimeEntryCreateFromStartAndEndTime
} from '../models/timeEntries.models';
// Admin permissions required.
export class TimeEntriesAPI {
harvest;
baseUrl: string;
constructor(harvest) {
this.baseUrl = '/v2/time_entries';... | Use creation interfaces for parameter | Use creation interfaces for parameter
| TypeScript | mit | log0ymxm/node-harvest | ---
+++
@@ -1,6 +1,8 @@
import {
TimeEntriesPagenationParameters,
- TimeEntry
+ TimeEntry,
+ TimeEntryCreateFromDuration,
+ TimeEntryCreateFromStartAndEndTime
} from '../models/timeEntries.models';
// Admin permissions required.
@@ -21,7 +23,7 @@
return this.harvest.request('GET', this.baseUrl, query... |
8f696734ee407ac375d377b8ee15c758c3079f7f | app/datastore/sample-objects.ts | app/datastore/sample-objects.ts | import {IdaiFieldDocument} from '../model/idai-field-document';
export var DOCS: IdaiFieldDocument[] = [
{
"id" : "o1", "resource" : { "id": "o1",
"identifier": "ob1",
"title": "Obi One Kenobi",
"cuts" : ["o2"],
"type": "object"
},
"synced": 0... | import {IdaiFieldDocument} from '../model/idai-field-document';
export var DOCS: IdaiFieldDocument[] = [
{
"id" : "o1", "resource" : { "id": "o1",
"identifier": "ob1",
"title": "Obi One Kenobi",
"relations" : { "cuts" : ["o2"] },
"type": "object"
},
... | Adjust sample objects. Add 'relations' level. | Adjust sample objects. Add 'relations' level.
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -5,7 +5,7 @@
"id" : "o1", "resource" : { "id": "o1",
"identifier": "ob1",
"title": "Obi One Kenobi",
- "cuts" : ["o2"],
+ "relations" : { "cuts" : ["o2"] },
"type": "object"
},
"synced": 0
@@ -14,26 +14,29 @@
"... |
a245ea55496176e2c41100c6460f61271fb1537b | src/CLI.ts | src/CLI.ts | /*
Fractive: A hypertext authoring tool -- https://github.com/invicticide/fractive
Copyright (C) 2017 Josh Sutphin
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the Licen... | /*
Fractive: A hypertext authoring tool -- https://github.com/invicticide/fractive
Copyright (C) 2017 Josh Sutphin
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the Licen... | Make the bundleJavascript compiler flag optional (default: true) | Make the bundleJavascript compiler flag optional (default: true)
| TypeScript | agpl-3.0 | invicticide/fractive,invicticide/fractive,invicticide/fractive | ---
+++
@@ -35,10 +35,13 @@
}
else
{
+ let bundleJavascript : boolean = true;
+ if(process.argv[i + 3] === "false") { bundleJavascript = false; }
+
Compiler.Compile(
process.argv[i + 1],
process.argv[i + 2],
- JSON.parse(process.argv[i + 3])
+ bundleJavascript
);
... |
d90fb8f346f3c2a290d0459a5240bc28ceb0144c | editor/rendering/camera.ts | editor/rendering/camera.ts |
export class Camera {
// Values, the actual matrix is the transposed of that one
private values: Array<number> = [
1, 0, 0,
0, 1, 0,
0, 0, 0
];
// Object space coordinates should map to pixels when
// the scale factor is 1.
// TODO: fix that (currently not the case)
... |
export class Camera {
// Values, the actual matrix is the transposed of that one
private values: Array<number> = [
2, 0, 0,
0, 2, 0,
0, 0, 0
];
// Object space coordinates should map to pixels when
// the scale factor is 1.
// TODO: fix that (currently not the case)
... | Fix a bug and set the default zoom to 2. | Fix a bug and set the default zoom to 2.
| TypeScript | mit | GreenPix/dilia,Nemikolh/dilia,GreenPix/dilia,Nemikolh/dilia,GreenPix/editor,GreenPix/editor,GreenPix/dilia,Nemikolh/dilia,GreenPix/editor,Nemikolh/dilia,GreenPix/dilia,GreenPix/editor | ---
+++
@@ -3,15 +3,15 @@
// Values, the actual matrix is the transposed of that one
private values: Array<number> = [
- 1, 0, 0,
- 0, 1, 0,
+ 2, 0, 0,
+ 0, 2, 0,
0, 0, 0
];
// Object space coordinates should map to pixels when
// the scale factor is 1... |
42a2ca8381247bc6654822068a833ef73fcc79ca | src/interface/index.ts | src/interface/index.ts | export { default as Icon } from './Icon';
export { default as SpellLink } from './SpellLink';
export { default as SpellIcon } from './SpellIcon';
export { default as ItemLink } from './ItemLink';
export { default as ItemIcon } from './ItemIcon';
export { default as ResourceLink } from './ResourceLink';
export { default... | export { default as Icon } from './Icon';
export { default as ConduitLink } from './ConduitLink';
export { default as SpellLink } from './SpellLink';
export { default as SpellIcon } from './SpellIcon';
export { default as ItemLink } from './ItemLink';
export { default as ItemIcon } from './ItemIcon';
export { default a... | Add ConduitLink to interface export. | Add ConduitLink to interface export.
| TypeScript | agpl-3.0 | sMteX/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,sMteX/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,sMteX/WoWAnalyzer | ---
+++
@@ -1,4 +1,5 @@
export { default as Icon } from './Icon';
+export { default as ConduitLink } from './ConduitLink';
export { default as SpellLink } from './SpellLink';
export { default as SpellIcon } from './SpellIcon';
export { default as ItemLink } from './ItemLink'; |
df156adb1fd9f27fbe243a5a143cdead981adb8a | src/test/_config.ts | src/test/_config.ts | import { Config, LoadBalancingStrategy } from "../connection";
const ARANGO_URL = process.env.TEST_ARANGODB_URL || "http://localhost:8529";
const ARANGO_VERSION = Number(
process.env.ARANGO_VERSION || process.env.ARANGOJS_DEVEL_VERSION || 39999
);
const ARANGO_LOAD_BALANCING_STRATEGY = process.env
.TEST_ARANGO_LOA... | import { Config, LoadBalancingStrategy } from "../connection";
const ARANGO_URL = process.env.TEST_ARANGODB_URL || "http://localhost:8529";
const ARANGO_VERSION = Number(
process.env.ARANGO_VERSION || process.env.ARANGOJS_DEVEL_VERSION || 39999
);
const ARANGO_LOAD_BALANCING_STRATEGY = process.env
.TEST_ARANGO_LOA... | Disable precaptureStackTraces in tests for now | Disable precaptureStackTraces in tests for now
Thinking this might cause the timeouts we're seeing in some cursor tests. | TypeScript | apache-2.0 | arangodb/arangojs,arangodb/arangojs | ---
+++
@@ -13,11 +13,9 @@
? {
url: ARANGO_URL.split(",").filter((s) => Boolean(s)),
arangoVersion: ARANGO_VERSION,
- precaptureStackTraces: true,
loadBalancingStrategy: ARANGO_LOAD_BALANCING_STRATEGY || "ROUND_ROBIN",
}
: {
url: ARANGO_URL,
arangoVersion: ARANGO_VER... |
b772907b2d527ea471dcaaab3a078ae81ad3ba3e | types/cors/cors-tests.ts | types/cors/cors-tests.ts |
import express = require('express');
import cors = require('cors');
const app = express();
app.use(cors());
app.use(cors({
maxAge: 100,
credentials: true,
optionsSuccessStatus: 200
}));
app.use(cors({
methods: 'GET,POST,PUT',
exposedHeaders: 'Content-Range,X-Content-Range',
allowedHeaders: 'Co... |
import express = require('express');
import cors = require('cors');
const app = express();
app.use(cors());
app.use(cors({
maxAge: 100,
credentials: true,
optionsSuccessStatus: 200
}));
app.use(cors({
methods: 'GET,POST,PUT',
exposedHeaders: 'Content-Range,X-Content-Range',
allowedHeaders: 'Co... | Add test for mixed type array | Add test for mixed type array
| TypeScript | mit | zuzusik/DefinitelyTyped,aciccarello/DefinitelyTyped,zuzusik/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,arusakov/DefinitelyTyped,borisyankov/DefinitelyTyped,aciccarello/DefinitelyTyped,dsebastien/DefinitelyTyped,benliddicott/DefinitelyTyped,rolandzwaga/DefinitelyTy... | ---
+++
@@ -29,6 +29,9 @@
origin: /example\.com$/
}));
app.use(cors({
+ origin: [/example\.com$/, 'http://example.com']
+}));
+app.use(cors({
origin: ['http://example.com', 'http://fakeurl.com']
}));
app.use(cors({ |
f53890943f8c1497aab089f6b57079710e6236a2 | generators/techs/templates/src/app/footer.spec.tsx | generators/techs/templates/src/app/footer.spec.tsx | import React from 'react';
import {shallow} from 'enzyme';
import {Footer} from './footer';
describe('Footer', () => {
it('should be a footer', () => {
expect(shallow(<Footer/>).is('footer')).toBe(true);
});
});
| /* tslint:disable:no-unused-variable */
import React from 'react';
import {shallow} from 'enzyme';
import {Footer} from './footer';
describe('Footer', () => {
it('should be a footer', () => {
expect(shallow(<Footer/>).is('footer')).toBe(true);
});
});
| Add exceptioin for tslint rule no-unused-var | Add exceptioin for tslint rule no-unused-var
| TypeScript | mit | FountainJS/generator-fountain-react,FountainJS/generator-fountain-react,FountainJS/generator-fountain-react | ---
+++
@@ -1,3 +1,4 @@
+/* tslint:disable:no-unused-variable */
import React from 'react';
import {shallow} from 'enzyme';
|
883bc29a92d52646a0c10739bbeb9074610a6941 | index.ts | index.ts | // Copyright (C) 2016 Sergey Akopkokhyants
// This project is licensed under the terms of the MIT license.
// https://github.com/akserg/ng2-toasty
import { NgModule, ModuleWithProviders } from "@angular/core";
export * from './src/toasty.service';
export * from './src/toasty.component';
import { ToastyComponent } fr... | // Copyright (C) 2016 Sergey Akopkokhyants
// This project is licensed under the terms of the MIT license.
// https://github.com/akserg/ng2-toasty
import { NgModule, ModuleWithProviders } from "@angular/core";
import { CommonModule } from '@angular/common';
export * from './src/toasty.service';
export * from './src/t... | Fix for can't bind to ngClass in div | fix(): Fix for can't bind to ngClass in div
| TypeScript | mit | akserg/ng2-toasty,akserg/ng2-toasty | ---
+++
@@ -3,6 +3,7 @@
// https://github.com/akserg/ng2-toasty
import { NgModule, ModuleWithProviders } from "@angular/core";
+import { CommonModule } from '@angular/common';
export * from './src/toasty.service';
export * from './src/toasty.component';
@@ -14,12 +15,13 @@
export let providers = [{ provide: ... |
ab9f052f5ed73833e2bca4ca18657345d76ee66d | src/app/components/list-paging/list-paging-demo.component.ts | src/app/components/list-paging/list-paging-demo.component.ts | import { Component } from '@angular/core';
import {
ListState,
ListStateDispatcher,
ListItemsLoadAction,
ListItemModel
} from '../../../core';
@Component({
selector: 'sky-list-paging-demo',
templateUrl: './list-paging-demo.component.html',
providers: [
ListState,
ListStateDispatcher
]
})
expor... | import { Component } from '@angular/core';
import {
ListStateDispatcher,
ListItemsLoadAction,
ListItemModel
} from '../../../core';
@Component({
selector: 'sky-list-paging-demo',
templateUrl: './list-paging-demo.component.html',
providers: [
ListStateDispatcher
]
})
export class SkyListPagingDemoCom... | Undo reverting to old version | Undo reverting to old version | TypeScript | mit | blackbaud/skyux2,blackbaud/skyux2,blackbaud-joshgerdes/skyux2,blackbaud-joshgerdes/skyux2,blackbaud/skyux2,blackbaud-joshgerdes/skyux2,blackbaud/skyux2,blackbaud-joshgerdes/skyux2 | ---
+++
@@ -1,7 +1,6 @@
import { Component } from '@angular/core';
import {
- ListState,
ListStateDispatcher,
ListItemsLoadAction,
ListItemModel
@@ -11,7 +10,6 @@
selector: 'sky-list-paging-demo',
templateUrl: './list-paging-demo.component.html',
providers: [
- ListState,
ListStateDispa... |
9223b02136f0ede6ebeacf0404a7c8c9a2851486 | tests/cases/conformance/classes/classExpressions/genericClassExpressionInFunction.ts | tests/cases/conformance/classes/classExpressions/genericClassExpressionInFunction.ts | class A<T> {
genericVar: T
}
function B<T>() {
// class expression can use T
return class extends A<T> { }
}
// extends can call B
class K extends B<number>() {
name: string;
}
var c = new K();
c.genericVar = 12;
| class A<T> {
genericVar: T
}
class B3 extends A<number> {
}
function B1<U>() {
// class expression can use T
return class extends A<U> { }
}
class B2<V> {
anon = class extends A<V> { }
}
// extends can call B
class K extends B1<number>() {
namae: string;
}
class C extends (new B2<nu... | Improve test case and add working comparison | Improve test case and add working comparison
| TypeScript | apache-2.0 | Microsoft/TypeScript,chuckjaz/TypeScript,minestarks/TypeScript,evgrud/TypeScript,synaptek/TypeScript,basarat/TypeScript,SaschaNaz/TypeScript,blakeembrey/TypeScript,nojvek/TypeScript,microsoft/TypeScript,Eyas/TypeScript,blakeembrey/TypeScript,vilic/TypeScript,ionux/TypeScript,basarat/TypeScript,TukekeSoft/TypeScript,mmo... | ---
+++
@@ -1,13 +1,25 @@
class A<T> {
genericVar: T
}
-function B<T>() {
+class B3 extends A<number> {
+}
+function B1<U>() {
// class expression can use T
- return class extends A<T> { }
+ return class extends A<U> { }
+}
+class B2<V> {
+ anon = class extends A<V> { }
}
// extends can call B... |
0c281242718d18ce5ea26a5ec972b7022854685a | src/app/models/workout.ts | src/app/models/workout.ts | import { Tag } from './tag';
import { Sport } from './sport';
import { Address } from './address';
import { Image } from './image';
export class Workout {
public id: number;
public startdate: Date;
public enddate: Date;
public duration: string;
public placeType: string;
public nbTicketAvailable... | import { Tag } from './tag';
import { Sport } from './sport';
import { Address } from './address';
import { Image } from './image';
export class Workout {
public id: number;
public startdate: Date;
public enddate: Date;
public duration: string;
public placeType: string;
public nbTicketAvailable... | Add style attributes for planning display | Add style attributes for planning display
When display on planning workout are position : absolute,
planning template need to retrieve this position from the object
It also need to know the height of the element.
| TypeScript | mit | XavierGuichet/bemoove-front,XavierGuichet/bemoove-front,XavierGuichet/bemoove-front | ---
+++
@@ -29,6 +29,8 @@
public title: string;
public photo: any;
public favorite: boolean;
+ public styleTop: string;
+ public styleHeight: string;
constructor(
) { |
d019ddac68fe106dd1e3f6893c87039a5cb80351 | src/lib/Scenes/Home/__stories__/Home.story.tsx | src/lib/Scenes/Home/__stories__/Home.story.tsx | import { storiesOf } from "@storybook/react-native"
import WorksForYou from "lib/Containers/WorksForYou"
import { ForYouRenderer, WorksForYouRenderer } from "lib/relay/QueryRenderers"
import renderWithLoadProgress from "lib/utils/renderWithLoadProgress"
import React from "react"
import Home from "../"
import ForYou fro... | import { storiesOf } from "@storybook/react-native"
import WorksForYou from "lib/Containers/WorksForYou"
import { ForYouRenderer, WorksForYouRenderer } from "lib/relay/QueryRenderers"
import renderWithLoadProgress from "lib/utils/renderWithLoadProgress"
import React from "react"
import Home from "../"
import ForYou fro... | Fix inital props for Home component | [Storybooks] Fix inital props for Home component
| TypeScript | mit | artsy/eigen,artsy/emission,artsy/emission,artsy/emission,artsy/emission,artsy/eigen,artsy/emission,artsy/eigen,artsy/emission,artsy/emission,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen | ---
+++
@@ -9,7 +9,7 @@
import { SalesRenderer } from "../Components/Sales/Relay/SalesRenderer"
storiesOf("Home/Relay")
- .add("Root", () => <Home tracking={trackingData => console.log(trackingData)} />)
+ .add("Root", () => <Home initialTab={0} isVisible={true} tracking={trackingData => console.log(trackingDat... |
51a837247c58ed460408f40fd385018c14fcd50a | packages/markdown/src/index.tsx | packages/markdown/src/index.tsx | import * as MathJax from "@nteract/mathjax";
import { Source } from "@nteract/presentational-components";
import React from "react";
import ReactMarkdown from "react-markdown";
import RemarkMathPlugin from "./remark-math";
const math = (props: { value: string }): React.ReactNode => (
<MathJax.Node>{props.value}</Ma... | import * as MathJax from "@nteract/mathjax";
import { Source } from "@nteract/presentational-components";
import React from "react";
import ReactMarkdown from "react-markdown";
import RemarkMathPlugin from "./remark-math";
const math = (props: { value: string }): React.ReactNode => (
<MathJax.Node>{props.value}</Ma... | Move spread operator so MarkdownRender.renderers can override preset. | Move spread operator so MarkdownRender.renderers can override preset.
| TypeScript | bsd-3-clause | nteract/nteract,nteract/nteract,nteract/composition,nteract/composition,nteract/nteract,nteract/composition,nteract/nteract,nteract/nteract | ---
+++
@@ -24,10 +24,10 @@
escapeHtml: false,
plugins: [RemarkMathPlugin],
renderers: {
- ...props.renderers,
math,
inlineMath,
- code
+ code,
+ ...props.renderers
} as any
};
|
dabd611f7f5adbcd2c51feae30fc20a096ab8d66 | extension.ts | extension.ts | import * as vscode from 'vscode';
import * as functionParser from './functionParser';
export function activate() {
console.log('Congratulations, your extension "addDocComments" is now active!');
vscode.commands.registerCommand('extension.addDocComments', () => {
var selection = vscode.window.getActiveTextEdit... | import * as vscode from 'vscode';
import * as functionParser from './functionParser';
export function activate() {
console.log('Congratulations, your extension "addDocComments" is now active!');
vscode.commands.registerCommand('extension.addDocComments', () => {
var selection = vscode.window.getActiveText... | Set the selection after inserting text | Set the selection after inserting text
| TypeScript | mit | Microsoft/vscode-comment | ---
+++
@@ -6,6 +6,8 @@
console.log('Congratulations, your extension "addDocComments" is now active!');
+
+
vscode.commands.registerCommand('extension.addDocComments', () => {
@@ -26,8 +28,11 @@
var startLine = selection.start.line - 1;
var pos = new vscode.Position(startLine, 0);
editBui... |
228307f9f2288a3ff3aa9865f682f4fa5a1f95f8 | src/lib/middleware/__tests__/rateLimiting.jest.ts | src/lib/middleware/__tests__/rateLimiting.jest.ts | import { _rateLimiterMiddleware, BURST_LIMIT_MESSAGE } from "../rateLimiting"
describe("rate limiting", () => {
let rateLimiter
let burstLimiter
let next
let res
let status
let send
let middleware
beforeEach(() => {
burstLimiter = {
consume: jest.fn(),
}
rateLimiter = {
consume... | import {
_rateLimiterMiddleware,
BURST_LIMIT_MESSAGE,
RATE_LIMIT_MESSAGE,
} from "../rateLimiting"
describe("rate limiting", () => {
let rateLimiter
let burstLimiter
let next
let res
let status
let send
let middleware
beforeEach(() => {
burstLimiter = {
consume: jest.fn(),
}
ra... | Add more rate limit tests | Add more rate limit tests
| TypeScript | mit | yuki24/force,anandaroop/force,mzikherman/force,mzikherman/force,oxaudo/force,eessex/force,oxaudo/force,joeyAghion/force,cavvia/force-1,eessex/force,eessex/force,joeyAghion/force,artsy/force-public,xtina-starr/force,izakp/force,eessex/force,erikdstock/force,artsy/force,oxaudo/force,damassi/force,anandaroop/force,cavvia/... | ---
+++
@@ -1,4 +1,8 @@
-import { _rateLimiterMiddleware, BURST_LIMIT_MESSAGE } from "../rateLimiting"
+import {
+ _rateLimiterMiddleware,
+ BURST_LIMIT_MESSAGE,
+ RATE_LIMIT_MESSAGE,
+} from "../rateLimiting"
describe("rate limiting", () => {
let rateLimiter
@@ -18,7 +22,7 @@
}
next = jest.fn()
... |
7431bb83209e8b8cb337a246eb815d10ce377f14 | modules/core/common/net.ts | modules/core/common/net.ts | import url from 'url';
import { PLATFORM } from './utils';
export const serverPort = PLATFORM === 'server' && (process.env.PORT || __SERVER_PORT__);
export const isApiExternal = !!url.parse(__API_URL__).protocol;
const clientApiUrl =
!isApiExternal && PLATFORM !== 'server'
? `${window.location.protocol}//${wind... | import url from 'url';
import { PLATFORM } from './utils';
export const serverPort =
PLATFORM === 'server' && (process.env.PORT || (typeof __SERVER_PORT__ !== 'undefined' ? __SERVER_PORT__ : 8080));
export const isApiExternal = !!url.parse(__API_URL__).protocol;
const clientApiUrl =
!isApiExternal && PLATFORM !==... | Use 8080 as default __SERVER_PORT__ | Use 8080 as default __SERVER_PORT__
| TypeScript | mit | sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit | ---
+++
@@ -1,7 +1,8 @@
import url from 'url';
import { PLATFORM } from './utils';
-export const serverPort = PLATFORM === 'server' && (process.env.PORT || __SERVER_PORT__);
+export const serverPort =
+ PLATFORM === 'server' && (process.env.PORT || (typeof __SERVER_PORT__ !== 'undefined' ? __SERVER_PORT__ : 8080... |
15c8360e5356a6d1b4954176b3f0146c42b817e8 | src/Test/Ast/CodeBlock.ts | src/Test/Ast/CodeBlock.ts | /// <reference path="../../../typings/mocha/mocha.d.ts" />
/// <reference path="../../../typings/chai/chai.d.ts" />
import { expect } from 'chai'
import * as Up from '../../index'
import { SyntaxNode } from '../../SyntaxNodes/SyntaxNode'
import { DocumentNode } from '../../SyntaxNodes/DocumentNode'
import { PlainTextN... | /// <reference path="../../../typings/mocha/mocha.d.ts" />
/// <reference path="../../../typings/chai/chai.d.ts" />
import { expect } from 'chai'
import * as Up from '../../index'
import { SyntaxNode } from '../../SyntaxNodes/SyntaxNode'
import { DocumentNode } from '../../SyntaxNodes/DocumentNode'
import { PlainTextN... | Add passing code block test | Add passing code block test
| TypeScript | mit | start/up,start/up | ---
+++
@@ -19,12 +19,30 @@
const text =
`
\`\`\`
-let x = y
+const pie = 3.5
\`\`\``
expect(Up.ast(text)).to.be.eql(
insideDocument([
new CodeBlockNode([
- new PlainTextNode('let x = y')
+ new PlainTextNode('const pie = 3.5')
+ ]),
+ ]))
+ })
+
+ i... |
c82c81856bf5038c2f5b348545aa8059ac22e483 | src/browser/ui/dialog/dialog-title.directive.ts | src/browser/ui/dialog/dialog-title.directive.ts | import { Directive, Input, OnInit, Optional } from '@angular/core';
import { DialogRef } from './dialog-ref';
let uniqueId = 0;
@Directive({
selector: '[gdDialogTitle]',
host: {
'class': 'DialogTitle',
},
})
export class DialogTitleDirective implements OnInit {
@Input() id = `gd-dialog-title... | import { Directive, Input, OnInit, Optional } from '@angular/core';
import { DialogRef } from './dialog-ref';
let uniqueId = 0;
@Directive({
selector: '[gdDialogTitle]',
host: {
'class': 'DialogTitle',
'[id]': 'id',
},
})
export class DialogTitleDirective implements OnInit {
@Input()... | Fix host attribute not assigned | Fix host attribute not assigned
| TypeScript | mit | seokju-na/geeks-diary,seokju-na/geeks-diary,seokju-na/geeks-diary | ---
+++
@@ -9,6 +9,7 @@
selector: '[gdDialogTitle]',
host: {
'class': 'DialogTitle',
+ '[id]': 'id',
},
})
export class DialogTitleDirective implements OnInit { |
0668458e989e622481e18a9ef3bf6fb313c1a8af | src/menu/bookmarks/components/TreeBar/index.tsx | src/menu/bookmarks/components/TreeBar/index.tsx | import React from 'react';
import Store from '../../store';
import Item from './Item';
import { Root, ForwardIcon } from './styles';
export default class TreeBar extends React.Component {
public render() {
return (
<Root>
<Item data={Store.data} home />
{Store.path.map((data: any, key: any... | import React from 'react';
import Store from '../../store';
import Item from './Item';
import { Root, ForwardIcon } from './styles';
export default class TreeBar extends React.Component {
public render() {
return (
<Root>
<Item data={Store.data} home />
{Store.path.map((data: any, key: any... | Fix unique key error in bookmarks | :bug: Fix unique key error in bookmarks
| TypeScript | apache-2.0 | Nersent/Wexond,Nersent/Wexond | ---
+++
@@ -10,7 +10,7 @@
<Root>
<Item data={Store.data} home />
{Store.path.map((data: any, key: any) => (
- <React.Fragment>
+ <React.Fragment key={key}>
<ForwardIcon className="FORWARD-ICON" />
<Item data={data} key={key} />
</React.Fr... |
d49c7826387f9c442c36f14835f9bff2950b92bb | src/lib/Scenes/ArtistSeries/ArtistSeriesHeader.tsx | src/lib/Scenes/ArtistSeries/ArtistSeriesHeader.tsx | import { Flex } from "@artsy/palette"
import { ArtistSeriesHeader_artistSeries } from "__generated__/ArtistSeriesHeader_artistSeries.graphql"
import OpaqueImageView from "lib/Components/OpaqueImageView/OpaqueImageView"
import React from "react"
import { createFragmentContainer, graphql } from "react-relay"
interface A... | import { Flex } from "@artsy/palette"
import { ArtistSeriesHeader_artistSeries } from "__generated__/ArtistSeriesHeader_artistSeries.graphql"
import OpaqueImageView from "lib/Components/OpaqueImageView/OpaqueImageView"
import React from "react"
import { createFragmentContainer, graphql } from "react-relay"
interface A... | Fix header image border radius | style: Fix header image border radius
| TypeScript | mit | artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen | ---
+++
@@ -12,7 +12,7 @@
return (
<Flex flexDirection="row" justifyContent="center">
- <OpaqueImageView width={180} height={180} imageURL={url} />
+ <OpaqueImageView width={180} height={180} imageURL={url} style={{ borderRadius: 2 }} />
</Flex>
)
} |
4d6e593c27e2bfb9d82b3a1f326f23c7f50403fd | src/app/app.component.ts | src/app/app.component.ts | import { Component, OnInit } from '@angular/core';
import { PLAYLIST_DATA } from './playlist';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
title = 'Stats Bar';
playlist_data = PLAYLIST_DATA;
item... | import { Component, OnInit } from '@angular/core';
import { PLAYLIST_DATA } from './playlist';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
title = 'Stats Bar';
playlist_data = PLAYLIST_DATA;
item... | Select first play list when loaded | Select first play list when loaded
| TypeScript | apache-2.0 | shioyang/StatsBar,shioyang/StatsBar,shioyang/StatsBar | ---
+++
@@ -14,6 +14,9 @@
constructor() { }
ngOnInit() {
+ if (this.playlist_data.length > 0) {
+ this.onMenuClick(0); // Select first one
+ }
}
onMenuClick(index: number): void { |
283907a20e5de2a156703aac37c80d2358d485e0 | lib/main.ts | lib/main.ts | import * as encryption from './encryption';
export const hashPassword = encryption.hashPassword;
export const comparePasswordWithHash = encryption.comparePasswordWithHash;
module.exports = encryption;
| import * as encryption from './encryption';
export const isValidDigestAlgorithm = encryption.isValidDigestAlgorithm;
export const hashPassword = encryption.hashPassword;
export const comparePasswordWithHash = encryption.comparePasswordWithHash;
module.exports = encryption;
| Add export for digest availability checking function | Add export for digest availability checking function
| TypeScript | mit | treylon/node-secure-password | ---
+++
@@ -1,5 +1,6 @@
import * as encryption from './encryption';
+export const isValidDigestAlgorithm = encryption.isValidDigestAlgorithm;
export const hashPassword = encryption.hashPassword;
export const comparePasswordWithHash = encryption.comparePasswordWithHash;
|
18408e773946923925bfbb719b37ea1875e8ac8a | data/loaders/PostsLoader.ts | data/loaders/PostsLoader.ts | import matter from "gray-matter"
import glob from "glob"
import path from "path"
import fs from "fs"
import BlogPost from "../../models/BlogPost"
import { EntryType } from "./Entry"
export class PostsLoader {
private cachedPosts?: BlogPost[]
async getPosts(forceRefresh: boolean = false): Promise<BlogPost[]> {
... | import matter from "gray-matter"
import glob from "glob"
import path from "path"
import fs from "fs"
import BlogPost from "../../models/BlogPost"
import { EntryType } from "./Entry"
export class PostsLoader {
private cachedPosts?: BlogPost[]
async getPosts(forceRefresh: boolean = false): Promise<BlogPost[]> {
... | Remove except separator from blog post content | Remove except separator from blog post content
| TypeScript | mit | JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk | ---
+++
@@ -21,15 +21,19 @@
for (const postPath of postPaths) {
console.debug(`Loading post at ${postPath}`)
const slug = path.basename(postPath, path.extname(postPath))
- const content = fs.readFileSync(postPath)
- const parsedContent = matter(content, {
+ const fileBuffer = fs.read... |
d33d1720d64c62bc1dd4d26d5646d0016a192290 | packages/react-day-picker/src/components/Day/Day.tsx | packages/react-day-picker/src/components/Day/Day.tsx | import { isSameDay } from 'date-fns';
import * as React from 'react';
import { DayProps } from '../../types';
import { getDayComponent } from './getDayComponent';
export function Day(props: DayProps): JSX.Element | null {
const el = React.useRef<HTMLTimeElement>(null);
const { day, dayPickerProps, currentMonth } ... | import { isSameDay } from 'date-fns';
import * as React from 'react';
import { DayProps } from '../../types';
import { getDayComponent } from './getDayComponent';
export function Day(props: DayProps): JSX.Element | null {
const el = React.useRef<HTMLTimeElement>(null);
const { day, dayPickerProps, currentMonth } ... | Use outside modifier to hide a day | Use outside modifier to hide a day
| TypeScript | mit | gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker | ---
+++
@@ -7,7 +7,7 @@
export function Day(props: DayProps): JSX.Element | null {
const el = React.useRef<HTMLTimeElement>(null);
const { day, dayPickerProps, currentMonth } = props;
- const { locale, formatDay, focusedDay } = dayPickerProps;
+ const { locale, formatDay, focusedDay, showOutsideDays } = dayP... |
dbd4552835ea1c81f5bed6cabeb80d9652fa42e3 | modules/html-lib/index.ts | modules/html-lib/index.ts | import {parseDocument} from 'htmlparser2'
import {innerText} from 'domutils'
export {innerText}
import type {Node, Document} from 'domhandler'
import cssSelect from 'css-select'
export {cssSelect}
export {encode, decode} from 'html-entities'
export function parseHtml(string: string): Document {
return parseDocume... | import {parseDocument} from 'htmlparser2'
import {textContent} from 'domutils'
export {textContent}
import type {Node, Document} from 'domhandler'
import cssSelect from 'css-select'
export {cssSelect}
export {encode, decode} from 'html-entities'
export function parseHtml(string: string): Document {
return parseDo... | Fix inner-text parsing by switching to textContent from innerText | Fix inner-text parsing by switching to textContent from innerText
| TypeScript | agpl-3.0 | StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native | ---
+++
@@ -1,7 +1,7 @@
import {parseDocument} from 'htmlparser2'
-import {innerText} from 'domutils'
-export {innerText}
+import {textContent} from 'domutils'
+export {textContent}
import type {Node, Document} from 'domhandler'
@@ -19,7 +19,7 @@
}
export function innerTextWithSpaces(elem: Node | Node[]):... |
a2d4a292d4acd455c26fb8f153578970ed888453 | src/vs/workbench/parts/terminal/common/terminal.ts | src/vs/workbench/parts/terminal/common/terminal.ts | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | Simplify default windows shell fetching | Simplify default windows shell fetching
| TypeScript | mit | microsoft/vscode,williamcspace/vscode,stringham/vscode,hoovercj/vscode,hungys/vscode,Zalastax/vscode,the-ress/vscode,Microsoft/vscode,stringham/vscode,Krzysztof-Cieslak/vscode,hashhar/vscode,hashhar/vscode,0xmohit/vscode,radshit/vscode,eklavyamirani/vscode,ups216/vscode,hungys/vscode,landonepps/vscode,hoovercj/vscode,r... | ---
+++
@@ -7,6 +7,7 @@
import {TPromise} from 'vs/base/common/winjs.base';
import {createDecorator, ServiceIdentifier} from 'vs/platform/instantiation/common/instantiation';
import platform = require('vs/base/common/platform');
+import processes = require('vs/base/node/processes');
export const TERMINAL_PANEL_... |
58c37d761a62100016a92786ae8620006143cf3d | cypress/integration/mentions.ts | cypress/integration/mentions.ts | const DELAY = 500;
context("Mentions", () => {
beforeEach(() => {
cy.visit("http://localhost:4000");
});
it("'@ + Enter' should select the first suggestion", () => {
cy.get(".mde-text")
.type("{selectall}{backspace}")
.type("@")
.wait(DELAY)
.type("{enter}")
.should("have.va... | const DELAY = 500;
context("Suggestions", () => {
beforeEach(() => {
cy.visit("http://localhost:4000");
});
it("'@' should display the suggestions box", () => {
cy.get(".mde-suggestions").should("not.exist");
cy.get(".mde-text")
.type("{selectall}{backspace}")
.type("@");
cy.get(".mde... | Add a test for suggestions | Add a test for suggestions
| TypeScript | mit | andrerpena/react-mde,andrerpena/react-mde,andrerpena/react-mde | ---
+++
@@ -1,8 +1,15 @@
const DELAY = 500;
-context("Mentions", () => {
+context("Suggestions", () => {
beforeEach(() => {
cy.visit("http://localhost:4000");
+ });
+ it("'@' should display the suggestions box", () => {
+ cy.get(".mde-suggestions").should("not.exist");
+ cy.get(".mde-text")
+ ... |
c01435e9df80be04636b3e114e823bfa7a85be4f | types/clean-webpack-plugin/clean-webpack-plugin-tests.ts | types/clean-webpack-plugin/clean-webpack-plugin-tests.ts | import * as CleanWebpackPlugin from 'clean-webpack-plugin';
const paths = [
'path',
'glob/**/*.js',
];
new CleanWebpackPlugin(paths);
new CleanWebpackPlugin(paths, 'root-directory');
new CleanWebpackPlugin(paths, {});
new CleanWebpackPlugin(paths, {
root: 'root-directory',
verbose: true,
dry: true,
watch: true,... | import CleanWebpackPlugin = require('clean-webpack-plugin');
const paths = [
'path',
'glob/**/*.js',
];
new CleanWebpackPlugin(paths);
new CleanWebpackPlugin(paths, 'root-directory');
new CleanWebpackPlugin(paths, {});
new CleanWebpackPlugin(paths, {
root: 'root-directory',
verbose: true,
dry: true,
watch: true... | Use `import = require` syntax. | Use `import = require` syntax. | TypeScript | mit | AgentME/DefinitelyTyped,borisyankov/DefinitelyTyped,one-pieces/DefinitelyTyped,georgemarshall/DefinitelyTyped,aciccarello/DefinitelyTyped,magny/DefinitelyTyped,chrootsu/DefinitelyTyped,aciccarello/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,alexdresko/DefinitelyTyped,borisyankov/DefinitelyTyped,magny/DefinitelyTyped,ge... | ---
+++
@@ -1,4 +1,4 @@
-import * as CleanWebpackPlugin from 'clean-webpack-plugin';
+import CleanWebpackPlugin = require('clean-webpack-plugin');
const paths = [
'path', |
54266c094adea7a3ea4449e1e223fa74ac5fabed | ui/test/kapacitor/components/KapacitorRulesTable.test.tsx | ui/test/kapacitor/components/KapacitorRulesTable.test.tsx | import React from 'react'
import {shallow} from 'enzyme'
import {isUUIDv4} from 'src/utils/stringValidators'
import KapacitorRulesTable from 'src/kapacitor/components/KapacitorRulesTable'
import {source, kapacitorRules} from 'test/resources'
const setup = () => {
const props = {
source,
rules: kapacitorRu... | import React from 'react'
import {shallow} from 'enzyme'
import KapacitorRulesTable from 'src/kapacitor/components/KapacitorRulesTable'
import {source, kapacitorRules} from 'test/resources'
const setup = () => {
const props = {
source,
rules: kapacitorRules,
onDelete: () => {},
onChangeRuleStatus: ... | Revert "Test KapacitorRulesTable tr keys to be UUIDv4" | Revert "Test KapacitorRulesTable tr keys to be UUIDv4"
This reverts commit bd6674859cb23500fd24d4cfbdf5503aeef0c831.
| TypeScript | mit | influxdata/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,li-ang/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdata/influxd... | ---
+++
@@ -1,7 +1,5 @@
import React from 'react'
import {shallow} from 'enzyme'
-
-import {isUUIDv4} from 'src/utils/stringValidators'
import KapacitorRulesTable from 'src/kapacitor/components/KapacitorRulesTable'
@@ -12,14 +10,14 @@
source,
rules: kapacitorRules,
onDelete: () => {},
- onCha... |
c39138e6a7bc51261600eee2c578011247f6c282 | website/app/main.ts | website/app/main.ts | import {bootstrap} from '@angular/platform-browser-dynamic';
import {AppComponent} from './app.component';
bootstrap(AppComponent);
| import {bootstrap} from '@angular/platform-browser-dynamic';
import {AppComponent} from './app.component';
import {enableProdMode} from '@angular/core';
// enable production mode and thus disable debugging information
enableProdMode();
bootstrap(AppComponent);
| Enable Angular 2 prod mode on website to increase performance. | Enable Angular 2 prod mode on website to increase performance.
| TypeScript | mit | DTU-R3/ArloBot,chrisl8/ArloBot,chrisl8/ArloBot,DTU-R3/ArloBot,DTU-R3/ArloBot,remarvel/ArloBot,remarvel/ArloBot,remarvel/ArloBot,chrisl8/ArloBot,remarvel/ArloBot,chrisl8/ArloBot,DTU-R3/ArloBot,chrisl8/ArloBot,chrisl8/ArloBot,remarvel/ArloBot,DTU-R3/ArloBot,DTU-R3/ArloBot,remarvel/ArloBot | ---
+++
@@ -1,4 +1,8 @@
import {bootstrap} from '@angular/platform-browser-dynamic';
import {AppComponent} from './app.component';
+import {enableProdMode} from '@angular/core';
+
+// enable production mode and thus disable debugging information
+enableProdMode();
bootstrap(AppComponent); |
11738f0da96ca7dd7ebff1c39bc1778f3f0e3e92 | src/keys.ts | src/keys.ts |
import { ECPair, address as baddress } from 'bitcoinjs-lib'
import { randomBytes } from './encryption/cryptoRandom'
import { createSha2Hash } from './encryption/sha2Hash'
import { createHashRipemd160 } from './encryption/hashRipemd160'
/**
*
* @param numberOfBytes
*
* @ignore
*/
export function getEntropy(arg... |
import { ECPair, address as baddress, networks } from 'bitcoinjs-lib'
import { randomBytes } from './encryption/cryptoRandom'
import { createSha2Hash } from './encryption/sha2Hash'
import { createHashRipemd160 } from './encryption/hashRipemd160'
/**
*
* @param numberOfBytes
*
* @ignore
*/
export function getE... | Use proper const for base58Check address encoding | Use proper const for base58Check address encoding
| TypeScript | mit | blockstack/opendig,blockstack/blockstack-cli,blockstack/blockstack-cli | ---
+++
@@ -1,5 +1,5 @@
-import { ECPair, address as baddress } from 'bitcoinjs-lib'
+import { ECPair, address as baddress, networks } from 'bitcoinjs-lib'
import { randomBytes } from './encryption/cryptoRandom'
import { createSha2Hash } from './encryption/sha2Hash'
import { createHashRipemd160 } from './encrypt... |
3bb15c9278d672c4181c1cc36db1e67c0265da35 | packages/components/containers/features/FeaturesContext.ts | packages/components/containers/features/FeaturesContext.ts | import { createContext } from 'react';
export type FeatureType = 'boolean' | 'integer' | 'float' | 'string' | 'enumeration' | 'mixed';
export interface Feature<V = any> {
Code: string;
Type: FeatureType;
DefaultValue: V;
Value: V;
Minimum: number;
Maximum: number;
Global: boolean;
Writ... | import { createContext } from 'react';
export type FeatureType = 'boolean' | 'integer' | 'float' | 'string' | 'enumeration' | 'mixed';
export interface Feature<V = any> {
Code: string;
Type: FeatureType;
DefaultValue: V;
Value: V;
Minimum: number;
Maximum: number;
Global: boolean;
Writ... | Add BE feature flag for Proton to Proton invites | Add BE feature flag for Proton to Proton invites
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -23,8 +23,8 @@
UsedMailMobileApp = 'UsedMailMobileApp',
UsedContactsImport = 'UsedContactsImport',
CanUserSendFeedback = 'CanUserSendFeedback',
- CalendarExport = 'CalendarExport',
EnabledEncryptedSearch = 'EnabledEncryptedSearch',
+ EnabledProtonProtonInvites = 'EnabledProtonProt... |
b6ea06b8381802f611ebca36cbf435a7e81d6b0b | src/core/screenreader/translations/translate.ts | src/core/screenreader/translations/translate.ts | import { add } from '../../../_modules/i18n';
import nl from './nl';
import fa from './fa';
import de from './de';
import ru from './ru';
import pt_br from './pt_br';
export default function() {
add(nl, 'nl');
add(fa, 'fa');
add(de, 'de');
add(pt_br, 'pt_br');
}
| import { add } from '../../../_modules/i18n';
import nl from './nl';
import fa from './fa';
import de from './de';
import ru from './ru';
import pt_br from './pt_br';
export default function() {
add(nl, 'nl');
add(fa, 'fa');
add(de, 'de');
add(ru, 'ru');
add(pt_br, 'pt_br');
}
| Fix some mistake on PR. | Fix some mistake on PR. | TypeScript | mit | BeSite/jQuery.mmenu,BeSite/jQuery.mmenu | ---
+++
@@ -10,5 +10,6 @@
add(nl, 'nl');
add(fa, 'fa');
add(de, 'de');
+ add(ru, 'ru');
add(pt_br, 'pt_br');
} |
2c5fb70dd4a73051f3117ad6f6f0a2b3b72e238e | spec/TsSyntaxTest.ts | spec/TsSyntaxTest.ts | /**
This file purely exists to make sure the expected syntax passes typescript type-checking
*/
import TminusLib = require("../src/lib");
function noop() {
var control = TminusLib.countdown({
endTime: new Date().getTime() + (1000 * 60 * 60),
target: <NodeListOf<HTMLElement>>document.querySelecto... | /**
This file purely exists to make sure the expected syntax passes typescript type-checking
*/
import TminusLib = require("../src/lib");
function noop() {
var control = TminusLib.countdown({
endTime: new Date().getTime() + (1000 * 60 * 60),
target: <NodeListOf<HTMLElement>>document.querySelecto... | Update test to correspond with the outer syntax | Update test to correspond with the outer syntax
| TypeScript | mit | ChronusEU/lib-tminus.js,ChronusEU/lib-tminus.js,ChronusEU/lib-tminus.js | ---
+++
@@ -7,7 +7,23 @@
function noop() {
var control = TminusLib.countdown({
endTime: new Date().getTime() + (1000 * 60 * 60),
- target: <NodeListOf<HTMLElement>>document.querySelectorAll('#countdown')
+ target: <NodeListOf<HTMLElement>>document.querySelectorAll('#countdown'),
+ ... |
c5fe83cb119f84ccd3ba6155e4544fc7a207fdd1 | examples/browser/main.ts | examples/browser/main.ts | import * as Gtk from '../../out/Gtk'
import * as WebKit from '../../out/WebKit'
Gtk.init(null)
let wnd = new Gtk.Window({ title: 'Browser Test', default_width: 400, default_height: 300 })
let box = new Gtk.Box({ })
let scroll = new Gtk.ScrolledWindow({ })
let webview = new WebKit.WebView({ })
webview.load_uri("h... | import * as Gtk from '../../out/Gtk';
import { FontDescription } from '../../out/Pango';
import * as WebKit from '../../out/WebKit';
function makeBackButton(label: string) {
let but = new Gtk.Button({ label: label })
but.get_child().modify_font(FontDescription.from_string('sans bold 16'))
return but
}
Gtk... | Improve web browser example a little. | Improve web browser example a little.
| TypeScript | apache-2.0 | sammydre/ts-for-gjs,sammydre/ts-for-gjs | ---
+++
@@ -1,15 +1,30 @@
-import * as Gtk from '../../out/Gtk'
-import * as WebKit from '../../out/WebKit'
+import * as Gtk from '../../out/Gtk';
+import { FontDescription } from '../../out/Pango';
+import * as WebKit from '../../out/WebKit';
+
+function makeBackButton(label: string) {
+ let but = new Gtk.Butt... |
3353e7005e5de3913dc960e1cbeefac48f5da0cc | client/components/Modal/PageCreateModal.stories.tsx | client/components/Modal/PageCreateModal.stories.tsx | import React from 'react'
import PageCreateModal from './PageCreateModal'
import Crowi from '../../util/Crowi'
import i18n from '../../i18n'
i18n()
const crowi = new Crowi({ user: {}, csrfToken: '' }, window)
export default { title: 'Modal/PageCreateModal' }
export const Default = () => <PageCreateModal crowi={crow... | import React from 'react'
import PageCreateModal from './PageCreateModal'
import Crowi from '../../util/Crowi'
import i18n from '../../i18n'
i18n()
const crowi = new Crowi({ user: { name: 'storybook' }, csrfToken: '' }, window)
export default { title: 'Modal/PageCreateModal' }
export const Default = () => <PageCrea... | Add user name to PageCreateModal story | Add user name to PageCreateModal story
| TypeScript | mit | crowi/crowi,crowi/crowi,crowi/crowi | ---
+++
@@ -5,7 +5,7 @@
i18n()
-const crowi = new Crowi({ user: {}, csrfToken: '' }, window)
+const crowi = new Crowi({ user: { name: 'storybook' }, csrfToken: '' }, window)
export default { title: 'Modal/PageCreateModal' }
|
c607a6a498eaee150560093625d8148113168a39 | src/lib/processors/throttler.ts | src/lib/processors/throttler.ts | import Processor from './processor';
export default class Throttler extends Processor {
private eventsPerPeriod: number;
private eventsInProgress: number = 0;
private periodInMS: number;
private queue: any[] = [];
constructor(options) {
super(options);
this.eventsPerPeriod = this.input[0];
this.... | import Processor from './processor';
export default class Throttler extends Processor {
private eventsPerPeriod: number;
private eventsInProgress: number = 0;
private periodInMS: number;
private queue: any[] = [];
constructor(options) {
super(options);
this.eventsPerPeriod = this.input[0];
this.... | Use const insead of var | Use const insead of var
| TypeScript | isc | Workable/aggregator-eip | ---
+++
@@ -15,7 +15,7 @@
processQueue() {
if (this.queue.length > 0) {
- var event = this.queue.shift();
+ const event = this.queue.shift();
this.addEvent();
this.inject(() => event);
} |
3cf03ced32ba24df96fa646969e8f628f57bbe2b | src/core/vg-media/i-playable.ts | src/core/vg-media/i-playable.ts | import {Observable} from "rxjs/Observable";
export interface IPlayable {
id:string;
elem:any;
time:any;
buffer:any;
track?:any;
canPlay:boolean;
canPlayThrough:boolean;
isMetadataLoaded:boolean;
isWaiting:boolean;
isCompleted:boolean;
isLive:boolean;
state:string;
su... | import {Observable} from "rxjs/Observable";
export interface IPlayable {
id:string;
elem:any;
time:any;
buffer:any;
track?:any; // its optional, need in add custom cue (addTextTrack)
canPlay:boolean;
canPlayThrough:boolean;
isMetadataLoaded:boolean;
isWaiting:boolean;
isCom... | Add create track and cues dynamically | Add create track and cues dynamically
| TypeScript | mit | videogular/videogular2,videogular/videogular2,amitkumarmahajan/videogular2,amitkumarmahajan/videogular2,amitkumarmahajan/videogular2,kwarismian/videogular2,videogular/videogular2,kwarismian/videogular2,kwarismian/videogular2 | ---
+++
@@ -5,7 +5,7 @@
elem:any;
time:any;
buffer:any;
- track?:any;
+ track?:any; // its optional, need in add custom cue (addTextTrack)
canPlay:boolean;
canPlayThrough:boolean;
isMetadataLoaded:boolean; |
d84b2df520991b1681736b4786c601eb38d97a0a | src/nerdbank-gitversioning.npm/ts/index.ts | src/nerdbank-gitversioning.npm/ts/index.ts | 'use strict';
import http = require('http');
import * as q from 'q';
import * as request from 'request';
import * as fs from 'fs';
async function existsAsync(path: string) {
return new Promise<boolean>(resolve => fs.exists(path, resolve));
};
export async function downloadNuGetExe(): Promise<string> {
const ... | 'use strict';
import http = require('http');
import * as q from 'q';
import * as request from 'request';
import * as fs from 'fs';
import {exec} from 'child_process';
function existsAsync(path: string) {
return new Promise<boolean>(resolve => fs.exists(path, resolve));
};
function execAsync(command: string) {
... | Install NB.GV in node script | Install NB.GV in node script
| TypeScript | mit | AArnott/Nerdbank.GitVersioning,AArnott/Nerdbank.GitVersioning,AArnott/Nerdbank.GitVersioning | ---
+++
@@ -4,12 +4,24 @@
import * as q from 'q';
import * as request from 'request';
import * as fs from 'fs';
+import {exec} from 'child_process';
-async function existsAsync(path: string) {
+function existsAsync(path: string) {
return new Promise<boolean>(resolve => fs.exists(path, resolve));
};
-expo... |
e6244de6e32a5fd8119fe304f519ca076fb34d81 | types/leaflet.locatecontrol/leaflet.locatecontrol-tests.ts | types/leaflet.locatecontrol/leaflet.locatecontrol-tests.ts | var map: L.Map;
// Defaults
L.control.locate().addTo(map);
// Simple
var lc = L.control.locate({
position: 'topright',
strings: {
title: "Show me where I am, yo!"
}
}).addTo(map);
// Locate Options
map.addControl(L.control.locate({
locateOptions: {
maxZoom: 10,
enableHighAccur... | var map = L.map('map', {
center: [51.505, -0.09],
zoom: 13
});
// Defaults
L.control.locate().addTo(map);
// Simple
var lc = L.control.locate({
position: 'topright',
strings: {
title: "Show me where I am, yo!"
}
}).addTo(map);
// Locate Options
map.addControl(L.control.locate({
locate... | Update tests because of linting | Update tests because of linting
| TypeScript | mit | ashwinr/DefinitelyTyped,markogresak/DefinitelyTyped,zuzusik/DefinitelyTyped,zuzusik/DefinitelyTyped,georgemarshall/DefinitelyTyped,YousefED/DefinitelyTyped,isman-usoh/DefinitelyTyped,arusakov/DefinitelyTyped,laurentiustamate94/DefinitelyTyped,chrootsu/DefinitelyTyped,johan-gorter/DefinitelyTyped,mcliment/DefinitelyType... | ---
+++
@@ -1,4 +1,7 @@
-var map: L.Map;
+var map = L.map('map', {
+ center: [51.505, -0.09],
+ zoom: 13
+});
// Defaults
L.control.locate().addTo(map); |
5764e028b4e56421868a896554f5f1bfaca0fc6c | website/examples/start.tsx | website/examples/start.tsx | import React from 'react';
import { format } from 'date-fns';
import { DayPicker } from 'react-day-picker';
import 'react-day-picker/dist/style.css';
export default function Example() {
const [selected, setSelected] = React.useState<Date>();
let footer = 'Please pick a day.';
if (selected) {
footer = `You ... | import React from 'react';
import { format } from 'date-fns';
import { DayPicker } from 'react-day-picker';
export default function Example() {
const [selected, setSelected] = React.useState<Date>();
let footer = 'Please pick a day.';
if (selected) {
footer = `You picked ${format(selected, 'PP')}.`;
}
... | Revert "docs: include css in example" | Revert "docs: include css in example"
This reverts commit 7f1d7aea4591cf4528fc8a5ec9cdc252d81555d4.
| TypeScript | mit | gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker | ---
+++
@@ -2,7 +2,6 @@
import { format } from 'date-fns';
import { DayPicker } from 'react-day-picker';
-import 'react-day-picker/dist/style.css';
export default function Example() {
const [selected, setSelected] = React.useState<Date>(); |
331f08f6403a59810cb3e20e106d33e8dd0a4984 | packages/core/src/webpack/image-assets-extensions.ts | packages/core/src/webpack/image-assets-extensions.ts | /**
* Extensions of all assets that can be served via url
*/
export const imageAssetsExtensions = [
'bmp',
'gif',
'ico',
'jpeg',
'jpg',
'png',
'svg',
'tif',
'tiff',
];
| /**
* Extensions of all assets that can be served via url
*/
export const imageAssetsExtensions = [
'bmp',
'gif',
'ico',
'jpeg',
'jpg',
'png',
'svg',
'tif',
'tiff',
'webp',
'avif',
];
| Add webp and avif as image format | Add webp and avif as image format
| TypeScript | mit | Atyantik/react-pwa,Atyantik/react-pwa | ---
+++
@@ -11,4 +11,6 @@
'svg',
'tif',
'tiff',
+ 'webp',
+ 'avif',
]; |
4a77f74116bccfc07bb649457fe454761f219f91 | src/index.ts | src/index.ts | import { fixture as f } from './fixture'
export default f
export * from './interfaces'
import fs = require('fs')
import path = require('path')
const cache = {}
export function fixture(dir) {
const absDir = path.resolve(dir)
cache[absDir] = {}
const files = fs.readdirSync(absDir)
files.forEach(file => {
... | import { fixture as f } from './fixture'
export default f
export * from './interfaces'
import { readdirSync, statSync } from 'fs'
import { join, resolve } from 'path'
const cache = {}
export function fixture(dir) {
const absDir = resolve(dir)
cache[absDir] = {}
const files = readdirSync(absDir)
files.forEac... | Use named export interop to build es2015 | Use named export interop to build es2015
| TypeScript | mit | unional/ava-fixture,unional/ava-fixture | ---
+++
@@ -3,17 +3,17 @@
export default f
export * from './interfaces'
-import fs = require('fs')
-import path = require('path')
+import { readdirSync, statSync } from 'fs'
+import { join, resolve } from 'path'
const cache = {}
export function fixture(dir) {
- const absDir = path.resolve(dir)
+ const absDi... |
a96bdc08c16222f1b4850e459360478c2db949ea | src/main/ts/talks.ts | src/main/ts/talks.ts | class TalksCtrl{
constructor() {
const favoriteButtons = document.getElementsByClassName('mxt-img--favorite');
Array.from(favoriteButtons).forEach((favoriteButton: HTMLElement) => favoriteButton.onclick= this.favoriteToggle);
}
favoriteToggle(event) {
const img = event.srcElement;
const email =... | class TalksCtrl{
constructor() {
const favoriteButtons = document.getElementsByClassName('mxt-img--favorite');
Array.from(favoriteButtons).forEach((favoriteButton: HTMLElement) => favoriteButton.onclick= this.favoriteToggle);
}
favoriteToggle(event) {
const img = event.srcElement;
const email = <... | Fix bug on propagation event on talk page | Fix bug on propagation event on talk page
| TypeScript | apache-2.0 | mixitconf/mixit,mix-it/mixit,mix-it/mixit,mixitconf/mixit,mix-it/mixit,mixitconf/mixit,mix-it/mixit,mixitconf/mixit,mix-it/mixit | ---
+++
@@ -1,12 +1,13 @@
class TalksCtrl{
constructor() {
const favoriteButtons = document.getElementsByClassName('mxt-img--favorite');
- Array.from(favoriteButtons).forEach((favoriteButton: HTMLElement) => favoriteButton.onclick= this.favoriteToggle);
+ Array.from(favoriteButtons).forEach((favorite... |
58014ce1b4fa0793ca38a11f235c7adccb05fa25 | src/extension/providers/source_code_action_provider.ts | src/extension/providers/source_code_action_provider.ts | import { CancellationToken, CodeAction, CodeActionContext, CodeActionKind, CodeActionProvider, CodeActionProviderMetadata, Range, TextDocument } from "vscode";
import { isAnalyzableAndInWorkspace } from "../utils";
const SourceSortMembers = CodeActionKind.Source.append("sortMembers");
export class SourceCodeActionPro... | import { CancellationToken, CodeAction, CodeActionContext, CodeActionKind, CodeActionProvider, CodeActionProviderMetadata, Range, TextDocument } from "vscode";
import { isAnalyzableAndInWorkspace } from "../utils";
const SourceSortMembers = CodeActionKind.Source.append("sortMembers");
export class SourceCodeActionPro... | Fix advertising of source actions based on context.only | Fix advertising of source actions based on context.only
| TypeScript | mit | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | ---
+++
@@ -5,32 +5,45 @@
export class SourceCodeActionProvider implements CodeActionProvider {
public readonly metadata: CodeActionProviderMetadata = {
- providedCodeActionKinds: [CodeActionKind.SourceOrganizeImports, SourceSortMembers],
+ providedCodeActionKinds: [CodeActionKind.Source, CodeActionKind.Source... |
0174bdd22a1a5ffba34f6f76b69323198cd0cee9 | src/app/store/map-layers/map-layers.reducer.spec.ts | src/app/store/map-layers/map-layers.reducer.spec.ts | /* tslint:disable:no-unused-variable */
/*!
* Map Layers Reducer Test
*
* Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph>
* Licensed under MIT
*/
import { async, inject } from '@angular/core/testing';
import { MapLayersReducer } from './map-layers.reducer';
describe('NgRx Store Reducer: Map Laye... | /* tslint:disable:no-unused-variable */
/*!
* Map Layers Reducer Test
*
* Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph>
* Licensed under MIT
*/
import { async, inject } from '@angular/core/testing';
import { MapLayersReducer, LayerState } from './map-layers.reducer';
import { assign } from 'lod... | Implement unit test for map layers reducer | Implement unit test for map layers reducer
| TypeScript | mit | ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-interactive-maps | ---
+++
@@ -8,14 +8,94 @@
*/
import { async, inject } from '@angular/core/testing';
-import { MapLayersReducer } from './map-layers.reducer';
+import { MapLayersReducer, LayerState } from './map-layers.reducer';
+import { assign } from 'lodash';
describe('NgRx Store Reducer: Map Layers', () => {
+
+ const in... |
205ffb91715751a757ea08f2b46d616d74bd3446 | yamcs-web/packages/app/src/app/system/template/SystemPage.ts | yamcs-web/packages/app/src/app/system/template/SystemPage.ts | import { ChangeDetectionStrategy, Component } from '@angular/core';
import { Instance } from '@yamcs/client';
import { AuthService } from '../../core/services/AuthService';
import { YamcsService } from '../../core/services/YamcsService';
import { User } from '../../shared/User';
@Component({
templateUrl: './SystemPa... | import { ChangeDetectionStrategy, Component } from '@angular/core';
import { Instance } from '@yamcs/client';
import { AuthService } from '../../core/services/AuthService';
import { YamcsService } from '../../core/services/YamcsService';
import { User } from '../../shared/User';
@Component({
templateUrl: './SystemPa... | Improve hiding of Streams page if insufficient privileges | Improve hiding of Streams page if insufficient privileges
| TypeScript | agpl-3.0 | fqqb/yamcs,yamcs/yamcs,m-sc/yamcs,fqqb/yamcs,yamcs/yamcs,fqqb/yamcs,m-sc/yamcs,yamcs/yamcs,yamcs/yamcs,m-sc/yamcs,m-sc/yamcs,fqqb/yamcs,fqqb/yamcs,fqqb/yamcs,m-sc/yamcs,m-sc/yamcs,yamcs/yamcs,yamcs/yamcs | ---
+++
@@ -28,6 +28,12 @@
}
showStreamsItem() {
- return this.user.isSuperuser() || this.user.getSystemPrivileges().length > 0;
+ const objectPrivileges = this.user.getObjectPrivileges();
+ for (const priv of objectPrivileges) {
+ if (priv.type === 'Stream') {
+ return true;
+ }
+ ... |
94b4f2ec874903ac3906df1cedf8de865640ac6b | packages/turf-length/index.ts | packages/turf-length/index.ts | import distance from '@turf/distance';
import { segmentReduce } from '@turf/meta';
import { Feature, FeatureCollection, LineString, MultiLineString, GeometryCollection, Units } from '@turf/helpers';
/**
* Takes a {@link GeoJSON} and measures its length in the specified units, {@link (Multi)Point}'s distance are ignor... | import distance from '@turf/distance';
import { segmentReduce } from '@turf/meta';
import { Feature, FeatureCollection, LineString, MultiLineString, GeometryCollection, Units } from '@turf/helpers';
/**
* Takes a {@link GeoJSON} and measures its length in the specified units, {@link (Multi)Point}'s distance are ignor... | Refactor length-function for TypeScript strict mode and some other minor enhancements. | Refactor length-function for TypeScript strict mode and some other minor enhancements.
| TypeScript | mit | dpmcmlxxvi/turf,tilemapjp/turf,dpmcmlxxvi/turf,dpmcmlxxvi/turf,tilemapjp/turf,Turfjs/turf,tilemapjp/turf,Turfjs/turf,Turfjs/turf | ---
+++
@@ -21,9 +21,9 @@
export default function length(geojson: Feature<any> | FeatureCollection<any> | GeometryCollection, options: {
units?: Units
} = {}): number {
- // Calculate distance from 2-vertex line segements
- return segmentReduce(geojson, function (previousValue, segment) {
- var co... |
4880f50d11566b6d58e820e39b0708f291d6d33f | src/SyntaxNodes/LineBlockNode.ts | src/SyntaxNodes/LineBlockNode.ts | import { InlineSyntaxNode } from './InlineSyntaxNode'
import { OutlineSyntaxNode } from './OutlineSyntaxNode'
export class LineBlockNode implements OutlineSyntaxNode {
constructor(public lines: LineBlockNode.Line[]) { }
OUTLINE_SYNTAX_NODE(): void { }
}
export module LineBlockNode {
export class Line {
c... | import { InlineSyntaxNode } from './InlineSyntaxNode'
import { OutlineSyntaxNode } from './OutlineSyntaxNode'
import { InlineSyntaxNodeContainer } from './InlineSyntaxNodeContainer'
export class LineBlockNode implements OutlineSyntaxNode {
constructor(public lines: LineBlockNode.Line[]) { }
OUTLINE_SYNTAX_NODE()... | Make line explicitly impl. inline container | Make line explicitly impl. inline container
| TypeScript | mit | start/up,start/up | ---
+++
@@ -1,5 +1,6 @@
import { InlineSyntaxNode } from './InlineSyntaxNode'
import { OutlineSyntaxNode } from './OutlineSyntaxNode'
+import { InlineSyntaxNodeContainer } from './InlineSyntaxNodeContainer'
export class LineBlockNode implements OutlineSyntaxNode {
@@ -10,7 +11,7 @@
export module LineBlock... |
03aeef911ff3b195c65c64e0ebf6bf493f8c45f8 | ravenjs/ravenjs-tests.ts | ravenjs/ravenjs-tests.ts | /// <reference path="ravenjs.d.ts" />
var options: RavenOptions = {
logger: 'my-logger',
ignoreUrls: [
/graph\.facebook\.com/i
],
ignoreErrors: [
'fb_xd_fragment'
],
includePaths: [
/https?:\/\/(www\.)?getsentry\.com/,
/https?:\/\/d3nslu0hdya83q\.cloudfront\.net/... | /// <reference path="ravenjs.d.ts" />
var options: RavenOptions = {
logger: 'my-logger',
ignoreUrls: [
/graph\.facebook\.com/i
],
ignoreErrors: [
'fb_xd_fragment'
],
includePaths: [
/https?:\/\/(www\.)?getsentry\.com/,
/https?:\/\/d3nslu0hdya83q\.cloudfront\.net/... | Update ravenjs tests to reflect new API | test: Update ravenjs tests to reflect new API | TypeScript | mit | shlomiassaf/DefinitelyTyped,daptiv/DefinitelyTyped,zuzusik/DefinitelyTyped,Litee/DefinitelyTyped,stephenjelfs/DefinitelyTyped,EnableSoftware/DefinitelyTyped,nycdotnet/DefinitelyTyped,wilfrem/DefinitelyTyped,nobuoka/DefinitelyTyped,abbasmhd/DefinitelyTyped,rolandzwaga/DefinitelyTyped,HPFOD/DefinitelyTyped,Litee/Definite... | ---
+++
@@ -33,7 +33,7 @@
setTimeout(Raven.wrap(throwsError), 1000);
Raven.wrap({logger: "my.module"}, throwsError)();
-Raven.setUser({
+Raven.setUserContext({
email: 'matt@example.com',
id: '123'
}); |
c67fb558bd62123ca6add635884e349469e0a999 | src/Test/Ast/OrderedListStart.ts | src/Test/Ast/OrderedListStart.ts |
import { expect } from 'chai'
import * as Up from '../../index'
import { OrderedListNode } from '../../SyntaxNodes/OrderedListNode'
function listStart(text: string): number {
const list = <OrderedListNode>Up.toAst(text).children[0]
return list.start()
}
describe('An ordered list that does not start with a numer... |
import { expect } from 'chai'
import * as Up from '../../index'
import { OrderedListNode } from '../../SyntaxNodes/OrderedListNode'
function listStart(text: string): number {
const list = <OrderedListNode>Up.toAst(text).children[0]
return list.start()
}
describe('An ordered list that does not start with a numer... | Fix ordered list start ordinal test | Fix ordered list start ordinal test
| TypeScript | mit | start/up,start/up | ---
+++
@@ -23,7 +23,7 @@
const text =
`
#. Hello, world!
-5 Goodbye, world!
+5) Goodbye, world!
#) Goodbye, world!`
expect(listStart(text)).to.be.eql(null)
}) |
44f89cd16229f0e8c8818f79a8c102f826ee6f5d | src/components/clickerButton/clickerButton.spec.ts | src/components/clickerButton/clickerButton.spec.ts | import { ComponentFixture, async } from '@angular/core/testing';
import { TestUtils } from '../../test-utils';
import { ClickerButton } from './clickerButton';
import { ClickerMock } from '../../models/clicker.mock';
let fixture: ComponentFixture<ClickerButton> = null;
let instance:... | import { ComponentFixture, async } from '@angular/core/testing';
import { TestUtils } from '../../test-utils';
import { ClickerButton } from './clickerButton';
import { ClickerMock } from '../../models/clicker.mock';
let fixture: ComponentFixture<ClickerButton> = null;
let instance:... | Revert "reverting to old style, using async didn't achieve anything" | Revert "reverting to old style, using async didn't achieve anything"
This reverts commit 094bc82f0ba5cdbc590372190bf6ddd1746fa9f6.
| TypeScript | mit | lathonez/clicker,lathonez/clicker,orthodoc/jointdb,lathonez/clicker,orthodoc/jointdb,orthodoc/jointdb | ---
+++
@@ -28,10 +28,13 @@
expect(fixture.nativeElement.querySelectorAll('.button-inner')[0].innerHTML).toEqual('TEST CLICKER (10)');
});
- it('does a click', () => {
- fixture.detectChanges();
+ it('does a click', async(() => {
spyOn(instance['clickerService'], 'doClick');
- TestUtils.eventFi... |
f9cce11d86789416c0760e04f071e56b1ba65b25 | app/src/component/CreateItem.tsx | app/src/component/CreateItem.tsx | import * as React from "react";
import Plus = require("react-icons/lib/md/add");
import "./style/CreateItem.css";
interface IProps {
createItem: () => void;
}
interface IState {
creatingItem: boolean;
}
export default class extends React.Component<IProps, IState> {
public state: IState = { creatingItem:... | import * as React from "react";
import Plus = require("react-icons/lib/md/add");
import "./style/CreateItem.css";
interface IProps {
createItem: () => void;
}
interface IState {
creatingItem: boolean;
}
export default class extends React.Component<IProps, IState> {
public state: IState = { creatingItem:... | Stop creating item on blur | Stop creating item on blur
| TypeScript | mit | raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d | ---
+++
@@ -19,9 +19,13 @@
if (this.state.creatingItem) {
return (
- <div className="CreateItem-form-container">
+ <div
+ className="CreateItem-form-container"
+ onClick={() => this.setState({ creatingItem: false })}
+ ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.