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 |
|---|---|---|---|---|---|---|---|---|---|---|
7f8894f4e7be0d40b2e6b788e4a1d7b51fb21a46 | src/index.d.ts | src/index.d.ts | import {
Body as NodeBody,
Headers as NodeHeaders,
Request as NodeRequest,
Response as NodeResponse
} from "node-fetch";
declare namespace unfetch {
export type IsomorphicHeaders = Headers | NodeHeaders;
export type IsomorphicBody = Body | NodeBody;
export type IsomorphicResponse = Response | NodeResponse;
export type IsomorphicRequest = Request | NodeRequest
}
declare const unfetch: typeof fetch;
declare module "unfetch" {
export = unfetch;
}
| import {
Body as NodeBody,
Headers as NodeHeaders,
Request as NodeRequest,
Response as NodeResponse
} from "node-fetch";
declare namespace unfetch {
export type IsomorphicHeaders = Headers | NodeHeaders;
export type IsomorphicBody = Body | NodeBody;
export type IsomorphicResponse = Response | NodeResponse;
export type IsomorphicRequest = Request | NodeRequest
}
declare const unfetch: typeof fetch;
export default unfetch;
| Fix for TS error TS2666 | Fix for TS error TS2666
| TypeScript | mit | developit/unfetch | ---
+++
@@ -14,6 +14,4 @@
declare const unfetch: typeof fetch;
-declare module "unfetch" {
- export = unfetch;
-}
+export default unfetch; |
423ce83f971f33dab5ad74e9d03ceadc310a8fc3 | TypeGap/Resources/GeneratedNotice.ts | TypeGap/Resources/GeneratedNotice.ts | //////////////////////////////////////////////////////////////////
//// ////
//// THIS FILE IS AUTO GENERATED ////
//// Changes you make to this file will lost the next time ////
//// the auto generation script runs. ////
//// ////
////////////////////////////////////////////////////////////////// | /* tslint:disable */
//////////////////////////////////////////////////////////////////
//// ////
//// THIS FILE IS AUTO GENERATED ////
//// Changes you make to this file will lost the next time ////
//// the auto generation script runs. ////
//// ////
////////////////////////////////////////////////////////////////// | Add tslint directive to generated files | Add tslint directive to generated files
| TypeScript | mit | BluestoneEU/TypeGap,BluestoneEU/TypeGap,BluestoneEU/TypeGap,BluestoneEU/TypeGap | ---
+++
@@ -1,4 +1,5 @@
-//////////////////////////////////////////////////////////////////
+/* tslint:disable */
+//////////////////////////////////////////////////////////////////
//// ////
//// THIS FILE IS AUTO GENERATED ////
//// Changes you make to this file will lost the next time //// |
b91a30a5b9875ecc7633ef26844edd51c0dc5613 | api_server/src/main/frontend/app/chart/chart-time-spec.ts | api_server/src/main/frontend/app/chart/chart-time-spec.ts | export class ChartTimeSpec {
constructor(public duration_seconds: Number, public end?: Date, public stepsize_seconds?: Number) {}
public getEnd() : Date {
return (this.end ? this.end : new Date());
}
public getBegin() : Date {
return new Date(this.getEnd().getTime() - 1000 * Number(this.duration_seconds));
}
public getStepsizeMsec() : Number {
return (this.stepsize_seconds ? 1000 * Number(this.stepsize_seconds) : null);
}
}
| /*
* Time specifications:
* - begin time only (stream from begin until end-of-data).
* - begin time and end time (stream from begin until end).
* - begin time and duration (treat as end = begin + duration).
* - end time and duration (treat as begin = end - duration).
* - duration only (treat as begin = now() - duration, no end, no duration).
*
* Duration-only is to be interpreted as a sliding window, always displaying
* data between the end-of-data - duration .. end-of-data.
*/
export class ChartTimeSpec {
constructor(public duration_seconds: Number, public end?: Date, public stepsize_seconds?: Number) {}
public getEnd() : Date {
return (this.end ? this.end : new Date());
}
public getBegin() : Date {
return new Date(this.getEnd().getTime() - 1000 * Number(this.duration_seconds));
}
public getStepsizeMsec() : Number {
return (this.stepsize_seconds ? 1000 * Number(this.stepsize_seconds) : null);
}
}
| Document what the spec for time-spec is to be. | Document what the spec for time-spec is to be.
| TypeScript | bsd-3-clause | groupon/monsoon,groupon/monsoon,groupon/monsoon,groupon/monsoon | ---
+++
@@ -1,3 +1,14 @@
+/*
+ * Time specifications:
+ * - begin time only (stream from begin until end-of-data).
+ * - begin time and end time (stream from begin until end).
+ * - begin time and duration (treat as end = begin + duration).
+ * - end time and duration (treat as begin = end - duration).
+ * - duration only (treat as begin = now() - duration, no end, no duration).
+ *
+ * Duration-only is to be interpreted as a sliding window, always displaying
+ * data between the end-of-data - duration .. end-of-data.
+ */
export class ChartTimeSpec {
constructor(public duration_seconds: Number, public end?: Date, public stepsize_seconds?: Number) {}
|
376eb731770ce9d11aa0a215db3b86ddab1131f3 | types/connect-history-api-fallback-exclusions/index.d.ts | types/connect-history-api-fallback-exclusions/index.d.ts | // Type definitions for connect-history-api-fallback-exclusions 1.5
// Project: https://github.com/Wirewheel/connect-history-api-fallback#readme
// Definitions by: Tony Stone <https://github.com/tonystonee>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
import { Url } from 'url';
import * as core from "express-serve-static-core";
declare function historyApiFallback(options?: historyApiFallback.Options): core.RequestHandler;
declare namespace historyApiFallback {
interface Options {
exclusions?: string[];
disableDotRule?: true;
htmlAcceptHeaders?: string[];
index?: string;
logger?: typeof console.log;
rewrites?: Rewrite[];
verbose?: boolean;
}
interface Context {
match: RegExpMatchArray;
parsedUrl: Url;
}
type RewriteTo = (context: Context) => string;
interface Rewrite {
from: RegExp;
to: string | RegExp | RewriteTo;
}
}
export = historyApiFallback;
| // Type definitions for connect-history-api-fallback-exclusions 1.5
// Project: https://github.com/Wirewheel/connect-history-api-fallback#readme
// Definitions by: Tony Stone <https://github.com/tonystonee>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
import { Url } from 'url';
import * as core from "express-serve-static-core";
declare function historyApiFallback(options?: historyApiFallback.Options): core.RequestHandler;
declare namespace historyApiFallback {
interface Options {
exclusions?: string[];
disableDotRule?: true;
htmlAcceptHeaders?: string[];
index?: string;
logger?: typeof console.log;
rewrites?: Rewrite[];
verbose?: boolean;
}
interface Context {
match: RegExpMatchArray;
parsedUrl: Url;
}
type RewriteTo = (context: Context) => string;
interface Rewrite {
from: RegExp;
to: string | RegExp | RewriteTo;
}
}
export = historyApiFallback;
| Remove trailing whitespace for Travis | Remove trailing whitespace for Travis
| TypeScript | mit | dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,mcliment/DefinitelyTyped,georgemarshall/DefinitelyTyped,dsebastien/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,markogresak/DefinitelyTyped,georgemarshall/DefinitelyTyped | ---
+++
@@ -22,13 +22,13 @@
rewrites?: Rewrite[];
verbose?: boolean;
}
-
+
interface Context {
match: RegExpMatchArray;
parsedUrl: Url;
}
type RewriteTo = (context: Context) => string;
-
+
interface Rewrite {
from: RegExp;
to: string | RegExp | RewriteTo; |
c3f5e6c77c462ee836e228f1cbda4dfb0a44cef2 | global.ts | global.ts | export var MAIN_EXTENSION_ID = 'gjfpooppigdbnojgpjhcbmlphmplomfo';
export var HELPER_EXTENSION_ID = 'chnomchpocolfpeolppjhnhlhlgpkogo';
export interface Message {
type: string;
}
/**
* P2P Web Proxy ̃zXg\
*/
export interface HostInfoMessage extends Message {
host: string;
port: number;
enabled: boolean;
}
/**
* P2P Web Proxy ̃CAvIȂ߂ɑ郁bZ[W
*/
export interface KeepAliveMessage extends Message {
needHostInfo?: boolean;
}
/**
* P2P Web Proxy ̃ubNXg
*/
export interface BlackListMessage extends Message {
url: string;
}
| // Desc : 2つの拡張機能に共通する定数とインターフェイスの定義
// License: MIT License
// Author : pine613<https://github.com/pine613>
// Copyright (C) 2014-2015 Pine Mizune.
/**
* メイン拡張機能 (Akame) の ID
*/
export var MAIN_EXTENSION_ID = 'gjfpooppigdbnojgpjhcbmlphmplomfo';
/**
* サブ拡張機能 (Kurome) の ID
*/
export var HELPER_EXTENSION_ID = 'chnomchpocolfpeolppjhnhlhlgpkogo';
/**
* 拡張機能間メッセージの共通フォーマット
*/
export interface Message {
type: string;
}
/**
* P2P Web Proxy のホスト情報を表す
*/
export interface HostInfoMessage extends Message {
host: string;
port: number;
enabled: boolean;
}
/**
* P2P Web Proxy のメインアプリが終了しないために送るメッセージ
*/
export interface KeepAliveMessage extends Message {
needHostInfo?: boolean;
}
/**
* P2P Web Proxy のブラックリスト
* (通信が失敗しため、直接接続でデータを取得する URL)
*/
export interface BlackListMessage extends Message {
url: string;
}
| Add comment & fix encoding | Add comment & fix encoding
| TypeScript | mit | WebRTC-CacheSharing/AkaKurome | ---
+++
@@ -1,14 +1,28 @@
+// Desc : 2つの拡張機能に共通する定数とインターフェイスの定義
+// License: MIT License
+// Author : pine613<https://github.com/pine613>
+// Copyright (C) 2014-2015 Pine Mizune.
+
+/**
+ * メイン拡張機能 (Akame) の ID
+ */
export var MAIN_EXTENSION_ID = 'gjfpooppigdbnojgpjhcbmlphmplomfo';
+
+/**
+ * サブ拡張機能 (Kurome) の ID
+ */
export var HELPER_EXTENSION_ID = 'chnomchpocolfpeolppjhnhlhlgpkogo';
-
+/**
+ * 拡張機能間メッセージの共通フォーマット
+ */
export interface Message {
type: string;
}
/**
- * P2P Web Proxy ̃zXg\
- */
+ * P2P Web Proxy のホスト情報を表す
+ */
export interface HostInfoMessage extends Message {
host: string;
port: number;
@@ -16,15 +30,16 @@
}
/**
- * P2P Web Proxy ̃CAvIȂ߂ɑ郁bZ[W
- */
+ * P2P Web Proxy のメインアプリが終了しないために送るメッセージ
+ */
export interface KeepAliveMessage extends Message {
needHostInfo?: boolean;
}
/**
- * P2P Web Proxy ̃ubNXg
- */
+ * P2P Web Proxy のブラックリスト
+ * (通信が失敗しため、直接接続でデータを取得する URL)
+ */
export interface BlackListMessage extends Message {
url: string;
} |
fd158335894564ad407eecfcc9a8a1eb95db16c6 | TheCollection.Web/ClientApp/thunks/tea/dashboard.ts | TheCollection.Web/ClientApp/thunks/tea/dashboard.ts | import { fetch, addTask } from 'domain-task';
import { routerActions, RouterAction } from 'react-router-redux';
import { AppThunkAction } from '../../store';
import { IRefValue } from '../../interfaces/IRefValue';
import { ICountBy } from '../../interfaces/ICountBy';
import { RECIEVE_BAGTYPECOUNT, REQUEST_BAGTYPECOUNT } from '../../constants/tea/dashboard';
import { ReceiveBagTypeCountAction, RequestBagTypeCountAction } from '../../actions/tea/dashboard';
export const requestBagTypeCount = {
requestBagTypeCount: (): AppThunkAction<ReceiveBagTypeCountAction | RequestBagTypeCountAction> => (dispatch, getState) => {
try {
let fetchTask = fetch(`/api/tea/Dashboard/BagTypes/`, { credentials: 'same-origin' })
.then(response => response.json() as Promise<ICountBy<IRefValue>[]>)
.then(data => {
dispatch({ type: RECIEVE_BAGTYPECOUNT, bagtypecount: data });
addTask(fetchTask); // ensure server-side prerendering waits for this to complete
});
} catch (err) {
dispatch({ type: RECIEVE_BAGTYPECOUNT, bagtypecount: undefined });
}
dispatch({ type: REQUEST_BAGTYPECOUNT });
},
};
| import { fetch, addTask } from 'domain-task';
import { routerActions, RouterAction } from 'react-router-redux';
import { AppThunkAction } from '../../store';
import { IRefValue } from '../../interfaces/IRefValue';
import { ICountBy } from '../../interfaces/ICountBy';
import { RECIEVE_BAGTYPECOUNT, REQUEST_BAGTYPECOUNT } from '../../constants/tea/dashboard';
import { ReceiveBagTypeCountAction, RequestBagTypeCountAction } from '../../actions/tea/dashboard';
export const requestBagTypeCount = {
requestBagTypeCount: (): AppThunkAction<ReceiveBagTypeCountAction | RequestBagTypeCountAction> => (dispatch, getState) => {
try {
let fetchTask = fetch(`/api/tea/Dashboards/BagTypes/`, { credentials: 'same-origin' })
.then(response => response.json() as Promise<ICountBy<IRefValue>[]>)
.then(data => {
dispatch({ type: RECIEVE_BAGTYPECOUNT, bagtypecount: data });
addTask(fetchTask); // ensure server-side prerendering waits for this to complete
});
} catch (err) {
dispatch({ type: RECIEVE_BAGTYPECOUNT, bagtypecount: undefined });
}
dispatch({ type: REQUEST_BAGTYPECOUNT });
},
};
| Fix worng api path call | Fix worng api path call
| TypeScript | apache-2.0 | projecteon/thecollection,projecteon/thecollection,projecteon/thecollection,projecteon/thecollection | ---
+++
@@ -9,7 +9,7 @@
export const requestBagTypeCount = {
requestBagTypeCount: (): AppThunkAction<ReceiveBagTypeCountAction | RequestBagTypeCountAction> => (dispatch, getState) => {
try {
- let fetchTask = fetch(`/api/tea/Dashboard/BagTypes/`, { credentials: 'same-origin' })
+ let fetchTask = fetch(`/api/tea/Dashboards/BagTypes/`, { credentials: 'same-origin' })
.then(response => response.json() as Promise<ICountBy<IRefValue>[]>)
.then(data => {
dispatch({ type: RECIEVE_BAGTYPECOUNT, bagtypecount: data }); |
e1c205e50ce11b787f7f2dc745673858167e7b89 | packages/openspec/src/common/OpenSpecVersions.ts | packages/openspec/src/common/OpenSpecVersions.ts | export type OS2Versions = "2.0";
export type OS3Versions = "3.0.1" | "3.0.2" | "3.0.3" | "3.1.0";
export type OpenSpecVersions = OS2Versions | OS3Versions;
| export type OS2Versions = "2.0";
export type OS3Versions = "3.0.1" | "3.0.2" | "3.0.3";
export type OpenSpecVersions = OS2Versions | OS3Versions;
| Remove the unsupported 3.1.0 version by swagger-ui | fix(swagger): Remove the unsupported 3.1.0 version by swagger-ui
| TypeScript | mit | Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators | ---
+++
@@ -1,3 +1,3 @@
export type OS2Versions = "2.0";
-export type OS3Versions = "3.0.1" | "3.0.2" | "3.0.3" | "3.1.0";
+export type OS3Versions = "3.0.1" | "3.0.2" | "3.0.3";
export type OpenSpecVersions = OS2Versions | OS3Versions; |
962e382290ffee5f1f866d995af4d1577fb3534a | src/main.ts | src/main.ts | import Sound = require("./lib/sound");
"use strict";
function main() {
var sound = new Sound();
var innocence = ["D5", "E5", "G5", "A5", "B5", "G5"];
var currentPlayIndex = 0;
document.addEventListener("click", () => {
if (currentPlayIndex === innocence.length) {
currentPlayIndex = 0;
}
var osc = sound.oscillator(innocence[currentPlayIndex]);
osc.connect(sound.ctx.destination);
osc.start(0);
setTimeout(() => {
osc.stop(0);
}, 200);
currentPlayIndex++;
});
}
document.addEventListener("DOMContentLoaded", main, false);
| /// <reference path="../DefinitelyTyped/fabricjs/fabricjs.d.ts" />
import Sound = require("./lib/sound");
"use strict";
class Line {
static create(coords: number[]) {
return new fabric.Line(coords, {
fill: "#51917a",
stroke: "#51917a",
strokeWidth: 10,
selectable: false
});
}
static draw(canvas: fabric.IStaticCanvas, coords: number[]): fabric.ILine {
var line = Line.create(coords);
canvas.add(line);
return line;
}
}
function main() {
var windowW = window.innerWidth,
windowH = window.innerHeight;
var currentPlayIndex = 0;
var canvas = new fabric.Canvas("c");
canvas.setWidth(windowW);
canvas.setHeight(windowH);
var lines = [
[0, (windowH / 2), windowW, (windowH / 2)],
[(windowW / 3.6), 0, (windowW / 3.6), windowH],
[(windowW / 1.25), 0, (windowW / 10), windowH],
[(windowW / 3.9), 0, (windowW / 1.5), windowH],
[0, (windowH / 4), windowW, (windowH / 4)],
[(windowW / 1.8), 0, (windowW / 2.8), windowH]
];
document.addEventListener("click", () => {
if (currentPlayIndex === innocence.length) {
currentPlayIndex = 0;
}
var osc = sound.oscillator(innocence[currentPlayIndex]);
osc.connect(sound.ctx.destination);
var line = Line.draw(canvas, lines[currentPlayIndex]);
(<any>line).animate('opacity', 0, {
onChange: canvas.renderAll.bind(canvas),
duration: 1000
});
currentPlayIndex++;
});
}
document.addEventListener("DOMContentLoaded", main, false);
| Add draw lines at click event | Add draw lines at click event
| TypeScript | mit | kubosho/ano-gakki,kubosho/ano-gakki,kubosho/ano-gakki,kubosho/ano-gakki | ---
+++
@@ -1,11 +1,43 @@
+/// <reference path="../DefinitelyTyped/fabricjs/fabricjs.d.ts" />
import Sound = require("./lib/sound");
"use strict";
+class Line {
+ static create(coords: number[]) {
+ return new fabric.Line(coords, {
+ fill: "#51917a",
+ stroke: "#51917a",
+ strokeWidth: 10,
+ selectable: false
+ });
+ }
+
+ static draw(canvas: fabric.IStaticCanvas, coords: number[]): fabric.ILine {
+ var line = Line.create(coords);
+ canvas.add(line);
+ return line;
+ }
+}
+
function main() {
- var sound = new Sound();
- var innocence = ["D5", "E5", "G5", "A5", "B5", "G5"];
+ var windowW = window.innerWidth,
+ windowH = window.innerHeight;
+
var currentPlayIndex = 0;
+
+ var canvas = new fabric.Canvas("c");
+ canvas.setWidth(windowW);
+ canvas.setHeight(windowH);
+
+ var lines = [
+ [0, (windowH / 2), windowW, (windowH / 2)],
+ [(windowW / 3.6), 0, (windowW / 3.6), windowH],
+ [(windowW / 1.25), 0, (windowW / 10), windowH],
+ [(windowW / 3.9), 0, (windowW / 1.5), windowH],
+ [0, (windowH / 4), windowW, (windowH / 4)],
+ [(windowW / 1.8), 0, (windowW / 2.8), windowH]
+ ];
document.addEventListener("click", () => {
if (currentPlayIndex === innocence.length) {
@@ -15,10 +47,11 @@
var osc = sound.oscillator(innocence[currentPlayIndex]);
osc.connect(sound.ctx.destination);
- osc.start(0);
- setTimeout(() => {
- osc.stop(0);
- }, 200);
+ var line = Line.draw(canvas, lines[currentPlayIndex]);
+ (<any>line).animate('opacity', 0, {
+ onChange: canvas.renderAll.bind(canvas),
+ duration: 1000
+ });
currentPlayIndex++;
}); |
e300b4c256df86a35f561cf8058626c0226fbb1b | src/ActiveFilter.ts | src/ActiveFilter.ts | import { Filter } from './types';
/**
* ActiveFilter represents the currently active filter over
* the grid.
*
* It can be a plain string value or an array of strings.
*/
export default class ActiveFilter {
private filter: Filter;
public constructor(filter: Filter) {
this.filter = filter;
}
public get(): Filter {
return this.filter;
}
public set(targetFilter: Filter): void {
this.filter = targetFilter;
}
public toggle(targetFilter: string): void {
this.filter = this.toggleFilter(this.filter, targetFilter);
}
private toggleFilter(
activeFilter: string | string[],
targetFilter: string
): string | string[] {
if (activeFilter === 'all') {
return targetFilter;
}
if (Array.isArray(activeFilter)) {
if (activeFilter.includes(targetFilter)) {
const newActiveFilter = activeFilter.filter(
(filter): boolean => filter !== targetFilter
);
return newActiveFilter.length === 1
? newActiveFilter[0]
: newActiveFilter;
}
return [...activeFilter, targetFilter];
}
if (activeFilter === targetFilter) {
return 'all';
}
return [activeFilter, targetFilter];
}
}
| import { Filter } from './types';
/**
* ActiveFilter represents the currently active filter over
* the grid.
*
* It can be a plain string value or an array of strings.
*/
export default class ActiveFilter {
private filter: Filter;
public constructor(filter: Filter) {
this.filter = filter;
}
public get(): Filter {
return this.filter;
}
public set(targetFilter: Filter): void {
this.filter = targetFilter;
}
public toggle(targetFilter: string): void {
this.filter = this.toggleFilter(this.filter, targetFilter);
}
private toggleFilter(
activeFilter: Filter,
targetFilter: string
): string | string[] {
if (activeFilter === 'all') {
return targetFilter;
}
if (Array.isArray(activeFilter)) {
if (activeFilter.includes(targetFilter)) {
const newActiveFilter = activeFilter.filter(
(filter): boolean => filter !== targetFilter
);
return newActiveFilter.length === 1
? newActiveFilter[0]
: newActiveFilter;
}
return [...activeFilter, targetFilter];
}
if (activeFilter === targetFilter) {
return 'all';
}
return [activeFilter, targetFilter];
}
}
| Use Filter type in signature for consistency | Use Filter type in signature for consistency
| TypeScript | mit | giotiskl/Filterizr | ---
+++
@@ -26,7 +26,7 @@
}
private toggleFilter(
- activeFilter: string | string[],
+ activeFilter: Filter,
targetFilter: string
): string | string[] {
if (activeFilter === 'all') { |
0ddc4af049f6fb6860dc96d14a8a3e59c90d9a35 | app/src/lib/git/revert.ts | app/src/lib/git/revert.ts | import { git, gitNetworkArguments, IGitExecutionOptions } from './core'
import { Repository } from '../../models/repository'
import { Commit } from '../../models/commit'
import { envForAuthentication, IGitAccount } from './authentication'
import { IRevertProgress } from '../app-state'
import { executionOptionsWithProgress } from '../progress/from-process'
import { RevertProgressParser } from '../progress/revert'
/**
* Creates a new commit that reverts the changes of a previous commit
*
* @param repository - The repository to update
*
* @param commit - The SHA of the commit to be reverted
*
*/
export async function revertCommit(
repository: Repository,
commit: Commit,
account: IGitAccount | null,
progressCallback?: (progress: IRevertProgress) => void
) {
const args = [...gitNetworkArguments, 'revert']
if (commit.parentSHAs.length > 1) {
args.push('-m', '1')
}
args.push(commit.sha)
let opts: IGitExecutionOptions = {}
if (progressCallback) {
const env = envForAuthentication(account)
opts = await executionOptionsWithProgress(
{ env, trackLFSProgress: true },
new RevertProgressParser(),
progress => {
const description =
progress.kind === 'progress' ? progress.details.text : progress.text
const value = progress.percent
progressCallback({ kind: 'revert', description, value, title: '' })
}
)
}
await git(args, repository.path, 'revert', opts)
}
| import { git, gitNetworkArguments, IGitExecutionOptions } from './core'
import { Repository } from '../../models/repository'
import { Commit } from '../../models/commit'
import { envForAuthentication, IGitAccount } from './authentication'
import { IRevertProgress } from '../app-state'
import { executionOptionsWithProgress } from '../progress/from-process'
import { RevertProgressParser } from '../progress/revert'
/**
* Creates a new commit that reverts the changes of a previous commit
*
* @param repository - The repository to update
*
* @param commit - The SHA of the commit to be reverted
*
*/
export async function revertCommit(
repository: Repository,
commit: Commit,
account: IGitAccount | null,
progressCallback?: (progress: IRevertProgress) => void
) {
const args = [...gitNetworkArguments, 'revert']
if (commit.parentSHAs.length > 1) {
args.push('-m', '1')
}
args.push(commit.sha)
let opts: IGitExecutionOptions = {}
if (progressCallback) {
const env = envForAuthentication(account)
opts = await executionOptionsWithProgress(
{ env, trackLFSProgress: true },
new RevertProgressParser(),
progress => {
const description =
progress.kind === 'progress' ? progress.details.text : progress.text
const title = progress.kind === 'progress' ? progress.details.title : ''
const value = progress.percent
progressCallback({ kind: 'revert', description, value, title })
}
)
}
await git(args, repository.path, 'revert', opts)
}
| Copy the title through too | Copy the title through too
| TypeScript | mit | kactus-io/kactus,shiftkey/desktop,j-f1/forked-desktop,say25/desktop,kactus-io/kactus,desktop/desktop,shiftkey/desktop,kactus-io/kactus,shiftkey/desktop,artivilla/desktop,desktop/desktop,artivilla/desktop,j-f1/forked-desktop,say25/desktop,kactus-io/kactus,j-f1/forked-desktop,j-f1/forked-desktop,artivilla/desktop,artivilla/desktop,desktop/desktop,shiftkey/desktop,say25/desktop,say25/desktop,desktop/desktop | ---
+++
@@ -36,9 +36,10 @@
progress => {
const description =
progress.kind === 'progress' ? progress.details.text : progress.text
+ const title = progress.kind === 'progress' ? progress.details.title : ''
const value = progress.percent
- progressCallback({ kind: 'revert', description, value, title: '' })
+ progressCallback({ kind: 'revert', description, value, title })
}
)
} |
8b51665b39dafb9eba24a43ec5fb0b1329697739 | src/assets/app.tsx | src/assets/app.tsx | import 'normalize.css'
import * as React from 'react'
import {render as renderToDOM} from 'react-dom'
import {AppRoot} from '../app/components/root'
import {createReducer} from '../app/reducer'
import {saga} from '../app/saga'
import {Container} from '../common/components/container'
import {createStore} from '../common/store'
// Reference app container to render to
const container = document.getElementById('container')!
// Create Redux store instance
const reducer = createReducer()
const store = createStore({reducer, saga})
// Render application. Also register to rerender if hot loading is available.
if(module.hot) { // tslint:disable-line:strict-boolean-expressions
module.hot.accept('../app/components/root', render)
module.hot.accept('../app/reducer', updateReducer)
module.hot.accept('../app/saga', () => true)
module.hot.accept('../common/components/container', render)
}
render()
/**
* Render application to the container. If we are not in production and an
* error is encountered the error is rendered to the screen. This may be called
* multiple times to rerender when a hot reload occurs.
*/
function render() {
renderToDOM(<Container store={store}><AppRoot /></Container>, container)
}
/**
* Update the reducer for the store. This may be called multiple times when a
* hot reload occurs.
*/
function updateReducer() {
store.replaceReducer(reducer)
}
| import 'normalize.css'
import * as React from 'react'
import {render as renderToDOM} from 'react-dom'
import {AppRoot} from '../app/components/root'
import {createReducer} from '../app/reducer'
import {saga} from '../app/saga'
import {Container} from '../common/components/container'
import {createStore} from '../common/store'
// Reference app container to render to
const container = document.getElementById('container')!
// Create Redux store instance
const store = createStore({reducer: createReducer(), saga})
// Render application. Also register to rerender if hot loading is available.
if(module.hot) { // tslint:disable-line:strict-boolean-expressions
module.hot.accept('../app/components/root', render)
module.hot.accept('../app/reducer', updateReducer)
module.hot.accept('../app/saga', () => true)
module.hot.accept('../common/components/container', render)
}
render()
/**
* Render application to the container. If we are not in production and an
* error is encountered the error is rendered to the screen. This may be called
* multiple times to rerender when a hot reload occurs.
*/
function render() {
renderToDOM(<Container store={store}><AppRoot /></Container>, container)
}
/**
* Update the reducer for the store. This may be called multiple times when a
* hot reload occurs.
*/
function updateReducer() {
store.replaceReducer(createReducer())
}
| Fix hot reload of reducer | Fix hot reload of reducer
| TypeScript | mit | jupl/astraea,jupl/astraea | ---
+++
@@ -11,8 +11,7 @@
const container = document.getElementById('container')!
// Create Redux store instance
-const reducer = createReducer()
-const store = createStore({reducer, saga})
+const store = createStore({reducer: createReducer(), saga})
// Render application. Also register to rerender if hot loading is available.
if(module.hot) { // tslint:disable-line:strict-boolean-expressions
@@ -37,5 +36,5 @@
* hot reload occurs.
*/
function updateReducer() {
- store.replaceReducer(reducer)
+ store.replaceReducer(createReducer())
} |
3bb3be1b375c143ff047f81ea063da5fb6c99d64 | packages/ionic/src/layouts/group/group-layout.ts | packages/ionic/src/layouts/group/group-layout.ts | import {
GroupLayout,
JsonFormsState,
RankedTester,
rankWith,
uiTypeIs
} from '@jsonforms/core';
import { Component } from '@angular/core';
import { NgRedux } from '@angular-redux/store';
import { JsonFormsIonicLayout } from '../JsonFormsIonicLayout';
@Component({
selector: 'jsonforms-group-layout',
template: `
<ion-card>
<ion-card-header>
{{label}}
</ion-card-header>
<ion-card-content>
<div *ngFor="let element of uischema?.elements">
<jsonforms-outlet
[uischema]="element"
[path]="path"
[schema]="schema"
></jsonforms-outlet>
</div>
</ion-card-content>
</ion-card>
`
})
export class GroupLayoutRenderer extends JsonFormsIonicLayout {
label: string;
constructor(ngRedux: NgRedux<JsonFormsState>) {
super(ngRedux);
}
mapAdditionalProps() {
this.label = (this.uischema as GroupLayout).label;
}
}
export const groupTester: RankedTester = rankWith(1, uiTypeIs('Group'));
| import {
GroupLayout, JsonFormsProps,
JsonFormsState,
RankedTester,
rankWith,
uiTypeIs
} from '@jsonforms/core';
import { Component } from '@angular/core';
import { NgRedux } from '@angular-redux/store';
import { JsonFormsIonicLayout } from '../JsonFormsIonicLayout';
@Component({
selector: 'jsonforms-group-layout',
template: `
<ion-card>
<ion-card-header>
{{label}}
</ion-card-header>
<ion-card-content>
<div *ngFor="let element of uischema?.elements">
<jsonforms-outlet
[uischema]="element"
[path]="path"
[schema]="schema"
></jsonforms-outlet>
</div>
</ion-card-content>
</ion-card>
`
})
export class GroupLayoutRenderer extends JsonFormsIonicLayout {
label: string;
constructor(ngRedux: NgRedux<JsonFormsState>) {
super(ngRedux);
this.initializers.push((props: JsonFormsProps) => {
this.label = (props.uischema as GroupLayout).label;
});
}
}
export const groupTester: RankedTester = rankWith(1, uiTypeIs('Group'));
| Fix group initializer for displaying label | [ionic] Fix group initializer for displaying label
| TypeScript | mit | qb-project/jsonforms,qb-project/jsonforms,qb-project/jsonforms | ---
+++
@@ -1,9 +1,9 @@
import {
- GroupLayout,
- JsonFormsState,
- RankedTester,
- rankWith,
- uiTypeIs
+ GroupLayout, JsonFormsProps,
+ JsonFormsState,
+ RankedTester,
+ rankWith,
+ uiTypeIs
} from '@jsonforms/core';
import { Component } from '@angular/core';
import { NgRedux } from '@angular-redux/store';
@@ -35,10 +35,9 @@
constructor(ngRedux: NgRedux<JsonFormsState>) {
super(ngRedux);
- }
-
- mapAdditionalProps() {
- this.label = (this.uischema as GroupLayout).label;
+ this.initializers.push((props: JsonFormsProps) => {
+ this.label = (props.uischema as GroupLayout).label;
+ });
}
}
|
42a265bad5fbd33d95f483432b20a271343e79a3 | examples/typescript/basic/src/output/YesNoOutput.ts | examples/typescript/basic/src/output/YesNoOutput.ts | import { BaseOutput, Output } from '@jovotech/framework';
import { OutputTemplate } from '@jovotech/output';
@Output()
export class YesNoOutput extends BaseOutput {
/*
|--------------------------------------------------------------------------
| Output Template
|--------------------------------------------------------------------------
|
| This structured output is later turned into a native response
| Learn more here: www.jovo.tech/docs/output
|
*/
build(): OutputTemplate | OutputTemplate[] {
return {
quickReplies: ['yes', 'no'],
listen: true,
};
}
}
| import { BaseOutput, Output, OutputTemplate } from '@jovotech/framework';
@Output()
export class YesNoOutput extends BaseOutput {
/*
|--------------------------------------------------------------------------
| Output Template
|--------------------------------------------------------------------------
|
| This structured output is later turned into a native response
| Learn more here: www.jovo.tech/docs/output
|
*/
build(): OutputTemplate | OutputTemplate[] {
return {
quickReplies: ['yes', 'no'],
listen: true,
};
}
}
| Fix invalid import in example | :bug: Fix invalid import in example
| TypeScript | apache-2.0 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | ---
+++
@@ -1,5 +1,4 @@
-import { BaseOutput, Output } from '@jovotech/framework';
-import { OutputTemplate } from '@jovotech/output';
+import { BaseOutput, Output, OutputTemplate } from '@jovotech/framework';
@Output()
export class YesNoOutput extends BaseOutput { |
108f19a14c46b1948906249b7ed1c5d10dc81463 | src/makeLayoutPositions/makeSameSizeLayoutPosition.ts | src/makeLayoutPositions/makeSameSizeLayoutPosition.ts | import { ContainerLayout, Position, Dimensions } from '../types/interfaces';
import { calculateColumnsForSameWidthLayouts } from './calculateColumnsForSameWidthLayouts';
/**
* Same size layout for items that have the same width/height
*/
export default (
containerWidth: number,
itemsDimensions: Dimensions[],
gutterPixels: number
): ContainerLayout => {
let cols = calculateColumnsForSameWidthLayouts(
containerWidth,
itemsDimensions[0].width,
gutterPixels
);
let row = 0;
const itemsPositions = itemsDimensions.map(
({ width, height }, index): Position => {
// update current row
if (index % cols === 0 && index >= cols) row++;
// determine pos in grid
const spot = index - cols * row;
// return object with new position in array
return {
left: spot * (width + gutterPixels),
top: row * (height + gutterPixels),
};
}
);
// These help calculate the final container height
const totalRows = row + 1;
const firstItemHeight = (itemsDimensions[0].height || 0) + gutterPixels;
const containerHeight = totalRows * firstItemHeight + gutterPixels;
return {
containerHeight,
itemsPositions,
};
};
| import { ContainerLayout, Position, Dimensions } from '../types/interfaces';
import { calculateColumnsForSameWidthLayouts } from './calculateColumnsForSameWidthLayouts';
/**
* Same size layout for items that have the same width/height
*/
export default (
containerWidth: number,
itemsDimensions: Dimensions[],
gutterPixels: number
): ContainerLayout => {
const columns = calculateColumnsForSameWidthLayouts(
containerWidth,
itemsDimensions[0].width,
gutterPixels
);
const itemsPositions = itemsDimensions.map(
({ width, height }, index): Position => {
const row = Math.floor(index / columns);
const col = index - columns * row;
return {
left: col * (width + gutterPixels),
top: row * (height + gutterPixels),
};
}
);
const totalRows = Math.floor(itemsDimensions.length / columns) + 1;
const firstItemHeight = itemsDimensions[0].height + gutterPixels;
const containerHeight = totalRows * firstItemHeight + gutterPixels;
return {
containerHeight,
itemsPositions,
};
};
| Simplify calculation of same size layouts | Simplify calculation of same size layouts
| TypeScript | mit | giotiskl/Filterizr | ---
+++
@@ -9,30 +9,25 @@
itemsDimensions: Dimensions[],
gutterPixels: number
): ContainerLayout => {
- let cols = calculateColumnsForSameWidthLayouts(
+ const columns = calculateColumnsForSameWidthLayouts(
containerWidth,
itemsDimensions[0].width,
gutterPixels
);
- let row = 0;
const itemsPositions = itemsDimensions.map(
({ width, height }, index): Position => {
- // update current row
- if (index % cols === 0 && index >= cols) row++;
- // determine pos in grid
- const spot = index - cols * row;
- // return object with new position in array
+ const row = Math.floor(index / columns);
+ const col = index - columns * row;
return {
- left: spot * (width + gutterPixels),
+ left: col * (width + gutterPixels),
top: row * (height + gutterPixels),
};
}
);
- // These help calculate the final container height
- const totalRows = row + 1;
- const firstItemHeight = (itemsDimensions[0].height || 0) + gutterPixels;
+ const totalRows = Math.floor(itemsDimensions.length / columns) + 1;
+ const firstItemHeight = itemsDimensions[0].height + gutterPixels;
const containerHeight = totalRows * firstItemHeight + gutterPixels;
return { |
c2c76e54331620ccf9963a00515bc860716e4159 | rundeckapp/grails-spa/packages/ui/src/components/central/main.ts | rundeckapp/grails-spa/packages/ui/src/components/central/main.ts | import moment from 'moment'
import Vue from 'vue'
import * as uiv from 'uiv'
import VueCookies from 'vue-cookies'
import VueI18n from 'vue-i18n'
import uivLang from '@rundeck/ui-trellis/lib/utilities/uivi18n'
import VueMoment from 'vue-moment'
import {getRundeckContext, getSynchronizerToken, RundeckBrowser} from '@rundeck/ui-trellis'
import {EventBus} from '@rundeck/ui-trellis/lib/utilities/vueEventBus'
type UivLangKey = keyof typeof uivLang
const win = window as any
let locale: UivLangKey = win._rundeck.locale || 'en_US'
let lang: UivLangKey = win._rundeck.language || 'en'
win.Messages = {
[lang]: {
...(win.Messages || {}),
...(uivLang[locale] || uivLang[lang])
}
}
Vue.use(uiv)
Vue.use(VueCookies)
Vue.use(VueI18n)
Vue.use(VueMoment, {moment})
const context = getRundeckContext()
const token = getSynchronizerToken()
context.rundeckClient = new RundeckBrowser(token.TOKEN, token.URI, context.rdBase)
context.eventBus = EventBus
| import moment from 'moment'
import Vue from 'vue'
import * as uiv from 'uiv'
import VueCookies from 'vue-cookies'
import VueI18n from 'vue-i18n'
import uivLang from '@rundeck/ui-trellis/lib/utilities/uivi18n'
import VueMoment from 'vue-moment'
import {getRundeckContext, getSynchronizerToken, RundeckBrowser} from '@rundeck/ui-trellis'
import {EventBus} from '@rundeck/ui-trellis/lib/utilities/vueEventBus'
import { RootStore } from '@rundeck/ui-trellis/lib/stores/RootStore'
type UivLangKey = keyof typeof uivLang
const win = window as any
let locale: UivLangKey = win._rundeck.locale || 'en_US'
let lang: UivLangKey = win._rundeck.language || 'en'
win.Messages = {
[lang]: {
...(win.Messages || {}),
...(uivLang[locale] || uivLang[lang])
}
}
Vue.use(uiv)
Vue.use(VueCookies)
Vue.use(VueI18n)
Vue.use(VueMoment, {moment})
const context = getRundeckContext()
const token = getSynchronizerToken()
context.rundeckClient = new RundeckBrowser(token.TOKEN, token.URI, context.rdBase)
context.eventBus = EventBus
context.rootStore = new RootStore(context.rundeckClient)
| Add root store to window | Add root store to window
| TypeScript | apache-2.0 | rundeck/rundeck,variacode/rundeck,rundeck/rundeck,variacode/rundeck,variacode/rundeck,rundeck/rundeck,rundeck/rundeck,rundeck/rundeck,variacode/rundeck,variacode/rundeck | ---
+++
@@ -7,6 +7,7 @@
import VueMoment from 'vue-moment'
import {getRundeckContext, getSynchronizerToken, RundeckBrowser} from '@rundeck/ui-trellis'
import {EventBus} from '@rundeck/ui-trellis/lib/utilities/vueEventBus'
+import { RootStore } from '@rundeck/ui-trellis/lib/stores/RootStore'
type UivLangKey = keyof typeof uivLang
@@ -32,3 +33,4 @@
context.rundeckClient = new RundeckBrowser(token.TOKEN, token.URI, context.rdBase)
context.eventBus = EventBus
+context.rootStore = new RootStore(context.rundeckClient) |
9b79baec0ebcaddacc66319361fe4128e7a3a14a | src/vs/platform/extensionManagement/common/extensionTelemetry.ts | src/vs/platform/extensionManagement/common/extensionTelemetry.ts | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { ILocalExtension, IGalleryExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
export function getLocalExtensionTelemetryData(extension: ILocalExtension): any {
return {
id: `${extension.manifest.publisher}.${extension.manifest.name}`,
name: extension.manifest.name,
galleryId: extension.metadata ? extension.metadata.id : null,
publisherId: extension.metadata ? extension.metadata.publisherId : null,
publisherName: extension.manifest.publisher,
publisherDisplayName: extension.metadata ? extension.metadata.publisherDisplayName : null
};
}
export function getGalleryExtensionTelemetryData(extension: IGalleryExtension): any {
return {
id: `${extension.publisher}.${extension.name}`,
name: extension.name,
galleryId: extension.id,
publisherId: extension.publisherId,
publisherName: extension.publisher,
publisherDisplayName: extension.publisherDisplayName
};
} | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { ILocalExtension, IGalleryExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
export function getLocalExtensionTelemetryData(extension: ILocalExtension): any {
return {
id: `${extension.manifest.publisher}.${extension.manifest.name}`,
name: extension.manifest.name,
galleryId: extension.metadata ? extension.metadata.id : null,
publisherId: extension.metadata ? extension.metadata.publisherId : null,
publisherName: extension.manifest.publisher,
publisherDisplayName: extension.metadata ? extension.metadata.publisherDisplayName : null,
dependencies: extension.manifest.extensionDependencies.length > 0
};
}
export function getGalleryExtensionTelemetryData(extension: IGalleryExtension): any {
return {
id: `${extension.publisher}.${extension.name}`,
name: extension.name,
galleryId: extension.id,
publisherId: extension.publisherId,
publisherName: extension.publisher,
publisherDisplayName: extension.publisherDisplayName,
dependencies: extension.properties.dependencies.length > 0
};
} | Add extension dependencies to telemetry data | Add extension dependencies to telemetry data
| TypeScript | mit | stringham/vscode,radshit/vscode,Microsoft/vscode,zyml/vscode,hoovercj/vscode,charlespierce/vscode,hungys/vscode,microlv/vscode,rkeithhill/VSCode,matthewshirley/vscode,microlv/vscode,radshit/vscode,zyml/vscode,eamodio/vscode,hungys/vscode,eamodio/vscode,stringham/vscode,DustinCampbell/vscode,rishii7/vscode,landonepps/vscode,landonepps/vscode,the-ress/vscode,microsoft/vscode,hungys/vscode,joaomoreno/vscode,the-ress/vscode,Microsoft/vscode,KattMingMing/vscode,eamodio/vscode,hoovercj/vscode,mjbvz/vscode,mjbvz/vscode,gagangupt16/vscode,matthewshirley/vscode,mjbvz/vscode,hungys/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,hashhar/vscode,hoovercj/vscode,joaomoreno/vscode,eamodio/vscode,microsoft/vscode,radshit/vscode,gagangupt16/vscode,radshit/vscode,zyml/vscode,microsoft/vscode,joaomoreno/vscode,microlv/vscode,Zalastax/vscode,zyml/vscode,hungys/vscode,0xmohit/vscode,charlespierce/vscode,hungys/vscode,zyml/vscode,jchadwick/vscode,KattMingMing/vscode,gagangupt16/vscode,microsoft/vscode,veeramarni/vscode,rishii7/vscode,stringham/vscode,eamodio/vscode,veeramarni/vscode,radshit/vscode,stringham/vscode,charlespierce/vscode,rishii7/vscode,radshit/vscode,the-ress/vscode,DustinCampbell/vscode,0xmohit/vscode,joaomoreno/vscode,mjbvz/vscode,the-ress/vscode,microlv/vscode,stringham/vscode,gagangupt16/vscode,KattMingMing/vscode,Microsoft/vscode,gagangupt16/vscode,eamodio/vscode,gagangupt16/vscode,0xmohit/vscode,hoovercj/vscode,matthewshirley/vscode,matthewshirley/vscode,hungys/vscode,joaomoreno/vscode,zyml/vscode,gagangupt16/vscode,matthewshirley/vscode,rishii7/vscode,DustinCampbell/vscode,cleidigh/vscode,cra0zy/VSCode,zyml/vscode,Zalastax/vscode,rishii7/vscode,microlv/vscode,microlv/vscode,microlv/vscode,joaomoreno/vscode,Krzysztof-Cieslak/vscode,hashhar/vscode,matthewshirley/vscode,hashhar/vscode,matthewshirley/vscode,microsoft/vscode,stringham/vscode,eamodio/vscode,Microsoft/vscode,stringham/vscode,joaomoreno/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,hoovercj/vscode,jchadwick/vscode,DustinCampbell/vscode,Krzysztof-Cieslak/vscode,jchadwick/vscode,cleidigh/vscode,zyml/vscode,jchadwick/vscode,hoovercj/vscode,cleidigh/vscode,eamodio/vscode,hungys/vscode,DustinCampbell/vscode,landonepps/vscode,charlespierce/vscode,radshit/vscode,KattMingMing/vscode,KattMingMing/vscode,microsoft/vscode,Zalastax/vscode,rishii7/vscode,cleidigh/vscode,veeramarni/vscode,landonepps/vscode,gagangupt16/vscode,hashhar/vscode,jchadwick/vscode,zyml/vscode,matthewshirley/vscode,KattMingMing/vscode,Microsoft/vscode,jchadwick/vscode,Microsoft/vscode,Zalastax/vscode,mjbvz/vscode,KattMingMing/vscode,0xmohit/vscode,zyml/vscode,cleidigh/vscode,microlv/vscode,Microsoft/vscode,hashhar/vscode,hoovercj/vscode,joaomoreno/vscode,DustinCampbell/vscode,mjbvz/vscode,the-ress/vscode,jchadwick/vscode,mjbvz/vscode,rishii7/vscode,hungys/vscode,the-ress/vscode,zyml/vscode,microlv/vscode,eamodio/vscode,matthewshirley/vscode,hoovercj/vscode,gagangupt16/vscode,KattMingMing/vscode,joaomoreno/vscode,jchadwick/vscode,joaomoreno/vscode,stringham/vscode,microsoft/vscode,jchadwick/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,charlespierce/vscode,Zalastax/vscode,eamodio/vscode,mjbvz/vscode,rishii7/vscode,microsoft/vscode,jchadwick/vscode,hashhar/vscode,DustinCampbell/vscode,stringham/vscode,DustinCampbell/vscode,mjbvz/vscode,Zalastax/vscode,Krzysztof-Cieslak/vscode,veeramarni/vscode,KattMingMing/vscode,radshit/vscode,hoovercj/vscode,veeramarni/vscode,veeramarni/vscode,radshit/vscode,jchadwick/vscode,the-ress/vscode,hashhar/vscode,mjbvz/vscode,Krzysztof-Cieslak/vscode,charlespierce/vscode,landonepps/vscode,microsoft/vscode,the-ress/vscode,gagangupt16/vscode,veeramarni/vscode,charlespierce/vscode,veeramarni/vscode,matthewshirley/vscode,rishii7/vscode,stringham/vscode,charlespierce/vscode,KattMingMing/vscode,DustinCampbell/vscode,joaomoreno/vscode,0xmohit/vscode,cleidigh/vscode,joaomoreno/vscode,landonepps/vscode,hashhar/vscode,radshit/vscode,matthewshirley/vscode,veeramarni/vscode,Zalastax/vscode,charlespierce/vscode,hoovercj/vscode,KattMingMing/vscode,microlv/vscode,gagangupt16/vscode,DustinCampbell/vscode,gagangupt16/vscode,Krzysztof-Cieslak/vscode,the-ress/vscode,stringham/vscode,landonepps/vscode,rishii7/vscode,microlv/vscode,matthewshirley/vscode,charlespierce/vscode,matthewshirley/vscode,hoovercj/vscode,microlv/vscode,Microsoft/vscode,veeramarni/vscode,hashhar/vscode,microsoft/vscode,stringham/vscode,Microsoft/vscode,charlespierce/vscode,cleidigh/vscode,hungys/vscode,matthewshirley/vscode,gagangupt16/vscode,the-ress/vscode,stringham/vscode,rishii7/vscode,0xmohit/vscode,DustinCampbell/vscode,the-ress/vscode,veeramarni/vscode,gagangupt16/vscode,Zalastax/vscode,charlespierce/vscode,mjbvz/vscode,veeramarni/vscode,DustinCampbell/vscode,hoovercj/vscode,0xmohit/vscode,landonepps/vscode,hashhar/vscode,Microsoft/vscode,gagangupt16/vscode,matthewshirley/vscode,eamodio/vscode,hashhar/vscode,landonepps/vscode,cleidigh/vscode,Zalastax/vscode,hashhar/vscode,DustinCampbell/vscode,0xmohit/vscode,joaomoreno/vscode,Krzysztof-Cieslak/vscode,KattMingMing/vscode,DustinCampbell/vscode,mjbvz/vscode,landonepps/vscode,microsoft/vscode,landonepps/vscode,mjbvz/vscode,joaomoreno/vscode,hoovercj/vscode,microlv/vscode,veeramarni/vscode,zyml/vscode,jchadwick/vscode,Zalastax/vscode,cleidigh/vscode,gagangupt16/vscode,eamodio/vscode,microsoft/vscode,KattMingMing/vscode,landonepps/vscode,zyml/vscode,Krzysztof-Cieslak/vscode,rishii7/vscode,matthewshirley/vscode,joaomoreno/vscode,charlespierce/vscode,the-ress/vscode,landonepps/vscode,veeramarni/vscode,cleidigh/vscode,eamodio/vscode,stringham/vscode,radshit/vscode,jchadwick/vscode,hungys/vscode,radshit/vscode,Microsoft/vscode,Zalastax/vscode,Zalastax/vscode,hashhar/vscode,KattMingMing/vscode,hashhar/vscode,0xmohit/vscode,hungys/vscode,hungys/vscode,Krzysztof-Cieslak/vscode,DustinCampbell/vscode,cleidigh/vscode,gagangupt16/vscode,radshit/vscode,DustinCampbell/vscode,microsoft/vscode,hungys/vscode,stringham/vscode,KattMingMing/vscode,0xmohit/vscode,zyml/vscode,cleidigh/vscode,KattMingMing/vscode,zyml/vscode,stringham/vscode,hoovercj/vscode,landonepps/vscode,0xmohit/vscode,radshit/vscode,veeramarni/vscode,eamodio/vscode,hungys/vscode,microlv/vscode,radshit/vscode,the-ress/vscode,charlespierce/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,hashhar/vscode,stringham/vscode,Zalastax/vscode,charlespierce/vscode,charlespierce/vscode,Krzysztof-Cieslak/vscode,charlespierce/vscode,Krzysztof-Cieslak/vscode,matthewshirley/vscode,DustinCampbell/vscode,mjbvz/vscode,cleidigh/vscode,Zalastax/vscode,microsoft/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,zyml/vscode,Zalastax/vscode,rishii7/vscode,Microsoft/vscode,rishii7/vscode,rishii7/vscode,the-ress/vscode,joaomoreno/vscode,cleidigh/vscode,microsoft/vscode,the-ress/vscode,0xmohit/vscode,0xmohit/vscode,0xmohit/vscode,zyml/vscode,the-ress/vscode,hashhar/vscode,landonepps/vscode,Microsoft/vscode,joaomoreno/vscode,KattMingMing/vscode,veeramarni/vscode,jchadwick/vscode,cleidigh/vscode,microsoft/vscode,hungys/vscode,jchadwick/vscode,jchadwick/vscode,jchadwick/vscode,hoovercj/vscode,Krzysztof-Cieslak/vscode,radshit/vscode,Microsoft/vscode,veeramarni/vscode,0xmohit/vscode,cleidigh/vscode,microlv/vscode,hashhar/vscode,Microsoft/vscode,microlv/vscode,Microsoft/vscode,rishii7/vscode,mjbvz/vscode,Zalastax/vscode,Zalastax/vscode,hoovercj/vscode,microsoft/vscode,microlv/vscode,rishii7/vscode,landonepps/vscode,0xmohit/vscode,cleidigh/vscode,mjbvz/vscode,landonepps/vscode,0xmohit/vscode,mjbvz/vscode,radshit/vscode,hoovercj/vscode,hungys/vscode | ---
+++
@@ -14,7 +14,8 @@
galleryId: extension.metadata ? extension.metadata.id : null,
publisherId: extension.metadata ? extension.metadata.publisherId : null,
publisherName: extension.manifest.publisher,
- publisherDisplayName: extension.metadata ? extension.metadata.publisherDisplayName : null
+ publisherDisplayName: extension.metadata ? extension.metadata.publisherDisplayName : null,
+ dependencies: extension.manifest.extensionDependencies.length > 0
};
}
@@ -25,6 +26,7 @@
galleryId: extension.id,
publisherId: extension.publisherId,
publisherName: extension.publisher,
- publisherDisplayName: extension.publisherDisplayName
+ publisherDisplayName: extension.publisherDisplayName,
+ dependencies: extension.properties.dependencies.length > 0
};
} |
1fe95b5d81916100a188072bf4438a9804cb8ecb | app/server/workers/WeatherService.ts | app/server/workers/WeatherService.ts | import {IWeatherUpdate} from '../../common/interfaces/WeatherInterfaces';
import * as Rx from '@reactivex/rxjs';
export class WeatherService {
sleepTime = 10000;
weatherPub: Rx.Subject<IWeatherUpdate>;
timer: any;
constructor() {
this.weatherPub = new Rx.Subject<IWeatherUpdate>();
this.start();
}
getWeatherUpdatePub() : Rx.Subject<IWeatherUpdate> {
return this.weatherPub;
}
start() {
this.timer = setInterval(() => {
this.monitorWeather();
}, this.sleepTime);
}
stop() {
if (this.timer) {
clearInterval(this.timer);
}
}
monitorWeather() {
let update:IWeatherUpdate = {
city: 'New York',
time: new Date(),
tempFarenheight: 80
};
this.weatherPub.next(update);
}
}
| import {IWeatherUpdate} from '../../common/interfaces/WeatherInterfaces';
import * as Rx from '@reactivex/rxjs';
export class WeatherService {
sleepTime = 1000;
weatherPub: Rx.Subject<IWeatherUpdate>;
timer: any;
cities:string[];
constructor() {
this.cities = ['New York', 'Los Angeles', 'Chicago', 'Miami', 'Dallas', 'Washington'];
this.weatherPub = new Rx.Subject<IWeatherUpdate>();
this.start();
}
getWeatherUpdatePub() : Rx.Subject<IWeatherUpdate> {
return this.weatherPub;
}
start() {
this.timer = setInterval(() => {
this.monitorWeather();
}, this.sleepTime);
}
stop() {
if (this.timer) {
clearInterval(this.timer);
}
}
monitorWeather() {
let index:number = Math.floor(Math.random() * this.cities.length);
let update:IWeatherUpdate = {
city: this.cities[index],
time: new Date(),
tempFarenheight: Math.floor(Math.random() * 80) + 20
};
this.weatherPub.next(update);
}
}
| Put mock data in the weather service | Put mock data in the weather service
| TypeScript | mit | hpinsley/angular-mashup,AngularShowcase/angular2-seed-example-mashup,AngularShowcase/angular2-seed-example-mashup,hpinsley/angular-mashup,AngularShowcase/angular2-seed-example-mashup,hpinsley/angular-mashup | ---
+++
@@ -3,11 +3,13 @@
export class WeatherService {
- sleepTime = 10000;
+ sleepTime = 1000;
weatherPub: Rx.Subject<IWeatherUpdate>;
timer: any;
+ cities:string[];
constructor() {
+ this.cities = ['New York', 'Los Angeles', 'Chicago', 'Miami', 'Dallas', 'Washington'];
this.weatherPub = new Rx.Subject<IWeatherUpdate>();
this.start();
}
@@ -29,10 +31,12 @@
}
monitorWeather() {
+ let index:number = Math.floor(Math.random() * this.cities.length);
+
let update:IWeatherUpdate = {
- city: 'New York',
+ city: this.cities[index],
time: new Date(),
- tempFarenheight: 80
+ tempFarenheight: Math.floor(Math.random() * 80) + 20
};
this.weatherPub.next(update); |
7308993ab20d47f9dfefb646ecc020d3af324818 | src/score-input/settings/name-edit/settings-add-player.tsx | src/score-input/settings/name-edit/settings-add-player.tsx | import * as React from 'react'
import flowRight from 'lodash-es/flowRight'
import {returntypeof} from 'react-redux-typescript'
import {connect} from 'react-redux'
import {translate} from 'react-i18next'
import IconButton from 'material-ui/IconButton'
import ContentAdd from 'material-ui/svg-icons/content/add'
import {bindActionCreators, Dispatch} from 'redux'
import {addRandomNameAction} from '../actions/add-name'
import {ITranslateMixin} from '../../../types'
import style from './name-edit.css'
const mapDispatchToProps = (dispatch: Dispatch<any>) =>
bindActionCreators({
addPlayer: addRandomNameAction
}, dispatch)
const dispatchType = returntypeof(mapDispatchToProps)
type SettingsAddPlayerProps = typeof dispatchType & ITranslateMixin
export function SettingsAddPlayerImpl({addPlayer, t}: SettingsAddPlayerProps) {
return <div className={style.addContainer}>
<IconButton tooltip={t('Add player')} onClick={addPlayer}>
<ContentAdd width="28px" height="28px" />
</IconButton>
</div>
}
export const SettingsAddPlayer = flowRight(
translate(),
connect(mapDispatchToProps)
)(SettingsAddPlayerImpl)
| import * as React from 'react'
import flowRight from 'lodash-es/flowRight'
import {returntypeof} from 'react-redux-typescript'
import {connect} from 'react-redux'
import {translate} from 'react-i18next'
import IconButton from 'material-ui/IconButton'
import ContentAdd from 'material-ui/svg-icons/content/add'
import {bindActionCreators, Dispatch} from 'redux'
import {addRandomNameAction} from '../actions/add-name'
import {ITranslateMixin} from '../../../types'
import style from './name-edit.css'
const mapDispatchToProps = (dispatch: Dispatch<any>) =>
bindActionCreators({
addPlayer: addRandomNameAction
}, dispatch)
const dispatchType = returntypeof(mapDispatchToProps)
type SettingsAddPlayerProps = typeof dispatchType & ITranslateMixin
export function SettingsAddPlayerImpl({addPlayer, t}: SettingsAddPlayerProps) {
return <div className={style.addContainer}>
<IconButton tooltip={t('Add player')} onClick={addPlayer}>
<ContentAdd width="28px" height="28px" />
</IconButton>
</div>
}
export const SettingsAddPlayer = flowRight(
translate(),
connect(null, mapDispatchToProps)
)(SettingsAddPlayerImpl)
| Fix add player not working in settings page | Fix add player not working in settings page
| TypeScript | mit | Holi0317/bridge-calc,Holi0317/bridge-calc,Holi0317/bridge-calc | ---
+++
@@ -29,5 +29,5 @@
export const SettingsAddPlayer = flowRight(
translate(),
- connect(mapDispatchToProps)
+ connect(null, mapDispatchToProps)
)(SettingsAddPlayerImpl) |
1d43f2140d89fd8aabf16aabdb692f00efd7810a | packages/plugin-vue/types/bugsnag-plugin-vue.d.ts | packages/plugin-vue/types/bugsnag-plugin-vue.d.ts | import { Plugin, Client } from '@bugsnag/core'
interface VueConfig {
errorHandler?: VueErrorHandler
}
interface VueConstructor {
config: VueConfig
}
interface VueApp {
use: (plugin: { install: (app: VueApp, ...options: any[]) => any }) => void
config: VueConfig
}
type VueErrorHandler = (err: unknown, instance: any, info: any) => void
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface BugsnagPluginVue extends Plugin { }
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
declare class BugsnagPluginVue {
constructor(Vue?: VueConstructor)
}
export interface BugsnagPluginVueResult {
install(app: VueApp): void
installVueErrorHandler(vue?: VueConstructor): void
}
// add a new call signature for the getPlugin() method that types the vue plugin result
declare module '@bugsnag/core' {
interface Client {
getPlugin(id: 'vue'): BugsnagPluginVueResult | undefined
}
}
export default BugsnagPluginVue
| import { Plugin, Client } from '@bugsnag/core'
interface VueConfig {
errorHandler?: VueErrorHandler
}
interface VueConstructor {
config: VueConfig
}
interface VueApp {
use: (plugin: { install: (app: VueApp, ...options: any[]) => any }) => void
config: VueConfig
}
type VueErrorHandler = (err: any, instance: any, info: any) => void
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface BugsnagPluginVue extends Plugin { }
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
declare class BugsnagPluginVue {
constructor(Vue?: VueConstructor)
}
export interface BugsnagPluginVueResult {
install(app: VueApp): void
installVueErrorHandler(vue?: VueConstructor): void
}
// add a new call signature for the getPlugin() method that types the vue plugin result
declare module '@bugsnag/core' {
interface Client {
getPlugin(id: 'vue'): BugsnagPluginVueResult | undefined
}
}
export default BugsnagPluginVue
| Tweak types for vue2+3 compat | refactor(plugin-vue): Tweak types for vue2+3 compat
| TypeScript | mit | bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js | ---
+++
@@ -13,7 +13,7 @@
config: VueConfig
}
-type VueErrorHandler = (err: unknown, instance: any, info: any) => void
+type VueErrorHandler = (err: any, instance: any, info: any) => void
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface BugsnagPluginVue extends Plugin { } |
a30f8e80f6cd8240cdb6c28f0ada7d16eb55bcf6 | showdesktop_hr.ts | showdesktop_hr.ts | <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="hr_HR">
<context>
<name>ShowDesktop</name>
<message>
<location filename="../../../showdesktop.cpp" line="48"/>
<source>Show desktop</source>
<translation type="unfinished">Pokaži radnu površinu</translation>
</message>
<message>
<location filename="../../../showdesktop.cpp" line="70"/>
<source>Show Desktop: Global shortcut '%1' cannot be registered</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../showdesktop.cpp" line="55"/>
<source>Show Desktop</source>
<translation type="unfinished">Pokaži Radnu površinu</translation>
</message>
</context>
</TS>
| <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="hr">
<context>
<name>ShowDesktop</name>
<message>
<location filename="../../../showdesktop.cpp" line="48"/>
<source>Show desktop</source>
<translation type="unfinished">Pokaži radnu površinu</translation>
</message>
<message>
<location filename="../../../showdesktop.cpp" line="70"/>
<source>Show Desktop: Global shortcut '%1' cannot be registered</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../showdesktop.cpp" line="55"/>
<source>Show Desktop</source>
<translation type="unfinished">Pokaži Radnu površinu</translation>
</message>
</context>
</TS>
| Fix language vs. name discrepancies | Fix language vs. name discrepancies
...revealed by auto testing
| TypeScript | lgpl-2.1 | stefonarch/lxqt-panel,lxde/lxqt-panel,stefonarch/lxqt-panel,stefonarch/lxqt-panel,lxde/lxqt-panel | ---
+++
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.1" language="hr_HR">
+<TS version="2.1" language="hr">
<context>
<name>ShowDesktop</name>
<message> |
972f157aaa85009a7f3d6fead0bf2433c1c6d76a | packages/altair-express-middleware/index.ts | packages/altair-express-middleware/index.ts | 'use strict';
import * as express from 'express';
import { getDistDirectory, renderAltair, renderInitialOptions, RenderOptions } from 'altair-static';
export const altairExpress = (opts: RenderOptions): express.Express => {
const app = express();
app.disable('strict routing');
app.get('/', (req, res) => {
if (req.originalUrl.substr(-1) !== '/') {
// We need the trailing slash to enable relative file paths to work
return res.redirect(301, req.originalUrl + '/');
}
return res.send(renderAltair(opts));
});
app.get('/initial_options.js', (req, res) => {
return res.send(renderInitialOptions(opts));
});
app.use(express.static(getDistDirectory()));
/**
* Catch-all route
*/
app.get('*', (req, res) => {
return res.send('404.');
});
return app;
};
| 'use strict';
import * as express from 'express';
import { getDistDirectory, renderAltair, renderInitialOptions, RenderOptions } from 'altair-static';
export const altairExpress = (opts: RenderOptions): express.Express => {
const app = express();
app.disable('strict routing');
app.get('/', (req, res) => {
if (req.originalUrl.substr(-1) !== '/') {
// We need the trailing slash to enable relative file paths to work
return res.redirect(301, req.originalUrl + '/');
}
return res.send(renderAltair(opts));
});
app.get('/initial_options.js', (req, res) => {
res.set('Content-Type', 'text/javascript');
return res.send(renderInitialOptions(opts));
});
app.use(express.static(getDistDirectory()));
/**
* Catch-all route
*/
app.get('*', (req, res) => {
return res.send('404.');
});
return app;
};
| Set correct header for js response | Set correct header for js response
| TypeScript | mit | imolorhe/altair,imolorhe/altair,imolorhe/altair,imolorhe/altair | ---
+++
@@ -15,6 +15,7 @@
return res.send(renderAltair(opts));
});
app.get('/initial_options.js', (req, res) => {
+ res.set('Content-Type', 'text/javascript');
return res.send(renderInitialOptions(opts));
});
app.use(express.static(getDistDirectory())); |
a0a6dcbd3e2d695d672109f576ba0ca4bb3d6b79 | components/Stepper/style/index.native.tsx | components/Stepper/style/index.native.tsx | import variables from '../../style/themes/default.native';
export default {
container: {
flexDirection: 'row',
},
button: {
alignItems: 'center',
justifyContent: 'center',
width: variables.stepper_height,
height: variables.stepper_height,
borderWidth: 1,
borderColor: variables.theme_primary,
},
buttonText: {
textAlign: 'center',
fontSize: variables.stepper_button_font_size,
color: variables.theme_primary,
marginBottom: 2,
},
input: {
width: variables.stepper_input_width,
height: variables.stepper_height,
marginHorizontal: 10,
fontSize: variables.stepper_input_font_size,
color: variables.color_text,
textAlign: 'center',
},
// shape
radiusButton: {
borderRadius: variables.radius_md,
},
circleButton: {
borderRadius: variables.stepper_height,
},
// disabled
disabledButton: {
borderColor: variables.background_disabled,
},
disabledText: {
color: variables.color_text_disabled,
},
};
| import variables from '../../style/themes/default.native';
export default {
container: {
flexDirection: 'row',
},
button: {
alignItems: 'center',
justifyContent: 'center',
width: variables.stepper_height,
height: variables.stepper_height,
borderWidth: 1,
borderColor: variables.theme_primary,
},
buttonText: {
textAlign: 'center',
fontSize: variables.stepper_button_font_size,
color: variables.theme_primary,
marginBottom: 2,
},
input: {
width: variables.stepper_input_width,
height: variables.stepper_height,
padding: 0,
marginHorizontal: 10,
fontSize: variables.stepper_input_font_size,
color: variables.color_text,
textAlign: 'center',
},
// shape
radiusButton: {
borderRadius: variables.radius_md,
},
circleButton: {
borderRadius: variables.stepper_height,
},
// disabled
disabledButton: {
borderColor: variables.background_disabled,
},
disabledText: {
color: variables.color_text_disabled,
},
};
| Fix bug for TextInput padding has default value in Android | Fix bug for TextInput padding has default value in Android
| TypeScript | mit | ZhonganTechENG/zarm,ZhonganTechENG/zarm,ZhonganTechENG/zarm,ZhonganTechENG/zarm,ZhonganTechENG/zarm,ZhonganTechENG/zarm | ---
+++
@@ -21,6 +21,7 @@
input: {
width: variables.stepper_input_width,
height: variables.stepper_height,
+ padding: 0,
marginHorizontal: 10,
fontSize: variables.stepper_input_font_size,
color: variables.color_text, |
c99ca68bdbcf65086a005ce09d32435b7fbca5a2 | src/app/theme.service.ts | src/app/theme.service.ts | import { Injectable } from '@angular/core';
import { Observable, BehaviorSubject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class ThemeService {
private darkMode = new BehaviorSubject(false);
// TODO: load previous setting from storage
constructor() { }
isDarkMode(): Observable<boolean> {
return this.darkMode.asObservable();
}
setLightMode(): void {
console.log('Setting light mode');
this.darkMode.next(false);
}
setDarkMode(): void {
console.log('Setting dark mode');
this.darkMode.next(true);
}
}
| import { Injectable } from '@angular/core';
import { Observable, BehaviorSubject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class ThemeService {
private darkMode = new BehaviorSubject(false);
constructor() {
const setting = localStorage.getItem('darkMode');
if (setting === 'true') {
this.darkMode.next(true);
}
}
isDarkMode(): Observable<boolean> {
return this.darkMode.asObservable();
}
setLightMode(): void {
console.log('Setting light mode');
this.darkMode.next(false);
localStorage.setItem('darkMode', 'false');
}
setDarkMode(): void {
console.log('Setting dark mode');
this.darkMode.next(true);
localStorage.setItem('darkMode', 'true');
}
}
| Save and load dark mode preference to local storage | Save and load dark mode preference to local storage
| TypeScript | mit | mbukosky/SpotifyUnchained,mbukosky/SpotifyUnchained,mbukosky/SpotifyUnchained,mbukosky/SpotifyUnchained | ---
+++
@@ -8,8 +8,12 @@
private darkMode = new BehaviorSubject(false);
- // TODO: load previous setting from storage
- constructor() { }
+ constructor() {
+ const setting = localStorage.getItem('darkMode');
+ if (setting === 'true') {
+ this.darkMode.next(true);
+ }
+ }
isDarkMode(): Observable<boolean> {
return this.darkMode.asObservable();
@@ -18,10 +22,12 @@
setLightMode(): void {
console.log('Setting light mode');
this.darkMode.next(false);
+ localStorage.setItem('darkMode', 'false');
}
setDarkMode(): void {
console.log('Setting dark mode');
this.darkMode.next(true);
+ localStorage.setItem('darkMode', 'true');
}
} |
78eb4c16ebf10c35d408ac73cb91477fbd3a1144 | src/index.ts | src/index.ts | export interface Result {
matches: boolean;
}
export interface VisualRegressionTester {
check: (name: string) => Promise<Result>;
}
export interface Browser {
takeScreenshot: () => Promise<string>;
}
export interface FileSystem {
read: (name: string) => Promise<string>;
write: (name: string) => Promise<string>;
}
export default class Mugshot implements VisualRegressionTester {
private browser: Browser;
private fs: FileSystem;
constructor(browser: Browser, storage: FileSystem) {
this.browser = browser;
this.fs = storage;
}
check = async (name: string) => {
const screenshot = await this.browser.takeScreenshot();
const base = await this.fs.read(name);
return Promise.resolve({ matches: screenshot === base });
};
}
| export interface Result {
matches: boolean;
}
export interface VisualRegressionTester {
check: (name: string) => Promise<Result>;
}
export interface Browser {
// https://w3c.github.io/webdriver/#take-screenshot
takeScreenshot: () => Promise<string>;
}
export interface FileSystem {
read: (name: string) => Promise<string>;
write: (name: string) => Promise<string>;
}
export default class Mugshot implements VisualRegressionTester {
private browser: Browser;
private fs: FileSystem;
constructor(browser: Browser, storage: FileSystem) {
this.browser = browser;
this.fs = storage;
}
check = async (name: string) => {
const screenshot = await this.browser.takeScreenshot();
const base = await this.fs.read(name);
return Promise.resolve({ matches: screenshot === base });
};
}
| Add link to webdriver spec | Add link to webdriver spec
| TypeScript | mit | uberVU/mugshot,uberVU/mugshot | ---
+++
@@ -7,6 +7,7 @@
}
export interface Browser {
+ // https://w3c.github.io/webdriver/#take-screenshot
takeScreenshot: () => Promise<string>;
}
|
c5ef44e14ef33c4df42ac296356c01a65d0834f6 | src/index.ts | src/index.ts | export {SEGMENT_CONFIG, SegmentModule} from './ngx-segment-analytics.module';
export {SegmentService} from './ngx-segment-analytics.service';
export {SegmentConfig} from './ngx-segment-analytics.config';
| export * from './ngx-segment-analytics.module';
export { SegmentService } from './ngx-segment-analytics.service';
export { SegmentConfig } from './ngx-segment-analytics.config';
| Revert "Limit exportation scope of module" | Revert "Limit exportation scope of module"
This reverts commit 39b5bd5c788ccb9e2d4c059ed46df5e3bf4b172a.
Fix #97
| TypeScript | mit | opendecide/ngx-segment-analytics | ---
+++
@@ -1,3 +1,3 @@
-export {SEGMENT_CONFIG, SegmentModule} from './ngx-segment-analytics.module';
-export {SegmentService} from './ngx-segment-analytics.service';
-export {SegmentConfig} from './ngx-segment-analytics.config';
+export * from './ngx-segment-analytics.module';
+export { SegmentService } from './ngx-segment-analytics.service';
+export { SegmentConfig } from './ngx-segment-analytics.config'; |
8b6f96a1ce584e34a2ba3601deb334c6bd24fbb2 | app/+services/projects.service.ts | app/+services/projects.service.ts | import { Injectable } from '@angular/core';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import 'rxjs/add/operator/toPromise';
import { Group, Project } from '../+models';
import { ApiService, AuthenticationService } from './';
@Injectable()
export class ProjectsService {
private projectsUrl = ApiService.baseUrl + '/projects';
constructor(private $http: Http) {}
getProjectList(): Promise<Group[]> {
let headers = new Headers({ 'Authorization': AuthenticationService.getToken() });
let options = new RequestOptions({ headers: headers });
return this.$http
.get(this.projectsUrl, options)
.toPromise()
.then((response: Response) => response.json() as Group[])
.catch(error => Promise.reject(error));
}
getProject(owner: string, repo: string): Promise<Project> {
return this.getProjectList()
.then((projectList: Group[]) => {
let group = projectList.find(function(project: Group) {
return project.user.pseudo === owner;
});
let projects = group.projects;
return projects.find(function(project: Project) {
return project.name === repo;
});
})
}
} | import { Injectable } from '@angular/core';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import 'rxjs/add/operator/toPromise';
import { Group, Project } from '../+models';
import { ApiService, AuthenticationService } from './';
@Injectable()
export class ProjectsService {
private all = () => `${ApiService.baseUrl}/projects`;
private one = (owner: string, repo: string) => `${ApiService.baseUrl}/projects/${owner}/${repo}`;
constructor(private $http: Http) {}
getProjectList(): Promise<Group[]> {
let headers = new Headers({ 'Authorization': AuthenticationService.getToken() });
let options = new RequestOptions({ headers: headers });
return this.$http
.get(this.all(), options)
.toPromise()
.then((response: Response) => response.json() as Group[])
.catch(error => Promise.reject(error));
}
getProject(owner: string, repo: string): Promise<Project> {
let headers = new Headers({ 'Authorization': AuthenticationService.getToken() });
let options = new RequestOptions({ headers: headers });
return this.$http
.get(this.one(owner, repo), options)
.toPromise()
.then((response: Response) => response.json() as Project)
.catch(error => Promise.reject(error));
}
} | Use mock server to retrieve a project | [Core] Use mock server to retrieve a project
| TypeScript | mit | yllieth/localehub,yllieth/localehub,yllieth/localehub,yllieth/localehub | ---
+++
@@ -7,7 +7,8 @@
@Injectable()
export class ProjectsService {
- private projectsUrl = ApiService.baseUrl + '/projects';
+ private all = () => `${ApiService.baseUrl}/projects`;
+ private one = (owner: string, repo: string) => `${ApiService.baseUrl}/projects/${owner}/${repo}`;
constructor(private $http: Http) {}
@@ -16,24 +17,20 @@
let options = new RequestOptions({ headers: headers });
return this.$http
- .get(this.projectsUrl, options)
+ .get(this.all(), options)
.toPromise()
.then((response: Response) => response.json() as Group[])
.catch(error => Promise.reject(error));
}
getProject(owner: string, repo: string): Promise<Project> {
- return this.getProjectList()
- .then((projectList: Group[]) => {
- let group = projectList.find(function(project: Group) {
- return project.user.pseudo === owner;
- });
+ let headers = new Headers({ 'Authorization': AuthenticationService.getToken() });
+ let options = new RequestOptions({ headers: headers });
- let projects = group.projects;
-
- return projects.find(function(project: Project) {
- return project.name === repo;
- });
- })
+ return this.$http
+ .get(this.one(owner, repo), options)
+ .toPromise()
+ .then((response: Response) => response.json() as Project)
+ .catch(error => Promise.reject(error));
}
} |
2eac3e8a3b8c76844958e0c19ddd5d5e7934a46d | src/providers/Jenkins.ts | src/providers/Jenkins.ts | import { Embed } from '../model/Embed'
import { BaseProvider } from '../util/BaseProvider'
/**
* https://plugins.jenkins.io/notification
*/
class Jenkins extends BaseProvider {
private static capitalize(str: string) {
const tmp = str.toLowerCase()
return tmp.charAt(0).toUpperCase() + tmp.slice(1)
}
public getName() {
return 'Jenkins-CI'
}
public async parseData() {
this.setEmbedColor(0xF0D6B7)
const phase = this.body.build.phase
const embed = new Embed()
embed.title = 'Project ' + this.body.name
embed.url = this.body.build.full_url
switch (phase) {
case 'STARTED':
embed.description = 'Started build #' + this.body.build.number
break
case 'COMPLETED':
case 'FINALIZED':
embed.description = Jenkins.capitalize(phase) + ' build #' + this.body.build.number + ' with status: ' + this.body.build.status
break
}
this.addEmbed(embed)
}
}
module.exports = Jenkins
| import { Embed } from '../model/Embed'
import { BaseProvider } from '../util/BaseProvider'
/**
* https://plugins.jenkins.io/notification
*/
class Jenkins extends BaseProvider {
private static capitalize(str: string) {
const tmp = str.toLowerCase()
return tmp.charAt(0).toUpperCase() + tmp.slice(1)
}
public getName() {
return 'Jenkins-CI'
}
public getPath() {
return 'jenkins'
}
public async parseData() {
this.setEmbedColor(0xF0D6B7)
const phase = this.body.build.phase
const embed = new Embed()
embed.title = 'Project ' + this.body.name
embed.url = this.body.build.full_url
switch (phase) {
case 'STARTED':
embed.description = 'Started build #' + this.body.build.number
break
case 'COMPLETED':
case 'FINALIZED':
embed.description = Jenkins.capitalize(phase) + ' build #' + this.body.build.number + ' with status: ' + this.body.build.status
break
}
this.addEmbed(embed)
}
}
module.exports = Jenkins
| Fix dat path for jenkins provider | Fix dat path for jenkins provider
| TypeScript | mit | Commit451/skyhook,dscalzi/skyhook,dscalzi/skyhook,dscalzi/skyhook | ---
+++
@@ -13,6 +13,10 @@
public getName() {
return 'Jenkins-CI'
+ }
+
+ public getPath() {
+ return 'jenkins'
}
public async parseData() { |
3ed4a09c9580aeb88ebb577becc992885089bbf8 | src/run.ts | src/run.ts | import callWith from "./utils/callWith";
export default (...tfs: Array<() => void>) => tfs.forEach(callWith());
| import callWith from "./utils/callWith";
export default (...tfs: Array<() => void>) => {
tfs.forEach(callWith());
process.exit(0);
};
| Exit with 0 if no errors or failures | Exit with 0 if no errors or failures
| TypeScript | mit | testingrequired/tf,testingrequired/tf | ---
+++
@@ -1,3 +1,6 @@
import callWith from "./utils/callWith";
-export default (...tfs: Array<() => void>) => tfs.forEach(callWith());
+export default (...tfs: Array<() => void>) => {
+ tfs.forEach(callWith());
+ process.exit(0);
+}; |
32957fac318c28344339bf178587000fb4a07cd3 | src/app/utils/media-queries.ts | src/app/utils/media-queries.ts | import store from '../store/store';
import { setPhonePortrait } from '../shell/actions';
import { Observable, defer, fromEventPattern, asapScheduler } from 'rxjs';
import { map, startWith, subscribeOn } from 'rxjs/operators';
// This seems like a good breakpoint for portrait based on https://material.io/devices/
// We can't use orientation:portrait because Android Chrome messes up when the keyboard is shown: https://www.chromestatus.com/feature/5656077370654720
const phoneWidthQuery = window.matchMedia('(max-width: 540px)');
/**
* Return whether we're in phone-portrait mode right now.
*/
export function isPhonePortraitFromMediaQuery() {
return phoneWidthQuery.matches;
}
/**
* Return an observable sequence of phone-portrait statuses.
*/
function isPhonePortraitStream(): Observable<boolean> {
return defer(() =>
fromEventPattern<MediaQueryList>(
(h: (this: MediaQueryList, ev: MediaQueryListEvent) => any) => phoneWidthQuery.addListener(h),
(h: (this: MediaQueryList, ev: MediaQueryListEvent) => any) =>
phoneWidthQuery.removeListener(h)
).pipe(
map((e: MediaQueryList) => e.matches),
startWith(phoneWidthQuery.matches),
subscribeOn(asapScheduler)
)
);
}
isPhonePortraitStream().subscribe((isPhonePortrait) =>
store.dispatch(setPhonePortrait(isPhonePortrait))
);
| import store from '../store/store';
import { setPhonePortrait } from '../shell/actions';
// This seems like a good breakpoint for portrait based on https://material.io/devices/
// We can't use orientation:portrait because Android Chrome messes up when the keyboard is shown: https://www.chromestatus.com/feature/5656077370654720
const phoneWidthQuery = window.matchMedia('(max-width: 540px)');
phoneWidthQuery.addListener((e) => {
store.dispatch(setPhonePortrait(e.matches));
});
/**
* Return whether we're in phone-portrait mode right now.
*/
export function isPhonePortraitFromMediaQuery() {
return phoneWidthQuery.matches;
}
| Remove rxjs from media queries | Remove rxjs from media queries
| TypeScript | mit | DestinyItemManager/DIM,delphiactual/DIM,DestinyItemManager/DIM,DestinyItemManager/DIM,delphiactual/DIM,DestinyItemManager/DIM,delphiactual/DIM,delphiactual/DIM | ---
+++
@@ -1,11 +1,13 @@
import store from '../store/store';
import { setPhonePortrait } from '../shell/actions';
-import { Observable, defer, fromEventPattern, asapScheduler } from 'rxjs';
-import { map, startWith, subscribeOn } from 'rxjs/operators';
// This seems like a good breakpoint for portrait based on https://material.io/devices/
// We can't use orientation:portrait because Android Chrome messes up when the keyboard is shown: https://www.chromestatus.com/feature/5656077370654720
const phoneWidthQuery = window.matchMedia('(max-width: 540px)');
+
+phoneWidthQuery.addListener((e) => {
+ store.dispatch(setPhonePortrait(e.matches));
+});
/**
* Return whether we're in phone-portrait mode right now.
@@ -13,24 +15,3 @@
export function isPhonePortraitFromMediaQuery() {
return phoneWidthQuery.matches;
}
-
-/**
- * Return an observable sequence of phone-portrait statuses.
- */
-function isPhonePortraitStream(): Observable<boolean> {
- return defer(() =>
- fromEventPattern<MediaQueryList>(
- (h: (this: MediaQueryList, ev: MediaQueryListEvent) => any) => phoneWidthQuery.addListener(h),
- (h: (this: MediaQueryList, ev: MediaQueryListEvent) => any) =>
- phoneWidthQuery.removeListener(h)
- ).pipe(
- map((e: MediaQueryList) => e.matches),
- startWith(phoneWidthQuery.matches),
- subscribeOn(asapScheduler)
- )
- );
-}
-
-isPhonePortraitStream().subscribe((isPhonePortrait) =>
- store.dispatch(setPhonePortrait(isPhonePortrait))
-); |
b7c55e6aae01d3089e71b12ca05848b355699ba1 | lib/hooks/use-promise.ts | lib/hooks/use-promise.ts | import {useEffect, useState} from 'react'
import LogRocket from '../logrocket'
function errorToString(e): string {
const str = e.value || e.message || ''
if (str === 'Failed to fetch')
return 'Failed to contact server. Please make sure you have an active internet connection.'
return str
}
/**
* Pass a function that returns the promise to be executed.
*/
export default function usePromise(
getPromise
): [boolean, void | string, void | any] {
const [loading, setLoading] = useState<boolean>(true)
const [error, setError] = useState<void | string>()
const [value, setValue] = useState<void | any>()
// Will throw an error if hooks are used after unmount.
useEffect(() => {
let mounted = true
setLoading(true)
getPromise()
.then((v) => {
if (mounted) setValue(v)
})
.catch((e) => {
LogRocket.captureException(e)
if (mounted) setError(errorToString(e))
})
.finally(() => {
if (mounted) setLoading(false)
})
return () => {
mounted = false
}
}, [getPromise])
return [loading, error, value]
}
| import {useEffect, useState} from 'react'
import LogRocket from '../logrocket'
function errorToString(e: unknown): string {
if (typeof e === 'string') return e
if (e instanceof Response) {
if (e.status === 401 || e.status === 403) return 'Access denied.'
if (e.status === 404) return '404: Object does not exist.'
if (e.status === 500) return 'Server error.'
return 'Application error'
}
if (e instanceof Error) {
const v = e.message
if (v === 'Failed to fetch') {
return 'Failed to contact server. Please make sure you have an active internet connection.'
}
return v
}
return 'Unknown error'
}
/**
* Pass a function that returns the promise to be executed.
*/
export default function usePromise(
getPromise
): [boolean, void | string, void | any] {
const [loading, setLoading] = useState<boolean>(true)
const [error, setError] = useState<void | string>()
const [value, setValue] = useState<void | any>()
// Will throw an error if hooks are used after unmount.
useEffect(() => {
let mounted = true
setLoading(true)
getPromise()
.then((v) => {
if (mounted) setValue(v)
})
.catch((e: unknown) => {
if (e instanceof Error) LogRocket.captureException(e)
if (mounted) setError(errorToString(e))
})
.finally(() => {
if (mounted) setLoading(false)
})
return () => {
mounted = false
}
}, [getPromise])
return [loading, error, value]
}
| Handle different error types more specifically | Handle different error types more specifically
| TypeScript | mit | conveyal/analysis-ui,conveyal/analysis-ui,conveyal/analysis-ui | ---
+++
@@ -2,11 +2,25 @@
import LogRocket from '../logrocket'
-function errorToString(e): string {
- const str = e.value || e.message || ''
- if (str === 'Failed to fetch')
- return 'Failed to contact server. Please make sure you have an active internet connection.'
- return str
+function errorToString(e: unknown): string {
+ if (typeof e === 'string') return e
+
+ if (e instanceof Response) {
+ if (e.status === 401 || e.status === 403) return 'Access denied.'
+ if (e.status === 404) return '404: Object does not exist.'
+ if (e.status === 500) return 'Server error.'
+ return 'Application error'
+ }
+
+ if (e instanceof Error) {
+ const v = e.message
+ if (v === 'Failed to fetch') {
+ return 'Failed to contact server. Please make sure you have an active internet connection.'
+ }
+ return v
+ }
+
+ return 'Unknown error'
}
/**
@@ -28,8 +42,8 @@
.then((v) => {
if (mounted) setValue(v)
})
- .catch((e) => {
- LogRocket.captureException(e)
+ .catch((e: unknown) => {
+ if (e instanceof Error) LogRocket.captureException(e)
if (mounted) setError(errorToString(e))
})
.finally(() => { |
79a5ac4c349500c19c93fabf0d628ecf5163d732 | types/express/index.d.ts | types/express/index.d.ts | import { Request } from 'express';
declare module 'express' {
export interface Request {
isProxy: boolean;
}
}
| declare module 'express-serve-static-core' {
export interface Request {
isProxy: boolean;
}
}
| Fix express augmentation so it works after npm install | SERV-23: Fix express augmentation so it works after npm install
| TypeScript | apache-2.0 | BitGo/BitGoJS,BitGo/BitGoJS,BitGo/BitGoJS,BitGo/BitGoJS | ---
+++
@@ -1,6 +1,4 @@
-import { Request } from 'express';
-
-declare module 'express' {
+declare module 'express-serve-static-core' {
export interface Request {
isProxy: boolean;
} |
6fc69b63d5eb688e47d1b9151e987f37a9dc45bf | src/admin/config/cli.ts | src/admin/config/cli.ts | #!/usr/bin/env node
'use strict';
import { configArgs } from './cli-args';
import { Cli } from './cli-tool';
import { Configuration } from '../../configuration';
import { Container } from 'typescript-ioc';
import { Database } from '../../database';
try {
const config: Configuration = Container.get(Configuration);
config.on('load', () => {
const database: Database = Container.get(Database);
new Cli(configArgs).processCommand()
.then(() => {
database.disconnect();
}).catch((err: any) => {
if (err && err.response && err.response.body && err.response.body.error) {
console.error(`Error: ${err.response.body.error}`);
} else if (err && typeof err !== 'string') {
console.error(`${JSON.stringify(err)}`);
} else {
console.error(`${err}`);
}
database.disconnect();
process.exit(1);
});
});
} catch (e) {
console.error(e);
}
| #!/usr/bin/env node
'use strict';
import { configArgs } from './cli-args';
import { Cli } from './cli-tool';
import { Configuration } from '../../configuration';
import { Container } from 'typescript-ioc';
import { Database } from '../../database';
try {
const config: Configuration = Container.get(Configuration);
config.on('load', () => {
const database: Database = Container.get(Database);
new Cli(configArgs).processCommand()
.then(() => {
database.disconnect();
}).catch((err: any) => {
if (err && err.response && err.response.body && err.response.body.error) {
console.error(`Error: ${err.response.body.error}`);
} else if (err && err.message) {
console.error(err.message);
} else {
console.error(`${err}`);
}
database.disconnect();
process.exit(1);
});
});
} catch (e) {
console.error(e);
}
| FIX error messages on CLI | FIX error messages on CLI
| TypeScript | mit | jairelton/tree-gateway,Leanty/tree-gateway,Leanty/tree-gateway,jairelton/tree-gateway,Leanty/tree-gateway,jairelton/tree-gateway | ---
+++
@@ -17,8 +17,8 @@
}).catch((err: any) => {
if (err && err.response && err.response.body && err.response.body.error) {
console.error(`Error: ${err.response.body.error}`);
- } else if (err && typeof err !== 'string') {
- console.error(`${JSON.stringify(err)}`);
+ } else if (err && err.message) {
+ console.error(err.message);
} else {
console.error(`${err}`);
} |
31b30efff41a9df4354d574d3cf60763fbf02eba | vscode-extensions/vscode-boot-properties/lib/Main.ts | vscode-extensions/vscode-boot-properties/lib/Main.ts | 'use strict';
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as VSCode from 'vscode';
import * as Path from 'path';
import * as FS from 'fs';
import * as Net from 'net';
import * as ChildProcess from 'child_process';
import {LanguageClient, LanguageClientOptions, SettingMonitor, ServerOptions, StreamInfo} from 'vscode-languageclient';
import {TextDocument} from 'vscode';
import * as commons from 'commons-vscode';
const PROPERTIES_LANGUAGE_ID = "spring-boot-properties";
const YAML_LANGUAGE_ID = "spring-boot-properties-yaml";
/** Called when extension is activated */
export function activate(context: VSCode.ExtensionContext) {
VSCode.window.showInformationMessage(
"The `vscode-boot-properties` extension is obsolete and no longer functional. "+
"Please uninstall it and install the `vscode-spring-boot` extension instead."
);
}
| 'use strict';
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as VSCode from 'vscode';
const PROPERTIES_LANGUAGE_ID = "spring-boot-properties";
const YAML_LANGUAGE_ID = "spring-boot-properties-yaml";
/** Called when extension is activated */
export function activate(context: VSCode.ExtensionContext) {
VSCode.window.showInformationMessage(
"The `vscode-boot-properties` extension is obsolete and no longer functional. "+
"Please uninstall it and install the `vscode-spring-boot` extension instead."
);
}
| Fix problem building dummy vscode-boot-properties | Fix problem building dummy vscode-boot-properties | TypeScript | epl-1.0 | spring-projects/sts4,spring-projects/sts4,spring-projects/sts4,spring-projects/sts4,spring-projects/sts4,spring-projects/sts4 | ---
+++
@@ -3,14 +3,6 @@
// Import the module and reference it with the alias vscode in your code below
import * as VSCode from 'vscode';
-import * as Path from 'path';
-import * as FS from 'fs';
-import * as Net from 'net';
-import * as ChildProcess from 'child_process';
-import {LanguageClient, LanguageClientOptions, SettingMonitor, ServerOptions, StreamInfo} from 'vscode-languageclient';
-import {TextDocument} from 'vscode';
-
-import * as commons from 'commons-vscode';
const PROPERTIES_LANGUAGE_ID = "spring-boot-properties";
const YAML_LANGUAGE_ID = "spring-boot-properties-yaml"; |
d824bef5c720d2c61b890e8ca659ca705c0af8cf | packages/data-mate/src/function-configs/object/equals.ts | packages/data-mate/src/function-configs/object/equals.ts | import { isDeepEqual } from '@terascope/utils';
import { FieldType } from '@terascope/types';
import {
FieldValidateConfig, ProcessMode, FunctionDefinitionType, FunctionDefinitionCategory
} from '../interfaces';
export interface EqualsArgs {
readonly value: unknown;
}
export const equalsConfig: FieldValidateConfig<EqualsArgs> = {
name: 'equals',
type: FunctionDefinitionType.FIELD_VALIDATION,
process_mode: ProcessMode.INDIVIDUAL_VALUES,
category: FunctionDefinitionCategory.OBJECT,
description: 'Checks to see if input matches the value',
create({ value }) {
return (input: unknown) => isDeepEqual(input, value);
},
accepts: [],
argument_schema: {
value: {
type: FieldType.Any,
array: false,
description: 'Value to use in the comparison'
}
}
};
| import { isDeepEqualFP } from '@terascope/utils';
import { FieldType } from '@terascope/types';
import {
FieldValidateConfig, ProcessMode, FunctionDefinitionType, FunctionDefinitionCategory
} from '../interfaces';
export interface EqualsArgs {
readonly value: unknown;
}
export const equalsConfig: FieldValidateConfig<EqualsArgs> = {
name: 'equals',
type: FunctionDefinitionType.FIELD_VALIDATION,
process_mode: ProcessMode.INDIVIDUAL_VALUES,
category: FunctionDefinitionCategory.OBJECT,
description: 'Checks to see if input matches the value',
create({ value }) {
return isDeepEqualFP(value);
},
accepts: [],
argument_schema: {
value: {
type: FieldType.Any,
array: false,
description: 'Value to use in the comparison'
}
}
};
| Use FP version of isDeepEqual | Use FP version of isDeepEqual
| TypeScript | apache-2.0 | terascope/teraslice,terascope/teraslice,terascope/teraslice,terascope/teraslice | ---
+++
@@ -1,4 +1,4 @@
-import { isDeepEqual } from '@terascope/utils';
+import { isDeepEqualFP } from '@terascope/utils';
import { FieldType } from '@terascope/types';
import {
FieldValidateConfig, ProcessMode, FunctionDefinitionType, FunctionDefinitionCategory
@@ -15,7 +15,7 @@
category: FunctionDefinitionCategory.OBJECT,
description: 'Checks to see if input matches the value',
create({ value }) {
- return (input: unknown) => isDeepEqual(input, value);
+ return isDeepEqualFP(value);
},
accepts: [],
argument_schema: { |
01b5b1762e7529eb3512749dcaaea55480570ccd | frontend/src/app/lunchplace/lunchplace.component.ts | frontend/src/app/lunchplace/lunchplace.component.ts | import { Component, OnInit, ViewEncapsulation, Input } from '@angular/core';
import { LunchplaceService } from './lunchplace.service';
@Component({
selector: 'lunchplace',
encapsulation: ViewEncapsulation.None,
templateUrl: './lunchplace.component.html',
styleUrls: ['./lunchplace.component.scss']
})
export class LunchplaceComponent implements OnInit {
@Input() organization: any;
teams: any[] = [];
private timer: number = 1000 * 60 * 15;
constructor(private lunchplaceService: LunchplaceService) { }
ngOnInit() {
if(!this.is_weekend()){
setInterval(() => {
this.lunchplaceService
.get_teams_daily(this.organization)
.subscribe(orga => {
this.teams = orga.teams
});
}, this.timer);
}
}
is_weekend(){
var day = new Date().getDay();
return (day == 6) || (day == 0);
}
}
| import { Component, OnInit, ViewEncapsulation, Input } from '@angular/core';
import { LunchplaceService } from './lunchplace.service';
@Component({
selector: 'lunchplace',
encapsulation: ViewEncapsulation.None,
templateUrl: './lunchplace.component.html',
styleUrls: ['./lunchplace.component.scss']
})
export class LunchplaceComponent implements OnInit {
@Input() organization: any;
teams: any[] = [];
private timer: number = 1000 * 60 * 15;
constructor(private lunchplaceService: LunchplaceService) { }
ngOnInit() {
if(!this.is_weekend()){
setInterval(() => {
this.get_teams_daily();
}, this.timer);
this.get_teams_daily();
}
}
get_teams_daily(){
this.lunchplaceService
.get_teams_daily(this.organization)
.subscribe(orga => {
this.teams = orga.teams
});
}
is_weekend(){
var day = new Date().getDay();
return (day == 6) || (day == 0);
}
}
| Call Lunchplace service on start | Call Lunchplace service on start
| TypeScript | mit | Zenika/MARCEL,Zenika/MARCEL,Zenika/MARCEL,Zenika/MARCEL | ---
+++
@@ -20,13 +20,18 @@
ngOnInit() {
if(!this.is_weekend()){
setInterval(() => {
- this.lunchplaceService
+ this.get_teams_daily();
+ }, this.timer);
+ this.get_teams_daily();
+ }
+ }
+
+ get_teams_daily(){
+ this.lunchplaceService
.get_teams_daily(this.organization)
.subscribe(orga => {
this.teams = orga.teams
});
- }, this.timer);
- }
}
is_weekend(){ |
8901058f863788807af333f0f6af26f80a3129f8 | packages/components/components/button/ErrorButton.tsx | packages/components/components/button/ErrorButton.tsx | import React from 'react';
import Button, { Props as ButtonProps } from './Button';
const ErrorButton = ({ children, ...rest }: ButtonProps) => {
return (
<Button className="pm-button--error" {...rest}>
{children}
</Button>
);
};
export default ErrorButton;
| import React from 'react';
import Button, { Props as ButtonProps } from './Button';
import { classnames } from '../../helpers/component';
const ErrorButton = ({ children, className, ...rest }: ButtonProps) => {
return (
<Button className={classnames(['pm-button--error', className])} {...rest}>
{children}
</Button>
);
};
export default ErrorButton;
| Fix error button className merging | Fix error button className merging
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -1,9 +1,10 @@
import React from 'react';
import Button, { Props as ButtonProps } from './Button';
+import { classnames } from '../../helpers/component';
-const ErrorButton = ({ children, ...rest }: ButtonProps) => {
+const ErrorButton = ({ children, className, ...rest }: ButtonProps) => {
return (
- <Button className="pm-button--error" {...rest}>
+ <Button className={classnames(['pm-button--error', className])} {...rest}>
{children}
</Button>
); |
1c0d7e3ff5d10389b5fde8b240965e27f61f16a1 | src/lib/handlers/serve-command.handler.ts | src/lib/handlers/serve-command.handler.ts | import * as nodemon from 'nodemon';
import * as path from 'path';
import { Logger } from '../../common/logger/interfaces/logger.interface';
import { GenerateCommandArguments } from '../../common/program/interfaces/command.aguments.interface';
import { CommandHandler } from '../../common/program/interfaces/command.handler.interface';
import { GenerateCommandOptions } from '../../common/program/interfaces/command.options.interface';
import { ConfigurationService } from '../../core/configuration/configuration.service';
import { ColorService } from '../../core/logger/color.service';
import { LoggerService } from '../../core/logger/logger.service';
export class ServeCommandHandler implements CommandHandler {
public execute(
args: GenerateCommandArguments,
options: GenerateCommandOptions,
logger: Logger
): Promise<void> {
LoggerService.setLogger(logger);
logger.debug(ColorService.blue('[DEBUG]'), 'execute serve command');
return ConfigurationService.load()
.then(() => {
const language: string = ConfigurationService.getProperty('language');
const entryFile: string =
path.resolve(process.cwd(),
ConfigurationService.getProperty('entryFile'));
if (language == 'js') {
nodemon({
'watch': ['src/**/*.js'],
'ignore': ['src/**/*.spec.ts'],
'exec': `ts-node ${entryFile}`
})
} else {
nodemon({
'watch': ['src/**/*.ts'],
'ignore': ['src/**/*.spec.ts'],
'exec': `ts-node ${entryFile}`
})
}
});
}
}
| import * as nodemon from 'nodemon';
import * as path from 'path';
import { Logger } from '../../common/logger/interfaces/logger.interface';
import { GenerateCommandArguments } from '../../common/program/interfaces/command.aguments.interface';
import { CommandHandler } from '../../common/program/interfaces/command.handler.interface';
import { GenerateCommandOptions } from '../../common/program/interfaces/command.options.interface';
import { ConfigurationService } from '../../core/configuration/configuration.service';
import { ColorService } from '../../core/logger/color.service';
import { LoggerService } from '../../core/logger/logger.service';
export class ServeCommandHandler implements CommandHandler {
public execute(
args: GenerateCommandArguments,
options: GenerateCommandOptions,
logger: Logger
): Promise<void> {
LoggerService.setLogger(logger);
logger.debug(ColorService.blue('[DEBUG]'), 'execute serve command');
return ConfigurationService.load()
.then(() => {
const language: string = ConfigurationService.getProperty('language');
const entryFile: string =
path.resolve(process.cwd(),
ConfigurationService.getProperty('entryFile'));
if (language == 'js') {
nodemon({
'watch': ['src/**/*.js'],
'ignore': ['src/**/*.spec.ts'],
'exec': `ts-node ${entryFile}`
})
} else {
nodemon({
'watch': ['src/**/*.ts'],
'ignore': ['src/**/*.spec.js'],
'exec': `ts-node ${entryFile}`
})
}
});
}
}
| Use .js for test files | Use .js for test files | TypeScript | mit | ThomRick/nest-cli,ThomRick/nest-cli | ---
+++
@@ -33,7 +33,7 @@
} else {
nodemon({
'watch': ['src/**/*.ts'],
- 'ignore': ['src/**/*.spec.ts'],
+ 'ignore': ['src/**/*.spec.js'],
'exec': `ts-node ${entryFile}`
})
} |
b8e4718a1218ff8e2fb38407e282679fa93c85e8 | extensions/typescript-language-features/src/utils/fileSchemes.ts | extensions/typescript-language-features/src/utils/fileSchemes.ts | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export const file = 'file';
export const untitled = 'untitled';
export const git = 'git';
/** Live share scheme */
export const vsls = 'vsls';
export const walkThroughSnippet = 'walkThroughSnippet';
export const semanticSupportedSchemes = [
file,
untitled,
];
/**
* File scheme for which JS/TS language feature should be disabled
*/
export const disabledSchemes = new Set([
git,
vsls
]);
| /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export const file = 'file';
export const untitled = 'untitled';
export const git = 'git';
export const privateScheme = 'private';
/** Live share scheme */
export const vsls = 'vsls';
export const walkThroughSnippet = 'walkThroughSnippet';
export const semanticSupportedSchemes = [
file,
untitled,
];
/**
* File scheme for which JS/TS language feature should be disabled
*/
export const disabledSchemes = new Set([
git,
vsls,
privateScheme,
]);
| Disable js/ts features for the private scheme | Disable js/ts features for the private scheme
This scheme is used internally by VS Code for features such as search/replace preview
| TypeScript | mit | eamodio/vscode,eamodio/vscode,eamodio/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,Microsoft/vscode,Microsoft/vscode,eamodio/vscode,eamodio/vscode,eamodio/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,Microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,eamodio/vscode,Microsoft/vscode,eamodio/vscode,eamodio/vscode,Microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Microsoft/vscode,eamodio/vscode,eamodio/vscode,Microsoft/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Microsoft/vscode,microsoft/vscode,Microsoft/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,Microsoft/vscode,Microsoft/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,Microsoft/vscode,microsoft/vscode | ---
+++
@@ -6,6 +6,8 @@
export const file = 'file';
export const untitled = 'untitled';
export const git = 'git';
+export const privateScheme = 'private';
+
/** Live share scheme */
export const vsls = 'vsls';
export const walkThroughSnippet = 'walkThroughSnippet';
@@ -20,5 +22,6 @@
*/
export const disabledSchemes = new Set([
git,
- vsls
+ vsls,
+ privateScheme,
]); |
9ebabbb3cff3e53d5ca2560ff54989f24d1f8336 | src/api/types/modules.ts | src/api/types/modules.ts | import {Query} from './rest';
// ------------------------------------------------------------------
// Knowledge base
export interface Feature {
id: string;
source: string;
feature_id: string;
species: string;
type: string;
sub_type: string;
name: string;
full_name: string;
description: string;
aliases: string[];
}
export interface FeatureQuery {
feature_id: string;
source: string;
species: string;
}
export interface FeaturesQuery {
feature_id: string[];
source: string;
species: string;
}
export interface FeatureSearchQuery extends Query {
query: string | string[];
source?: string;
species?: string;
}
export interface FeatureAutocompleteQuery extends FeatureSearchQuery {
query: string;
}
// ------------------------------------------------------------------
// File upload
// Stored file descriptor.
export interface FileDescriptor {
file: string;
is_remote?: boolean;
file_temp?: string;
notes?: string;
size?: number;
refs?: string[];
}
export interface FileUploadResponseItem {
done: boolean;
name: string;
size: number;
temp: string;
}
export interface FileUploadResponse {
files: FileUploadResponseItem[];
}
| import {Query} from './rest';
// ------------------------------------------------------------------
// Knowledge base
export interface Feature {
id: string;
source: string;
feature_id: string;
species: string;
type: string;
sub_type: string;
name: string;
full_name: string;
description: string;
aliases: string[];
}
export interface FeatureQuery {
feature_id: string;
source: string;
species: string;
}
export interface FeaturesQuery {
feature_id: string[];
source: string;
species: string;
}
export interface FeatureSearchQuery extends Query {
query: string;
source?: string;
species?: string;
}
export interface FeatureAutocompleteQuery extends FeatureSearchQuery {
query: string;
}
// ------------------------------------------------------------------
// File upload
// Stored file descriptor.
export interface FileDescriptor {
file: string;
is_remote?: boolean;
file_temp?: string;
notes?: string;
size?: number;
refs?: string[];
}
export interface FileUploadResponseItem {
done: boolean;
name: string;
size: number;
temp: string;
}
export interface FileUploadResponse {
files: FileUploadResponseItem[];
}
| Change FeatureSearchQuery query type from string[] to string | Change FeatureSearchQuery query type from string[] to string
| TypeScript | apache-2.0 | genialis/resolwe-js,genialis/resolwe-js | ---
+++
@@ -29,7 +29,7 @@
}
export interface FeatureSearchQuery extends Query {
- query: string | string[];
+ query: string;
source?: string;
species?: string;
} |
f92eaddc0db9d64d60d9f378d5fb9027c5432b2d | app/src/lib/git/revert.ts | app/src/lib/git/revert.ts | import { git } from './core'
import { Repository } from '../../models/repository'
export async function revertCommit(repository: Repository, SHA: string) {
await git([ 'revert', '-m', '1', SHA ], repository.path, 'revert')
}
| import { git } from './core'
import { Repository } from '../../models/repository'
/**
* Creates a new commit that reverts the changes of a previous commit
*
* @param repository - The repository to update
*
* @param SHA - The SHA of the commit to be reverted
*
*/
export async function revertCommit(repository: Repository, SHA: string) {
await git([ 'revert', '-m', '1', SHA ], repository.path, 'revert')
}
| Throw some docs on it | Throw some docs on it
| TypeScript | mit | gengjiawen/desktop,desktop/desktop,gengjiawen/desktop,kactus-io/kactus,j-f1/forked-desktop,kactus-io/kactus,artivilla/desktop,artivilla/desktop,j-f1/forked-desktop,say25/desktop,desktop/desktop,hjobrien/desktop,say25/desktop,j-f1/forked-desktop,say25/desktop,gengjiawen/desktop,artivilla/desktop,say25/desktop,desktop/desktop,shiftkey/desktop,j-f1/forked-desktop,gengjiawen/desktop,hjobrien/desktop,desktop/desktop,artivilla/desktop,shiftkey/desktop,kactus-io/kactus,hjobrien/desktop,hjobrien/desktop,shiftkey/desktop,shiftkey/desktop,kactus-io/kactus | ---
+++
@@ -1,6 +1,14 @@
import { git } from './core'
import { Repository } from '../../models/repository'
+/**
+ * Creates a new commit that reverts the changes of a previous commit
+ *
+ * @param repository - The repository to update
+ *
+ * @param SHA - The SHA of the commit to be reverted
+ *
+ */
export async function revertCommit(repository: Repository, SHA: string) {
await git([ 'revert', '-m', '1', SHA ], repository.path, 'revert')
} |
fbeb3fe9659a0c580631436a4ea24231a080ea56 | client/Utility/Toolbox.ts | client/Utility/Toolbox.ts | export interface KeyValueSet<T> {
[key: string]: T;
}
export function removeFirst<T>(array: T[], item: T) {
const index = array.indexOf(item);
if (index > -1) {
array.splice(index, 1);
}
}
export function toModifierString(number: number): string {
if (number >= 0) {
return `+${number}`;
}
return number.toString();
}
export function probablyUniqueString(): string {
//string contains only easily relayable characters for forward
//compatability with speech-based data transfer ;-)
let chars = "1234567890abcdefghijkmnpqrstuvxyz";
let probablyUniqueString = "";
for (let i = 0; i < 8; i++) {
let index = Math.floor(Math.random() * chars.length);
probablyUniqueString += chars[index];
}
return probablyUniqueString;
}
export function combatantCountsByName<T>(name: string, counts: T, oldName?: string): T {
if (name == oldName) { return counts; }
if (oldName) {
if (!counts[oldName]) { counts[oldName] = 1; }
counts[oldName] = counts[oldName] - 1;
}
if (!counts[name]) {
counts[name] = 1;
} else {
counts[name] = counts[name] + 1;
}
return counts;
}
| export interface KeyValueSet<T> {
[key: string]: T;
}
export function removeFirst<T>(array: T[], item: T) {
const index = array.indexOf(item);
if (index > -1) {
array.splice(index, 1);
}
}
export function toModifierString(number: number): string {
if (number >= 0) {
return `+${number}`;
}
return number.toString();
}
export function probablyUniqueString(): string {
//string contains only easily relayable characters for forward
//compatability with speech-based data transfer ;-)
let chars = "1234567890abcdefghijkmnpqrstuvxyz";
let probablyUniqueString = "";
for (let i = 0; i < 8; i++) {
let index = Math.floor(Math.random() * chars.length);
probablyUniqueString += chars[index];
}
return probablyUniqueString;
}
export function combatantCountsByName(name: string, counts: { [name: string]: number }, oldName?: string): { [name: string]: number } {
if (name == oldName) { return counts; }
if (oldName) {
if (!counts[oldName]) { counts[oldName] = 1; }
counts[oldName] = counts[oldName] - 1;
}
if (!counts[name]) {
counts[name] = 1;
} else {
counts[name] = counts[name] + 1;
}
return counts;
}
| Remove generic typing on combatantCountsByName utility method | Remove generic typing on combatantCountsByName utility method
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -29,7 +29,7 @@
return probablyUniqueString;
}
-export function combatantCountsByName<T>(name: string, counts: T, oldName?: string): T {
+export function combatantCountsByName(name: string, counts: { [name: string]: number }, oldName?: string): { [name: string]: number } {
if (name == oldName) { return counts; }
if (oldName) {
if (!counts[oldName]) { counts[oldName] = 1; } |
756be9bebf6a4517224eb52298c88599a25b6a20 | tests/cases/fourslash/completionListNewIdentifierVariableDeclaration.ts | tests/cases/fourslash/completionListNewIdentifierVariableDeclaration.ts | /// <reference path='fourslash.ts' />
////var x : (/*1*/) => void;
////var y : (s:string, list/*2*/
test.markers().forEach((m) => {
goTo.position(m.position, m.fileName);
verify.not.completionListIsEmpty();
verify.completionListAllowsNewIdentifier();
}); | /// <reference path='fourslash.ts' />
////var x : (s/*1*/
////var y : (s:string, list/*2*/
test.markers().forEach((m) => {
goTo.position(m.position, m.fileName);
verify.not.completionListIsEmpty();
verify.completionListAllowsNewIdentifier();
}); | Update the test to actually test what we intended | Update the test to actually test what we intended
| TypeScript | apache-2.0 | fabioparra/TypeScript,mihailik/TypeScript,germ13/TypeScript,abbasmhd/TypeScript,jwbay/TypeScript,chocolatechipui/TypeScript,synaptek/TypeScript,JohnZ622/TypeScript,keir-rex/TypeScript,fearthecowboy/TypeScript,abbasmhd/TypeScript,bpowers/TypeScript,ropik/TypeScript,vilic/TypeScript,sassson/TypeScript,nycdotnet/TypeScript,billti/TypeScript,chocolatechipui/TypeScript,yazeng/TypeScript,impinball/TypeScript,mihailik/TypeScript,fearthecowboy/TypeScript,SimoneGianni/TypeScript,msynk/TypeScript,jbondc/TypeScript,ionux/TypeScript,TukekeSoft/TypeScript,kumikumi/TypeScript,alexeagle/TypeScript,abbasmhd/TypeScript,shanexu/TypeScript,pcan/TypeScript,kpreisser/TypeScript,jbondc/TypeScript,shanexu/TypeScript,jwbay/TypeScript,synaptek/TypeScript,DanielRosenwasser/TypeScript,evgrud/TypeScript,nojvek/TypeScript,ziacik/TypeScript,jdavidberger/TypeScript,enginekit/TypeScript,shanexu/TypeScript,kimamula/TypeScript,synaptek/TypeScript,rodrigues-daniel/TypeScript,jeremyepling/TypeScript,rgbkrk/TypeScript,Viromo/TypeScript,plantain-00/TypeScript,TukekeSoft/TypeScript,Eyas/TypeScript,progre/TypeScript,ZLJASON/TypeScript,kitsonk/TypeScript,Viromo/TypeScript,samuelhorwitz/typescript,chocolatechipui/TypeScript,erikmcc/TypeScript,OlegDokuka/TypeScript,chuckjaz/TypeScript,hoanhtien/TypeScript,vilic/TypeScript,RReverser/TypeScript,bpowers/TypeScript,jeremyepling/TypeScript,weswigham/TypeScript,nagyistoce/TypeScript,microsoft/TypeScript,mcanthony/TypeScript,Mqgh2013/TypeScript,kpreisser/TypeScript,fabioparra/TypeScript,kumikumi/TypeScript,fearthecowboy/TypeScript,zmaruo/TypeScript,SimoneGianni/TypeScript,hoanhtien/TypeScript,plantain-00/TypeScript,nycdotnet/TypeScript,ionux/TypeScript,tempbottle/TypeScript,HereSinceres/TypeScript,weswigham/TypeScript,mmoskal/TypeScript,basarat/TypeScript,thr0w/Thr0wScript,minestarks/TypeScript,hitesh97/TypeScript,synaptek/TypeScript,zhengbli/TypeScript,Viromo/TypeScript,erikmcc/TypeScript,ZLJASON/TypeScript,zhengbli/TypeScript,DLehenbauer/TypeScript,MartyIX/TypeScript,jeremyepling/TypeScript,Microsoft/TypeScript,donaldpipowitch/TypeScript,shovon/TypeScript,jdavidberger/TypeScript,microsoft/TypeScript,shanexu/TypeScript,webhost/TypeScript,jwbay/TypeScript,ropik/TypeScript,suto/TypeScript,alexeagle/TypeScript,mihailik/TypeScript,donaldpipowitch/TypeScript,nagyistoce/TypeScript,moander/TypeScript,nycdotnet/TypeScript,Mqgh2013/TypeScript,microsoft/TypeScript,ziacik/TypeScript,basarat/TypeScript,MartyIX/TypeScript,kitsonk/TypeScript,hitesh97/TypeScript,jamesrmccallum/TypeScript,jteplitz602/TypeScript,ionux/TypeScript,erikmcc/TypeScript,tempbottle/TypeScript,progre/TypeScript,MartyIX/TypeScript,matthewjh/TypeScript,keir-rex/TypeScript,gonifade/TypeScript,blakeembrey/TypeScript,billti/TypeScript,DanielRosenwasser/TypeScript,AbubakerB/TypeScript,kumikumi/TypeScript,DanielRosenwasser/TypeScript,nojvek/TypeScript,matthewjh/TypeScript,ionux/TypeScript,JohnZ622/TypeScript,chuckjaz/TypeScript,kingland/TypeScript,jwbay/TypeScript,moander/TypeScript,blakeembrey/TypeScript,impinball/TypeScript,evgrud/TypeScript,fabioparra/TypeScript,jteplitz602/TypeScript,moander/TypeScript,zmaruo/TypeScript,sassson/TypeScript,mcanthony/TypeScript,thr0w/Thr0wScript,jbondc/TypeScript,ropik/TypeScript,DLehenbauer/TypeScript,samuelhorwitz/typescript,yortus/TypeScript,kimamula/TypeScript,bpowers/TypeScript,OlegDokuka/TypeScript,MartyIX/TypeScript,shovon/TypeScript,zmaruo/TypeScript,evgrud/TypeScript,impinball/TypeScript,germ13/TypeScript,minestarks/TypeScript,RReverser/TypeScript,minestarks/TypeScript,kimamula/TypeScript,JohnZ622/TypeScript,pcan/TypeScript,samuelhorwitz/typescript,rgbkrk/TypeScript,mmoskal/TypeScript,fabioparra/TypeScript,mszczepaniak/TypeScript,gonifade/TypeScript,jamesrmccallum/TypeScript,DLehenbauer/TypeScript,blakeembrey/TypeScript,plantain-00/TypeScript,vilic/TypeScript,rgbkrk/TypeScript,yortus/TypeScript,JohnZ622/TypeScript,Mqgh2013/TypeScript,enginekit/TypeScript,rodrigues-daniel/TypeScript,donaldpipowitch/TypeScript,msynk/TypeScript,RyanCavanaugh/TypeScript,chuckjaz/TypeScript,blakeembrey/TypeScript,ZLJASON/TypeScript,yortus/TypeScript,mmoskal/TypeScript,donaldpipowitch/TypeScript,nagyistoce/TypeScript,Microsoft/TypeScript,TukekeSoft/TypeScript,samuelhorwitz/typescript,SmallAiTT/TypeScript,moander/TypeScript,Eyas/TypeScript,Viromo/TypeScript,kpreisser/TypeScript,zhengbli/TypeScript,AbubakerB/TypeScript,nojvek/TypeScript,pcan/TypeScript,vilic/TypeScript,hitesh97/TypeScript,jteplitz602/TypeScript,RyanCavanaugh/TypeScript,chuckjaz/TypeScript,nycdotnet/TypeScript,sassson/TypeScript,kingland/TypeScript,HereSinceres/TypeScript,matthewjh/TypeScript,mihailik/TypeScript,gonifade/TypeScript,webhost/TypeScript,progre/TypeScript,basarat/TypeScript,tinganho/TypeScript,enginekit/TypeScript,billti/TypeScript,SaschaNaz/TypeScript,tinganho/TypeScript,yazeng/TypeScript,shovon/TypeScript,OlegDokuka/TypeScript,jdavidberger/TypeScript,plantain-00/TypeScript,AbubakerB/TypeScript,tinganho/TypeScript,mcanthony/TypeScript,SmallAiTT/TypeScript,shiftkey/TypeScript,thr0w/Thr0wScript,ziacik/TypeScript,webhost/TypeScript,AbubakerB/TypeScript,germ13/TypeScript,HereSinceres/TypeScript,ziacik/TypeScript,mcanthony/TypeScript,SimoneGianni/TypeScript,SmallAiTT/TypeScript,jamesrmccallum/TypeScript,mszczepaniak/TypeScript,Eyas/TypeScript,kitsonk/TypeScript,kimamula/TypeScript,rodrigues-daniel/TypeScript,msynk/TypeScript,erikmcc/TypeScript,suto/TypeScript,RReverser/TypeScript,shiftkey/TypeScript,Eyas/TypeScript,kingland/TypeScript,hoanhtien/TypeScript,mszczepaniak/TypeScript,evgrud/TypeScript,SaschaNaz/TypeScript,SaschaNaz/TypeScript,mmoskal/TypeScript,DLehenbauer/TypeScript,basarat/TypeScript,Microsoft/TypeScript,yazeng/TypeScript,alexeagle/TypeScript,thr0w/Thr0wScript,ropik/TypeScript,shiftkey/TypeScript,SaschaNaz/TypeScript,nojvek/TypeScript,keir-rex/TypeScript,DanielRosenwasser/TypeScript,yortus/TypeScript,tempbottle/TypeScript,rodrigues-daniel/TypeScript,RyanCavanaugh/TypeScript,weswigham/TypeScript,suto/TypeScript | ---
+++
@@ -1,6 +1,6 @@
/// <reference path='fourslash.ts' />
-////var x : (/*1*/) => void;
+////var x : (s/*1*/
////var y : (s:string, list/*2*/
|
3dc43cb7b3bed2d93265bfa4edcea389c238bd15 | extensions/typescript-language-features/src/utils/fileSchemes.ts | extensions/typescript-language-features/src/utils/fileSchemes.ts | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export const file = 'file';
export const untitled = 'untitled';
export const git = 'git';
export const privateScheme = 'private';
/** Live share scheme */
export const vsls = 'vsls';
export const walkThroughSnippet = 'walkThroughSnippet';
export const semanticSupportedSchemes = [
file,
untitled,
];
/**
* File scheme for which JS/TS language feature should be disabled
*/
export const disabledSchemes = new Set([
git,
vsls,
privateScheme,
]);
| /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export const file = 'file';
export const untitled = 'untitled';
export const git = 'git';
export const pr = 'pr';
export const privateScheme = 'private';
/** Live share scheme */
export const vsls = 'vsls';
export const walkThroughSnippet = 'walkThroughSnippet';
export const semanticSupportedSchemes = [
file,
untitled,
];
/**
* File scheme for which JS/TS language feature should be disabled
*/
export const disabledSchemes = new Set([
git,
vsls,
privateScheme,
pr,
]);
| Exclude `pr` schemed files from js/ts language features | Exclude `pr` schemed files from js/ts language features
Fixes #105842
| TypeScript | mit | Krzysztof-Cieslak/vscode,Microsoft/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,eamodio/vscode,eamodio/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,microsoft/vscode,Microsoft/vscode,microsoft/vscode,Microsoft/vscode,Microsoft/vscode,microsoft/vscode,eamodio/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,Microsoft/vscode,Microsoft/vscode,microsoft/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Microsoft/vscode,eamodio/vscode,Microsoft/vscode,eamodio/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,microsoft/vscode,eamodio/vscode,microsoft/vscode,eamodio/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,eamodio/vscode,Microsoft/vscode,microsoft/vscode | ---
+++
@@ -6,8 +6,8 @@
export const file = 'file';
export const untitled = 'untitled';
export const git = 'git';
+export const pr = 'pr';
export const privateScheme = 'private';
-
/** Live share scheme */
export const vsls = 'vsls';
export const walkThroughSnippet = 'walkThroughSnippet';
@@ -24,4 +24,5 @@
git,
vsls,
privateScheme,
+ pr,
]); |
6a56e4175ee92dbc7e895b6fe8a52364a488b5f9 | src/navigation/workspace/BaseList.tsx | src/navigation/workspace/BaseList.tsx | import * as classNames from 'classnames';
import * as React from 'react';
import * as ListGroup from 'react-bootstrap/lib/ListGroup';
import * as ListGroupItem from 'react-bootstrap/lib/ListGroupItem';
import { Scrollbars } from 'react-custom-scrollbars';
export const BaseList = ({
items,
selectedItem,
selectItem,
EmptyPlaceholder,
ItemComponent,
}) => {
const scrollBarRef = React.useRef<Scrollbars>();
const itemId = selectedItem?.uuid;
const adjustScroll = React.useCallback(() => {
if (itemId) {
const view = scrollBarRef.current.view;
const query = `[data-uuid="${itemId}"]`;
const itemElement = view.querySelector(query);
if (itemElement) {
view.scroll(0, itemElement.offsetTop);
}
}
}, [scrollBarRef, itemId]);
React.useEffect(adjustScroll, []);
return (
<Scrollbars style={{ height: 300 }} ref={scrollBarRef}>
<ListGroup>
{items.length === 0 ? (
<ListGroupItem>
<EmptyPlaceholder />
</ListGroupItem>
) : (
items.map(item => (
<ListGroupItem
data-uuid={item.uuid}
className={classNames({
active: selectedItem && item.uuid == selectedItem.uuid,
})}
onClick={() => selectItem(item)}
key={item.uuid}
>
<ItemComponent item={item} />
</ListGroupItem>
))
)}
</ListGroup>
</Scrollbars>
);
};
| import * as classNames from 'classnames';
import * as React from 'react';
import * as ListGroup from 'react-bootstrap/lib/ListGroup';
import * as ListGroupItem from 'react-bootstrap/lib/ListGroupItem';
import { Scrollbars } from 'react-custom-scrollbars';
export const BaseList = ({
items,
selectedItem,
selectItem,
EmptyPlaceholder,
ItemComponent,
}) => {
const scrollBarRef = React.useRef<Scrollbars>();
const itemId = selectedItem?.uuid;
const adjustScroll = React.useCallback(() => {
if (itemId) {
const view = scrollBarRef.current.view;
const query = `[data-uuid="${itemId}"]`;
const itemElement = view.querySelector(query);
if (itemElement) {
view.scrollTop = itemElement.offsetTop;
}
}
}, [scrollBarRef, itemId]);
React.useEffect(adjustScroll, []);
return (
<Scrollbars style={{ height: 300 }} ref={scrollBarRef}>
<ListGroup>
{items.length === 0 ? (
<ListGroupItem>
<EmptyPlaceholder />
</ListGroupItem>
) : (
items.map(item => (
<ListGroupItem
data-uuid={item.uuid}
className={classNames({
active: selectedItem && item.uuid == selectedItem.uuid,
})}
onClick={() => selectItem(item)}
key={item.uuid}
>
<ItemComponent item={item} />
</ListGroupItem>
))
)}
</ListGroup>
</Scrollbars>
);
};
| Fix workspace selector: use scrollTop instead of scroll to fix IE compatibility. | Fix workspace selector: use scrollTop instead of scroll to fix IE compatibility.
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -20,7 +20,7 @@
const query = `[data-uuid="${itemId}"]`;
const itemElement = view.querySelector(query);
if (itemElement) {
- view.scroll(0, itemElement.offsetTop);
+ view.scrollTop = itemElement.offsetTop;
}
}
}, [scrollBarRef, itemId]); |
5e6758be6ceef4156ca6dab9cdacc6f7e7d74a4c | src/app/core/models/run-record.model.ts | src/app/core/models/run-record.model.ts | import { RunDuration } from '../run-duration';
import { MongooseRunStatus } from '../mongoose-run-status';
export class MongooseRunRecord {
constructor(status: MongooseRunStatus, startTime: String, nodes: String[], duration: RunDuration, comment: String) { }
} | import { RunDuration } from '../run-duration';
import { MongooseRunStatus } from '../mongoose-run-status';
export class MongooseRunRecord {
public status: MongooseRunStatus;
public startTime: String;
public nodes: String[];
public duration: RunDuration;
public comment: String;
constructor(status: MongooseRunStatus, startTime: String, nodes: String[], duration: RunDuration, comment: String) {
this.status = status;
this.startTime = startTime;
this.nodes = nodes;
this.duration = duration;
this.comment = comment;
}
} | Add implicit declaration for Mongoose Run Record class' fields. | Add implicit declaration for Mongoose Run Record class' fields.
| TypeScript | mit | emc-mongoose/console,emc-mongoose/console,emc-mongoose/console | ---
+++
@@ -3,6 +3,18 @@
export class MongooseRunRecord {
- constructor(status: MongooseRunStatus, startTime: String, nodes: String[], duration: RunDuration, comment: String) { }
+ public status: MongooseRunStatus;
+ public startTime: String;
+ public nodes: String[];
+ public duration: RunDuration;
+ public comment: String;
+
+ constructor(status: MongooseRunStatus, startTime: String, nodes: String[], duration: RunDuration, comment: String) {
+ this.status = status;
+ this.startTime = startTime;
+ this.nodes = nodes;
+ this.duration = duration;
+ this.comment = comment;
+ }
} |
32bdc9cd2699191e1c835d93c3d07d71500f537a | pages/_document.tsx | pages/_document.tsx | import * as React from 'react';
import Document, { Head, Main, NextScript, NextDocumentContext } from 'next/document';
import * as http from 'http';
type MyDocumentProps = {
locale: string;
localeDataScript: string;
};
export default class MyDocument extends Document<MyDocumentProps> {
static async getInitialProps(context: NextDocumentContext) {
const props = await super.getInitialProps(context);
const req = context.req as http.IncomingMessage & MyDocumentProps;
return {
...props,
locale: req.locale,
localeDataScript: req.localeDataScript
};
}
render() {
return (
<html>
<Head>
<title>Krasnodar Dev Days</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
</Head>
<body>
<Main />
<script
dangerouslySetInnerHTML={{
__html: this.props.localeDataScript
}}
/>
<NextScript />
</body>
</html>
);
}
}
| import * as React from 'react';
import Document, { Head, Main, NextScript, NextDocumentContext } from 'next/document';
import * as http from 'http';
type MyDocumentProps = {
locale: string;
localeDataScript: string;
};
export default class MyDocument extends Document<MyDocumentProps> {
static async getInitialProps(context: NextDocumentContext) {
const props = await super.getInitialProps(context);
const req = context.req as http.IncomingMessage & MyDocumentProps;
return {
...props,
locale: req.locale,
localeDataScript: req.localeDataScript
};
}
render() {
return (
<html lang={this.props.locale}>
<Head>
<meta charSet="utf-8" />
<title>Krasnodar Dev Days</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
</Head>
<body>
<Main />
<script
dangerouslySetInnerHTML={{
__html: this.props.localeDataScript
}}
/>
<NextScript />
</body>
</html>
);
}
}
| Add `lang` attribute for `html` tag | Add `lang` attribute for `html` tag
| TypeScript | mit | krddevdays/krddevdays.ru,krddevdays/krddevdays.ru | ---
+++
@@ -21,8 +21,9 @@
render() {
return (
- <html>
+ <html lang={this.props.locale}>
<Head>
+ <meta charSet="utf-8" />
<title>Krasnodar Dev Days</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
</Head> |
9d9216d7269f09b445c117f53d2a9b4ebfc3edc8 | app/javascript/retrospring/initializers/bootstrap.ts | app/javascript/retrospring/initializers/bootstrap.ts | import 'bootstrap';
import $ from 'jquery';
/**
* This module sets up Bootstraps JavaScript
*
* Inside of the exported function below, initialize Bootstrap
* modules that require explicit initilization, like tooltips
*/
export default function (): void {
$(document).ready(() => {
$('[data-toggle="tooltip"]').tooltip();
$('.dropdown-toggle').dropdown();
});
} | import 'bootstrap';
import $ from 'jquery';
/**
* This module sets up Bootstrap's JavaScript
*
* Inside of the exported function below, initialize Bootstrap
* modules that require explicit initilization, like tooltips
*/
export default function (): void {
$(document).ready(() => {
$('[data-toggle="tooltip"]').tooltip();
$('.dropdown-toggle').dropdown();
});
}
| Apply review suggestion by @raccube | Apply review suggestion by @raccube
Co-authored-by: Dominik M. Kwiatek <a279f78642aaf231facf94ac593d2ad2fd791699@users.noreply.github.com> | TypeScript | agpl-3.0 | Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring | ---
+++
@@ -2,7 +2,7 @@
import $ from 'jquery';
/**
- * This module sets up Bootstraps JavaScript
+ * This module sets up Bootstrap's JavaScript
*
* Inside of the exported function below, initialize Bootstrap
* modules that require explicit initilization, like tooltips |
8c1578a22f532e7b15e7beeddc2d00fd36d5a8e7 | src/devices/devices.tsx | src/devices/devices.tsx | import * as React from "react";
import { connect } from "react-redux";
import { WeedDetector } from "../images";
import { HardwareSettings } from "./components/hardware_settings";
import { FarmbotOsSettings } from "./components/farmbot_os_settings";
import { Farmware } from "../farmware/farmware_panel";
import { Page, Col } from "../ui/index";
import { mapStateToProps } from "./state_to_props";
import { Props } from "./interfaces";
@connect(mapStateToProps)
export class Devices extends React.Component<Props, {}> {
render() {
if (this.props.auth) {
return <Page className="devices">
<Col xs={12} sm={6}>
<Farmware bot={this.props.bot} />
<FarmbotOsSettings
account={this.props.deviceAccount}
dispatch={this.props.dispatch}
bot={this.props.bot}
auth={this.props.auth} />
</Col>
<Col xs={12} sm={6}>
<HardwareSettings
dispatch={this.props.dispatch}
bot={this.props.bot} />
<WeedDetector
dispatch={this.props.dispatch}
bot={this.props.bot}
images={this.props.images} />
</Col>
</Page>;
} else {
throw new Error("Log in first");
}
}
};
| import * as React from "react";
import { connect } from "react-redux";
import { WeedDetector } from "../images";
import { HardwareSettings } from "./components/hardware_settings";
import { FarmbotOsSettings } from "./components/farmbot_os_settings";
import { Farmware } from "../farmware/farmware_panel";
import { Page, Col } from "../ui/index";
import { mapStateToProps } from "./state_to_props";
import { Props } from "./interfaces";
@connect(mapStateToProps)
export class Devices extends React.Component<Props, {}> {
render() {
if (this.props.auth) {
return <Page className="devices">
<Col xs={12} sm={6}>
<Farmware bot={this.props.bot} />
<FarmbotOsSettings
account={this.props.deviceAccount}
dispatch={this.props.dispatch}
bot={this.props.bot}
auth={this.props.auth} />
</Col>
<Col xs={12} sm={6}>
<HardwareSettings
dispatch={this.props.dispatch}
bot={this.props.bot} />
</Col>
</Page>;
} else {
throw new Error("Log in first");
}
}
};
| Remove device panel from hardware page | Remove device panel from hardware page
| TypeScript | mit | MrChristofferson/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,FarmBot/farmbot-web-frontend,FarmBot/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,MrChristofferson/farmbot-web-frontend | ---
+++
@@ -25,10 +25,6 @@
<HardwareSettings
dispatch={this.props.dispatch}
bot={this.props.bot} />
- <WeedDetector
- dispatch={this.props.dispatch}
- bot={this.props.bot}
- images={this.props.images} />
</Col>
</Page>;
} else { |
988a1b39b961599fea9ee6be80e4986212d275ff | src/app/login/logout.component.ts | src/app/login/logout.component.ts | import { Component, OnInit } from '@angular/core';
import { RoutingService } from './../shared/routing/routing.service';
@Component({
selector: 'ts-logout',
template: ''
})
export class LogoutComponent implements OnInit {
constructor(
private routingService: RoutingService
) { }
ngOnInit(): void {
console.log('TODO: really logout');
this.routingService.toLogin();
}
} | import { Component, OnInit } from '@angular/core';
import { RoutingService } from './../shared/routing/routing.service';
import { SessionService } from './../shared/session/session.service';
@Component({
selector: 'ts-logout',
template: ''
})
export class LogoutComponent implements OnInit {
constructor(
private routingService: RoutingService,
private sessionService: SessionService
) { }
ngOnInit(): void {
this.sessionService.clean();
this.routingService.toLogin();
}
} | Clean session data when logout | Clean session data when logout
| TypeScript | apache-2.0 | johncol/trini-salud-web,johncol/trini-salud-web,johncol/trini-salud-web | ---
+++
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { RoutingService } from './../shared/routing/routing.service';
+import { SessionService } from './../shared/session/session.service';
@Component({
selector: 'ts-logout',
@@ -9,11 +10,12 @@
export class LogoutComponent implements OnInit {
constructor(
- private routingService: RoutingService
+ private routingService: RoutingService,
+ private sessionService: SessionService
) { }
ngOnInit(): void {
- console.log('TODO: really logout');
+ this.sessionService.clean();
this.routingService.toLogin();
}
|
57e42aa49e01089f7d48dece81694aaa5c8dcfef | src/Char.ts | src/Char.ts | import * as e from "./Enums";
import * as _ from "lodash";
import {memoize} from "./Decorators";
import {Attributes} from "./Interfaces";
export const attributesFlyweight = _.memoize(
(attributes: Attributes): Attributes => _.clone(attributes),
(attributes: Dictionary<any>) => {
const ordered: Dictionary<any> = {};
Object.keys(attributes).sort().forEach(key => ordered[key] = attributes[key]);
return JSON.stringify(ordered);
}
);
export default class Char {
static empty = Char.flyweight(" ", {});
@memoize()
static flyweight(char: string, attributes: Attributes) {
return new Char(char, attributesFlyweight(attributes));
}
constructor(private char: string, private _attributes: Attributes) {
if (char.length !== 1) {
throw(`Char can be created only from a single character; passed ${char.length}: ${char}`);
}
}
getCharCode(): e.KeyCode {
return (<any>e.KeyCode)[e.KeyCode[this.char.charCodeAt(0)]];
}
get attributes(): Attributes {
return this._attributes;
}
toString(): string {
return this.char;
}
isSpecial(): boolean {
// http://www.asciitable.com/index/asciifull.gif
const charCode = this.char.charCodeAt(0);
return charCode < 32;
}
}
| import * as e from "./Enums";
import * as _ from "lodash";
import {memoize} from "./Decorators";
import {Attributes} from "./Interfaces";
export const attributesFlyweight = _.memoize(
(attributes: Attributes): Attributes => Object.assign({}, attributes),
(attributes: Dictionary<any>) => {
const ordered: Dictionary<any> = {};
Object.keys(attributes).sort().forEach(key => ordered[key] = attributes[key]);
return JSON.stringify(ordered);
}
);
export default class Char {
static empty = Char.flyweight(" ", {});
@memoize()
static flyweight(char: string, attributes: Attributes) {
return new Char(char, attributesFlyweight(attributes));
}
constructor(private char: string, private _attributes: Attributes) {
if (char.length !== 1) {
throw(`Char can be created only from a single character; passed ${char.length}: ${char}`);
}
}
getCharCode(): e.KeyCode {
return (<any>e.KeyCode)[e.KeyCode[this.char.charCodeAt(0)]];
}
get attributes(): Attributes {
return this._attributes;
}
toString(): string {
return this.char;
}
isSpecial(): boolean {
// http://www.asciitable.com/index/asciifull.gif
const charCode = this.char.charCodeAt(0);
return charCode < 32;
}
}
| Use Object.assign instead of _.clone. | Use Object.assign instead of _.clone.
| TypeScript | mit | shockone/black-screen,j-allard/black-screen,drew-gross/black-screen,black-screen/black-screen,railsware/upterm,vshatskyi/black-screen,drew-gross/black-screen,drew-gross/black-screen,black-screen/black-screen,vshatskyi/black-screen,vshatskyi/black-screen,shockone/black-screen,railsware/upterm,j-allard/black-screen,j-allard/black-screen,black-screen/black-screen,vshatskyi/black-screen,drew-gross/black-screen | ---
+++
@@ -4,7 +4,7 @@
import {Attributes} from "./Interfaces";
export const attributesFlyweight = _.memoize(
- (attributes: Attributes): Attributes => _.clone(attributes),
+ (attributes: Attributes): Attributes => Object.assign({}, attributes),
(attributes: Dictionary<any>) => {
const ordered: Dictionary<any> = {};
Object.keys(attributes).sort().forEach(key => ordered[key] = attributes[key]); |
db10edc0476366ae305993644e4a1f7ee0f0462c | test/method-decorators/logger.spec.ts | test/method-decorators/logger.spec.ts | import { LoggerMethod } from './../../src/';
describe("HelloComponent", () => {
class X {
@LoggerMethod()
add(a, b) {
return a + b;
}
}
it("should log method calls", () => {
let x = new X();
x.add(2, 3);
x.add(1, 5);
expect(true).toBe(true);
});
}); | import { LoggerMethod } from './../../src/';
describe('LoggerMethod decorator', () => {
beforeEach(() => {
spyOn(console, 'log');
});
it('should not output log trace (no annotation, empty, default behaviour)', () => {
class TestClassMethod {
@LoggerMethod()
add(a, b) {
return a + b;
}
}
let testClass = new TestClassMethod();
testClass.add(2, 3);
expect(console.log).toHaveBeenCalledTimes(1);
});
it('should not output log trace (null annotation, default behaviour)', () => {
class TestClassMethod {
@LoggerMethod(null)
add(a, b) {
return a + b;
}
}
let testClass = new TestClassMethod();
testClass.add(2, 3);
expect(console.log).toHaveBeenCalledTimes(1);
});
it('should output default log trace for method start', () => {
class TestClassMethod {
@LoggerMethod({ entryTrace: true })
add(a, b) {
return a + b;
}
}
let testClass = new TestClassMethod();
testClass.add(2, 3);
expect(console.log).toHaveBeenCalledTimes(2);
});
it('should output default log trace in the method end', () => {
class TestClassMethod {
@LoggerMethod({ endTrace: true })
add(a, b) {
return a + b;
}
}
let testClass = new TestClassMethod();
testClass.add(2, 3);
expect(console.log).toHaveBeenCalledTimes(3);
});
it('should output default log trace in the beginning and end method invocation', () => {
class TestClassMethod {
@LoggerMethod({ entryTrace: true, endTrace: true })
add(a, b) {
return a + b;
}
}
let testClass = new TestClassMethod();
testClass.add(2, 3);
expect(console.log).toHaveBeenCalledTimes(4);
});
it('should output log trace with custom prefix', () => {
let customPrefix = '[TEST-PREFIX]';
class TestClassMethod {
@LoggerMethod({ prefix: customPrefix })
add(a, b) {
return a + b;
}
}
let testClass = new TestClassMethod();
testClass.add(2, 3);
expect(console.log).toHaveBeenCalledTimes(1);
expect(console.log).toHaveBeenCalledWith(jasmine.any(String));
});
}); | Update test cases for method logger decorator | Update test cases for method logger decorator
| TypeScript | mit | semagarcia/typescript-decorators,semagarcia/typescript-decorators | ---
+++
@@ -1,20 +1,89 @@
import { LoggerMethod } from './../../src/';
-describe("HelloComponent", () => {
+describe('LoggerMethod decorator', () => {
- class X {
+ beforeEach(() => {
+ spyOn(console, 'log');
+ });
+
+ it('should not output log trace (no annotation, empty, default behaviour)', () => {
+ class TestClassMethod {
@LoggerMethod()
- add(a, b) {
- return a + b;
+ add(a, b) {
+ return a + b;
+ }
}
- }
- it("should log method calls", () => {
+ let testClass = new TestClassMethod();
+ testClass.add(2, 3);
+ expect(console.log).toHaveBeenCalledTimes(1);
+ });
- let x = new X();
- x.add(2, 3);
- x.add(1, 5);
+ it('should not output log trace (null annotation, default behaviour)', () => {
+ class TestClassMethod {
+ @LoggerMethod(null)
+ add(a, b) {
+ return a + b;
+ }
+ }
- expect(true).toBe(true);
+ let testClass = new TestClassMethod();
+ testClass.add(2, 3);
+ expect(console.log).toHaveBeenCalledTimes(1);
});
+
+ it('should output default log trace for method start', () => {
+ class TestClassMethod {
+ @LoggerMethod({ entryTrace: true })
+ add(a, b) {
+ return a + b;
+ }
+ }
+
+ let testClass = new TestClassMethod();
+ testClass.add(2, 3);
+ expect(console.log).toHaveBeenCalledTimes(2);
+ });
+
+ it('should output default log trace in the method end', () => {
+ class TestClassMethod {
+ @LoggerMethod({ endTrace: true })
+ add(a, b) {
+ return a + b;
+ }
+ }
+
+ let testClass = new TestClassMethod();
+ testClass.add(2, 3);
+ expect(console.log).toHaveBeenCalledTimes(3);
+ });
+
+ it('should output default log trace in the beginning and end method invocation', () => {
+ class TestClassMethod {
+ @LoggerMethod({ entryTrace: true, endTrace: true })
+ add(a, b) {
+ return a + b;
+ }
+ }
+
+ let testClass = new TestClassMethod();
+ testClass.add(2, 3);
+ expect(console.log).toHaveBeenCalledTimes(4);
+ });
+
+ it('should output log trace with custom prefix', () => {
+ let customPrefix = '[TEST-PREFIX]';
+ class TestClassMethod {
+ @LoggerMethod({ prefix: customPrefix })
+ add(a, b) {
+ return a + b;
+ }
+ }
+
+ let testClass = new TestClassMethod();
+ testClass.add(2, 3);
+ expect(console.log).toHaveBeenCalledTimes(1);
+ expect(console.log).toHaveBeenCalledWith(jasmine.any(String));
+ });
+
}); |
519b351187ce651dbbcb2f6e723e15714c24e0b9 | app/src/lib/git/branch.ts | app/src/lib/git/branch.ts | import { git, envForAuthentication } from './core'
import { Repository } from '../../models/repository'
import { Branch, BranchType } from '../../models/branch'
import { Account } from '../../models/account'
/** Create a new branch from the given start point. */
export async function createBranch(repository: Repository, name: string, startPoint: string): Promise<void> {
await git([ 'branch', name, startPoint ], repository.path, 'createBranch')
}
/** Rename the given branch to a new name. */
export async function renameBranch(repository: Repository, branch: Branch, newName: string): Promise<void> {
await git([ 'branch', '-m', branch.nameWithoutRemote, newName ], repository.path, 'renameBranch')
}
/**
* Delete the branch. If the branch has a remote branch, it too will be
* deleted.
*/
export async function deleteBranch(repository: Repository, branch: Branch, account: Account | null): Promise<true> {
if (branch.type === BranchType.Local) {
await git([ 'branch', '-D', branch.name ], repository.path, 'deleteBranch')
}
const remote = branch.remote
// If the user is not authenticated, the push is going to fail
// Let this propagate and leave it to the caller to handle
if (remote) {
await git([ 'push', remote, `:${branch.nameWithoutRemote}` ], repository.path, 'deleteBranch', { env: envForAuthentication(account) })
}
return true
}
| import { git, envForAuthentication } from './core'
import { Repository } from '../../models/repository'
import { Branch, BranchType } from '../../models/branch'
import { Account } from '../../models/account'
/** Create a new branch from the given start point. */
export async function createBranch(repository: Repository, name: string, startPoint: string): Promise<true> {
await git([ 'branch', name, startPoint ], repository.path, 'createBranch')
return true
}
/** Rename the given branch to a new name. */
export async function renameBranch(repository: Repository, branch: Branch, newName: string): Promise<void> {
await git([ 'branch', '-m', branch.nameWithoutRemote, newName ], repository.path, 'renameBranch')
}
/**
* Delete the branch. If the branch has a remote branch, it too will be
* deleted.
*/
export async function deleteBranch(repository: Repository, branch: Branch, account: Account | null): Promise<true> {
if (branch.type === BranchType.Local) {
await git([ 'branch', '-D', branch.name ], repository.path, 'deleteBranch')
}
const remote = branch.remote
// If the user is not authenticated, the push is going to fail
// Let this propagate and leave it to the caller to handle
if (remote) {
await git([ 'push', remote, `:${branch.nameWithoutRemote}` ], repository.path, 'deleteBranch', { env: envForAuthentication(account) })
}
return true
}
| Return a sentinel value out of createBranch | Return a sentinel value out of createBranch
| TypeScript | mit | j-f1/forked-desktop,say25/desktop,shiftkey/desktop,desktop/desktop,say25/desktop,hjobrien/desktop,kactus-io/kactus,gengjiawen/desktop,artivilla/desktop,gengjiawen/desktop,desktop/desktop,BugTesterTest/desktops,shiftkey/desktop,BugTesterTest/desktops,hjobrien/desktop,say25/desktop,artivilla/desktop,j-f1/forked-desktop,j-f1/forked-desktop,BugTesterTest/desktops,desktop/desktop,desktop/desktop,kactus-io/kactus,artivilla/desktop,kactus-io/kactus,artivilla/desktop,kactus-io/kactus,gengjiawen/desktop,shiftkey/desktop,gengjiawen/desktop,hjobrien/desktop,say25/desktop,j-f1/forked-desktop,hjobrien/desktop,shiftkey/desktop,BugTesterTest/desktops | ---
+++
@@ -4,8 +4,9 @@
import { Account } from '../../models/account'
/** Create a new branch from the given start point. */
-export async function createBranch(repository: Repository, name: string, startPoint: string): Promise<void> {
+export async function createBranch(repository: Repository, name: string, startPoint: string): Promise<true> {
await git([ 'branch', name, startPoint ], repository.path, 'createBranch')
+ return true
}
/** Rename the given branch to a new name. */ |
7e52ed5ba690ffedb05cb6af8b9b6ec5dc35fc68 | src/index.ts | src/index.ts | import * as through from "through2";
import * as applySourceMap from "vinyl-sourcemaps-apply";
import * as iife from "./iife";
module.exports = function gulpIife(userOptions: any) {
return through.obj(function (file, encoding, callback) {
const contents = String(file.contents);
const sourceMapOptions = file.sourceMap
? { fileName: file.relative }
: null;
const result = iife.surround(contents, userOptions, sourceMapOptions);
file.contents = new Buffer(result.code);
if (file.sourceMap) {
applySourceMap(file, result.sourceMap);
}
callback(null, file);
});
};
| import * as through from "through2";
import * as applySourceMap from "vinyl-sourcemaps-apply";
import * as iife from "./iife";
module.exports = function gulpIife(userOptions: any) {
return through.obj(function (file, encoding, callback) {
const contents = String(file.contents);
const sourceMapOptions = file.sourceMap
? { fileName: file.relative }
: null;
const result = iife.surround(contents, userOptions, sourceMapOptions);
file.contents = Buffer.from(result.code);
if (file.sourceMap) {
applySourceMap(file, result.sourceMap);
}
callback(null, file);
});
};
| Migrate new Buffer() to Buffer.from() | Migrate new Buffer() to Buffer.from()
| TypeScript | mit | mariusschulz/gulp-iife,mariusschulz/gulp-iife | ---
+++
@@ -10,7 +10,7 @@
: null;
const result = iife.surround(contents, userOptions, sourceMapOptions);
- file.contents = new Buffer(result.code);
+ file.contents = Buffer.from(result.code);
if (file.sourceMap) {
applySourceMap(file, result.sourceMap); |
2f58e9e67078f5e424769068d9c4c16772eb715c | json.ts | json.ts | /**
* Wraps parsing of JSON, so that an error is logged, but no exception is thrown
*/
function safeParseJson (value?: string|null) : {[k: string]: any}
{
if (!value)
{
return {};
}
try
{
const content = value.trim();
return (content !== "")
? JSON.parse(content)
: {};
}
catch (e)
{
console.error(`Could not parse JSON content: ${e.message}`, e);
return {};
}
}
| /**
* Wraps parsing of JSON, so that an error is logged, but no exception is thrown
*/
function safeParseJson (value?: string|boolean|null) : {[k: string]: any}|null
{
if (!value)
{
return null;
}
try
{
const content = value.trim();
return (content !== "")
? JSON.parse(content)
: null;
}
catch (e)
{
console.error(`Could not parse JSON content: ${e.message}`, e);
return null;
}
}
| Change default value of `safeParseJson()` | Change default value of `safeParseJson()`
| TypeScript | bsd-3-clause | Becklyn/mojave,Becklyn/mojave,Becklyn/mojave | ---
+++
@@ -1,11 +1,11 @@
/**
* Wraps parsing of JSON, so that an error is logged, but no exception is thrown
*/
-function safeParseJson (value?: string|null) : {[k: string]: any}
+function safeParseJson (value?: string|boolean|null) : {[k: string]: any}|null
{
if (!value)
{
- return {};
+ return null;
}
try
@@ -13,12 +13,12 @@
const content = value.trim();
return (content !== "")
? JSON.parse(content)
- : {};
+ : null;
}
catch (e)
{
console.error(`Could not parse JSON content: ${e.message}`, e);
- return {};
+ return null;
}
}
|
fd3017afa2f053340546d39d38cfc723e31fca02 | app/javascript/retrospring/utilities/notifications.ts | app/javascript/retrospring/utilities/notifications.ts | require('toastify-js/src/toastify.css');
import Toastify from 'toastify-js';
export function showErrorNotification(text: string): void {
showNotification(text, false);
}
export function showNotification(text: string, status = true): void {
Toastify({
text: text,
style: {
color: status ? 'rgb(var(--success-text))' : 'rgb(var(--danger-text))',
background: status ? 'var(--success)' : 'var(--danger)'
}
}).showToast();
} | import Toastify from 'toastify-js';
export function showErrorNotification(text: string): void {
showNotification(text, false);
}
export function showNotification(text: string, status = true): void {
Toastify({
text: text,
style: {
color: status ? 'rgb(var(--success-text))' : 'rgb(var(--danger-text))',
background: status ? 'var(--success)' : 'var(--danger)'
}
}).showToast();
} | Include toastify styles from SCSS | Include toastify styles from SCSS
| TypeScript | agpl-3.0 | Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring | ---
+++
@@ -1,4 +1,3 @@
-require('toastify-js/src/toastify.css');
import Toastify from 'toastify-js';
export function showErrorNotification(text: string): void { |
950f05c367585a8721e284d6963b449d2c932d41 | app/config.ts | app/config.ts | const path = electronRequire('path');
// appveyor/travisci sets this var
const CI_MOD = process.env['CI'] ? 3 : 1;
const omnisharpPath = path.resolve((IS_LINUX ? `${process.env.HOME}/.ream-editor/` :
`${process.env.LOCALAPPDATA}\\ReamEditor\\`) + 'omnisharp');
// todo some of this is mirrored in int-helpers.js
const unitTestData = {
backendTimeout: 10 * 1000 * CI_MOD,
sqliteWorlddbConnectionString: `Data Source=${path.normalize(path.join(__dirname, '../query/sql/world.sqlite'))}`
};
export default {
unitTestData,
omnisharpPort: 2000,
queryEnginePort: 8111,
omnisharpProjectPath: omnisharpPath,
dotnetDebugPath: IS_LINUX ? path.normalize('/usr/bin/dotnet')
: path.normalize('C:/Program Files/dotnet/dotnet.exe')
};
| const path = electronRequire('path');
// appveyor/travisci sets this var
const CI_MOD = process.env['CI'] ? 3 : 1;
const omnisharpPath = path.resolve((IS_LINUX ? `${process.env.HOME}/.ream-editor/` :
`${process.env.LOCALAPPDATA}\\ReamEditor\\`) + 'omnisharp');
// todo some of this is mirrored in int-helpers.js
const unitTestData = {
backendTimeout: 10 * 1000 * CI_MOD,
sqliteWorlddbConnectionString: `Data Source=${path.normalize(path.join(process.cwd(), 'query/sql/world.sqlite'))}`
};
export default {
unitTestData,
omnisharpPort: 2000,
queryEnginePort: 8111,
omnisharpProjectPath: omnisharpPath,
dotnetDebugPath: IS_LINUX ? path.normalize('/usr/bin/dotnet')
: path.normalize('C:/Program Files/dotnet/dotnet.exe')
};
| Fix path to sqlite db file | Fix path to sqlite db file
| TypeScript | mit | stofte/ream-editor,stofte/ream-editor,stofte/linq-editor,stofte/ream-editor,stofte/ream-editor | ---
+++
@@ -8,7 +8,7 @@
// todo some of this is mirrored in int-helpers.js
const unitTestData = {
backendTimeout: 10 * 1000 * CI_MOD,
- sqliteWorlddbConnectionString: `Data Source=${path.normalize(path.join(__dirname, '../query/sql/world.sqlite'))}`
+ sqliteWorlddbConnectionString: `Data Source=${path.normalize(path.join(process.cwd(), 'query/sql/world.sqlite'))}`
};
export default { |
127247ca34566ac67afec71b4bbf4b937291f721 | src/background/usecases/LinkUseCase.ts | src/background/usecases/LinkUseCase.ts | import TabPresenter from '../presenters/TabPresenter';
export default class LinkUseCase {
private tabPresenter: TabPresenter;
constructor() {
this.tabPresenter = new TabPresenter();
}
openToTab(url: string, tabId: number): Promise<any> {
return this.tabPresenter.open(url, tabId);
}
openNewTab(url: string, openerId: number, background: boolean): Promise<any> {
return this.tabPresenter.create(url, {
openerTabId: openerId, active: !background
});
}
}
| import TabPresenter from '../presenters/TabPresenter';
export default class LinkUseCase {
private tabPresenter: TabPresenter;
constructor() {
this.tabPresenter = new TabPresenter();
}
openToTab(url: string, tabId: number): Promise<any> {
return this.tabPresenter.open(url, tabId);
}
openNewTab(url: string, openerId: number, background: boolean): Promise<any> {
// openerTabId not supported on Android
let properties = typeof browser.tabs.Tab === "object" ?
{ openerTabId: openerId, active: !background } : { active: !background };
return this.tabPresenter.create(url, properties);
}
}
| Fix openerTabId warning on Android | Fix openerTabId warning on Android
| TypeScript | mit | ueokande/vim-vixen,ueokande/vim-vixen,ueokande/vim-vixen | ---
+++
@@ -12,8 +12,9 @@
}
openNewTab(url: string, openerId: number, background: boolean): Promise<any> {
- return this.tabPresenter.create(url, {
- openerTabId: openerId, active: !background
- });
+ // openerTabId not supported on Android
+ let properties = typeof browser.tabs.Tab === "object" ?
+ { openerTabId: openerId, active: !background } : { active: !background };
+ return this.tabPresenter.create(url, properties);
}
} |
c5d9e968f62797f07bc64482df92f28fb4d4a0d1 | src/TypeScriptClient/Bit.TSClient.Core/Contracts/iSecurityService.ts | src/TypeScriptClient/Bit.TSClient.Core/Contracts/iSecurityService.ts | module Bit.Contracts {
export interface Token {
access_token: string;
expires_in: number;
token_type: string;
login_date: Date;
}
export interface ISecurityService {
isLoggedIn(): boolean;
login(state?: any): void;
logout(): void;
loginWithCredentials(username: string, password: string, client_id: string, client_secret: string, scopes: string[], saveToken: boolean): Promise<Token>;
getCurrentToken(): Token;
}
} | module Bit.Contracts {
export interface Token {
access_token: string;
expires_in: number;
token_type: string;
login_date: Date;
}
export interface ISecurityService {
isLoggedIn(): boolean;
login(state?: any): void;
logout(): void;
loginWithCredentials(username: string, password: string, client_id: string, client_secret: string, scopes?: string[], saveToken?: boolean): Promise<Token>;
getCurrentToken(): Token;
}
}
| Make security service contract's loginWithCredentionals of ts client sync with its default implementation | Make security service contract's loginWithCredentionals of ts client sync with its default implementation | TypeScript | mit | bit-foundation/bit-framework,bit-foundation/bit-framework,bit-foundation/bit-framework,bit-foundation/bit-framework | ---
+++
@@ -11,7 +11,7 @@
isLoggedIn(): boolean;
login(state?: any): void;
logout(): void;
- loginWithCredentials(username: string, password: string, client_id: string, client_secret: string, scopes: string[], saveToken: boolean): Promise<Token>;
+ loginWithCredentials(username: string, password: string, client_id: string, client_secret: string, scopes?: string[], saveToken?: boolean): Promise<Token>;
getCurrentToken(): Token;
}
} |
59edd142a288fc6425d5553627fdc574a38999f7 | demo/src/app/components/inputmask/inputmaskdemo.module.ts | demo/src/app/components/inputmask/inputmaskdemo.module.ts | import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { NgModule } from "@angular/core";
import { HighlightJsModule } from 'ngx-highlight-js';
import { InputModule } from 'truly-ui/input';
import { DirectiveModule } from 'truly-ui/core/directives/index';
import { TooltipModule } from 'truly-ui/tooltip';
import { InputMaskDemo } from "./inputmaskdemo.component";
import { InputMaskDemoRoutingModule } from "./inputmaskdemo-routing.module";
@NgModule({
declarations: [
InputMaskDemo
],
imports:[
CommonModule,
DirectiveModule,
FormsModule,
HighlightJsModule,
InputMaskDemoRoutingModule,
InputModule,
TooltipModule
],
exports: [
InputMaskDemo
]
})
export class InputMaskDemoModule {}
| import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { NgModule } from "@angular/core";
import { HighlightJsModule } from 'ngx-highlight-js';
import { InputModule } from 'truly-ui/input';
import { TooltipModule } from 'truly-ui/tooltip';
import { InputMaskDemo } from "./inputmaskdemo.component";
import { InputMaskDemoRoutingModule } from "./inputmaskdemo-routing.module";
@NgModule({
declarations: [
InputMaskDemo
],
imports:[
CommonModule,
FormsModule,
HighlightJsModule,
InputMaskDemoRoutingModule,
InputModule,
TooltipModule
],
exports: [
InputMaskDemo
]
})
export class InputMaskDemoModule {}
| Remove import not used anymore. | docs(inputmaskdemo): Remove import not used anymore.
| TypeScript | mit | TemainfoSistemas/truly-ui,TemainfoSistemas/truly-ui,TemainfoSistemas/truly-ui | ---
+++
@@ -5,7 +5,6 @@
import { HighlightJsModule } from 'ngx-highlight-js';
import { InputModule } from 'truly-ui/input';
-import { DirectiveModule } from 'truly-ui/core/directives/index';
import { TooltipModule } from 'truly-ui/tooltip';
import { InputMaskDemo } from "./inputmaskdemo.component";
@@ -17,7 +16,6 @@
],
imports:[
CommonModule,
- DirectiveModule,
FormsModule,
HighlightJsModule,
InputMaskDemoRoutingModule, |
77a0a6b40bd17a5633f108573e9d81e040ef3f85 | components/query/query.module.ts | components/query/query.module.ts | import {BrowserModule} from '@angular/platform-browser';
import {
CUSTOM_ELEMENTS_SCHEMA,
NO_ERRORS_SCHEMA,
NgModule,
} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {HsPanelHelpersModule} from '../layout/panels/panel-helpers.module';
import {HsQueryAttributeRowComponent} from './attribute-row.component';
import {HsQueryBaseService} from './query-base.service';
import {HsQueryComponent} from './query.component';
import {HsQueryDefaultInfoPanelBodyComponent} from './default-info-panel-body.directive';
import {HsQueryFeatureComponent} from './feature.component';
import {HsQueryFeaturePopupComponent} from './feature-popup.component';
import {HsQueryVectorService} from './query-vector.service';
import {HsQueryWmsService} from './query-wms.service';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
declarations: [
HsQueryComponent,
HsQueryFeaturePopupComponent,
HsQueryFeatureComponent,
HsQueryDefaultInfoPanelBodyComponent,
HsQueryAttributeRowComponent,
],
imports: [CommonModule, BrowserModule, HsPanelHelpersModule, FormsModule],
exports: [HsQueryComponent],
providers: [HsQueryBaseService, HsQueryVectorService, HsQueryWmsService],
entryComponents: [HsQueryComponent],
})
export class HsQueryModule {}
| import {BrowserModule} from '@angular/platform-browser';
import {
CUSTOM_ELEMENTS_SCHEMA,
NO_ERRORS_SCHEMA,
NgModule,
} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {HsPanelHelpersModule} from '../layout/panels/panel-helpers.module';
import {HsQueryAttributeRowComponent} from './attribute-row.component';
import {HsQueryBaseService} from './query-base.service';
import {HsQueryComponent} from './query.component';
import {HsQueryDefaultInfoPanelBodyComponent} from './default-info-panel-body.directive';
import {HsQueryFeatureComponent} from './feature.component';
import {HsQueryFeaturePopupComponent} from './feature-popup.component';
import {HsQueryVectorService} from './query-vector.service';
import {HsQueryWmsService} from './query-wms.service';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
declarations: [
HsQueryComponent,
HsQueryFeaturePopupComponent,
HsQueryFeatureComponent,
HsQueryDefaultInfoPanelBodyComponent,
HsQueryAttributeRowComponent,
],
imports: [CommonModule, BrowserModule, HsPanelHelpersModule, FormsModule],
exports: [HsQueryComponent],
providers: [HsQueryBaseService, HsQueryVectorService, HsQueryWmsService],
entryComponents: [HsQueryComponent, HsQueryFeaturePopupComponent],
})
export class HsQueryModule {}
| Add HsQueryFeaturePopupComponent to entry components | Add HsQueryFeaturePopupComponent to entry components
| TypeScript | mit | hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng | ---
+++
@@ -28,6 +28,6 @@
imports: [CommonModule, BrowserModule, HsPanelHelpersModule, FormsModule],
exports: [HsQueryComponent],
providers: [HsQueryBaseService, HsQueryVectorService, HsQueryWmsService],
- entryComponents: [HsQueryComponent],
+ entryComponents: [HsQueryComponent, HsQueryFeaturePopupComponent],
})
export class HsQueryModule {} |
90e3a4a3012945d9a42577a33c37d6dce357e4f3 | app/src/shared-process/users-store.ts | app/src/shared-process/users-store.ts | import { IDataStore, ISecureStore } from './stores'
import { getKeyForUser } from './auth'
import User from '../models/user'
export default class UsersStore {
private dataStore: IDataStore
private secureStore: ISecureStore
private users: User[]
public constructor(dataStore: IDataStore, secureStore: ISecureStore) {
this.dataStore = dataStore
this.secureStore = secureStore
this.users = []
}
public getUsers(): ReadonlyArray<User> {
// TODO: Should this be a copy/snapshot?
return this.users
}
public addUser(user: User) {
this.secureStore.setItem(getKeyForUser(user), user.login, user.token)
this.users.push(user)
this.save()
}
public loadFromStore() {
const raw = this.dataStore.getItem('users')
if (!raw || !raw.length) {
return
}
const rawUsers: any[] = JSON.parse(raw)
const usersWithTokens = rawUsers.map(user => {
const userWithoutToken = new User(user.login, user.endpoint, '', user.email, user.avatarURL)
return userWithoutToken.withToken(this.secureStore.getItem(getKeyForUser(userWithoutToken), user.login))
})
this.users = usersWithTokens
}
private save() {
const usersWithoutTokens = this.users.map(user => user.withToken(''))
this.dataStore.setItem('users', JSON.stringify(usersWithoutTokens))
}
}
| import { IDataStore, ISecureStore } from './stores'
import { getKeyForUser } from './auth'
import User from '../models/user'
export default class UsersStore {
private dataStore: IDataStore
private secureStore: ISecureStore
private users: User[]
public constructor(dataStore: IDataStore, secureStore: ISecureStore) {
this.dataStore = dataStore
this.secureStore = secureStore
this.users = []
}
public getUsers(): ReadonlyArray<User> {
return this.users.slice()
}
public addUser(user: User) {
this.secureStore.setItem(getKeyForUser(user), user.login, user.token)
this.users.push(user)
this.save()
}
public loadFromStore() {
const raw = this.dataStore.getItem('users')
if (!raw || !raw.length) {
return
}
const rawUsers: any[] = JSON.parse(raw)
const usersWithTokens = rawUsers.map(user => {
const userWithoutToken = new User(user.login, user.endpoint, '', user.email, user.avatarURL)
return userWithoutToken.withToken(this.secureStore.getItem(getKeyForUser(userWithoutToken), user.login))
})
this.users = usersWithTokens
}
private save() {
const usersWithoutTokens = this.users.map(user => user.withToken(''))
this.dataStore.setItem('users', JSON.stringify(usersWithoutTokens))
}
}
| Copy the array before returning it | Copy the array before returning it
| TypeScript | mit | hjobrien/desktop,gengjiawen/desktop,artivilla/desktop,BugTesterTest/desktops,hjobrien/desktop,desktop/desktop,hjobrien/desktop,desktop/desktop,desktop/desktop,j-f1/forked-desktop,shiftkey/desktop,artivilla/desktop,BugTesterTest/desktops,gengjiawen/desktop,say25/desktop,shiftkey/desktop,artivilla/desktop,say25/desktop,kactus-io/kactus,hjobrien/desktop,gengjiawen/desktop,BugTesterTest/desktops,kactus-io/kactus,j-f1/forked-desktop,gengjiawen/desktop,desktop/desktop,BugTesterTest/desktops,say25/desktop,say25/desktop,shiftkey/desktop,j-f1/forked-desktop,shiftkey/desktop,artivilla/desktop,j-f1/forked-desktop,kactus-io/kactus,kactus-io/kactus | ---
+++
@@ -15,8 +15,7 @@
}
public getUsers(): ReadonlyArray<User> {
- // TODO: Should this be a copy/snapshot?
- return this.users
+ return this.users.slice()
}
public addUser(user: User) { |
dfb4ec875c7cf427b96b82dd255deb60c805772b | app/app.component.ts | app/app.component.ts | import { Component } from '@angular/core';
export class Hero {
id: number;
name: string;
}
@Component({
selector: 'my-app',
template: `
<h1>{{title}}</h1>
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div><label>name: </label>{{hero.name}}</div>
`
})
export class AppComponent {
title = 'Tour of Heroes';
hero: Hero = {
id: 1,
name: 'Windstorm'
};
}
| import { Component } from '@angular/core';
export class Hero {
id: number;
name: string;
}
@Component({
selector: 'my-app',
template: `
<h1>{{title}}</h1>
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div>
<label>name: </label>
<input value="{{hero.name}}" placeholder="name">
</div>
`
})
export class AppComponent {
title = 'Tour of Heroes';
hero: Hero = {
id: 1,
name: 'Windstorm'
};
}
| Make Hero editable PART I: html part | Make Hero editable PART I: html part
| TypeScript | mit | radovanthefoley/angular2learning,radovanthefoley/angular2learning,radovanthefoley/angular2learning | ---
+++
@@ -11,7 +11,10 @@
<h1>{{title}}</h1>
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
- <div><label>name: </label>{{hero.name}}</div>
+ <div>
+ <label>name: </label>
+ <input value="{{hero.name}}" placeholder="name">
+ </div>
`
})
|
2cce87988fe9db00771c05ca2e20bb53ff7917f7 | src/app/plugins/platform/Docker/dockerfile/constants.ts | src/app/plugins/platform/Docker/dockerfile/constants.ts | /**
* Currently-supported Composer version.
*/
export const composerTag = '1.9';
/**
* The name of the Composer image to use for projects.
*/
export const composerImage = 'forumone/composer';
/**
* The full `<image>:<tag>` string for this image; useful for `docker run` or the `image:`
* field in Docker Compose.
*/
export const composer = `${composerImage}:${composerTag}`;
/**
* The Docker Hub image used to build Gesso.
*/
export const gessoImage = 'forumone/gesso';
/**
* The currently-supported tag for Gesso builds.
*/
export const gessoTag = 'php7.3-node12';
/**
* The full `<image>:<tag>` string for Gesso; useful for the `image:` field in Docker
* Compose or the `FROM` instruction in a Dockerfile.
*/
export const gesso = `${gessoImage}:${gessoTag}`;
| /**
* Currently-supported Composer version.
*/
export const composerTag = '2';
/**
* The name of the Composer image to use for projects.
*/
export const composerImage = 'composer';
/**
* The full `<image>:<tag>` string for this image; useful for `docker run` or the `image:`
* field in Docker Compose.
*/
export const composer = `${composerImage}:${composerTag}`;
/**
* The Docker Hub image used to build Gesso.
*/
export const gessoImage = 'forumone/gesso';
/**
* The currently-supported tag for Gesso builds.
*/
export const gessoTag = 'php7.3-node12';
/**
* The full `<image>:<tag>` string for Gesso; useful for the `image:` field in Docker
* Compose or the `FROM` instruction in a Dockerfile.
*/
export const gesso = `${gessoImage}:${gessoTag}`;
| Update Composer image references to use composer:2. | Update Composer image references to use composer:2.
Replace usage of the `forumone/composer` image with the defacto
`composer:2` image since the prestissimo plugin is no longer needed
and the `forumone/composer` image may now be deprecated.
| TypeScript | mit | forumone/generator-web-starter,forumone/generator-web-starter,forumone/generator-web-starter,forumone/generator-web-starter,forumone/generator-web-starter | ---
+++
@@ -1,12 +1,12 @@
/**
* Currently-supported Composer version.
*/
-export const composerTag = '1.9';
+export const composerTag = '2';
/**
* The name of the Composer image to use for projects.
*/
-export const composerImage = 'forumone/composer';
+export const composerImage = 'composer';
/**
* The full `<image>:<tag>` string for this image; useful for `docker run` or the `image:` |
5ffadef6f7d7891dcea972cb917c9ab5c3669dfd | src/lib/Components/ArtworkFilterOptions/PriceRangeOptions.tsx | src/lib/Components/ArtworkFilterOptions/PriceRangeOptions.tsx | import { OrderedPriceRangeFilters, PriceRangeOption } from "lib/Scenes/Collection/Helpers/FilterArtworksHelpers"
import { ArtworkFilterContext, useSelectedOptionsDisplay } from "lib/utils/ArtworkFiltersStore"
import React, { useContext } from "react"
import { NavigatorIOS } from "react-native"
import { SingleSelectOptionScreen } from "./SingleSelectOption"
interface PriceRangeOptionsScreenProps {
navigator: NavigatorIOS
}
export const PriceRangeOptionsScreen: React.SFC<PriceRangeOptionsScreenProps> = ({ navigator }) => {
const { dispatch } = useContext(ArtworkFilterContext)
const filterType = "priceRange"
const selectedOptions = useSelectedOptionsDisplay()
const selectedOption = selectedOptions.find(option => option.filterType === filterType)?.value! as PriceRangeOption
const selectOption = (option: PriceRangeOption) => {
dispatch({ type: "selectFilters", payload: { value: option, filterType } })
}
return (
<SingleSelectOptionScreen
onSelect={selectOption}
filterHeaderText="Price Range"
filterOptions={OrderedPriceRangeFilters}
selectedOption={selectedOption}
navigator={navigator}
/>
)
}
| import { AggregateOption, FilterParamName, FilterType } from "lib/Scenes/Collection/Helpers/FilterArtworksHelpers"
import { ArtworkFilterContext, useSelectedOptionsDisplay } from "lib/utils/ArtworkFiltersStore"
import React, { useContext } from "react"
import { NavigatorIOS } from "react-native"
import { aggregationFromFilterType } from "../FilterModal"
import { SingleSelectOptionScreen } from "./SingleSelectOption"
interface PriceRangeOptionsScreenProps {
navigator: NavigatorIOS
}
export const PriceRangeOptionsScreen: React.SFC<PriceRangeOptionsScreenProps> = ({ navigator }) => {
const { dispatch, aggregations } = useContext(ArtworkFilterContext)
const filterType = FilterType.priceRange
const aggregationName = aggregationFromFilterType(filterType)
const aggregation = aggregations!.filter(value => value.slice === aggregationName)[0]
const options = aggregation.counts.map(aggCount => {
return {
displayText: aggCount.name,
paramName: FilterParamName.priceRange,
paramValue: aggCount.value,
filterType,
}
})
const selectedOptions = useSelectedOptionsDisplay()
const selectedOption = selectedOptions.find(option => option.filterType === filterType)!
const selectOption = (option: AggregateOption) => {
dispatch({
type: "selectFilters",
payload: {
displayText: option.displayText,
paramValue: option.paramValue,
paramName: FilterParamName.priceRange,
filterType,
},
})
}
return (
<SingleSelectOptionScreen
onSelect={selectOption}
filterHeaderText="Price Range"
filterOptions={options}
selectedOption={selectedOption}
navigator={navigator}
/>
)
}
| Convert price ranges to aggregate filters | Convert price ranges to aggregate filters
| TypeScript | mit | artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen | ---
+++
@@ -1,7 +1,8 @@
-import { OrderedPriceRangeFilters, PriceRangeOption } from "lib/Scenes/Collection/Helpers/FilterArtworksHelpers"
+import { AggregateOption, FilterParamName, FilterType } from "lib/Scenes/Collection/Helpers/FilterArtworksHelpers"
import { ArtworkFilterContext, useSelectedOptionsDisplay } from "lib/utils/ArtworkFiltersStore"
import React, { useContext } from "react"
import { NavigatorIOS } from "react-native"
+import { aggregationFromFilterType } from "../FilterModal"
import { SingleSelectOptionScreen } from "./SingleSelectOption"
interface PriceRangeOptionsScreenProps {
@@ -9,22 +10,40 @@
}
export const PriceRangeOptionsScreen: React.SFC<PriceRangeOptionsScreenProps> = ({ navigator }) => {
- const { dispatch } = useContext(ArtworkFilterContext)
+ const { dispatch, aggregations } = useContext(ArtworkFilterContext)
- const filterType = "priceRange"
+ const filterType = FilterType.priceRange
+ const aggregationName = aggregationFromFilterType(filterType)
+ const aggregation = aggregations!.filter(value => value.slice === aggregationName)[0]
+ const options = aggregation.counts.map(aggCount => {
+ return {
+ displayText: aggCount.name,
+ paramName: FilterParamName.priceRange,
+ paramValue: aggCount.value,
+ filterType,
+ }
+ })
const selectedOptions = useSelectedOptionsDisplay()
- const selectedOption = selectedOptions.find(option => option.filterType === filterType)?.value! as PriceRangeOption
+ const selectedOption = selectedOptions.find(option => option.filterType === filterType)!
- const selectOption = (option: PriceRangeOption) => {
- dispatch({ type: "selectFilters", payload: { value: option, filterType } })
+ const selectOption = (option: AggregateOption) => {
+ dispatch({
+ type: "selectFilters",
+ payload: {
+ displayText: option.displayText,
+ paramValue: option.paramValue,
+ paramName: FilterParamName.priceRange,
+ filterType,
+ },
+ })
}
return (
<SingleSelectOptionScreen
onSelect={selectOption}
filterHeaderText="Price Range"
- filterOptions={OrderedPriceRangeFilters}
+ filterOptions={options}
selectedOption={selectedOption}
navigator={navigator}
/> |
62c51fc9d142ece421eb8cf9ab85e5e6cd13e3bb | step-release-vis/src/app/services/environment_test.ts | step-release-vis/src/app/services/environment_test.ts | import { TestBed } from '@angular/core/testing';
import { EnvironmentService } from './environment';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import {CandidateInfo} from '../models/Data';
describe('EnvironmentService', () => {
let service: EnvironmentService;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule]
});
service = TestBed.inject(EnvironmentService);
});
// TODO(naoai): write getPolygons test
it('#getPercentages should return 3 candidates with ~ equal percentages', () => {
const input: CandidateInfo[] = [{name: '1', job_count: 666}, {name: '2', job_count: 667},
{name: '3', job_count: 667}];
// @ts-ignore
const resultMap: Map<string, number> = service.getPercentages(input);
expect(resultMap.get('1')).toEqual(34);
expect(resultMap.get('2')).toEqual(33);
expect(resultMap.get('3')).toEqual(33);
});
it('#getPercentages should have a candidate with 100', () => {
const input: CandidateInfo[] = [{name: '1', job_count: 2000}, {name: '2', job_count: 0}];
// @ts-ignore
const resultMap: Map<string, number> = service.getPercentages(input);
expect(resultMap.get('1')).toEqual(100);
});
});
| import { TestBed } from '@angular/core/testing';
import { EnvironmentService } from './environment';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import {CandidateInfo} from '../models/Data';
describe('EnvironmentService', () => {
let service: EnvironmentService;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule]
});
service = TestBed.inject(EnvironmentService);
});
// TODO(naoai): write getPolygons test
it('#getPercentages should return 3 candidates with ~ equal percentages', () => {
const input: CandidateInfo[] = [{name: '1', job_count: 666}, {name: '2', job_count: 667},
{name: '3', job_count: 667}];
// @ts-ignore
const resultMap: Map<string, number> = service.getPercentages(input);
expect(resultMap.get('1')).toEqual(33.3);
expect(resultMap.get('2')).toEqual(33.35);
expect(resultMap.get('3')).toEqual(33.35);
});
it('#getPercentages should have a candidate with 100', () => {
const input: CandidateInfo[] = [{name: '1', job_count: 2000}, {name: '2', job_count: 0}];
// @ts-ignore
const resultMap: Map<string, number> = service.getPercentages(input);
expect(resultMap.get('1')).toEqual(100);
});
});
| Modify test for fractional percentages. | Modify test for fractional percentages.
| TypeScript | apache-2.0 | googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020 | ---
+++
@@ -21,9 +21,9 @@
// @ts-ignore
const resultMap: Map<string, number> = service.getPercentages(input);
- expect(resultMap.get('1')).toEqual(34);
- expect(resultMap.get('2')).toEqual(33);
- expect(resultMap.get('3')).toEqual(33);
+ expect(resultMap.get('1')).toEqual(33.3);
+ expect(resultMap.get('2')).toEqual(33.35);
+ expect(resultMap.get('3')).toEqual(33.35);
});
it('#getPercentages should have a candidate with 100', () => { |
9d427783f001dd33199b5310fe40eece14af89b1 | app/src/ui/about/about.tsx | app/src/ui/about/about.tsx | import * as React from 'react'
import { Row } from '../lib/row'
import { Button } from '../lib/button'
import { ButtonGroup } from '../lib/button-group'
import { Dialog, DialogContent, DialogFooter } from '../dialog'
import { Octicon, OcticonSymbol } from '../octicons'
interface IAboutProps {
readonly onDismissed: () => void
readonly version: string
}
/** The Create Branch component. */
export class About extends React.Component<IAboutProps, void> {
public render() {
return (
<Dialog
id='about'
onSubmit={this.props.onDismissed}
onDismissed={this.props.onDismissed}>
<DialogContent>
<Row className='logo'>
<Octicon symbol={OcticonSymbol.markGithub} />
</Row>
<h2>GitHub Desktop</h2>
<p>Installed version {this.props.version}</p>
</DialogContent>
<DialogFooter>
<ButtonGroup>
<Button type='submit'>Close</Button>
</ButtonGroup>
</DialogFooter>
</Dialog>
)
}
}
| import * as React from 'react'
import { Row } from '../lib/row'
import { Button } from '../lib/button'
import { ButtonGroup } from '../lib/button-group'
import { Dialog, DialogContent, DialogFooter } from '../dialog'
import { Octicon, OcticonSymbol } from '../octicons'
import { LinkButton} from '../lib/link-button'
interface IAboutProps {
readonly onDismissed: () => void
readonly version: string
}
const releaseNotesUri = 'https://desktop.github.com/release-notes/tng/'
/** The Create Branch component. */
export class About extends React.Component<IAboutProps, void> {
private closeButton: Button | null = null
private onCloseButtonRef = (button: Button | null) => {
this.closeButton = button
}
public componentDidMount() {
// A modal dialog autofocuses the first element that can receive
// focus (and our dialog even uses the autofocus attribute on its
// fieldset). In our case that's the release notes link button and
// we don't want that to have focus so we'll move it over to the
// close button instead.
if (this.closeButton) {
this.closeButton.focus()
}
}
public render() {
const version = this.props.version
const releaseNotesLink = <LinkButton uri={releaseNotesUri}>release notes</LinkButton>
return (
<Dialog
id='about'
onSubmit={this.props.onDismissed}
onDismissed={this.props.onDismissed}>
<DialogContent>
<Row className='logo'>
<Octicon symbol={OcticonSymbol.markGithub} />
</Row>
<h2>GitHub Desktop</h2>
<p>
Version {version} ({releaseNotesLink})
</p>
</DialogContent>
<DialogFooter>
<ButtonGroup>
<Button type='submit' ref={this.onCloseButtonRef}>Close</Button>
</ButtonGroup>
</DialogFooter>
</Dialog>
)
}
}
| Add a link to the release notes | Add a link to the release notes
| TypeScript | mit | say25/desktop,kactus-io/kactus,kactus-io/kactus,hjobrien/desktop,shiftkey/desktop,desktop/desktop,shiftkey/desktop,BugTesterTest/desktops,desktop/desktop,hjobrien/desktop,kactus-io/kactus,BugTesterTest/desktops,j-f1/forked-desktop,artivilla/desktop,BugTesterTest/desktops,gengjiawen/desktop,j-f1/forked-desktop,gengjiawen/desktop,desktop/desktop,shiftkey/desktop,j-f1/forked-desktop,shiftkey/desktop,hjobrien/desktop,say25/desktop,j-f1/forked-desktop,BugTesterTest/desktops,gengjiawen/desktop,gengjiawen/desktop,say25/desktop,artivilla/desktop,kactus-io/kactus,artivilla/desktop,hjobrien/desktop,desktop/desktop,artivilla/desktop,say25/desktop | ---
+++
@@ -5,16 +5,39 @@
import { ButtonGroup } from '../lib/button-group'
import { Dialog, DialogContent, DialogFooter } from '../dialog'
import { Octicon, OcticonSymbol } from '../octicons'
+import { LinkButton} from '../lib/link-button'
interface IAboutProps {
readonly onDismissed: () => void
readonly version: string
}
+const releaseNotesUri = 'https://desktop.github.com/release-notes/tng/'
+
/** The Create Branch component. */
export class About extends React.Component<IAboutProps, void> {
+ private closeButton: Button | null = null
+
+ private onCloseButtonRef = (button: Button | null) => {
+ this.closeButton = button
+ }
+
+ public componentDidMount() {
+ // A modal dialog autofocuses the first element that can receive
+ // focus (and our dialog even uses the autofocus attribute on its
+ // fieldset). In our case that's the release notes link button and
+ // we don't want that to have focus so we'll move it over to the
+ // close button instead.
+ if (this.closeButton) {
+ this.closeButton.focus()
+ }
+ }
+
public render() {
+
+ const version = this.props.version
+ const releaseNotesLink = <LinkButton uri={releaseNotesUri}>release notes</LinkButton>
return (
<Dialog
@@ -26,12 +49,14 @@
<Octicon symbol={OcticonSymbol.markGithub} />
</Row>
<h2>GitHub Desktop</h2>
- <p>Installed version {this.props.version}</p>
+ <p>
+ Version {version} ({releaseNotesLink})
+ </p>
</DialogContent>
<DialogFooter>
<ButtonGroup>
- <Button type='submit'>Close</Button>
+ <Button type='submit' ref={this.onCloseButtonRef}>Close</Button>
</ButtonGroup>
</DialogFooter>
</Dialog> |
3b778e4b68c67422e42b407f613a0ce217666930 | typescript-marionette-v2/src/views/SummarizationView.ts | typescript-marionette-v2/src/views/SummarizationView.ts | import SummarizationViewModel from "./SummarizationViewModel"
import TypedItemView from "./typedViews/TypedItemView"
import TypedItemViewOptions from "./typedViews/TypedItemViewOptions"
interface SummarizationViewOptions extends TypedItemViewOptions<SummarizationViewModel> {
}
// TODO: Move the view models to a separate folder?
export default class SummarizationView extends TypedItemView<SummarizationViewModel> {
constructor(options: SummarizationViewOptions) {
super(options)
this.listenTo(this.collection, "change:completed update", this.getThrottledRender())
}
template = require("./SummarizationView.ejs")
templateHelpers() {
return {
numberOfCompletedTodos: this.model.todos.getCompleted().length,
numberOfTodos: this.model.todos.length
}
}
}
| import SummarizationViewModel from "../viewModels/SummarizationViewModel"
import TypedItemView from "./typedViews/TypedItemView"
import TypedItemViewOptions from "./typedViews/TypedItemViewOptions"
interface SummarizationViewOptions extends TypedItemViewOptions<SummarizationViewModel> {
}
export default class SummarizationView extends TypedItemView<SummarizationViewModel> {
constructor(options: SummarizationViewOptions) {
super(options)
this.listenTo(this.collection, "change:completed update", this.getThrottledRender())
}
template = require("./SummarizationView.ejs")
templateHelpers() {
return {
numberOfCompletedTodos: this.model.todos.getCompleted().length,
numberOfTodos: this.model.todos.length
}
}
}
| Fix URL and remove TODO | Fix URL and remove TODO
| TypeScript | unlicense | janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations | ---
+++
@@ -1,11 +1,10 @@
-import SummarizationViewModel from "./SummarizationViewModel"
+import SummarizationViewModel from "../viewModels/SummarizationViewModel"
import TypedItemView from "./typedViews/TypedItemView"
import TypedItemViewOptions from "./typedViews/TypedItemViewOptions"
interface SummarizationViewOptions extends TypedItemViewOptions<SummarizationViewModel> {
}
-// TODO: Move the view models to a separate folder?
export default class SummarizationView extends TypedItemView<SummarizationViewModel> {
constructor(options: SummarizationViewOptions) {
super(options) |
244b5018d064468320f3edb60bca8baa51e2cb23 | src/app/app.component.ts | src/app/app.component.ts | import { Component } from '@angular/core';
import { OAuthService, JwksValidationHandler } from 'angular-oauth2-oidc';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app';
constructor(private oauthService: OAuthService) {
this.oauthService.redirectUri = window.location.origin;
this.oauthService.clientId = 'MjlYvTtFW26gOoOAHKOz';
this.oauthService.scope = 'openid profile email';
this.oauthService.issuer = 'https://dev-158606.oktapreview.com';
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
// Load Discovery Document and then try to login the user
this.oauthService.loadDiscoveryDocument().then(() => {
this.oauthService.tryLogin();
});
}
}
| import { Component } from '@angular/core';
import { OAuthService, JwksValidationHandler } from 'angular-oauth2-oidc';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app';
constructor(private oauthService: OAuthService) {
this.oauthService.redirectUri = window.location.origin;
this.oauthService.clientId = 'MjlYvTtFW26gOoOAHKOz';
this.oauthService.scope = 'openid profile email';
this.oauthService.issuer = 'https://dev-158606.oktapreview.com/oauth2/default';
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
// Load Discovery Document and then try to login the user
this.oauthService.loadDiscoveryDocument().then(() => {
this.oauthService.tryLogin();
});
}
}
| Update README and fix issuer | Update README and fix issuer
| TypeScript | apache-2.0 | oktadeveloper/okta-angular-openid-connect-example,oktadeveloper/okta-angular-openid-connect-example,oktadeveloper/okta-angular-openid-connect-example | ---
+++
@@ -13,7 +13,7 @@
this.oauthService.redirectUri = window.location.origin;
this.oauthService.clientId = 'MjlYvTtFW26gOoOAHKOz';
this.oauthService.scope = 'openid profile email';
- this.oauthService.issuer = 'https://dev-158606.oktapreview.com';
+ this.oauthService.issuer = 'https://dev-158606.oktapreview.com/oauth2/default';
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
// Load Discovery Document and then try to login the user |
6df230e73d5690f02923d5a76d53fc1f5268b83a | src/server_manager/infrastructure/crypto.ts | src/server_manager/infrastructure/crypto.ts | // Copyright 2018 The Outline Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import * as forge from 'node-forge';
// Keys are in OpenSSH format
export class KeyPair {
public: string;
private: string;
}
// Generates an RSA keypair using forge
export function generateKeyPair(): KeyPair {
const pair = forge.pki.rsa.generateKeyPair({bits: 1538});
// trim() the string because forge adds a trailing space to
// public keys which really messes things up later.
return {
public: forge.ssh.publicKeyToOpenSSH(pair.publicKey, '').trim(),
private: forge.ssh.privateKeyToOpenSSH(pair.privateKey, '').trim()
};
}
| // Copyright 2018 The Outline Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import * as forge from 'node-forge';
// Keys are in OpenSSH format
export class KeyPair {
public: string;
private: string;
}
// Generates an RSA keypair using forge
export function generateKeyPair(): KeyPair {
const pair = forge.pki.rsa.generateKeyPair({bits: 2048});
// trim() the string because forge adds a trailing space to
// public keys which really messes things up later.
return {
public: forge.ssh.publicKeyToOpenSSH(pair.publicKey, '').trim(),
private: forge.ssh.privateKeyToOpenSSH(pair.privateKey, '').trim()
};
}
| Change key size from 1538 bits to 2048 bits | Change key size from 1538 bits to 2048 bits | TypeScript | apache-2.0 | Jigsaw-Code/outline-server,Jigsaw-Code/outline-server,Jigsaw-Code/outline-server,Jigsaw-Code/outline-server | ---
+++
@@ -22,7 +22,7 @@
// Generates an RSA keypair using forge
export function generateKeyPair(): KeyPair {
- const pair = forge.pki.rsa.generateKeyPair({bits: 1538});
+ const pair = forge.pki.rsa.generateKeyPair({bits: 2048});
// trim() the string because forge adds a trailing space to
// public keys which really messes things up later.
return { |
c5c177aafdd078561359edabc1084d2af5d0156d | client/Components/Tabs.tsx | client/Components/Tabs.tsx | import * as React from "react";
interface TabsProps {
options: string[];
selected?: string;
onChoose: (option: string) => void;
}
interface TabsState { }
export class Tabs extends React.Component<TabsProps, TabsState> {
constructor(props) {
super(props);
}
public render() {
const spanElements = this.props.options.map(
option => <span className={this.props.selected == option ? "s-selected" : ""} onClick={() => this.props.onChoose(option)}>{option}</span>
);
return <div className="c-tabs">
{spanElements}
</div>;
}
} | import * as React from "react";
interface TabsProps {
options: string[];
selected?: string;
onChoose: (option: string) => void;
}
interface TabsState { }
export class Tabs extends React.Component<TabsProps, TabsState> {
constructor(props) {
super(props);
}
public render() {
const spanElements = this.props.options.map(
(option, i) => <span key={i} className={this.props.selected == option ? "s-selected" : ""} onClick={() => this.props.onChoose(option)}>{option}</span>
);
return <div className="c-tabs">
{spanElements}
</div>;
}
} | Add key to tab spans | Add key to tab spans
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -14,7 +14,7 @@
}
public render() {
const spanElements = this.props.options.map(
- option => <span className={this.props.selected == option ? "s-selected" : ""} onClick={() => this.props.onChoose(option)}>{option}</span>
+ (option, i) => <span key={i} className={this.props.selected == option ? "s-selected" : ""} onClick={() => this.props.onChoose(option)}>{option}</span>
);
return <div className="c-tabs"> |
ba9f0d3c37a969cfcdca32f0b83d9601765ef2ce | index.ts | index.ts | export { default as Model, Ref } from "./lib/Model";
export { default as def } from "./lib/decorators/def";
export { default as model } from "./lib/decorators/model";
export { default as nested } from "./lib/decorators/nested";
export {
default as property,
default as prop,
} from "./lib/decorators/prop";
export { default as propertyTransformers }
from "./lib/decorators/propertyTransformers";
export { default as ref } from "./lib/decorators/ref";
export { default as subdoc } from "./lib/decorators/subdoc";
export { Query } from "mongoose";
| export { default as Model, Ref } from "./lib/Model";
export { default as def } from "./lib/decorators/def";
export { default as method } from "./lib/decorators/method";
export { default as model } from "./lib/decorators/model";
export { default as nested } from "./lib/decorators/nested";
export {
default as property,
default as prop,
} from "./lib/decorators/prop";
export { default as propertyTransformers }
from "./lib/decorators/propertyTransformers";
export { default as ref } from "./lib/decorators/ref";
export { default as subdoc } from "./lib/decorators/subdoc";
export { Query } from "mongoose";
| Add @method decorator: fix export | Add @method decorator: fix export
| TypeScript | mit | megahertz/mongoose-model | ---
+++
@@ -1,5 +1,6 @@
export { default as Model, Ref } from "./lib/Model";
export { default as def } from "./lib/decorators/def";
+export { default as method } from "./lib/decorators/method";
export { default as model } from "./lib/decorators/model";
export { default as nested } from "./lib/decorators/nested";
export { |
e43bbe78ec9403ad55eec171e17c156c626d10f9 | applications/play/redux/index.ts | applications/play/redux/index.ts | import * as actions from "./actions.js";
export { actions };
export { default as createStore } from "./createStore";
| import * as actions from "./actions";
export { actions };
export { default as createStore } from "./createStore";
| Fix import in redux file | Fix import in redux file
| TypeScript | bsd-3-clause | nteract/nteract,nteract/composition,nteract/composition,nteract/nteract,nteract/composition,nteract/nteract,nteract/nteract,nteract/nteract | ---
+++
@@ -1,4 +1,4 @@
-import * as actions from "./actions.js";
+import * as actions from "./actions";
export { actions };
export { default as createStore } from "./createStore"; |
ec893ae07554e37ba4e04773b346b5b80e71e152 | server/lib/files-cache/abstract-video-static-file-cache.ts | server/lib/files-cache/abstract-video-static-file-cache.ts | import { remove } from 'fs-extra'
import { logger } from '../../helpers/logger'
import * as memoizee from 'memoizee'
type GetFilePathResult = { isOwned: boolean, path: string } | undefined
export abstract class AbstractVideoStaticFileCache <T> {
getFilePath: (params: T) => Promise<GetFilePathResult>
abstract getFilePathImpl (params: T): Promise<GetFilePathResult>
// Load and save the remote file, then return the local path from filesystem
protected abstract loadRemoteFile (key: string): Promise<GetFilePathResult>
init (max: number, maxAge: number) {
this.getFilePath = memoizee(this.getFilePathImpl, {
maxAge,
max,
promise: true,
dispose: (result: GetFilePathResult) => {
if (result.isOwned !== true) {
remove(result.path)
.then(() => logger.debug('%s removed from %s', result.path, this.constructor.name))
.catch(err => logger.error('Cannot remove %s from cache %s.', result.path, this.constructor.name, { err }))
}
}
})
}
}
| import { remove } from 'fs-extra'
import { logger } from '../../helpers/logger'
import * as memoizee from 'memoizee'
type GetFilePathResult = { isOwned: boolean, path: string } | undefined
export abstract class AbstractVideoStaticFileCache <T> {
getFilePath: (params: T) => Promise<GetFilePathResult>
abstract getFilePathImpl (params: T): Promise<GetFilePathResult>
// Load and save the remote file, then return the local path from filesystem
protected abstract loadRemoteFile (key: string): Promise<GetFilePathResult>
init (max: number, maxAge: number) {
this.getFilePath = memoizee(this.getFilePathImpl, {
maxAge,
max,
promise: true,
dispose: (result?: GetFilePathResult) => {
if (result && result.isOwned !== true) {
remove(result.path)
.then(() => logger.debug('%s removed from %s', result.path, this.constructor.name))
.catch(err => logger.error('Cannot remove %s from cache %s.', result.path, this.constructor.name, { err }))
}
}
})
}
}
| Fix crash in files cache | Fix crash in files cache
| TypeScript | agpl-3.0 | Chocobozzz/PeerTube,Green-Star/PeerTube,Green-Star/PeerTube,Green-Star/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Green-Star/PeerTube | ---
+++
@@ -18,8 +18,8 @@
maxAge,
max,
promise: true,
- dispose: (result: GetFilePathResult) => {
- if (result.isOwned !== true) {
+ dispose: (result?: GetFilePathResult) => {
+ if (result && result.isOwned !== true) {
remove(result.path)
.then(() => logger.debug('%s removed from %s', result.path, this.constructor.name))
.catch(err => logger.error('Cannot remove %s from cache %s.', result.path, this.constructor.name, { err })) |
da0485273d81a8c66f286ebfb36b31227261372b | jovo-integrations/jovo-cms-googlesheets/src/ObjectArraySheet.ts | jovo-integrations/jovo-cms-googlesheets/src/ObjectArraySheet.ts | import _merge = require('lodash.merge');
import _set = require('lodash.set');
import {DefaultSheet, GoogleSheetsSheet} from "./DefaultSheet";
import {HandleRequest, JovoError, ErrorCode} from "jovo-core";
export interface Config extends GoogleSheetsSheet {
}
export class ObjectArraySheet extends DefaultSheet {
config: Config = {
enabled: true,
range: 'A:Z',
};
constructor(config?: Config) {
super(config);
if (config) {
this.config = _merge(this.config, config);
}
}
parse(handleRequest: HandleRequest, values: any[]) { // tslint:disable-line
const entity = this.config.entity || this.config.name;
if (!entity) {
throw new JovoError(
'entity has to be set.',
ErrorCode.ERR_PLUGIN,
'jovo-cms-googlesheets',
'The sheet\'s name has to be defined in your config.js file.',
undefined,
'https://www.jovo.tech/docs/cms/google-sheets#configuration'
);
}
const resultArray = [];
const keys = values[0];
for (let i = 1; i < values.length; i++) {
const row: string[] = values[i];
const obj = {};
for (let j = 0; j < row.length; j++) {
const cell: string = row[j];
_set(obj, `${keys[j]}`, cell);
}
resultArray.push(obj);
}
handleRequest.app.$cms[entity] = resultArray;
}
}
| import _merge = require('lodash.merge');
import _set = require('lodash.set');
import {DefaultSheet, GoogleSheetsSheet} from "./DefaultSheet";
import {HandleRequest, JovoError, ErrorCode} from "jovo-core";
export interface Config extends GoogleSheetsSheet {
}
export class ObjectArraySheet extends DefaultSheet {
config: Config = {
enabled: true,
name: undefined,
range: 'A:Z',
};
constructor(config?: Config) {
super(config);
if (config) {
this.config = _merge(this.config, config);
}
}
parse(handleRequest: HandleRequest, values: any[]) { // tslint:disable-line
const entity = this.config.entity || this.config.name;
if (!entity) {
throw new JovoError(
'entity has to be set.',
ErrorCode.ERR_PLUGIN,
'jovo-cms-googlesheets',
'The sheet\'s name has to be defined in your config.js file.',
undefined,
'https://www.jovo.tech/docs/cms/google-sheets#configuration'
);
}
const resultArray = [];
const keys = values[0];
for (let i = 1; i < values.length; i++) {
const row: string[] = values[i];
const obj = {};
for (let j = 0; j < row.length; j++) {
const cell: string = row[j];
_set(obj, `${keys[j]}`, cell);
}
resultArray.push(obj);
}
handleRequest.app.$cms[entity] = resultArray;
}
}
| Add missing default config property | :bug: Add missing default config property
| TypeScript | apache-2.0 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | ---
+++
@@ -11,6 +11,7 @@
export class ObjectArraySheet extends DefaultSheet {
config: Config = {
enabled: true,
+ name: undefined,
range: 'A:Z',
};
constructor(config?: Config) { |
b4950219840e0644af6addea10699894fadc98aa | src/app/write/write.component.ts | src/app/write/write.component.ts | import { Component, OnInit } from '@angular/core';
import {ChapterService} from "../chapter.service";
import {ActivatedRoute, Router} from "@angular/router";
import {Chapter} from "../../models/chapter";
@Component({
selector: 'wn-write',
templateUrl: './write.component.html',
styleUrls: ['./write.component.css']
})
export class WriteComponent implements OnInit {
parentChapter: Chapter;
newChapter:Chapter = new Chapter();
loaded:boolean = false;
constructor(private _chapterService:ChapterService, private route: ActivatedRoute, private router: Router) { }
ngOnInit() {
this.route.params.subscribe(params =>{
let parentId = params['parentChapter'];
if(parentId){
this._chapterService.getChapter(parentId).subscribe(chapter =>{
this.parentChapter = chapter;
this.newChapter.parent = this.parentChapter._id;
this.newChapter.book = this.parentChapter.book;
this.loaded = true;
})
}
})
}
saveChapter(){
this.newChapter.author='59c3995ddd8415653e5ebc87';//TODO Create userservice to get current user
this._chapterService.saveChapter(this.newChapter).subscribe((chapterId)=>{
this.parentChapter.childrenIds.push(chapterId);
this._chapterService.updateChapter(this.parentChapter).subscribe((response)=>{
this.router.navigate(['read', chapterId]);
});
})
}
}
| import { Component, OnInit } from '@angular/core';
import {ChapterService} from "../chapter.service";
import {ActivatedRoute, Router} from "@angular/router";
import {Chapter} from "../../models/chapter";
@Component({
selector: 'wn-write',
templateUrl: './write.component.html',
styleUrls: ['./write.component.css']
})
export class WriteComponent implements OnInit {
parentChapter: Chapter;
newChapter:Chapter = new Chapter();
loaded:boolean = false;
constructor(private _chapterService:ChapterService, private route: ActivatedRoute, private router: Router) { }
ngOnInit() {
this.route.params.subscribe(params =>{
let parentId = params['parentChapter'];
if(parentId){
this._chapterService.getChapter(parentId).subscribe(chapter =>{
this.parentChapter = chapter;
this.newChapter.parent = this.parentChapter._id;
this.newChapter.book = this.parentChapter.book;
this.loaded = true;
})
}
})
}
saveChapter(){
this.loaded = false;
this.newChapter.author='59c3995ddd8415653e5ebc87';//TODO Create userservice to get current user
this._chapterService.saveChapter(this.newChapter).subscribe((chapterId)=>{
this.parentChapter.childrenIds.push(chapterId);
this._chapterService.updateChapter(this.parentChapter).subscribe((response)=>{
this.loaded = true;
this.router.navigate(['read', chapterId]);
});
})
}
}
| Disable save button when saving is happening in the background | Disable save button when saving is happening in the background
| TypeScript | mit | oleeskild/WebNovel,oleeskild/WebNovel,oleeskild/WebNovel | ---
+++
@@ -32,10 +32,12 @@
}
saveChapter(){
+ this.loaded = false;
this.newChapter.author='59c3995ddd8415653e5ebc87';//TODO Create userservice to get current user
this._chapterService.saveChapter(this.newChapter).subscribe((chapterId)=>{
this.parentChapter.childrenIds.push(chapterId);
this._chapterService.updateChapter(this.parentChapter).subscribe((response)=>{
+ this.loaded = true;
this.router.navigate(['read', chapterId]);
});
}) |
4fe4b9590a41ef193a90e89d3643dc9fe8cc3a05 | src/index.ts | src/index.ts | import {app, BrowserWindow} from "electron";
let win;
function createWindow() {
win = new BrowserWindow({ width: 800, height: 600 });
win.loadURL(`file://${__dirname}/app/view/index.html`);
// win.webContents.openDevTools();
win.on("closed", () => {
win = null;
});
}
app.on("ready", createWindow);
app.on("window-all-closed", () => {
process.platform !== "darwin" && app.quit(); // Code like if you were in Satan's church
});
app.on("activate", () => {
win === null && createWindow(); // Code like if you were in Satan's church
}); | import {app, BrowserWindow} from "electron";
let win;
function createWindow() {
win = new BrowserWindow({ width: 800, height: 600, minWidth: 650, minHeight: 500});
win.loadURL(`file://${__dirname}/app/view/index.html`);
// win.webContents.openDevTools();
win.on("closed", () => {
win = null;
});
}
app.on("ready", createWindow);
app.on("window-all-closed", () => {
process.platform !== "darwin" && app.quit(); // Code like if you were in Satan's church
});
app.on("activate", () => {
win === null && createWindow(); // Code like if you were in Satan's church
}); | Set minHeight and minWidth of the window | Set minHeight and minWidth of the window
| TypeScript | mit | Xstoudi/alduin,Xstoudi/alduin,Xstoudi/alduin | ---
+++
@@ -3,7 +3,7 @@
let win;
function createWindow() {
- win = new BrowserWindow({ width: 800, height: 600 });
+ win = new BrowserWindow({ width: 800, height: 600, minWidth: 650, minHeight: 500});
win.loadURL(`file://${__dirname}/app/view/index.html`);
|
e4c18fc8fe21c7762b8f8e2b029241fef8388330 | tensorflow/tensorboard/components/tf-audio-dashboard/test/audioDashboardTests.ts | tensorflow/tensorboard/components/tf-audio-dashboard/test/audioDashboardTests.ts | declare function stub(el: string, obj: any): void;
describe('audio dashboard tests', function() {
var audioDash;
var reloadCount = 0;
beforeEach(function() {
audioDash = fixture('testElementFixture');
var router = TF.Backend.router('data', true);
var backend = new TF.Backend.Backend(router);
audioDash.backend = backend;
stub('tf-audio-loader', {
reload: function() { reloadCount++; },
});
});
it('calling reload on dashboard reloads the audio-loaders',
function(done) {
audioDash.backendReload().then(() => {
reloadCount = 0;
var loaders = [].slice.call(
audioDash.getElementsByTagName('tf-audio-loader'));
audioDash.frontendReload();
setTimeout(function() {
assert.isAbove(reloadCount, 3);
done();
});
});
});
});
| /* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an 'AS IS' BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
declare function stub(el: string, obj: any): void;
describe('audio dashboard tests', function() {
var audioDash;
var reloadCount = 0;
beforeEach(function() {
audioDash = fixture('testElementFixture');
var router = TF.Backend.router('data', true);
var backend = new TF.Backend.Backend(router);
audioDash.backend = backend;
stub('tf-audio-loader', {
reload: function() { reloadCount++; },
});
});
it('calling reload on dashboard reloads the audio-loaders',
function(done) {
audioDash.backendReload().then(() => {
reloadCount = 0;
var loaders = [].slice.call(
audioDash.getElementsByTagName('tf-audio-loader'));
audioDash.frontendReload();
setTimeout(function() {
assert.isAbove(reloadCount, 3);
done();
});
});
});
});
| Add license header to file. Change: 134564823 | Add license header to file.
Change: 134564823
| TypeScript | apache-2.0 | AndreasMadsen/tensorflow,kevin-coder/tensorflow-fork,snnn/tensorflow,kevin-coder/tensorflow-fork,asimshankar/tensorflow,yanchen036/tensorflow,vrv/tensorflow,alistairlow/tensorflow,theflofly/tensorflow,sandeepdsouza93/TensorFlow-15712,laosiaudi/tensorflow,eadgarchen/tensorflow,elingg/tensorflow,seaotterman/tensorflow,tensorflow/tensorflow-pywrap_saved_model,rabipanda/tensorflow,alshedivat/tensorflow,seanli9jan/tensorflow,lukeiwanski/tensorflow-opencl,Carmezim/tensorflow,paolodedios/tensorflow,SnakeJenny/TensorFlow,calebfoss/tensorflow,tensorflow/tensorflow-pywrap_saved_model,alheinecke/tensorflow-xsmm,aam-at/tensorflow,code-sauce/tensorflow,calebfoss/tensorflow,asadziach/tensorflow,maciekcc/tensorflow,a-doumoulakis/tensorflow,with-git/tensorflow,benoitsteiner/tensorflow-xsmm,adamtiger/tensorflow,JingJunYin/tensorflow,cg31/tensorflow,jbedorf/tensorflow,johndpope/tensorflow,thjashin/tensorflow,zasdfgbnm/tensorflow,mixturemodel-flow/tensorflow,eadgarchen/tensorflow,elingg/tensorflow,aam-at/tensorflow,pavelchristof/gomoku-ai,cancan101/tensorflow,asimshankar/tensorflow,jhaux/tensorflow,av8ramit/tensorflow,Intel-tensorflow/tensorflow,raymondxyang/tensorflow,Carmezim/tensorflow,martinwicke/tensorflow,Bismarrck/tensorflow,arborh/tensorflow,sjperkins/tensorflow,drpngx/tensorflow,MoamerEncsConcordiaCa/tensorflow,xzturn/tensorflow,anilmuthineni/tensorflow,kamcpp/tensorflow,codrut3/tensorflow,dancingdan/tensorflow,theflofly/tensorflow,laszlocsomor/tensorflow,rabipanda/tensorflow,nanditav/15712-TensorFlow,brchiu/tensorflow,ishay2b/tensorflow,rabipanda/tensorflow,krikru/tensorflow-opencl,yongtang/tensorflow,eaplatanios/tensorflow,chenjun0210/tensorflow,paolodedios/tensorflow,lakshayg/tensorflow,pcm17/tensorflow,dancingdan/tensorflow,thesuperzapper/tensorflow,pavelchristof/gomoku-ai,MostafaGazar/tensorflow,mrry/tensorflow,gunan/tensorflow,anilmuthineni/tensorflow,Mazecreator/tensorflow,manazhao/tf_recsys,alheinecke/tensorflow-xsmm,yanchen036/tensorflow,manazhao/tf_recsys,ArtsiomCh/tensorflow,snnn/tensorflow,scenarios/tensorflow,handroissuazo/tensorflow,Bulochkin/tensorflow_pack,zycdragonball/tensorflow,dyoung418/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ibmsoe/tensorflow,petewarden/tensorflow,ageron/tensorflow,pierreg/tensorflow,laosiaudi/tensorflow,seanli9jan/tensorflow,hehongliang/tensorflow,cancan101/tensorflow,jalexvig/tensorflow,ghchinoy/tensorflow,pierreg/tensorflow,XueqingLin/tensorflow,gojira/tensorflow,gnieboer/tensorflow,code-sauce/tensorflow,alivecor/tensorflow,strint/tensorflow,drpngx/tensorflow,aselle/tensorflow,tensorflow/tensorflow,dyoung418/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yaroslavvb/tensorflow,ran5515/DeepDecision,jhseu/tensorflow,girving/tensorflow,nightjean/Deep-Learning,cg31/tensorflow,a-doumoulakis/tensorflow,asadziach/tensorflow,tomasreimers/tensorflow-emscripten,memo/tensorflow,ageron/tensorflow,juharris/tensorflow,karllessard/tensorflow,aam-at/tensorflow,haeusser/tensorflow,SnakeJenny/TensorFlow,jbedorf/tensorflow,Intel-Corporation/tensorflow,brchiu/tensorflow,asadziach/tensorflow,ageron/tensorflow,lukeiwanski/tensorflow-opencl,mengxn/tensorflow,bowang/tensorflow,davidzchen/tensorflow,eadgarchen/tensorflow,benoitsteiner/tensorflow,cxxgtxy/tensorflow,AnishShah/tensorflow,code-sauce/tensorflow,suiyuan2009/tensorflow,gnieboer/tensorflow,davidzchen/tensorflow,gautam1858/tensorflow,memo/tensorflow,xodus7/tensorflow,abhitopia/tensorflow,dongjoon-hyun/tensorflow,brchiu/tensorflow,manipopopo/tensorflow,jalexvig/tensorflow,eerwitt/tensorflow,memo/tensorflow,dendisuhubdy/tensorflow,chris-chris/tensorflow,zasdfgbnm/tensorflow,nburn42/tensorflow,ishay2b/tensorflow,DavidNorman/tensorflow,yongtang/tensorflow,cg31/tensorflow,ravindrapanda/tensorflow,Xeralux/tensorflow,seaotterman/tensorflow,alisidd/tensorflow,lukeiwanski/tensorflow-opencl,chemelnucfin/tensorflow,ghchinoy/tensorflow,yaroslavvb/tensorflow,jhaux/tensorflow,Mistobaan/tensorflow,Xeralux/tensorflow,haeusser/tensorflow,MostafaGazar/tensorflow,kamcpp/tensorflow,alshedivat/tensorflow,codrut3/tensorflow,DCSaunders/tensorflow,codrut3/tensorflow,Bulochkin/tensorflow_pack,Mistobaan/tensorflow,wangyum/tensorflow,tensorflow/tensorflow,alistairlow/tensorflow,tongwang01/tensorflow,eaplatanios/tensorflow,ghchinoy/tensorflow,jhaux/tensorflow,hsaputra/tensorflow,tiagofrepereira2012/tensorflow,chemelnucfin/tensorflow,jeffzheng1/tensorflow,gojira/tensorflow,Bulochkin/tensorflow_pack,RapidApplicationDevelopment/tensorflow,Moriadry/tensorflow,andrewcmyers/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,tntnatbry/tensorflow,nikste/tensorflow,Mazecreator/tensorflow,ppwwyyxx/tensorflow,asimshankar/tensorflow,sandeepgupta2k4/tensorflow,girving/tensorflow,memo/tensorflow,paolodedios/tensorflow,pierreg/tensorflow,with-git/tensorflow,guschmue/tensorflow,jwlawson/tensorflow,dongjoon-hyun/tensorflow,with-git/tensorflow,JVillella/tensorflow,meteorcloudy/tensorflow,Mistobaan/tensorflow,alisidd/tensorflow,markslwong/tensorflow,ppries/tensorflow,tongwang01/tensorflow,vrv/tensorflow,Bulochkin/tensorflow_pack,JingJunYin/tensorflow,kamcpp/tensorflow,tensorflow/tensorflow,av8ramit/tensorflow,chenjun0210/tensorflow,code-sauce/tensorflow,cancan101/tensorflow,yaroslavvb/tensorflow,suiyuan2009/tensorflow,tongwang01/tensorflow,andrewcmyers/tensorflow,kobejean/tensorflow,ppwwyyxx/tensorflow,JingJunYin/tensorflow,alivecor/tensorflow,freedomtan/tensorflow,kchodorow/tensorflow,krikru/tensorflow-opencl,jendap/tensorflow,gojira/tensorflow,chris-chris/tensorflow,gibiansky/tensorflow,lukeiwanski/tensorflow,tornadozou/tensorflow,ZhangXinNan/tensorflow,sarvex/tensorflow,tntnatbry/tensorflow,ArtsiomCh/tensorflow,with-git/tensorflow,rabipanda/tensorflow,taknevski/tensorflow-xsmm,tiagofrepereira2012/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,MycChiu/tensorflow,mavenlin/tensorflow,Bulochkin/tensorflow_pack,gautam1858/tensorflow,asadziach/tensorflow,karllessard/tensorflow,alshedivat/tensorflow,theflofly/tensorflow,renyi533/tensorflow,asadziach/tensorflow,brchiu/tensorflow,DavidNorman/tensorflow,caisq/tensorflow,mortada/tensorflow,markslwong/tensorflow,jostep/tensorflow,drpngx/tensorflow,seanli9jan/tensorflow,alheinecke/tensorflow-xsmm,theflofly/tensorflow,JVillella/tensorflow,girving/tensorflow,seaotterman/tensorflow,arborh/tensorflow,hehongliang/tensorflow,ychfan/tensorflow,gautam1858/tensorflow,mavenlin/tensorflow,nightjean/Deep-Learning,ArtsiomCh/tensorflow,frreiss/tensorflow-fred,asimshankar/tensorflow,dendisuhubdy/tensorflow,admcrae/tensorflow,benoitsteiner/tensorflow-xsmm,pavelchristof/gomoku-ai,dongjoon-hyun/tensorflow,annarev/tensorflow,markslwong/tensorflow,nolanliou/tensorflow,cg31/tensorflow,mdrumond/tensorflow,dongjoon-hyun/tensorflow,tensorflow/tensorflow,codrut3/tensorflow,gojira/tensorflow,JVillella/tensorflow,zasdfgbnm/tensorflow,MycChiu/tensorflow,pcm17/tensorflow,aldian/tensorflow,Carmezim/tensorflow,DavidNorman/tensorflow,krikru/tensorflow-opencl,ppwwyyxx/tensorflow,kchodorow/tensorflow,jart/tensorflow,eaplatanios/tensorflow,mrry/tensorflow,Xeralux/tensorflow,AnishShah/tensorflow,petewarden/tensorflow,jhseu/tensorflow,nolanliou/tensorflow,ychfan/tensorflow,tongwang01/tensorflow,ibmsoe/tensorflow,sjperkins/tensorflow,paolodedios/tensorflow,av8ramit/tensorflow,whn09/tensorflow,aam-at/tensorflow,Mistobaan/tensorflow,AnishShah/tensorflow,ZhangXinNan/tensorflow,calebfoss/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jart/tensorflow,HKUST-SING/tensorflow,manazhao/tf_recsys,jwlawson/tensorflow,gnieboer/tensorflow,MoamerEncsConcordiaCa/tensorflow,gunan/tensorflow,llhe/tensorflow,alsrgv/tensorflow,andrewcmyers/tensorflow,arborh/tensorflow,Moriadry/tensorflow,sandeepgupta2k4/tensorflow,anand-c-goog/tensorflow,nburn42/tensorflow,Carmezim/tensorflow,JingJunYin/tensorflow,gnieboer/tensorflow,eaplatanios/tensorflow,gibiansky/tensorflow,jbedorf/tensorflow,horance-liu/tensorflow,tensorflow/tensorflow,asimshankar/tensorflow,Carmezim/tensorflow,ageron/tensorflow,mdrumond/tensorflow,sandeepdsouza93/TensorFlow-15712,ychfan/tensorflow,with-git/tensorflow,apark263/tensorflow,MycChiu/tensorflow,freedomtan/tensorflow,suiyuan2009/tensorflow,yaroslavvb/tensorflow,HKUST-SING/tensorflow,code-sauce/tensorflow,dongjoon-hyun/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ghchinoy/tensorflow,kobejean/tensorflow,rdipietro/tensorflow,HKUST-SING/tensorflow,adit-chandra/tensorflow,sjperkins/tensorflow,ibmsoe/tensorflow,lukeiwanski/tensorflow,yufengg/tensorflow,yanchen036/tensorflow,JVillella/tensorflow,chenjun0210/tensorflow,Moriadry/tensorflow,gibiansky/tensorflow,abhitopia/tensorflow,hehongliang/tensorflow,sandeepgupta2k4/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,ppries/tensorflow,drpngx/tensorflow,kevin-coder/tensorflow-fork,brchiu/tensorflow,krikru/tensorflow-opencl,kevin-coder/tensorflow-fork,nikste/tensorflow,alheinecke/tensorflow-xsmm,cg31/tensorflow,kobejean/tensorflow,sjperkins/tensorflow,manipopopo/tensorflow,manipopopo/tensorflow,arborh/tensorflow,lakshayg/tensorflow,av8ramit/tensorflow,chenjun0210/tensorflow,jbedorf/tensorflow,allenlavoie/tensorflow,codrut3/tensorflow,dyoung418/tensorflow,anilmuthineni/tensorflow,mortada/tensorflow,DavidNorman/tensorflow,jhseu/tensorflow,thesuperzapper/tensorflow,av8ramit/tensorflow,gunan/tensorflow,manjunaths/tensorflow,raymondxyang/tensorflow,gibiansky/tensorflow,Mazecreator/tensorflow,calebfoss/tensorflow,ishay2b/tensorflow,tongwang01/tensorflow,raymondxyang/tensorflow,pierreg/tensorflow,aam-at/tensorflow,annarev/tensorflow,johndpope/tensorflow,snnn/tensorflow,odejesush/tensorflow,alistairlow/tensorflow,kobejean/tensorflow,asadziach/tensorflow,karllessard/tensorflow,jwlawson/tensorflow,alivecor/tensorflow,girving/tensorflow,ageron/tensorflow,aldian/tensorflow,XueqingLin/tensorflow,ppries/tensorflow,adamtiger/tensorflow,kevin-coder/tensorflow-fork,lakshayg/tensorflow,benoitsteiner/tensorflow,gautam1858/tensorflow,seaotterman/tensorflow,renyi533/tensorflow,ychfan/tensorflow,manjunaths/tensorflow,sjperkins/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,hfp/tensorflow-xsmm,eaplatanios/tensorflow,ArtsiomCh/tensorflow,theflofly/tensorflow,jostep/tensorflow,tomasreimers/tensorflow-emscripten,cancan101/tensorflow,ran5515/DeepDecision,XueqingLin/tensorflow,raymondxyang/tensorflow,benoitsteiner/tensorflow,hfp/tensorflow-xsmm,ville-k/tensorflow,gnieboer/tensorflow,odejesush/tensorflow,alivecor/tensorflow,adamtiger/tensorflow,asadziach/tensorflow,jendap/tensorflow,yufengg/tensorflow,alsrgv/tensorflow,tomasreimers/tensorflow-emscripten,Bismarrck/tensorflow,HKUST-SING/tensorflow,tomasreimers/tensorflow-emscripten,eadgarchen/tensorflow,dongjoon-hyun/tensorflow,sandeepdsouza93/TensorFlow-15712,anilmuthineni/tensorflow,llhe/tensorflow,a-doumoulakis/tensorflow,scenarios/tensorflow,alistairlow/tensorflow,XueqingLin/tensorflow,jeffzheng1/tensorflow,gautam1858/tensorflow,alisidd/tensorflow,jbedorf/tensorflow,SnakeJenny/TensorFlow,pcm17/tensorflow,rabipanda/tensorflow,tillahoffmann/tensorflow,elingg/tensorflow,dendisuhubdy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,JingJunYin/tensorflow,laosiaudi/tensorflow,horance-liu/tensorflow,benoitsteiner/tensorflow-xsmm,av8ramit/tensorflow,whn09/tensorflow,mortada/tensorflow,eerwitt/tensorflow,laszlocsomor/tensorflow,davidzchen/tensorflow,admcrae/tensorflow,chenjun0210/tensorflow,markslwong/tensorflow,jostep/tensorflow,Kongsea/tensorflow,hfp/tensorflow-xsmm,jhaux/tensorflow,Intel-Corporation/tensorflow,alsrgv/tensorflow,scenarios/tensorflow,neilhan/tensorflow,ibmsoe/tensorflow,sandeepdsouza93/TensorFlow-15712,ZhangXinNan/tensorflow,RapidApplicationDevelopment/tensorflow,cancan101/tensorflow,meteorcloudy/tensorflow,arborh/tensorflow,alsrgv/tensorflow,hehongliang/tensorflow,eaplatanios/tensorflow,hsaputra/tensorflow,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,kamcpp/tensorflow,anand-c-goog/tensorflow,yongtang/tensorflow,Carmezim/tensorflow,AnishShah/tensorflow,nburn42/tensorflow,DCSaunders/tensorflow,Intel-tensorflow/tensorflow,calebfoss/tensorflow,yanchen036/tensorflow,unsiloai/syntaxnet-ops-hack,unsiloai/syntaxnet-ops-hack,zycdragonball/tensorflow,jeffzheng1/tensorflow,benoitsteiner/tensorflow-opencl,ravindrapanda/tensorflow,jeffzheng1/tensorflow,lukeiwanski/tensorflow,ishay2b/tensorflow,wangyum/tensorflow,xodus7/tensorflow,mixturemodel-flow/tensorflow,adit-chandra/tensorflow,chenjun0210/tensorflow,benoitsteiner/tensorflow-opencl,benoitsteiner/tensorflow-xsmm,freedomtan/tensorflow,lakshayg/tensorflow,unsiloai/syntaxnet-ops-hack,yanchen036/tensorflow,adit-chandra/tensorflow,eaplatanios/tensorflow,Bulochkin/tensorflow_pack,allenlavoie/tensorflow,xzturn/tensorflow,manjunaths/tensorflow,seanli9jan/tensorflow,anilmuthineni/tensorflow,mrry/tensorflow,alheinecke/tensorflow-xsmm,mortada/tensorflow,nikste/tensorflow,nanditav/15712-TensorFlow,av8ramit/tensorflow,RapidApplicationDevelopment/tensorflow,kobejean/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,girving/tensorflow,maciekcc/tensorflow,tntnatbry/tensorflow,johndpope/tensorflow,jalexvig/tensorflow,aselle/tensorflow,XueqingLin/tensorflow,cg31/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,allenlavoie/tensorflow,asimshankar/tensorflow,apark263/tensorflow,sandeepdsouza93/TensorFlow-15712,jeffzheng1/tensorflow,Moriadry/tensorflow,jendap/tensorflow,zasdfgbnm/tensorflow,dongjoon-hyun/tensorflow,taknevski/tensorflow-xsmm,petewarden/tensorflow,benoitsteiner/tensorflow-xsmm,Kongsea/tensorflow,guschmue/tensorflow,nikste/tensorflow,ageron/tensorflow,xzturn/tensorflow,arborh/tensorflow,pcm17/tensorflow,cxxgtxy/tensorflow,strint/tensorflow,strint/tensorflow,alsrgv/tensorflow,Kongsea/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,nightjean/Deep-Learning,benoitsteiner/tensorflow-xsmm,admcrae/tensorflow,benoitsteiner/tensorflow-xsmm,xzturn/tensorflow,kevin-coder/tensorflow-fork,xodus7/tensorflow,alheinecke/tensorflow-xsmm,girving/tensorflow,alshedivat/tensorflow,ZhangXinNan/tensorflow,tornadozou/tensorflow,suiyuan2009/tensorflow,caisq/tensorflow,freedomtan/tensorflow,jart/tensorflow,admcrae/tensorflow,hsaputra/tensorflow,mavenlin/tensorflow,nolanliou/tensorflow,alistairlow/tensorflow,xodus7/tensorflow,eadgarchen/tensorflow,eaplatanios/tensorflow,jendap/tensorflow,yufengg/tensorflow,Bismarrck/tensorflow,eerwitt/tensorflow,lukeiwanski/tensorflow-opencl,benoitsteiner/tensorflow-opencl,johndpope/tensorflow,eaplatanios/tensorflow,laszlocsomor/tensorflow,strint/tensorflow,nburn42/tensorflow,manjunaths/tensorflow,laosiaudi/tensorflow,xzturn/tensorflow,adamtiger/tensorflow,nburn42/tensorflow,johndpope/tensorflow,Bismarrck/tensorflow,kchodorow/tensorflow,ravindrapanda/tensorflow,ravindrapanda/tensorflow,calebfoss/tensorflow,Intel-tensorflow/tensorflow,LUTAN/tensorflow,davidzchen/tensorflow,renyi533/tensorflow,maciekcc/tensorflow,brchiu/tensorflow,kchodorow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,theflofly/tensorflow,ghchinoy/tensorflow,HKUST-SING/tensorflow,thjashin/tensorflow,Moriadry/tensorflow,alisidd/tensorflow,mrry/tensorflow,kchodorow/tensorflow,petewarden/tensorflow,guschmue/tensorflow,jendap/tensorflow,chemelnucfin/tensorflow,AndreasMadsen/tensorflow,tiagofrepereira2012/tensorflow,strint/tensorflow,ville-k/tensorflow,kamcpp/tensorflow,martinwicke/tensorflow,chris-chris/tensorflow,mixturemodel-flow/tensorflow,jostep/tensorflow,allenlavoie/tensorflow,petewarden/tensorflow,whn09/tensorflow,eadgarchen/tensorflow,gnieboer/tensorflow,abhitopia/tensorflow,Xeralux/tensorflow,jbedorf/tensorflow,thesuperzapper/tensorflow,xzturn/tensorflow,eerwitt/tensorflow,wangyum/tensorflow,freedomtan/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,krikru/tensorflow-opencl,kobejean/tensorflow,Mistobaan/tensorflow,mengxn/tensorflow,wangyum/tensorflow,strint/tensorflow,caisq/tensorflow,tiagofrepereira2012/tensorflow,snnn/tensorflow,chris-chris/tensorflow,MycChiu/tensorflow,martinwicke/tensorflow,wangyum/tensorflow,rdipietro/tensorflow,martinwicke/tensorflow,ppries/tensorflow,AnishShah/tensorflow,handroissuazo/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tiagofrepereira2012/tensorflow,mavenlin/tensorflow,manjunaths/tensorflow,yongtang/tensorflow,SnakeJenny/TensorFlow,neilhan/tensorflow,drpngx/tensorflow,gojira/tensorflow,ZhangXinNan/tensorflow,Mazecreator/tensorflow,ppries/tensorflow,mengxn/tensorflow,codrut3/tensorflow,kchodorow/tensorflow,hsaputra/tensorflow,brchiu/tensorflow,gojira/tensorflow,llhe/tensorflow,snnn/tensorflow,jwlawson/tensorflow,eerwitt/tensorflow,cg31/tensorflow,AnishShah/tensorflow,jart/tensorflow,taknevski/tensorflow-xsmm,jbedorf/tensorflow,handroissuazo/tensorflow,allenlavoie/tensorflow,kamcpp/tensorflow,tensorflow/tensorflow-pywrap_saved_model,MostafaGazar/tensorflow,benoitsteiner/tensorflow,with-git/tensorflow,nolanliou/tensorflow,mengxn/tensorflow,kevin-coder/tensorflow-fork,freedomtan/tensorflow,ZhangXinNan/tensorflow,XueqingLin/tensorflow,gautam1858/tensorflow,renyi533/tensorflow,benoitsteiner/tensorflow,benoitsteiner/tensorflow,laszlocsomor/tensorflow,benoitsteiner/tensorflow-opencl,girving/tensorflow,ZhangXinNan/tensorflow,kamcpp/tensorflow,MycChiu/tensorflow,RapidApplicationDevelopment/tensorflow,tensorflow/tensorflow-pywrap_saved_model,lukeiwanski/tensorflow,scenarios/tensorflow,benoitsteiner/tensorflow-xsmm,sandeepdsouza93/TensorFlow-15712,gunan/tensorflow,taknevski/tensorflow-xsmm,av8ramit/tensorflow,mixturemodel-flow/tensorflow,tillahoffmann/tensorflow,juharris/tensorflow,thjashin/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,jart/tensorflow,Intel-tensorflow/tensorflow,anand-c-goog/tensorflow,Mazecreator/tensorflow,zycdragonball/tensorflow,HKUST-SING/tensorflow,thesuperzapper/tensorflow,renyi533/tensorflow,ran5515/DeepDecision,odejesush/tensorflow,JingJunYin/tensorflow,arborh/tensorflow,jbedorf/tensorflow,gnieboer/tensorflow,hfp/tensorflow-xsmm,meteorcloudy/tensorflow,sandeepgupta2k4/tensorflow,DavidNorman/tensorflow,jhaux/tensorflow,nikste/tensorflow,apark263/tensorflow,pcm17/tensorflow,rdipietro/tensorflow,girving/tensorflow,abhitopia/tensorflow,JVillella/tensorflow,elingg/tensorflow,brchiu/tensorflow,kobejean/tensorflow,apark263/tensorflow,sandeepgupta2k4/tensorflow,alshedivat/tensorflow,frreiss/tensorflow-fred,seanli9jan/tensorflow,lakshayg/tensorflow,mengxn/tensorflow,hehongliang/tensorflow,laosiaudi/tensorflow,elingg/tensorflow,aldian/tensorflow,paolodedios/tensorflow,adamtiger/tensorflow,handroissuazo/tensorflow,tntnatbry/tensorflow,adit-chandra/tensorflow,Xeralux/tensorflow,Intel-tensorflow/tensorflow,tntnatbry/tensorflow,Mazecreator/tensorflow,jart/tensorflow,cxxgtxy/tensorflow,Bulochkin/tensorflow_pack,laosiaudi/tensorflow,seanli9jan/tensorflow,alisidd/tensorflow,snnn/tensorflow,ghchinoy/tensorflow,jbedorf/tensorflow,sandeepgupta2k4/tensorflow,chemelnucfin/tensorflow,nolanliou/tensorflow,MoamerEncsConcordiaCa/tensorflow,bowang/tensorflow,frreiss/tensorflow-fred,meteorcloudy/tensorflow,scenarios/tensorflow,alistairlow/tensorflow,Mistobaan/tensorflow,taknevski/tensorflow-xsmm,theflofly/tensorflow,rabipanda/tensorflow,ville-k/tensorflow,brchiu/tensorflow,frreiss/tensorflow-fred,sjperkins/tensorflow,gibiansky/tensorflow,suiyuan2009/tensorflow,paolodedios/tensorflow,mortada/tensorflow,horance-liu/tensorflow,gunan/tensorflow,AnishShah/tensorflow,laszlocsomor/tensorflow,dongjoon-hyun/tensorflow,alistairlow/tensorflow,Bulochkin/tensorflow_pack,lukeiwanski/tensorflow,haeusser/tensorflow,xodus7/tensorflow,jhseu/tensorflow,cxxgtxy/tensorflow,mavenlin/tensorflow,alivecor/tensorflow,ibmsoe/tensorflow,tomasreimers/tensorflow-emscripten,dancingdan/tensorflow,elingg/tensorflow,yongtang/tensorflow,cancan101/tensorflow,asimshankar/tensorflow,seanli9jan/tensorflow,lukeiwanski/tensorflow,davidzchen/tensorflow,asimshankar/tensorflow,jostep/tensorflow,MoamerEncsConcordiaCa/tensorflow,llhe/tensorflow,karllessard/tensorflow,zycdragonball/tensorflow,DavidNorman/tensorflow,freedomtan/tensorflow,manipopopo/tensorflow,ran5515/DeepDecision,markslwong/tensorflow,dendisuhubdy/tensorflow,aldian/tensorflow,Bulochkin/tensorflow_pack,alisidd/tensorflow,eadgarchen/tensorflow,unsiloai/syntaxnet-ops-hack,dancingdan/tensorflow,paolodedios/tensorflow,MostafaGazar/tensorflow,cancan101/tensorflow,tillahoffmann/tensorflow,meteorcloudy/tensorflow,av8ramit/tensorflow,eerwitt/tensorflow,ibmsoe/tensorflow,cg31/tensorflow,mortada/tensorflow,pavelchristof/gomoku-ai,DavidNorman/tensorflow,jalexvig/tensorflow,hfp/tensorflow-xsmm,lukeiwanski/tensorflow,zasdfgbnm/tensorflow,anilmuthineni/tensorflow,gibiansky/tensorflow,AndreasMadsen/tensorflow,haeusser/tensorflow,xodus7/tensorflow,Kongsea/tensorflow,karllessard/tensorflow,alisidd/tensorflow,apark263/tensorflow,AnishShah/tensorflow,MostafaGazar/tensorflow,zycdragonball/tensorflow,benoitsteiner/tensorflow-xsmm,kobejean/tensorflow,tillahoffmann/tensorflow,zycdragonball/tensorflow,karllessard/tensorflow,yanchen036/tensorflow,vrv/tensorflow,yongtang/tensorflow,freedomtan/tensorflow,ppries/tensorflow,seaotterman/tensorflow,lakshayg/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,seaotterman/tensorflow,dyoung418/tensorflow,chemelnucfin/tensorflow,manipopopo/tensorflow,jhseu/tensorflow,tensorflow/tensorflow,jbedorf/tensorflow,DCSaunders/tensorflow,whn09/tensorflow,taknevski/tensorflow-xsmm,DavidNorman/tensorflow,alshedivat/tensorflow,jwlawson/tensorflow,guschmue/tensorflow,gautam1858/tensorflow,alshedivat/tensorflow,ville-k/tensorflow,ArtsiomCh/tensorflow,XueqingLin/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,eerwitt/tensorflow,alsrgv/tensorflow,ravindrapanda/tensorflow,andrewcmyers/tensorflow,anilmuthineni/tensorflow,benoitsteiner/tensorflow,caisq/tensorflow,rdipietro/tensorflow,kevin-coder/tensorflow-fork,Intel-Corporation/tensorflow,yufengg/tensorflow,MoamerEncsConcordiaCa/tensorflow,arborh/tensorflow,apark263/tensorflow,jart/tensorflow,neilhan/tensorflow,abhitopia/tensorflow,thjashin/tensorflow,davidzchen/tensorflow,sandeepgupta2k4/tensorflow,Mistobaan/tensorflow,aam-at/tensorflow,guschmue/tensorflow,xodus7/tensorflow,MostafaGazar/tensorflow,asadziach/tensorflow,cxxgtxy/tensorflow,dongjoon-hyun/tensorflow,alheinecke/tensorflow-xsmm,asimshankar/tensorflow,scenarios/tensorflow,kevin-coder/tensorflow-fork,tornadozou/tensorflow,nanditav/15712-TensorFlow,annarev/tensorflow,kamcpp/tensorflow,ibmsoe/tensorflow,nolanliou/tensorflow,codrut3/tensorflow,pierreg/tensorflow,HKUST-SING/tensorflow,manazhao/tf_recsys,odejesush/tensorflow,xzturn/tensorflow,aldian/tensorflow,lukeiwanski/tensorflow,yufengg/tensorflow,ville-k/tensorflow,markslwong/tensorflow,tornadozou/tensorflow,tensorflow/tensorflow,alsrgv/tensorflow,nburn42/tensorflow,SnakeJenny/TensorFlow,Intel-Corporation/tensorflow,chemelnucfin/tensorflow,tillahoffmann/tensorflow,Kongsea/tensorflow,jhseu/tensorflow,jhseu/tensorflow,manipopopo/tensorflow,tensorflow/tensorflow,tornadozou/tensorflow,yaroslavvb/tensorflow,seanli9jan/tensorflow,alshedivat/tensorflow,tornadozou/tensorflow,gibiansky/tensorflow,taknevski/tensorflow-xsmm,ran5515/DeepDecision,odejesush/tensorflow,sjperkins/tensorflow,laosiaudi/tensorflow,snnn/tensorflow,gojira/tensorflow,paolodedios/tensorflow,ghchinoy/tensorflow,memo/tensorflow,vrv/tensorflow,krikru/tensorflow-opencl,AnishShah/tensorflow,thesuperzapper/tensorflow,frreiss/tensorflow-fred,krikru/tensorflow-opencl,Bulochkin/tensorflow_pack,annarev/tensorflow,davidzchen/tensorflow,aldian/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gojira/tensorflow,bowang/tensorflow,chris-chris/tensorflow,ageron/tensorflow,johndpope/tensorflow,nburn42/tensorflow,DCSaunders/tensorflow,krikru/tensorflow-opencl,tillahoffmann/tensorflow,lukeiwanski/tensorflow,thesuperzapper/tensorflow,thjashin/tensorflow,meteorcloudy/tensorflow,pavelchristof/gomoku-ai,gojira/tensorflow,LUTAN/tensorflow,wangyum/tensorflow,llhe/tensorflow,nightjean/Deep-Learning,ageron/tensorflow,MoamerEncsConcordiaCa/tensorflow,aselle/tensorflow,meteorcloudy/tensorflow,tongwang01/tensorflow,memo/tensorflow,brchiu/tensorflow,juharris/tensorflow,Kongsea/tensorflow,LUTAN/tensorflow,whn09/tensorflow,ville-k/tensorflow,vrv/tensorflow,ibmsoe/tensorflow,JingJunYin/tensorflow,benoitsteiner/tensorflow,xzturn/tensorflow,kobejean/tensorflow,taknevski/tensorflow-xsmm,MoamerEncsConcordiaCa/tensorflow,xodus7/tensorflow,frreiss/tensorflow-fred,ravindrapanda/tensorflow,yaroslavvb/tensorflow,hfp/tensorflow-xsmm,benoitsteiner/tensorflow-xsmm,laszlocsomor/tensorflow,petewarden/tensorflow,jalexvig/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,jendap/tensorflow,manazhao/tf_recsys,martinwicke/tensorflow,Intel-Corporation/tensorflow,code-sauce/tensorflow,jwlawson/tensorflow,elingg/tensorflow,nburn42/tensorflow,girving/tensorflow,yufengg/tensorflow,juharris/tensorflow,martinwicke/tensorflow,AnishShah/tensorflow,aselle/tensorflow,ychfan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,vrv/tensorflow,whn09/tensorflow,Intel-tensorflow/tensorflow,pavelchristof/gomoku-ai,jwlawson/tensorflow,RapidApplicationDevelopment/tensorflow,jbedorf/tensorflow,codrut3/tensorflow,ZhangXinNan/tensorflow,tomasreimers/tensorflow-emscripten,tillahoffmann/tensorflow,johndpope/tensorflow,jalexvig/tensorflow,haeusser/tensorflow,annarev/tensorflow,mortada/tensorflow,hfp/tensorflow-xsmm,elingg/tensorflow,Mistobaan/tensorflow,scenarios/tensorflow,pierreg/tensorflow,sandeepdsouza93/TensorFlow-15712,rdipietro/tensorflow,pierreg/tensorflow,karllessard/tensorflow,codrut3/tensorflow,horance-liu/tensorflow,adamtiger/tensorflow,asadziach/tensorflow,bowang/tensorflow,ville-k/tensorflow,a-doumoulakis/tensorflow,jbedorf/tensorflow,arborh/tensorflow,odejesush/tensorflow,ghchinoy/tensorflow,ageron/tensorflow,nanditav/15712-TensorFlow,anand-c-goog/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,theflofly/tensorflow,horance-liu/tensorflow,johndpope/tensorflow,ArtsiomCh/tensorflow,benoitsteiner/tensorflow,freedomtan/tensorflow,laszlocsomor/tensorflow,theflofly/tensorflow,admcrae/tensorflow,rdipietro/tensorflow,hehongliang/tensorflow,tensorflow/tensorflow,dendisuhubdy/tensorflow,annarev/tensorflow,tntnatbry/tensorflow,Intel-Corporation/tensorflow,AndreasMadsen/tensorflow,dyoung418/tensorflow,johndpope/tensorflow,eadgarchen/tensorflow,unsiloai/syntaxnet-ops-hack,Mazecreator/tensorflow,benoitsteiner/tensorflow-opencl,ppries/tensorflow,MycChiu/tensorflow,chenjun0210/tensorflow,hsaputra/tensorflow,manipopopo/tensorflow,dancingdan/tensorflow,renyi533/tensorflow,caisq/tensorflow,a-doumoulakis/tensorflow,hsaputra/tensorflow,caisq/tensorflow,gunan/tensorflow,yanchen036/tensorflow,guschmue/tensorflow,renyi533/tensorflow,aselle/tensorflow,yaroslavvb/tensorflow,DCSaunders/tensorflow,seaotterman/tensorflow,yanchen036/tensorflow,aselle/tensorflow,mdrumond/tensorflow,adit-chandra/tensorflow,jhaux/tensorflow,aam-at/tensorflow,manazhao/tf_recsys,pavelchristof/gomoku-ai,renyi533/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,arborh/tensorflow,tensorflow/tensorflow,markslwong/tensorflow,theflofly/tensorflow,nolanliou/tensorflow,mdrumond/tensorflow,AndreasMadsen/tensorflow,ishay2b/tensorflow,manipopopo/tensorflow,nburn42/tensorflow,Bismarrck/tensorflow,jhseu/tensorflow,sandeepdsouza93/TensorFlow-15712,unsiloai/syntaxnet-ops-hack,neilhan/tensorflow,mavenlin/tensorflow,haeusser/tensorflow,gojira/tensorflow,ZhangXinNan/tensorflow,dendisuhubdy/tensorflow,aam-at/tensorflow,lukeiwanski/tensorflow,manjunaths/tensorflow,aselle/tensorflow,dendisuhubdy/tensorflow,chemelnucfin/tensorflow,benoitsteiner/tensorflow-opencl,neilhan/tensorflow,jhseu/tensorflow,dendisuhubdy/tensorflow,admcrae/tensorflow,sarvex/tensorflow,calebfoss/tensorflow,yaroslavvb/tensorflow,LUTAN/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,calebfoss/tensorflow,anand-c-goog/tensorflow,ville-k/tensorflow,zasdfgbnm/tensorflow,nolanliou/tensorflow,aam-at/tensorflow,annarev/tensorflow,gunan/tensorflow,xodus7/tensorflow,snnn/tensorflow,aam-at/tensorflow,petewarden/tensorflow,eerwitt/tensorflow,LUTAN/tensorflow,ppries/tensorflow,Mistobaan/tensorflow,karllessard/tensorflow,dyoung418/tensorflow,Bismarrck/tensorflow,seanli9jan/tensorflow,lukeiwanski/tensorflow-opencl,nanditav/15712-TensorFlow,johndpope/tensorflow,with-git/tensorflow,abhitopia/tensorflow,paolodedios/tensorflow,nanditav/15712-TensorFlow,mixturemodel-flow/tensorflow,neilhan/tensorflow,ychfan/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,code-sauce/tensorflow,rabipanda/tensorflow,RapidApplicationDevelopment/tensorflow,jostep/tensorflow,LUTAN/tensorflow,lakshayg/tensorflow,juharris/tensorflow,jhaux/tensorflow,tiagofrepereira2012/tensorflow,Mazecreator/tensorflow,tntnatbry/tensorflow,frreiss/tensorflow-fred,theflofly/tensorflow,girving/tensorflow,jwlawson/tensorflow,aselle/tensorflow,ageron/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,LUTAN/tensorflow,ychfan/tensorflow,suiyuan2009/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,Mazecreator/tensorflow,guschmue/tensorflow,mavenlin/tensorflow,jhseu/tensorflow,vrv/tensorflow,ville-k/tensorflow,karllessard/tensorflow,mengxn/tensorflow,wangyum/tensorflow,unsiloai/syntaxnet-ops-hack,seanli9jan/tensorflow,anand-c-goog/tensorflow,horance-liu/tensorflow,alsrgv/tensorflow,tongwang01/tensorflow,MoamerEncsConcordiaCa/tensorflow,nightjean/Deep-Learning,dongjoon-hyun/tensorflow,tensorflow/tensorflow-pywrap_saved_model,kobejean/tensorflow,pcm17/tensorflow,karllessard/tensorflow,andrewcmyers/tensorflow,ravindrapanda/tensorflow,alsrgv/tensorflow,Carmezim/tensorflow,dongjoon-hyun/tensorflow,MoamerEncsConcordiaCa/tensorflow,sarvex/tensorflow,zasdfgbnm/tensorflow,tomasreimers/tensorflow-emscripten,Bismarrck/tensorflow,abhitopia/tensorflow,thesuperzapper/tensorflow,girving/tensorflow,AndreasMadsen/tensorflow,DavidNorman/tensorflow,eadgarchen/tensorflow,ravindrapanda/tensorflow,renyi533/tensorflow,llhe/tensorflow,asimshankar/tensorflow,raymondxyang/tensorflow,jostep/tensorflow,raymondxyang/tensorflow,mortada/tensorflow,dancingdan/tensorflow,jalexvig/tensorflow,a-doumoulakis/tensorflow,renyi533/tensorflow,AndreasMadsen/tensorflow,XueqingLin/tensorflow,ZhangXinNan/tensorflow,hsaputra/tensorflow,ppwwyyxx/tensorflow,chenjun0210/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jwlawson/tensorflow,petewarden/tensorflow,rdipietro/tensorflow,alisidd/tensorflow,nightjean/Deep-Learning,annarev/tensorflow,jhaux/tensorflow,ran5515/DeepDecision,jeffzheng1/tensorflow,gunan/tensorflow,DavidNorman/tensorflow,ppwwyyxx/tensorflow,gautam1858/tensorflow,maciekcc/tensorflow,maciekcc/tensorflow,lukeiwanski/tensorflow-opencl,tensorflow/tensorflow,HKUST-SING/tensorflow,anilmuthineni/tensorflow,eaplatanios/tensorflow,mdrumond/tensorflow,raymondxyang/tensorflow,renyi533/tensorflow,MycChiu/tensorflow,xodus7/tensorflow,seanli9jan/tensorflow,Bulochkin/tensorflow_pack,juharris/tensorflow,ppwwyyxx/tensorflow,mengxn/tensorflow,gnieboer/tensorflow,ran5515/DeepDecision,neilhan/tensorflow,gnieboer/tensorflow,dendisuhubdy/tensorflow,odejesush/tensorflow,tomasreimers/tensorflow-emscripten,caisq/tensorflow,tntnatbry/tensorflow,thjashin/tensorflow,nanditav/15712-TensorFlow,Bulochkin/tensorflow_pack,paolodedios/tensorflow,JingJunYin/tensorflow,strint/tensorflow,XueqingLin/tensorflow,chenjun0210/tensorflow,apark263/tensorflow,chemelnucfin/tensorflow,xzturn/tensorflow,kamcpp/tensorflow,DCSaunders/tensorflow,zasdfgbnm/tensorflow,snnn/tensorflow,llhe/tensorflow,manipopopo/tensorflow,whn09/tensorflow,hfp/tensorflow-xsmm,Mistobaan/tensorflow,RapidApplicationDevelopment/tensorflow,sandeepgupta2k4/tensorflow,hfp/tensorflow-xsmm,code-sauce/tensorflow,suiyuan2009/tensorflow,benoitsteiner/tensorflow-opencl,allenlavoie/tensorflow,jeffzheng1/tensorflow,adit-chandra/tensorflow,eadgarchen/tensorflow,jart/tensorflow,adit-chandra/tensorflow,JVillella/tensorflow,vrv/tensorflow,frreiss/tensorflow-fred,horance-liu/tensorflow,jalexvig/tensorflow,brchiu/tensorflow,mengxn/tensorflow,thjashin/tensorflow,bowang/tensorflow,av8ramit/tensorflow,mrry/tensorflow,aldian/tensorflow,HKUST-SING/tensorflow,dancingdan/tensorflow,adit-chandra/tensorflow,LUTAN/tensorflow,seaotterman/tensorflow,manipopopo/tensorflow,Bismarrck/tensorflow,mixturemodel-flow/tensorflow,av8ramit/tensorflow,zycdragonball/tensorflow,MostafaGazar/tensorflow,andrewcmyers/tensorflow,dancingdan/tensorflow,tntnatbry/tensorflow,ychfan/tensorflow,MycChiu/tensorflow,allenlavoie/tensorflow,ghchinoy/tensorflow,cg31/tensorflow,ppwwyyxx/tensorflow,tillahoffmann/tensorflow,gunan/tensorflow,dancingdan/tensorflow,wangyum/tensorflow,code-sauce/tensorflow,tiagofrepereira2012/tensorflow,DavidNorman/tensorflow,DCSaunders/tensorflow,ArtsiomCh/tensorflow,alshedivat/tensorflow,gibiansky/tensorflow,manjunaths/tensorflow,nolanliou/tensorflow,MostafaGazar/tensorflow,llhe/tensorflow,frreiss/tensorflow-fred,nolanliou/tensorflow,horance-liu/tensorflow,mrry/tensorflow,alistairlow/tensorflow,cancan101/tensorflow,calebfoss/tensorflow,aselle/tensorflow,bowang/tensorflow,unsiloai/syntaxnet-ops-hack,alivecor/tensorflow,arborh/tensorflow,yongtang/tensorflow,JVillella/tensorflow,laosiaudi/tensorflow,apark263/tensorflow,benoitsteiner/tensorflow-opencl,chris-chris/tensorflow,aldian/tensorflow,martinwicke/tensorflow,davidzchen/tensorflow,dancingdan/tensorflow,meteorcloudy/tensorflow,apark263/tensorflow,pcm17/tensorflow,chris-chris/tensorflow,jalexvig/tensorflow,jendap/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,neilhan/tensorflow,mrry/tensorflow,AndreasMadsen/tensorflow,alsrgv/tensorflow,aselle/tensorflow,sjperkins/tensorflow,nikste/tensorflow,sarvex/tensorflow,hehongliang/tensorflow,horance-liu/tensorflow,raymondxyang/tensorflow,MycChiu/tensorflow,jhaux/tensorflow,gautam1858/tensorflow,AnishShah/tensorflow,chemelnucfin/tensorflow,SnakeJenny/TensorFlow,andrewcmyers/tensorflow,pcm17/tensorflow,laosiaudi/tensorflow,laszlocsomor/tensorflow,martinwicke/tensorflow,abhitopia/tensorflow,meteorcloudy/tensorflow,Intel-Corporation/tensorflow,DavidNorman/tensorflow,jendap/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Bismarrck/tensorflow,guschmue/tensorflow,zasdfgbnm/tensorflow,pcm17/tensorflow,mixturemodel-flow/tensorflow,haeusser/tensorflow,apark263/tensorflow,ychfan/tensorflow,adit-chandra/tensorflow,drpngx/tensorflow,seaotterman/tensorflow,hfp/tensorflow-xsmm,pavelchristof/gomoku-ai,bowang/tensorflow,horance-liu/tensorflow,alivecor/tensorflow,pierreg/tensorflow,freedomtan/tensorflow,zasdfgbnm/tensorflow,ppwwyyxx/tensorflow,RapidApplicationDevelopment/tensorflow,snnn/tensorflow,sarvex/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,yongtang/tensorflow,scenarios/tensorflow,strint/tensorflow,Xeralux/tensorflow,meteorcloudy/tensorflow,lukeiwanski/tensorflow-opencl,nanditav/15712-TensorFlow,mdrumond/tensorflow,Xeralux/tensorflow,sjperkins/tensorflow,yufengg/tensorflow,ghchinoy/tensorflow,rdipietro/tensorflow,Xeralux/tensorflow,dendisuhubdy/tensorflow,Carmezim/tensorflow,laszlocsomor/tensorflow,DCSaunders/tensorflow,arborh/tensorflow,DCSaunders/tensorflow,benoitsteiner/tensorflow-xsmm,caisq/tensorflow,gautam1858/tensorflow,kchodorow/tensorflow,maciekcc/tensorflow,adit-chandra/tensorflow,LUTAN/tensorflow,mrry/tensorflow,jendap/tensorflow,gautam1858/tensorflow,alistairlow/tensorflow,alheinecke/tensorflow-xsmm,rabipanda/tensorflow,maciekcc/tensorflow,JingJunYin/tensorflow,xzturn/tensorflow,sandeepdsouza93/TensorFlow-15712,Moriadry/tensorflow,mengxn/tensorflow,memo/tensorflow,juharris/tensorflow,tiagofrepereira2012/tensorflow,kobejean/tensorflow,Mistobaan/tensorflow,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,caisq/tensorflow,hsaputra/tensorflow,sarvex/tensorflow,ZhangXinNan/tensorflow,hfp/tensorflow-xsmm,Kongsea/tensorflow,xodus7/tensorflow,tornadozou/tensorflow,haeusser/tensorflow,ville-k/tensorflow,benoitsteiner/tensorflow-opencl,eaplatanios/tensorflow,jeffzheng1/tensorflow,ishay2b/tensorflow,mrry/tensorflow,gojira/tensorflow,lukeiwanski/tensorflow-opencl,memo/tensorflow,ageron/tensorflow,eerwitt/tensorflow,davidzchen/tensorflow,chris-chris/tensorflow,handroissuazo/tensorflow,ishay2b/tensorflow,jalexvig/tensorflow,Xeralux/tensorflow,taknevski/tensorflow-xsmm,nikste/tensorflow,adit-chandra/tensorflow,manazhao/tf_recsys,chris-chris/tensorflow,sarvex/tensorflow,drpngx/tensorflow,nightjean/Deep-Learning,jart/tensorflow,admcrae/tensorflow,hsaputra/tensorflow,nikste/tensorflow,whn09/tensorflow,guschmue/tensorflow,elingg/tensorflow,MostafaGazar/tensorflow,strint/tensorflow,rdipietro/tensorflow,scenarios/tensorflow,adamtiger/tensorflow,cxxgtxy/tensorflow,sarvex/tensorflow,anilmuthineni/tensorflow,Xeralux/tensorflow,kchodorow/tensorflow,ppwwyyxx/tensorflow,drpngx/tensorflow,Moriadry/tensorflow,yaroslavvb/tensorflow,kevin-coder/tensorflow-fork,mortada/tensorflow,andrewcmyers/tensorflow,abhitopia/tensorflow,hsaputra/tensorflow,ravindrapanda/tensorflow,alheinecke/tensorflow-xsmm,Kongsea/tensorflow,tensorflow/tensorflow-pywrap_saved_model,juharris/tensorflow,a-doumoulakis/tensorflow,Moriadry/tensorflow,codrut3/tensorflow,lakshayg/tensorflow,alshedivat/tensorflow,petewarden/tensorflow,tornadozou/tensorflow,aam-at/tensorflow,ppries/tensorflow,laszlocsomor/tensorflow,with-git/tensorflow,gunan/tensorflow,markslwong/tensorflow,maciekcc/tensorflow,rabipanda/tensorflow,rabipanda/tensorflow,theflofly/tensorflow,Xeralux/tensorflow,thjashin/tensorflow,thesuperzapper/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,chemelnucfin/tensorflow,odejesush/tensorflow,thesuperzapper/tensorflow,gibiansky/tensorflow,mdrumond/tensorflow,jostep/tensorflow,adit-chandra/tensorflow,jhaux/tensorflow,tomasreimers/tensorflow-emscripten,benoitsteiner/tensorflow,mdrumond/tensorflow,handroissuazo/tensorflow,markslwong/tensorflow,aselle/tensorflow,jwlawson/tensorflow,mdrumond/tensorflow,handroissuazo/tensorflow,jendap/tensorflow,cancan101/tensorflow,admcrae/tensorflow,annarev/tensorflow,anand-c-goog/tensorflow,alivecor/tensorflow,caisq/tensorflow,alshedivat/tensorflow,memo/tensorflow,wangyum/tensorflow,SnakeJenny/TensorFlow,tensorflow/tensorflow-experimental_link_static_libraries_once,chemelnucfin/tensorflow,bowang/tensorflow,neilhan/tensorflow,ibmsoe/tensorflow,jeffzheng1/tensorflow,sjperkins/tensorflow,guschmue/tensorflow,nanditav/15712-TensorFlow,nburn42/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,snnn/tensorflow,ghchinoy/tensorflow,RapidApplicationDevelopment/tensorflow,kevin-coder/tensorflow-fork,allenlavoie/tensorflow,a-doumoulakis/tensorflow,alistairlow/tensorflow,drpngx/tensorflow,jwlawson/tensorflow,thjashin/tensorflow,tongwang01/tensorflow,manjunaths/tensorflow,ppwwyyxx/tensorflow,odejesush/tensorflow,manipopopo/tensorflow,alisidd/tensorflow,admcrae/tensorflow,freedomtan/tensorflow,apark263/tensorflow,allenlavoie/tensorflow,lukeiwanski/tensorflow-opencl,haeusser/tensorflow,frreiss/tensorflow-fred,mavenlin/tensorflow,jhseu/tensorflow,dancingdan/tensorflow,JingJunYin/tensorflow,manjunaths/tensorflow,jhseu/tensorflow,drpngx/tensorflow,Carmezim/tensorflow,jart/tensorflow,annarev/tensorflow,alsrgv/tensorflow,kchodorow/tensorflow,llhe/tensorflow,anand-c-goog/tensorflow,jendap/tensorflow,asimshankar/tensorflow,ageron/tensorflow,nightjean/Deep-Learning,sandeepgupta2k4/tensorflow,dyoung418/tensorflow,nburn42/tensorflow,whn09/tensorflow,zasdfgbnm/tensorflow,Bismarrck/tensorflow,yongtang/tensorflow,allenlavoie/tensorflow,handroissuazo/tensorflow,krikru/tensorflow-opencl,nikste/tensorflow,ArtsiomCh/tensorflow,llhe/tensorflow,vrv/tensorflow,rabipanda/tensorflow,Intel-tensorflow/tensorflow,SnakeJenny/TensorFlow,Bismarrck/tensorflow,anand-c-goog/tensorflow,handroissuazo/tensorflow,AndreasMadsen/tensorflow,jalexvig/tensorflow,allenlavoie/tensorflow,mixturemodel-flow/tensorflow,martinwicke/tensorflow,dyoung418/tensorflow,DCSaunders/tensorflow | ---
+++
@@ -1,3 +1,17 @@
+/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
+
+Licensed under the Apache License, Version 2.0 (the 'License');
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an 'AS IS' BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
declare function stub(el: string, obj: any): void;
describe('audio dashboard tests', function() { |
d82b051383984e19d79e833689848d9298e10c3d | app/src/ui/history/commit-list-item.tsx | app/src/ui/history/commit-list-item.tsx | import * as React from 'react'
import * as moment from 'moment'
import { Commit } from '../../lib/local-git-operations'
import { EmojiText } from '../lib/emoji-text'
const DefaultAvatarURL = 'https://github.com/hubot.png'
interface ICommitProps {
readonly commit: Commit
readonly avatarURL: string | null
readonly emoji: Map<string, string>
}
/** A component which displays a single commit in a commit list. */
export class CommitListItem extends React.Component<ICommitProps, void> {
public render() {
const relative = moment(this.props.commit.authorDate).fromNow()
const avatarURL = this.props.avatarURL || DefaultAvatarURL
return (
<div className='commit'>
<img className='avatar' src={avatarURL}/>
<div className='info'>
<EmojiText className='summary' emoji={this.props.emoji}>{this.props.commit.summary}</EmojiText>
<div className='byline' title={this.props.commit.authorDate.toString()}>{relative} by {this.props.commit.authorName}</div>
</div>
</div>
)
}
public shouldComponentUpdate(nextProps: ICommitProps, nextState: void): boolean {
return (
this.props.commit.sha !== nextProps.commit.sha ||
this.props.avatarURL !== nextProps.avatarURL
)
}
}
| import * as React from 'react'
import { Commit } from '../../lib/local-git-operations'
import { EmojiText } from '../lib/emoji-text'
import { RelativeTime } from '../relative-time'
const DefaultAvatarURL = 'https://github.com/hubot.png'
interface ICommitProps {
readonly commit: Commit
readonly avatarURL: string | null
readonly emoji: Map<string, string>
}
/** A component which displays a single commit in a commit list. */
export class CommitListItem extends React.Component<ICommitProps, void> {
public render() {
const authorDate = this.props.commit.authorDate
const avatarURL = this.props.avatarURL || DefaultAvatarURL
return (
<div className='commit'>
<img className='avatar' src={avatarURL}/>
<div className='info'>
<EmojiText className='summary' emoji={this.props.emoji}>{this.props.commit.summary}</EmojiText>
<div className='byline' title={this.props.commit.authorDate.toString()}>
<RelativeTime date={authorDate} /> by {this.props.commit.authorName}
</div>
</div>
</div>
)
}
public shouldComponentUpdate(nextProps: ICommitProps, nextState: void): boolean {
return (
this.props.commit.sha !== nextProps.commit.sha ||
this.props.avatarURL !== nextProps.avatarURL
)
}
}
| Use relative time compoenent in commit list | Use relative time compoenent in commit list
| TypeScript | mit | BugTesterTest/desktops,shiftkey/desktop,artivilla/desktop,kactus-io/kactus,artivilla/desktop,kactus-io/kactus,gengjiawen/desktop,hjobrien/desktop,say25/desktop,hjobrien/desktop,BugTesterTest/desktops,j-f1/forked-desktop,BugTesterTest/desktops,hjobrien/desktop,desktop/desktop,shiftkey/desktop,shiftkey/desktop,desktop/desktop,say25/desktop,desktop/desktop,j-f1/forked-desktop,desktop/desktop,kactus-io/kactus,say25/desktop,artivilla/desktop,hjobrien/desktop,artivilla/desktop,j-f1/forked-desktop,gengjiawen/desktop,BugTesterTest/desktops,j-f1/forked-desktop,say25/desktop,gengjiawen/desktop,kactus-io/kactus,shiftkey/desktop,gengjiawen/desktop | ---
+++
@@ -1,7 +1,7 @@
import * as React from 'react'
-import * as moment from 'moment'
import { Commit } from '../../lib/local-git-operations'
import { EmojiText } from '../lib/emoji-text'
+import { RelativeTime } from '../relative-time'
const DefaultAvatarURL = 'https://github.com/hubot.png'
@@ -14,14 +14,16 @@
/** A component which displays a single commit in a commit list. */
export class CommitListItem extends React.Component<ICommitProps, void> {
public render() {
- const relative = moment(this.props.commit.authorDate).fromNow()
+ const authorDate = this.props.commit.authorDate
const avatarURL = this.props.avatarURL || DefaultAvatarURL
return (
<div className='commit'>
<img className='avatar' src={avatarURL}/>
<div className='info'>
<EmojiText className='summary' emoji={this.props.emoji}>{this.props.commit.summary}</EmojiText>
- <div className='byline' title={this.props.commit.authorDate.toString()}>{relative} by {this.props.commit.authorName}</div>
+ <div className='byline' title={this.props.commit.authorDate.toString()}>
+ <RelativeTime date={authorDate} /> by {this.props.commit.authorName}
+ </div>
</div>
</div>
) |
872eb62950280497c54b71cca50f8f31bc1c7959 | app_client/app/providers/api-service.ts | app_client/app/providers/api-service.ts | import { Http, Headers, RequestOptions } from '@angular/http';
import { tokenNotExpired, JwtHelper } from 'angular2-jwt';
import { Storage, LocalStorage } from 'ionic-angular';
export class ApiService {
protected baseApiUrl: string = "/";
protected storage: Storage;
constructor() {
this.storage = new Storage(LocalStorage);
}
protected defaultRequestOptions(): RequestOptions {
let headers = new Headers({ 'Content-Type': 'application/json' });
this.checkAuthstatus(headers);
let options = new RequestOptions({ headers: headers });
return options;
}
private checkAuthstatus(headers: Headers): Headers {
if (tokenNotExpired()) {
let token = localStorage.getItem('id_token');
headers.append('Authorization', `JWT ${token}`);
}
return headers;
}
}
| import { Http, Headers, RequestOptions } from '@angular/http';
import { tokenNotExpired, JwtHelper } from 'angular2-jwt';
import { Storage, LocalStorage } from 'ionic-angular';
export class ApiService {
protected baseApiUrl: string = "";
protected storage: Storage;
constructor() {
this.storage = new Storage(LocalStorage);
}
protected defaultRequestOptions(): RequestOptions {
let headers = new Headers({ 'Content-Type': 'application/json' });
this.checkAuthstatus(headers);
let options = new RequestOptions({ headers: headers });
return options;
}
private checkAuthstatus(headers: Headers): Headers {
if (tokenNotExpired()) {
let token = localStorage.getItem('id_token');
headers.append('Authorization', `JWT ${token}`);
}
return headers;
}
}
| FIX url for api service | FIX url for api service
| TypeScript | mit | clervens/mean-stack-example,clervens/mean-stack-example,clervens/mean-stack-example,clervens/mean-stack-example | ---
+++
@@ -3,7 +3,7 @@
import { Storage, LocalStorage } from 'ionic-angular';
export class ApiService {
- protected baseApiUrl: string = "/";
+ protected baseApiUrl: string = "";
protected storage: Storage;
constructor() { |
8f23700d8ec22e5ec899e09928110007a4664050 | lib/theming/src/utils.ts | lib/theming/src/utils.ts | import { rgba, lighten, darken } from 'polished';
export const mkColor = (color: string) => ({ color });
// Passing arguments that can't be converted to RGB such as linear-gradient
// to library polished's functions such as lighten or darken throws the error
// that crashes the entire storybook. It needs to be guarded when arguments
// of those functions are from user input.
const isLinearGradient = (color: string) => {
return typeof color === 'string' && color.includes('linear-gradient');
};
const colorFactory = (type: string) => (color: string) => {
if (type === 'darken') {
return isLinearGradient(color) ? color : rgba(`${darken(1, color)}`, 0.95);
}
if (type === 'lighten') {
return isLinearGradient(color) ? color : rgba(`${lighten(1, color)}`, 0.95);
}
return color;
};
export const lightenColor = colorFactory('lighten');
export const darkenColor = colorFactory('darken');
| import { rgba, lighten, darken } from 'polished';
export const mkColor = (color: string) => ({ color });
// Passing arguments that can't be converted to RGB such as linear-gradient
// to library polished's functions such as lighten or darken throws the error
// that crashes the entire storybook. It needs to be guarded when arguments
// of those functions are from user input.
const isColorVarChangeable = (color: string) => {
return !!color.match(/(gradient|var)/);
};
const colorFactory = (type: string) => (color: string) => {
if (type === 'darken') {
return isColorVarChangeable(color) ? color : rgba(`${darken(1, color)}`, 0.95);
}
if (type === 'lighten') {
return isColorVarChangeable(color) ? color : rgba(`${lighten(1, color)}`, 0.95);
}
return color;
};
export const lightenColor = colorFactory('lighten');
export const darkenColor = colorFactory('darken');
| Change guarding functions for broader cases | Change guarding functions for broader cases
| TypeScript | mit | kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook | ---
+++
@@ -6,17 +6,17 @@
// to library polished's functions such as lighten or darken throws the error
// that crashes the entire storybook. It needs to be guarded when arguments
// of those functions are from user input.
-const isLinearGradient = (color: string) => {
- return typeof color === 'string' && color.includes('linear-gradient');
+const isColorVarChangeable = (color: string) => {
+ return !!color.match(/(gradient|var)/);
};
const colorFactory = (type: string) => (color: string) => {
if (type === 'darken') {
- return isLinearGradient(color) ? color : rgba(`${darken(1, color)}`, 0.95);
+ return isColorVarChangeable(color) ? color : rgba(`${darken(1, color)}`, 0.95);
}
if (type === 'lighten') {
- return isLinearGradient(color) ? color : rgba(`${lighten(1, color)}`, 0.95);
+ return isColorVarChangeable(color) ? color : rgba(`${lighten(1, color)}`, 0.95);
}
return color; |
23023495b8941606e68f2c24decadc94caa903cf | src/index.ts | src/index.ts | import { configure, observable } from "mobx"
import { Component } from "react"
import { unstable_batchedUpdates as rdBatched } from "react-dom"
if (!Component) throw new Error("mobx-react requires React to be available")
if (!observable) throw new Error("mobx-react requires mobx to be available")
if (typeof rdBatched === "function") configure({ reactionScheduler: rdBatched })
export {
Observer,
useObserver,
useAsObservableSource,
useLocalStore,
isUsingStaticRendering,
useStaticRendering,
observerBatching,
observerBatchingOptOut,
isObserverBatched
} from "mobx-react-lite"
export { observer } from "./observer"
export { MobXProviderContext, Provider, ProviderProps } from "./Provider"
export { inject } from "./inject"
export { disposeOnUnmount } from "./disposeOnUnmount"
export { PropTypes } from "./propTypes"
export { IWrappedComponent } from "./types/IWrappedComponent"
| import { observable } from "mobx"
import { Component } from "react"
if (!Component) throw new Error("mobx-react requires React to be available")
if (!observable) throw new Error("mobx-react requires mobx to be available")
export {
Observer,
useObserver,
useAsObservableSource,
useLocalStore,
isUsingStaticRendering,
useStaticRendering,
observerBatching,
observerBatchingOptOut,
isObserverBatched
} from "mobx-react-lite"
export { observer } from "./observer"
export { MobXProviderContext, Provider, ProviderProps } from "./Provider"
export { inject } from "./inject"
export { disposeOnUnmount } from "./disposeOnUnmount"
export { PropTypes } from "./propTypes"
export { IWrappedComponent } from "./types/IWrappedComponent"
| Remove auto configure with react-dom | Remove auto configure with react-dom
| TypeScript | mit | mweststrate/mobservable-react,mobxjs/mobx-react,mweststrate/mobservable-react,mobxjs/mobx-react | ---
+++
@@ -1,11 +1,8 @@
-import { configure, observable } from "mobx"
+import { observable } from "mobx"
import { Component } from "react"
-import { unstable_batchedUpdates as rdBatched } from "react-dom"
if (!Component) throw new Error("mobx-react requires React to be available")
if (!observable) throw new Error("mobx-react requires mobx to be available")
-
-if (typeof rdBatched === "function") configure({ reactionScheduler: rdBatched })
export {
Observer, |
7a2abb24f66ba8d4c8fc7334df71de10a2a722ed | src/index.ts | src/index.ts | /**
* @file The primary entry for Innerface.
*
* @author Justin Toon
* @license MIT
*/
import * as _ from 'lodash';
import { selectors } from './if.const';
import * as controllers from './controllers';
/**
* A system of simple UI actions implemented with an HTML API.
*
* @since 0.1.0
*/
export default class Innerface {
/**
* Initialize the library.
*/
init() {
_.forEach(controllers, (controller, index) => {
controller().initialize();
});
}
}
| /**
* @file The primary entry for Innerface.
*
* @author Justin Toon
* @license MIT
*/
import * as _ from 'lodash';
import { selectors } from './if.const';
import * as controllers from './controllers';
/**
* A system of simple UI actions implemented with an HTML API.
*
* @since 0.1.0
*/
export default class Innerface {
/**
* Initialize the library.
*/
public static init() {
_.forEach(controllers, (controller, index) => {
controller().initialize();
});
}
}
| Change entry function to static method | Change entry function to static method
| TypeScript | mit | overneath42/innerface,overneath42/innerface | ---
+++
@@ -19,7 +19,7 @@
/**
* Initialize the library.
*/
- init() {
+ public static init() {
_.forEach(controllers, (controller, index) => {
controller().initialize();
}); |
c47048b0f97bd4ad493ea0c891a09606c44c39fa | app/src/ui/remove-repository/confirm-remove-repository.tsx | app/src/ui/remove-repository/confirm-remove-repository.tsx | import * as React from 'react'
import { ButtonGroup } from '../../ui/lib/button-group'
import { Button } from '../../ui/lib/button'
import { Dialog, DialogContent, DialogFooter } from '../../ui/dialog'
import { Repository } from '../../models/repository'
interface IConfirmRemoveRepositoryProps {
/** The repository to be removed */
readonly repository: Repository
/** The action to execute when the user confirms */
readonly onConfirmation: (repo: Repository) => void
/** The action to execute when the user cancels */
readonly onDismissed: () => void
}
export class ConfirmRemoveRepository extends React.Component<IConfirmRemoveRepositoryProps, void> {
private cancel = () => {
this.props.onDismissed()
}
private onConfirmed = () => {
this.props.onConfirmation(this.props.repository)
this.props.onDismissed()
}
public render() {
return (
<Dialog
id='confirm-remove-repository'
key='remove-repository-confirmation'
type='warning'
title={ __DARWIN__ ? 'Remove Repository' : 'Remove repository' }
onDismissed={this.cancel}
onSubmit={this.onConfirmed}
>
<DialogContent>
<p>Are you sure you want to remove this repository?</p>
</DialogContent>
<DialogFooter>
<ButtonGroup>
<Button type='submit'>Yes</Button>
<Button onClick={this.cancel}>No</Button>
</ButtonGroup>
</DialogFooter>
</Dialog>
)
}
}
| import * as React from 'react'
import { ButtonGroup } from '../../ui/lib/button-group'
import { Button } from '../../ui/lib/button'
import { Dialog, DialogContent, DialogFooter } from '../../ui/dialog'
import { Repository } from '../../models/repository'
interface IConfirmRemoveRepositoryProps {
/** The repository to be removed */
readonly repository: Repository
/** The action to execute when the user confirms */
readonly onConfirmation: (repo: Repository) => void
/** The action to execute when the user cancels */
readonly onDismissed: () => void
}
export class ConfirmRemoveRepository extends React.Component<IConfirmRemoveRepositoryProps, void> {
private cancel = () => {
this.props.onDismissed()
}
private onConfirmed = () => {
this.props.onConfirmation(this.props.repository)
this.props.onDismissed()
}
public render() {
return (
<Dialog
id='confirm-remove-repository'
key='remove-repository-confirmation'
type='warning'
title={ __DARWIN__ ? 'Remove Repository' : 'Remove repository' }
onDismissed={this.cancel}
onSubmit={this.onConfirmed}
>
<DialogContent>
<p>Are you sure you want to remove the repository "{this.props.repository.name}"?</p>
</DialogContent>
<DialogFooter>
<ButtonGroup>
<Button type='submit'>Yes</Button>
<Button onClick={this.cancel}>No</Button>
</ButtonGroup>
</DialogFooter>
</Dialog>
)
}
}
| Include repository name in dialog | Include repository name in dialog
| TypeScript | mit | j-f1/forked-desktop,gengjiawen/desktop,hjobrien/desktop,shiftkey/desktop,j-f1/forked-desktop,hjobrien/desktop,desktop/desktop,BugTesterTest/desktops,kactus-io/kactus,BugTesterTest/desktops,hjobrien/desktop,kactus-io/kactus,desktop/desktop,kactus-io/kactus,desktop/desktop,shiftkey/desktop,artivilla/desktop,BugTesterTest/desktops,shiftkey/desktop,kactus-io/kactus,say25/desktop,hjobrien/desktop,artivilla/desktop,say25/desktop,gengjiawen/desktop,j-f1/forked-desktop,desktop/desktop,artivilla/desktop,gengjiawen/desktop,artivilla/desktop,say25/desktop,gengjiawen/desktop,shiftkey/desktop,BugTesterTest/desktops,j-f1/forked-desktop,say25/desktop | ---
+++
@@ -36,7 +36,7 @@
onSubmit={this.onConfirmed}
>
<DialogContent>
- <p>Are you sure you want to remove this repository?</p>
+ <p>Are you sure you want to remove the repository "{this.props.repository.name}"?</p>
</DialogContent>
<DialogFooter>
<ButtonGroup> |
401024ad47133ce82c6170d297010d257229d5c4 | source/renderer/app/components/staking/stake-pools/hooks/useInViewPort.tsx | source/renderer/app/components/staking/stake-pools/hooks/useInViewPort.tsx | import { useRef, useState, useCallback } from 'react';
export const useInViewPort = () => {
const [isInViewport, setIsInViewport] = useState(true);
const targetRef = useRef(null);
const observerRef = useRef(
new IntersectionObserver((entries) => {
entries.forEach((entry) => {
setIsInViewport(entry.isIntersecting);
});
})
);
const setTargetRef = useCallback((target: HTMLElement) => {
if (targetRef.current) {
observerRef.current.unobserve(targetRef.current);
}
if (target) {
observerRef.current.observe(target);
}
targetRef.current = target;
}, []);
return { isInViewport, setTargetRef };
};
| import { useRef, useState, useCallback } from 'react';
export const useInViewPort = () => {
const [isInViewport, setIsInViewport] = useState(true);
const targetRef = useRef(null);
const observerRef = useRef(
new IntersectionObserver((entries) => {
entries.forEach((entry) => {
setIsInViewport(entry.isIntersecting);
});
})
);
// React will call the ref callback twice. Once when the component mounts, and call it with again when it unmounts.
// https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node
const setTargetRef = useCallback((target: HTMLElement) => {
if (targetRef.current) {
observerRef.current.unobserve(targetRef.current);
}
if (target) {
observerRef.current.observe(target);
}
targetRef.current = target;
}, []);
return { isInViewport, setTargetRef };
};
| Add comment for re callback usage | [DDW-923] Add comment for re callback usage
| TypeScript | apache-2.0 | input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus | ---
+++
@@ -11,6 +11,8 @@
})
);
+ // React will call the ref callback twice. Once when the component mounts, and call it with again when it unmounts.
+ // https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node
const setTargetRef = useCallback((target: HTMLElement) => {
if (targetRef.current) {
observerRef.current.unobserve(targetRef.current); |
35835b04773a53137d002f4d024f80c194424679 | desktop/src/renderer/components/settings/plugins/app-plugins.tsx | desktop/src/renderer/components/settings/plugins/app-plugins.tsx | import { Component, h, State } from '@stencil/core'
import { CHANNEL } from '../../../../preload/index'
import { getAvailablePlugins, pluginStore } from './pluginStore'
import { i18n } from '../../../../i18n'
@Component({
tag: 'app-plugins',
styleUrl: 'app-plugins.css',
scoped: true,
})
export class AppPlugins {
@State() plugins: Plugin[] = []
@State() inProgress: boolean
async componentWillLoad() {
return getAvailablePlugins()
}
private checkForUpdates = () => {
this.inProgress = true
window.api.invoke(CHANNEL.REFRESH_PLUGINS).finally(() => {
this.inProgress = false
})
}
render() {
return (
<div class="appPlugins">
<div class="title">
<h1>{i18n.t('core.welcome')}</h1>
<stencila-button
onClick={this.checkForUpdates}
size="xsmall"
color="neutral"
>
{i18n.t('settings.plugins.checkUpdates')}
</stencila-button>
</div>
{pluginStore.plugins.ids.map((pluginName) => (
<plugin-card pluginName={pluginName}></plugin-card>
))}
</div>
)
}
}
| import { Component, h, State } from '@stencil/core'
import { CHANNEL } from '../../../../preload/index'
import { getAvailablePlugins, pluginStore } from './pluginStore'
import { i18n } from '../../../../i18n'
@Component({
tag: 'app-plugins',
styleUrl: 'app-plugins.css',
scoped: true,
})
export class AppPlugins {
@State() plugins: Plugin[] = []
@State() inProgress: boolean
async componentWillLoad() {
return getAvailablePlugins()
}
private checkForUpdates = () => {
this.inProgress = true
window.api.invoke(CHANNEL.REFRESH_PLUGINS).finally(() => {
this.inProgress = false
})
}
render() {
return (
<div class="appPlugins">
<div class="title">
<h1>{i18n.t('settings.plugins.title')}</h1>
<stencila-button
onClick={this.checkForUpdates}
size="xsmall"
color="neutral"
>
{i18n.t('settings.plugins.checkUpdates')}
</stencila-button>
</div>
{pluginStore.plugins.ids.map((pluginName) => (
<plugin-card pluginName={pluginName}></plugin-card>
))}
</div>
)
}
}
| Fix plugins settings view title | fix(Desktop): Fix plugins settings view title
| TypeScript | apache-2.0 | stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila | ---
+++
@@ -29,7 +29,7 @@
return (
<div class="appPlugins">
<div class="title">
- <h1>{i18n.t('core.welcome')}</h1>
+ <h1>{i18n.t('settings.plugins.title')}</h1>
<stencila-button
onClick={this.checkForUpdates}
size="xsmall" |
3dabfa70a79e2ba9898ca8d814bc722243faa0e1 | front_end/src/app/shared/services/http-client.service.ts | front_end/src/app/shared/services/http-client.service.ts | import {Injectable} from '@angular/core';
import {Http, Headers, RequestOptions} from '@angular/http';
@Injectable()
export class HttpClientService {
private http: Http;
private authenticationToken: string = '';
constructor(http: Http) {
this.http = http;
}
get(url: string, options?: RequestOptions) {
let requestOptions = this.getRequestOption(options)
return this.http.get(url, requestOptions);
}
post(url:string, data:any, options?: RequestOptions) {
let requestOptions = this.getRequestOption(options)
return this.http.post(url, data, requestOptions);
}
isLoggedIn(): boolean {
return this.authenticationToken.length > 0;
}
private getRequestOption(options?: RequestOptions): RequestOptions {
let reqOptions = options || new RequestOptions();
reqOptions.headers = this.createAuthorizationHeader(reqOptions.headers);
return reqOptions;
}
private createAuthorizationHeader(headers?: Headers) {
let reqHeaders = headers || new Headers();
reqHeaders.set('Authorization', this.authenticationToken);
reqHeaders.set('Content-Type', 'application/json');
reqHeaders.set('Crds-Api-Key', process.env.ECHECK_API_TOKEN);
return reqHeaders;
}
}
| import {Injectable} from '@angular/core';
import {Http, Headers, RequestOptions} from '@angular/http';
@Injectable()
export class HttpClientService {
private http: Http;
private authenticationToken: string = '';
constructor(http: Http) {
this.http = http;
}
get(url: string, options?: RequestOptions) {
let requestOptions = this.getRequestOption(options)
return this.http.get(url, requestOptions);
}
post(url:string, data:any, options?: RequestOptions) {
let requestOptions = this.getRequestOption(options)
return this.http.post(url, data, requestOptions);
}
isLoggedIn(): boolean {
return this.authenticationToken.length > 0;
}
private getRequestOption(options?: RequestOptions): RequestOptions {
let reqOptions = options || new RequestOptions();
reqOptions.headers = this.createAuthorizationHeader(reqOptions.headers);
return reqOptions;
}
private createAuthorizationHeader(headers?: Headers) {
let reqHeaders = headers || new Headers();
reqHeaders.set('Authorization', this.authenticationToken);
reqHeaders.set('Content-Type', 'application/json');
reqHeaders.set('Accept', 'application/json, text/plain, */*');
reqHeaders.set('Crds-Api-Key', process.env.ECHECK_API_TOKEN);
return reqHeaders;
}
}
| Add Accept header to requests | DE2004: Add Accept header to requests
Previously, we were getting text/xml content back in FF and Edge, as they were both sending Accept: application/xml header
| TypeScript | bsd-2-clause | crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin | ---
+++
@@ -35,6 +35,7 @@
let reqHeaders = headers || new Headers();
reqHeaders.set('Authorization', this.authenticationToken);
reqHeaders.set('Content-Type', 'application/json');
+ reqHeaders.set('Accept', 'application/json, text/plain, */*');
reqHeaders.set('Crds-Api-Key', process.env.ECHECK_API_TOKEN);
return reqHeaders; |
e9c0b9382f24bc14b5c96dc21f454f1507a4cb15 | front_end/src/app/shared/services/http-client.service.ts | front_end/src/app/shared/services/http-client.service.ts | import {Injectable} from '@angular/core';
import {Http, Headers, RequestOptions} from '@angular/http';
@Injectable()
export class HttpClientService {
private http: Http;
private authenticationToken: string = '';
constructor(http: Http) {
this.http = http;
}
get(url: string, options?: RequestOptions) {
let requestOptions = this.getRequestOption(options)
return this.http.get(url, requestOptions);
}
post(url:string, data:any, options?: RequestOptions) {
let requestOptions = this.getRequestOption(options)
return this.http.post(url, data, requestOptions);
}
isLoggedIn(): boolean {
return this.authenticationToken.length > 0;
}
private getRequestOption(options?: RequestOptions): RequestOptions {
let reqOptions = options || new RequestOptions();
reqOptions.headers = this.createAuthorizationHeader(reqOptions.headers);
return reqOptions;
}
private createAuthorizationHeader(headers?: Headers) {
let reqHeaders = headers || new Headers();
reqHeaders.set('Authorization', this.authenticationToken);
reqHeaders.set('Content-Type', 'application/json');
reqHeaders.set('Access-Control-Allow-Origin', '*');
return reqHeaders;
}
}
| import {Injectable} from '@angular/core';
import {Http, Headers, RequestOptions} from '@angular/http';
@Injectable()
export class HttpClientService {
private http: Http;
private authenticationToken: string = '';
constructor(http: Http) {
this.http = http;
}
get(url: string, options?: RequestOptions) {
let requestOptions = this.getRequestOption(options)
return this.http.get(url, requestOptions);
}
post(url:string, data:any, options?: RequestOptions) {
let requestOptions = this.getRequestOption(options)
return this.http.post(url, data, requestOptions);
}
isLoggedIn(): boolean {
return this.authenticationToken.length > 0;
}
private getRequestOption(options?: RequestOptions): RequestOptions {
let reqOptions = options || new RequestOptions();
reqOptions.headers = this.createAuthorizationHeader(reqOptions.headers);
return reqOptions;
}
private createAuthorizationHeader(headers?: Headers) {
let reqHeaders = headers || new Headers();
reqHeaders.set('Authorization', this.authenticationToken);
reqHeaders.set('Content-Type', 'application/json');
reqHeaders.set('Access-Control-Allow-Origin', '*');
//reqHeaders.set('Crds-Api-Key', process.env.ECHECK_API_TOKEN)
return reqHeaders;
}
}
| Add crds-api-key to the headers but comment out right now. | Add crds-api-key to the headers but comment out right now.
| TypeScript | bsd-2-clause | crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin | ---
+++
@@ -36,6 +36,7 @@
reqHeaders.set('Authorization', this.authenticationToken);
reqHeaders.set('Content-Type', 'application/json');
reqHeaders.set('Access-Control-Allow-Origin', '*');
+ //reqHeaders.set('Crds-Api-Key', process.env.ECHECK_API_TOKEN)
return reqHeaders;
} |
3697c07701aede9615bb4a1f6612547f21e7f479 | packages/formdata-event/ts_src/environment/html_input_element.ts | packages/formdata-event/ts_src/environment/html_input_element.ts | /**
* @license
* Copyright (c) 2020 The Polymer Project Authors. All rights reserved. This
* code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt The complete set of authors may be
* found at http://polymer.github.io/AUTHORS.txt The complete set of
* contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code
* distributed by Google as part of the polymer project is also subject to an
* additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
export const constructor = window.HTMLInputElement;
export const prototype = constructor.prototype;
export const descriptors = {
name: Object.getOwnPropertyDescriptor(prototype, 'name')!,
type: Object.getOwnPropertyDescriptor(prototype, 'type')!,
value: Object.getOwnPropertyDescriptor(prototype, 'value')!,
};
| /**
* @license
* Copyright (c) 2020 The Polymer Project Authors. All rights reserved. This
* code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt The complete set of authors may be
* found at http://polymer.github.io/AUTHORS.txt The complete set of
* contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code
* distributed by Google as part of the polymer project is also subject to an
* additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
export const constructor = window.HTMLInputElement;
export const prototype = constructor.prototype;
export const descriptors = {
name: Object.getOwnPropertyDescriptor(prototype, 'name'),
type: Object.getOwnPropertyDescriptor(prototype, 'type'),
value: Object.getOwnPropertyDescriptor(prototype, 'value'),
};
| Remove incorrect `!` assertions for HTMLInputElement descriptors. | Remove incorrect `!` assertions for HTMLInputElement descriptors.
| TypeScript | bsd-3-clause | webcomponents/polyfills,webcomponents/polyfills,webcomponents/polyfills | ---
+++
@@ -14,7 +14,7 @@
export const prototype = constructor.prototype;
export const descriptors = {
- name: Object.getOwnPropertyDescriptor(prototype, 'name')!,
- type: Object.getOwnPropertyDescriptor(prototype, 'type')!,
- value: Object.getOwnPropertyDescriptor(prototype, 'value')!,
+ name: Object.getOwnPropertyDescriptor(prototype, 'name'),
+ type: Object.getOwnPropertyDescriptor(prototype, 'type'),
+ value: Object.getOwnPropertyDescriptor(prototype, 'value'),
}; |
cbdb3f7e26791224c78b9e5891d48ffc72971dc4 | tests/__tests__/tsconfig-comments.spec.ts | tests/__tests__/tsconfig-comments.spec.ts | import { } from 'jest';
import { } from 'node';
import * as ts from 'typescript';
import * as fs from 'fs';
jest.mock('path');
describe('parse tsconfig with comments', () => {
const configFile1 = './tests/tsconfig-test/allows-comments.json';
const configFile2 = './tests/tsconfig-test/allows-comments2.json';
beforeEach(() => {
// Set up some mocked out file info before each test
require('path').__setBaseDir('./tests/tsconfig-test');
});
it('the two config files should exist', () => {
expect(fs.existsSync(configFile1)).toBe(true);
expect(fs.existsSync(configFile2)).toBe(true);
});
it('the two config files should have comments', () => {
// We test for comments by trying to use JSON.parse
// which should fail.
expect(() => {
JSON.parse(fs.readFileSync(configFile1, 'utf8'));
}).toThrowError();
expect(() => {
JSON.parse(fs.readFileSync(configFile2, 'utf8'));
}).toThrowError();
});
it('should correctly read allow-comments.json', () => {
const { getTSConfig } = require('../../src/utils');
expect(() => {
getTSConfig({
'__TS_CONFIG__': 'allows-comments.json'
});
}).not.toThrow();
});
});
| import { } from 'jest';
import { } from 'node';
import * as ts from 'typescript';
import * as fs from 'fs';
import * as tsconfig from 'tsconfig';
jest.mock('path');
describe('parse tsconfig with comments', () => {
const configFile1 = './tests/tsconfig-test/allows-comments.json';
const configFile2 = './tests/tsconfig-test/allows-comments2.json';
beforeEach(() => {
// Set up some mocked out file info before each test
require('path').__setBaseDir('./tests/tsconfig-test');
});
it('the two config files should exist', () => {
expect(fs.existsSync(configFile1)).toBe(true);
expect(fs.existsSync(configFile2)).toBe(true);
});
it('the two config files should have comments', () => {
// We test for comments by trying to use JSON.parse
// which should fail.
expect(() => {
JSON.parse(fs.readFileSync(configFile1, 'utf8'));
}).toThrowError();
expect(() => {
JSON.parse(fs.readFileSync(configFile2, 'utf8'));
}).toThrowError();
});
it('one config file should extend the other', () => {
const content = fs.readFileSync(configFile1, 'utf8');
const config = tsconfig.parse(content, configFile1);
expect(config.extends).toEqual('allows-comments2.json');
});
it('should correctly read allow-comments.json', () => {
const { getTSConfig } = require('../../src/utils');
expect(() => {
getTSConfig({
'__TS_CONFIG__': 'allows-comments.json'
});
}).not.toThrow();
});
});
| Check that tests for comments in tsconfig tests extended files | Check that tests for comments in tsconfig tests extended files
| TypeScript | mit | kulshekhar/ts-jest,kulshekhar/ts-jest | ---
+++
@@ -2,6 +2,7 @@
import { } from 'node';
import * as ts from 'typescript';
import * as fs from 'fs';
+import * as tsconfig from 'tsconfig';
jest.mock('path');
@@ -26,9 +27,18 @@
expect(() => {
JSON.parse(fs.readFileSync(configFile1, 'utf8'));
}).toThrowError();
+
expect(() => {
JSON.parse(fs.readFileSync(configFile2, 'utf8'));
}).toThrowError();
+
+ });
+
+ it('one config file should extend the other', () => {
+ const content = fs.readFileSync(configFile1, 'utf8');
+ const config = tsconfig.parse(content, configFile1);
+
+ expect(config.extends).toEqual('allows-comments2.json');
});
it('should correctly read allow-comments.json', () => { |
af51e46e9c6fd264230e1fbe373fcfddc3fc4142 | src/server.ts | src/server.ts | import puppeteer from 'puppeteer';
import * as xmlrpc from 'xmlrpc';
import { Bot } from './bot';
import { Doku } from './doku';
import { onExit } from './on_exit';
import { Renderer } from './render';
// Used by our .service initfile to find the bot process.
process.title = 'comicsbot';
interface Config {
discordToken: string
doku: {
user: string,
password: string,
baseUrl: string,
},
}
(async () => {
let config: Config = require('../config/config.json');
const doku = new Doku(xmlrpc.createClient({
url: config.doku.baseUrl + 'lib/exe/xmlrpc.php',
cookies: true,
}));
await doku.login(config.doku.user, config.doku.password);
const browser = await puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox'],
handleSIGINT: false,
handleSIGTERM: false,
handleSIGHUP: false,
});
onExit(browser.close);
const render = new Renderer('../config/render.js', doku, browser,
config.doku.baseUrl);
const bot = new Bot(render);
bot.connect(config.discordToken);
onExit(bot.destroy);
})();
| import puppeteer from 'puppeteer';
import * as xmlrpc from 'xmlrpc';
import { Bot } from './bot';
import { Doku } from './doku';
import { onExit } from './on_exit';
import { Renderer } from './render';
// Used by our .service initfile to find the bot process.
process.title = 'comicsbot';
interface Config {
discordToken: string
doku: {
user: string,
password: string,
baseUrl: string,
},
}
(async () => {
let config: Config = require('../config/config.json');
const browser = await puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox'],
handleSIGINT: false,
handleSIGTERM: false,
handleSIGHUP: false,
});
onExit(browser.close);
// TODO(dotdoom): createClient vs createSecureClient based on protocol in URL.
const doku = new Doku(xmlrpc.createSecureClient({
url: config.doku.baseUrl + 'lib/exe/xmlrpc.php',
cookies: true,
// headers: {
// 'User-Agent': await browser.userAgent(),
// },
}));
await doku.login(config.doku.user, config.doku.password);
const render = new Renderer('../config/render.js', doku, browser,
config.doku.baseUrl);
const bot = new Bot(render);
bot.connect(config.discordToken);
onExit(bot.destroy);
})();
| Create secure (https) XMLRPC client | Create secure (https) XMLRPC client
| TypeScript | mit | dotdoom/comicsbot,dotdoom/comicsbot | ---
+++
@@ -20,12 +20,6 @@
(async () => {
let config: Config = require('../config/config.json');
- const doku = new Doku(xmlrpc.createClient({
- url: config.doku.baseUrl + 'lib/exe/xmlrpc.php',
- cookies: true,
- }));
- await doku.login(config.doku.user, config.doku.password);
-
const browser = await puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox'],
handleSIGINT: false,
@@ -34,6 +28,16 @@
});
onExit(browser.close);
+ // TODO(dotdoom): createClient vs createSecureClient based on protocol in URL.
+ const doku = new Doku(xmlrpc.createSecureClient({
+ url: config.doku.baseUrl + 'lib/exe/xmlrpc.php',
+ cookies: true,
+ // headers: {
+ // 'User-Agent': await browser.userAgent(),
+ // },
+ }));
+ await doku.login(config.doku.user, config.doku.password);
+
const render = new Renderer('../config/render.js', doku, browser,
config.doku.baseUrl);
|
02bcd7cb9446d3a3999fc1f34acb6238ce2d1bd6 | src/lib/Components/SectionTitle.tsx | src/lib/Components/SectionTitle.tsx | import { ArrowRightIcon, Flex, Sans, space } from "@artsy/palette"
import React from "react"
import { TouchableOpacity, View } from "react-native"
const Wrapper: React.FC<{ onPress(): any }> = ({ onPress, children }) => {
if (onPress) {
return (
<TouchableOpacity onPress={onPress} data-test-id="touchable-wrapper">
{children}
</TouchableOpacity>
)
} else {
return <>{children}</>
}
}
export const SectionTitle: React.FC<{ title: React.ReactChild; subtitle?: React.ReactChild; onPress?: () => any }> = ({
title,
subtitle,
onPress,
}) => {
return (
<Wrapper onPress={onPress}>
<Flex mt="3" mb="1" flexDirection="row" alignItems="center">
<View style={{ overflow: "hidden", flex: 1 }}>
<Sans size="4" ellipsizeMode="tail" numberOfLines={1} data-test-id="title">
{title}
</Sans>
{Boolean(subtitle) && (
<Sans size="2" color="black60" data-test-id="subtitle">
{subtitle}
</Sans>
)}
</View>
{onPress && (
<View style={{ flexShrink: 0, paddingLeft: space(1) }}>
<ArrowRightIcon />
</View>
)}
</Flex>
</Wrapper>
)
}
| import { ArrowRightIcon, Flex, Sans, space } from "@artsy/palette"
import React from "react"
import { TouchableOpacity, View } from "react-native"
const Wrapper: React.FC<{ onPress(): any }> = ({ onPress, children }) => {
if (onPress) {
return (
<TouchableOpacity onPress={onPress} data-test-id="touchable-wrapper">
{children}
</TouchableOpacity>
)
} else {
return <>{children}</>
}
}
export const SectionTitle: React.FC<{ title: React.ReactChild; subtitle?: React.ReactChild; onPress?: () => any }> = ({
title,
subtitle,
onPress,
}) => {
return (
<Wrapper onPress={onPress}>
<Flex mt="3" mb="1" flexDirection="row" alignItems="center">
<View style={{ overflow: "hidden", flex: 1 }}>
<Sans size="4" ellipsizeMode="tail" numberOfLines={1} data-test-id="title">
{title}
</Sans>
{Boolean(subtitle) && (
<Sans size="3t" color="black60" data-test-id="subtitle">
{subtitle}
</Sans>
)}
</View>
{onPress && (
<View style={{ flexShrink: 0, paddingLeft: space(1) }}>
<ArrowRightIcon />
</View>
)}
</Flex>
</Wrapper>
)
}
| Update subtitle size in home rails | Update subtitle size in home rails
| TypeScript | mit | artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen | ---
+++
@@ -27,7 +27,7 @@
{title}
</Sans>
{Boolean(subtitle) && (
- <Sans size="2" color="black60" data-test-id="subtitle">
+ <Sans size="3t" color="black60" data-test-id="subtitle">
{subtitle}
</Sans>
)} |
8e697ab928fb1a852e08addabb177220a43805bd | src/core/watcher-helper.ts | src/core/watcher-helper.ts | import {
Injectable
} from '@angular/core';
@Injectable()
export class WatcherHelper {
private _watchers: any[] = [];
getWatchMethod() {
let watchMethod = (valueGetter, valueChangeCallback, options) => {
let oldValue = valueGetter();
options = options || {};
if (!options.skipImmediate) {
valueChangeCallback(oldValue);
}
let watcher = () => {
let newValue = valueGetter();
if (this._isDifferentValues(oldValue, newValue, options.deep)) {
valueChangeCallback(newValue);
oldValue = newValue;
}
};
this._watchers.push(watcher);
return () => {
let index = this._watchers.indexOf(watcher);
if (index !== -1) {
this._watchers.splice(index, 1);
}
};
};
return watchMethod;
}
private _isDifferentValues(oldValue: any, newValue: any, deepCheck: boolean) {
if (deepCheck && newValue instanceof (Object)) {
return this._checkObjectsFields(newValue, oldValue);
}
return oldValue !== newValue;
}
private _checkObjectsFields(checkingFromObject: Object, checkingToObject: Object) {
if (!(checkingFromObject && checkingToObject)) {
return true;
}
for (let field in checkingFromObject) {
if (checkingFromObject[field] > checkingToObject[field] || checkingFromObject[field] < checkingToObject[field]) {
return true;
}
}
}
checkWatchers() {
for (let watcher of this._watchers) {
watcher();
}
}
}
| import {
Injectable
} from '@angular/core';
@Injectable()
export class WatcherHelper {
private _watchers: any[] = [];
getWatchMethod() {
let watchMethod = (valueGetter, valueChangeCallback, options) => {
let oldValue = valueGetter();
options = options || {};
if (!options.skipImmediate) {
valueChangeCallback(oldValue);
}
let watcher = () => {
let newValue = valueGetter();
if (this._isDifferentValues(oldValue, newValue, options.deep)) {
valueChangeCallback(newValue);
oldValue = newValue;
}
};
this._watchers.push(watcher);
return () => {
let index = this._watchers.indexOf(watcher);
if (index !== -1) {
this._watchers.splice(index, 1);
}
};
};
return watchMethod;
}
private _isDifferentValues(oldValue: any, newValue: any, deepCheck: boolean) {
if (deepCheck && newValue instanceof (Object) && oldValue instanceof (Object)) {
return this._checkObjectsFields(newValue, oldValue);
}
return oldValue !== newValue;
}
private _checkObjectsFields(checkingFromObject: Object, checkingToObject: Object) {
for (let field in checkingFromObject) {
if (checkingFromObject[field] > checkingToObject[field] || checkingFromObject[field] < checkingToObject[field]) {
return true;
}
}
}
checkWatchers() {
for (let watcher of this._watchers) {
watcher();
}
}
}
| Check that oldValue is instance of object before check by fields | Check that oldValue is instance of object before check by fields
| TypeScript | mit | DevExpress/devextreme-angular,DevExpress/devextreme-angular,DevExpress/devextreme-angular | ---
+++
@@ -39,17 +39,13 @@
}
private _isDifferentValues(oldValue: any, newValue: any, deepCheck: boolean) {
- if (deepCheck && newValue instanceof (Object)) {
+ if (deepCheck && newValue instanceof (Object) && oldValue instanceof (Object)) {
return this._checkObjectsFields(newValue, oldValue);
}
return oldValue !== newValue;
}
private _checkObjectsFields(checkingFromObject: Object, checkingToObject: Object) {
- if (!(checkingFromObject && checkingToObject)) {
- return true;
- }
-
for (let field in checkingFromObject) {
if (checkingFromObject[field] > checkingToObject[field] || checkingFromObject[field] < checkingToObject[field]) {
return true; |
4285cf27c6e9ad28e6cac541ab3c4301a7077141 | test/mapping-entry-test.ts | test/mapping-entry-test.ts | import { assert } from "chai";
import { getAbsoluteMappingEntries } from "../src/mapping-entry";
describe("mapping-entry", () => {
it("should change to absolute paths and sort in longest prefix order", () => {
const result = getAbsoluteMappingEntries("/absolute/base/url", {
"*": ["/foo1", "/foo2"],
"longest/pre/fix/*": ["/foo2/bar"],
"pre/fix/*": ["/foo3"]
});
assert.deepEqual(result, [
{ pattern: "longest/pre/fix/*", paths: ["/absolute/base/url/foo2/bar"] },
{ pattern: "pre/fix/*", paths: ["/absolute/base/url/foo3"] },
{
pattern: "*",
paths: ["/absolute/base/url/foo1", "/absolute/base/url/foo2"]
}
]);
});
});
| import { assert } from "chai";
import { getAbsoluteMappingEntries } from "../src/mapping-entry";
import { join } from "path";
describe("mapping-entry", () => {
it("should change to absolute paths and sort in longest prefix order", () => {
const result = getAbsoluteMappingEntries("/absolute/base/url", {
"*": ["/foo1", "/foo2"],
"longest/pre/fix/*": ["/foo2/bar"],
"pre/fix/*": ["/foo3"]
});
assert.deepEqual(result, [
{
pattern: "longest/pre/fix/*",
paths: [join("/absolute", "base", "url", "foo2", "bar")]
},
{
pattern: "pre/fix/*",
paths: [join("/absolute", "base", "url", "foo3")]
},
{
pattern: "*",
paths: [
join("/absolute", "base", "url", "foo1"),
join("/absolute", "base", "url", "foo2")
]
}
]);
});
});
| Fix test to work on windows | Fix test to work on windows
| TypeScript | mit | jonaskello/tsconfig-paths,dividab/tsconfig-paths,dividab/tsconfig-paths,jonaskello/tsconfig-paths | ---
+++
@@ -1,5 +1,6 @@
import { assert } from "chai";
import { getAbsoluteMappingEntries } from "../src/mapping-entry";
+import { join } from "path";
describe("mapping-entry", () => {
it("should change to absolute paths and sort in longest prefix order", () => {
@@ -9,11 +10,20 @@
"pre/fix/*": ["/foo3"]
});
assert.deepEqual(result, [
- { pattern: "longest/pre/fix/*", paths: ["/absolute/base/url/foo2/bar"] },
- { pattern: "pre/fix/*", paths: ["/absolute/base/url/foo3"] },
+ {
+ pattern: "longest/pre/fix/*",
+ paths: [join("/absolute", "base", "url", "foo2", "bar")]
+ },
+ {
+ pattern: "pre/fix/*",
+ paths: [join("/absolute", "base", "url", "foo3")]
+ },
{
pattern: "*",
- paths: ["/absolute/base/url/foo1", "/absolute/base/url/foo2"]
+ paths: [
+ join("/absolute", "base", "url", "foo1"),
+ join("/absolute", "base", "url", "foo2")
+ ]
}
]);
}); |
ccf082cc5ed799cc3f8ca60bbe7de67543b06645 | admin-panel/react-admin-interface/src/config.ts | admin-panel/react-admin-interface/src/config.ts | import * as queryString from "query-string"
const defaultPortal = process.env.REACT_APP_PORTAL_URL
const defaultOatuhClientName = process.env.REACT_APP_OATUH_CLIENT_NAME
const params = queryString.parse(window.location.search);
const GraphQlHost = process.env.REACT_APP_GRAPHQL_HOST
// Note your Portal connection must use https:
const PortalUrl = params.REACT_APP_PORTAL_URL || defaultPortal
const OauthClientName = params.OATUH_CLIENT_NAME
? (params.OATUH_CLIENT_NAME as string)
: defaultOatuhClientName
const JwtUrl = `${PortalUrl}/api/v1/jwt/portal`
const OauthUrl = `${PortalUrl}/auth/oauth_authorize`
export const Config = { GraphQlHost, PortalUrl, OauthClientName, JwtUrl, OauthUrl }
| import * as queryString from "query-string"
const defaultPortal = process.env.REACT_APP_PORTAL_URL
const defaultOatuhClientName = process.env.REACT_APP_OATUH_CLIENT_NAME
const params = queryString.parse(window.location.search);
const GraphQlHost = process.env.REACT_APP_GRAPHQL_HOST
// Note your Portal connection must use https:
const PortalUrl = params.PORTAL_URL || defaultPortal
const OauthClientName = params.OATUH_CLIENT_NAME
? (params.OATUH_CLIENT_NAME as string)
: defaultOatuhClientName
const JwtUrl = `${PortalUrl}/api/v1/jwt/portal`
const OauthUrl = `${PortalUrl}/auth/oauth_authorize`
export const Config = { GraphQlHost, PortalUrl, OauthClientName, JwtUrl, OauthUrl }
| Fix typo in react-admin param name. | Fix typo in react-admin param name.
[#174024121]
https://www.pivotaltracker.com/story/show/174024121
| TypeScript | mit | concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse | ---
+++
@@ -7,7 +7,7 @@
const GraphQlHost = process.env.REACT_APP_GRAPHQL_HOST
// Note your Portal connection must use https:
-const PortalUrl = params.REACT_APP_PORTAL_URL || defaultPortal
+const PortalUrl = params.PORTAL_URL || defaultPortal
const OauthClientName = params.OATUH_CLIENT_NAME
? (params.OATUH_CLIENT_NAME as string) |
520fa966c0c9b553f0a534c8168fe278c7ace397 | src/common/services/i18next.ts | src/common/services/i18next.ts | import i18next from 'i18next';
import { initReactI18next } from 'react-i18next';
import XHR from 'i18next-xhr-backend';
import { isDev } from 'config';
// Maps to public/locales/:language_code
export const LANGUAGE_CODES = {
EN: 'en',
};
// see: https://www.i18next.com/overview/configuration-options
i18next
.use(XHR)
.use(initReactI18next)
.init({
debug: isDev,
backend: {
loadPath: '/locales/{{lng}}/{{ns}}.json',
},
lng: LANGUAGE_CODES.EN,
fallbackLng: LANGUAGE_CODES.EN,
whitelist: [LANGUAGE_CODES.EN],
nonExplicitWhitelist: true,
interpolation: {
escapeValue: false,
},
react: {
defaultTransParent: 'span', // fixes Google Translate issue https://github.com/facebook/react/issues/11538
},
});
export const t = i18next.t.bind(i18next);
export default i18next;
| import i18next from 'i18next';
import { initReactI18next } from 'react-i18next';
import XHR from 'i18next-xhr-backend';
import { isDev } from 'config';
// Maps to public/locales/:language_code
export const LANGUAGE_CODES = {
EN: 'en',
};
// see: https://www.i18next.com/overview/configuration-options
i18next
.use(XHR)
.use(initReactI18next)
.init({
debug: isDev,
backend: {
loadPath: '/locales/{{lng}}/{{ns}}.json',
},
lng: LANGUAGE_CODES.EN,
fallbackLng: LANGUAGE_CODES.EN,
whitelist: [LANGUAGE_CODES.EN],
nonExplicitWhitelist: true,
interpolation: {
escapeValue: false,
},
});
export const t = i18next.t.bind(i18next);
export default i18next;
| Remove leftover of Google translate fix | Remove leftover of Google translate fix
| TypeScript | mit | Kamahl19/react-starter,Kamahl19/react-starter,Kamahl19/react-starter,Kamahl19/react-starter | ---
+++
@@ -25,9 +25,6 @@
interpolation: {
escapeValue: false,
},
- react: {
- defaultTransParent: 'span', // fixes Google Translate issue https://github.com/facebook/react/issues/11538
- },
});
export const t = i18next.t.bind(i18next); |
4f6d4511e8d70f49bdc4ee627db45b00f91d236b | src/providers/token-service.ts | src/providers/token-service.ts | import { Injectable } from '@angular/core';
import { Http, Response, Headers } from '@angular/http';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/observable/of';
import { Observable } from 'rxjs/Observable';
import { Credential } from '../model/credential';
import { ImsHeaders } from '../model/imsHeaders';
import { Token } from '../model/token';
@Injectable()
export class TokenService {
constructor(public http: Http) {
}
private token: Token = null;
getToken(credential: Credential): Observable<Token> {
if (this.token != null && new Date() < new Date(this.token.licenseExpirationDate)) {
return Observable.of(this.token);
} else {
return this.getTokenForSegment(credential).flatMap(l => this.getTokenFromUrl(credential, l)).map(loadedToken => {
this.token = loadedToken;
return loadedToken;
});
}
}
getTokenForSegment(credential: Credential): Observable<string> {
let segment = { "name": credential.segmentName };
return this.http.post(credential.server + "/rest/license/tokens", segment, { headers: new ImsHeaders(credential) }).map(r => r.headers.get("location"));
}
getTokenFromUrl(credential: Credential, location: string): Observable<Token> {
return this.http.get(location, { headers: new ImsHeaders(credential) }).map(r => r.json());
}
}
| import { Injectable } from '@angular/core';
import { Http, Response, Headers } from '@angular/http';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/observable/of';
import { Observable } from 'rxjs/Observable';
import { Credential } from '../model/credential';
import { ImsHeaders } from '../model/imsHeaders';
import { Token } from '../model/token';
@Injectable()
export class TokenService {
constructor(public http: Http) {
}
private token: Token = null;
getToken(credential: Credential): Observable<Token> {
console.log(this.token2);
if (this.token != null && new Date() < new Date(this.token.licenseExpirationDate)) {
return Observable.of(this.token);
} else {
return this.getTokenForSegment(credential).flatMap(l => this.getTokenFromUrl(credential, l)).map(t => this.cacheToken(t));
}
}
cacheToken(token:Token) : Token {
this.token = token;
return token;
}
getTokenForSegment(credential: Credential): Observable<string> {
let segment = { "name": credential.segmentName };
return this.http.post(credential.server + "/rest/license/tokens", segment, { headers: new ImsHeaders(credential) }).map(r => r.headers.get("location"));
}
getTokenFromUrl(credential: Credential, location: string): Observable<Token> {
return this.http.get(location, { headers: new ImsHeaders(credential) }).map(r => r.json());
}
}
| Refactor method extraction. Create aE cacheToken method for better understanding. | Refactor method extraction.
Create aE cacheToken method for better understanding.
| TypeScript | mit | IMSmobile/app,IMSmobile/app,IMSmobile/app,IMSmobile/app | ---
+++
@@ -16,15 +16,19 @@
}
private token: Token = null;
+
getToken(credential: Credential): Observable<Token> {
+ console.log(this.token2);
if (this.token != null && new Date() < new Date(this.token.licenseExpirationDate)) {
return Observable.of(this.token);
} else {
- return this.getTokenForSegment(credential).flatMap(l => this.getTokenFromUrl(credential, l)).map(loadedToken => {
- this.token = loadedToken;
- return loadedToken;
- });
+ return this.getTokenForSegment(credential).flatMap(l => this.getTokenFromUrl(credential, l)).map(t => this.cacheToken(t));
}
+ }
+
+ cacheToken(token:Token) : Token {
+ this.token = token;
+ return token;
}
getTokenForSegment(credential: Credential): Observable<string> { |
e135b9360e56b1ba009eec7f75230e0a4153a15c | app/src/ui/ui-view.tsx | app/src/ui/ui-view.tsx | import * as React from 'react'
interface IUiViewProps extends React.Props<UiView> {
/** An optional element id for the view */
id?: string
}
/**
* High order component for housing a View.
*
* In Desktop we currently define a view as a component which occupies
* the entire app save for the sidebar and minus any currently active
* popovers and of which there's only ever one single instance active
* at any point in time.
*
* Examples of views are <Repository /> and <CloningRepository />.
*
* Examples of what's not a View include the Changes and History tabs
* as these are contained within the <Repository /> view
*/
export class UiView extends React.Component<IUiViewProps, void> {
public render() {
return <div id={this.props.id} className='ui-view'>
{this.props.children}
</div>
}
}
| import * as React from 'react'
const uiViewClassName = 'ui-view'
interface IUiViewProps extends React.HTMLProps<HTMLDivElement> { }
/**
* High order component for housing a View.
*
* In Desktop we currently define a view as a component which occupies
* the entire app save for the sidebar and minus any currently active
* popovers and of which there's only ever one single instance active
* at any point in time.
*
* Examples of views are <Repository /> and <CloningRepository />.
*
* Examples of what's not a View include the Changes and History tabs
* as these are contained within the <Repository /> view
*/
export class UiView extends React.Component<IUiViewProps, void> {
public static defaultProps: IUiViewProps = {
className: uiViewClassName,
}
public render() {
// TODO: If this gets more complex, consider using something like
// https://github.com/JedWatson/classnames
if (this.props.className !== 'ui-view') {
this.props.className += ` ${uiViewClassName}`
}
return <div {...this.props}>
{this.props.children}
</div>
}
}
| Allow arbitrary attributes on UiView components | Allow arbitrary attributes on UiView components
| TypeScript | mit | say25/desktop,kactus-io/kactus,j-f1/forked-desktop,desktop/desktop,shiftkey/desktop,shiftkey/desktop,say25/desktop,kactus-io/kactus,kactus-io/kactus,say25/desktop,BugTesterTest/desktops,kactus-io/kactus,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,BugTesterTest/desktops,desktop/desktop,artivilla/desktop,hjobrien/desktop,gengjiawen/desktop,say25/desktop,desktop/desktop,shiftkey/desktop,gengjiawen/desktop,hjobrien/desktop,hjobrien/desktop,j-f1/forked-desktop,artivilla/desktop,BugTesterTest/desktops,artivilla/desktop,artivilla/desktop,BugTesterTest/desktops,gengjiawen/desktop,j-f1/forked-desktop,hjobrien/desktop,gengjiawen/desktop | ---
+++
@@ -1,9 +1,8 @@
import * as React from 'react'
-interface IUiViewProps extends React.Props<UiView> {
- /** An optional element id for the view */
- id?: string
-}
+const uiViewClassName = 'ui-view'
+
+interface IUiViewProps extends React.HTMLProps<HTMLDivElement> { }
/**
* High order component for housing a View.
@@ -19,8 +18,20 @@
* as these are contained within the <Repository /> view
*/
export class UiView extends React.Component<IUiViewProps, void> {
+
+ public static defaultProps: IUiViewProps = {
+ className: uiViewClassName,
+ }
+
public render() {
- return <div id={this.props.id} className='ui-view'>
+
+ // TODO: If this gets more complex, consider using something like
+ // https://github.com/JedWatson/classnames
+ if (this.props.className !== 'ui-view') {
+ this.props.className += ` ${uiViewClassName}`
+ }
+
+ return <div {...this.props}>
{this.props.children}
</div>
} |
ac83ad160604dade593171d9cc99f796294ee66f | src/app/views/sessions/session/tools/job-list/job-list.component.ts | src/app/views/sessions/session/tools/job-list/job-list.component.ts | import {Component, EventEmitter, Input, OnChanges, Output} from "@angular/core";
import Job from "../../../../../model/session/job";
import {NgbDropdown} from "@ng-bootstrap/ng-bootstrap";
@Component({
selector: 'ch-job-list',
templateUrl: './job-list.component.html'
})
export class JobListComponent implements OnChanges {
@Input() jobs: Job[];
jobsSorted: Job[];
@Output() private onJobSelection = new EventEmitter<Job>();
constructor(private dropDown: NgbDropdown) {
}
ngOnChanges() {
this.jobsSorted = this.jobs.sort((a, b) => {
let d1 = new Date(a.startTime).getTime();
let d2 = new Date(b.startTime).getTime();
return d2 - d1;
});
}
selectJob(job: Job) {
this.onJobSelection.emit(job);
this.dropDown.close();
}
}
| import {Component, EventEmitter, Input, OnChanges, Output} from '@angular/core';
import Job from '../../../../../model/session/job';
import {NgbDropdown} from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'ch-job-list',
templateUrl: './job-list.component.html'
})
export class JobListComponent implements OnChanges {
@Input() jobs: Job[];
jobsSorted: Job[];
@Output() private selectJobEmitter = new EventEmitter<Job>();
constructor(private dropDown: NgbDropdown) {
}
ngOnChanges() {
this.jobsSorted = this.jobs.sort((a, b) => {
const d1 = new Date(a.created).getTime();
const d2 = new Date(b.created).getTime();
return d2 - d1;
});
}
selectJob(job: Job) {
this.selectJobEmitter.emit(job);
this.dropDown.close();
}
}
| Sort jobs by created instead of start time | Sort jobs by created instead of start time
| TypeScript | mit | chipster/chipster-web,chipster/chipster-web,chipster/chipster-web | ---
+++
@@ -1,6 +1,6 @@
-import {Component, EventEmitter, Input, OnChanges, Output} from "@angular/core";
-import Job from "../../../../../model/session/job";
-import {NgbDropdown} from "@ng-bootstrap/ng-bootstrap";
+import {Component, EventEmitter, Input, OnChanges, Output} from '@angular/core';
+import Job from '../../../../../model/session/job';
+import {NgbDropdown} from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'ch-job-list',
@@ -11,21 +11,21 @@
@Input() jobs: Job[];
jobsSorted: Job[];
- @Output() private onJobSelection = new EventEmitter<Job>();
+ @Output() private selectJobEmitter = new EventEmitter<Job>();
constructor(private dropDown: NgbDropdown) {
}
ngOnChanges() {
this.jobsSorted = this.jobs.sort((a, b) => {
- let d1 = new Date(a.startTime).getTime();
- let d2 = new Date(b.startTime).getTime();
+ const d1 = new Date(a.created).getTime();
+ const d2 = new Date(b.created).getTime();
return d2 - d1;
});
}
selectJob(job: Job) {
- this.onJobSelection.emit(job);
+ this.selectJobEmitter.emit(job);
this.dropDown.close();
}
} |
15268f63ce32baf4ec1a72a03f8c9ae23c42df9a | packages/post-effect-plugins/the-world/index.ts | packages/post-effect-plugins/the-world/index.ts | import {
PostEffectBase,
PreRenderRequest,
RenderRequest,
Type,
} from '@ragg/delir-core'
import * as clamp from 'lodash/clamp'
interface Params {
opacity: number
}
export default class TheWorldPostEffect extends PostEffectBase {
/**
* Provide usable parameters
*/
public static provideParameters() {
return Type
.float('opacity', {label: 'Opacity', defaultValue: 100, animatable: true})
}
private bufCtx: CanvasRenderingContext2D
/**
* Called when before rendering start.
*
* If you want initializing before rendering (likes load audio, image, etc...)
* Do it in this method.
*/
public async initialize(req: PreRenderRequest)
{
const canvas = document.createElement('canvas')
canvas.width = req.width
canvas.height = req.height
this.bufCtx = canvas.getContext('2d')!
}
/**
* Render frame into destination canvas.
* @param req
*/
public async render(req: RenderRequest<Params>)
{
const param = req.parameters
const { canvas } = this.bufCtx
if (req.frameOnClip === 0) {
this.bufCtx.drawImage(req.srcCanvas!, 0, 0)
}
const destCtx = req.destCanvas.getContext('2d')!
destCtx.globalAlpha = clamp(param.opacity, 0, 100) / 100
destCtx.clearRect(0, 0, req.width, req.height)
destCtx.drawImage(canvas, 0, 0)
}
}
| import {
PostEffectBase,
PreRenderRequest,
RenderRequest,
Type,
} from '@ragg/delir-core'
import * as clamp from 'lodash/clamp'
interface Params {
opacity: number
}
export default class TheWorldPostEffect extends PostEffectBase {
/**
* Provide usable parameters
*/
public static provideParameters() {
return Type
.float('opacity', {label: 'Opacity', defaultValue: 100, animatable: true})
}
private canvas: HTMLCanvasElement
private bufCtx: CanvasRenderingContext2D
/**
* Called when before rendering start.
*
* If you want initializing before rendering (likes load audio, image, etc...)
* Do it in this method.
*/
public async initialize(req: PreRenderRequest)
{
const canvas = document.createElement('canvas')
canvas.width = req.width
canvas.height = req.height
this.canvas = canvas
this.bufCtx = canvas.getContext('2d')!
}
/**
* Render frame into destination canvas.
* @param req
*/
public async render(req: RenderRequest<Params>)
{
const param = req.parameters
if (req.frameOnClip === 0) {
this.bufCtx.drawImage(req.srcCanvas!, 0, 0)
}
const destCtx = req.destCanvas.getContext('2d')!
destCtx.globalAlpha = clamp(param.opacity, 0, 100) / 100
destCtx.clearRect(0, 0, req.width, req.height)
destCtx.drawImage(this.canvas, 0, 0)
}
}
| Fix electron crashed on running the-world post effect | Fix electron crashed on running the-world post effect
どうやらVM内でCanvasオブジェクトがGCされて死ぬっぽい… 闇だ
| TypeScript | mit | Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir | ---
+++
@@ -20,6 +20,7 @@
.float('opacity', {label: 'Opacity', defaultValue: 100, animatable: true})
}
+ private canvas: HTMLCanvasElement
private bufCtx: CanvasRenderingContext2D
/**
@@ -34,6 +35,7 @@
canvas.width = req.width
canvas.height = req.height
+ this.canvas = canvas
this.bufCtx = canvas.getContext('2d')!
}
@@ -44,7 +46,6 @@
public async render(req: RenderRequest<Params>)
{
const param = req.parameters
- const { canvas } = this.bufCtx
if (req.frameOnClip === 0) {
this.bufCtx.drawImage(req.srcCanvas!, 0, 0)
@@ -53,6 +54,6 @@
const destCtx = req.destCanvas.getContext('2d')!
destCtx.globalAlpha = clamp(param.opacity, 0, 100) / 100
destCtx.clearRect(0, 0, req.width, req.height)
- destCtx.drawImage(canvas, 0, 0)
+ destCtx.drawImage(this.canvas, 0, 0)
}
} |
bcc5ed0d956fc4017d62a1c940da7bfc68d52d85 | app/src/lib/feature-flag.ts | app/src/lib/feature-flag.ts | /**
* Enables the application to opt-in for preview features based on runtime
* checks. This is backed by the GITHUB_DESKTOP_PREVIEW_FEATURES environment
* variable, which is checked for non-development environments.
*/
export function enablePreviewFeatures(): boolean {
if (__DEV__) {
return true
}
if (process.env.GITHUB_DESKTOP_PREVIEW_FEATURES) {
return true
}
return false
}
| const EnablePreviewFeaturesKey = 'enable-preview-features'
/**
* Enables the application to opt-in for preview features based on runtime
* checks. This is backed by the GITHUB_DESKTOP_PREVIEW_FEATURES environment
* variable, which is checked for non-development environments.
*/
export function enablePreviewFeatures(): boolean {
if (__DEV__) {
return true
}
if (process.env.GITHUB_DESKTOP_PREVIEW_FEATURES) {
return true
}
const enableFeatures = localStorage.getItem(EnablePreviewFeaturesKey)
const enableFeaturesValue = enableFeatures && parseInt(enableFeatures, 10)
if (
enableFeaturesValue &&
!isNaN(enableFeaturesValue) &&
enableFeaturesValue > 0
) {
return true
}
return false
}
| Enable preview features from localStorage too | Enable preview features from localStorage too
| TypeScript | mit | j-f1/forked-desktop,kactus-io/kactus,j-f1/forked-desktop,desktop/desktop,desktop/desktop,j-f1/forked-desktop,shiftkey/desktop,j-f1/forked-desktop,artivilla/desktop,gengjiawen/desktop,gengjiawen/desktop,shiftkey/desktop,say25/desktop,shiftkey/desktop,artivilla/desktop,desktop/desktop,kactus-io/kactus,kactus-io/kactus,say25/desktop,shiftkey/desktop,say25/desktop,artivilla/desktop,kactus-io/kactus,gengjiawen/desktop,gengjiawen/desktop,artivilla/desktop,say25/desktop,desktop/desktop | ---
+++
@@ -1,3 +1,5 @@
+const EnablePreviewFeaturesKey = 'enable-preview-features'
+
/**
* Enables the application to opt-in for preview features based on runtime
* checks. This is backed by the GITHUB_DESKTOP_PREVIEW_FEATURES environment
@@ -12,5 +14,15 @@
return true
}
+ const enableFeatures = localStorage.getItem(EnablePreviewFeaturesKey)
+ const enableFeaturesValue = enableFeatures && parseInt(enableFeatures, 10)
+ if (
+ enableFeaturesValue &&
+ !isNaN(enableFeaturesValue) &&
+ enableFeaturesValue > 0
+ ) {
+ return true
+ }
+
return false
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.