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
eb692c5b37b80be8dc9bad510aa019e9e459706f
applications/calendar/src/app/containers/calendar/confirmationModals/DuplicateAttendeesModal.tsx
applications/calendar/src/app/containers/calendar/confirmationModals/DuplicateAttendeesModal.tsx
import React from 'react'; import { c } from 'ttag'; import { Alert, FormModal } from 'react-components'; import { noop } from 'proton-shared/lib/helpers/function'; interface Props { onClose: () => void; duplicateAttendees: string[][]; } const DuplicateAttendeesModal = ({ onClose, duplicateAttendees, ...rest ...
import React from 'react'; import { c } from 'ttag'; import { Alert, FormModal } from 'react-components'; import { noop } from 'proton-shared/lib/helpers/function'; interface Props { onClose: () => void; duplicateAttendees: string[][]; } const DuplicateAttendeesModal = ({ onClose, duplicateAttendees, ...rest ...
Remove title ellipsis on duplicate attendees modal
Remove title ellipsis on duplicate attendees modal CALWEB-2487
TypeScript
mit
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
--- +++ @@ -17,6 +17,7 @@ onSubmit={onClose} onClose={noop} hasClose={false} + noTitleEllipsis small {...rest} >
165978bf842b6f017a42a3409ef9281b1743c537
examples/examples.test.ts
examples/examples.test.ts
import {assert} from 'chai'; import * as vl from '../src/vl'; import {zSchema} from '../test/util'; const inspect = require('util').inspect; const fs = require('fs'); const path = require('path'); const validator = new zSchema({ noEmptyArrays: true, noEmptyStrings: true }); const vlSchema = require('../vega-lite...
import {assert} from 'chai'; import * as vl from '../src/vl'; import {zSchema} from '../test/util'; const inspect = require('util').inspect; const fs = require('fs'); const path = require('path'); const validator = new zSchema({ noEmptyArrays: true, noEmptyStrings: true }); const vlSchema = require('../vega-lite...
Validate generated vega spec against vega schema
Validate generated vega spec against vega schema Fixes https://github.com/vega/vega-lite/issues/1156
TypeScript
bsd-3-clause
uwdata/vega-lite,uwdata/vega-lite,vega/vega-lite,uwdata/vega-lite,uwdata/vega-lite,vega/vega-lite,vega/vega-lite,uwdata/vega-lite,vega/vega-lite,vega/vega-lite
--- +++ @@ -22,7 +22,7 @@ } assert(isVlValid); - const vegaSpec = vl.compile(vlspec); + const vegaSpec = vl.compile(vlspec).spec; const isVgValid = validator.validate(vegaSpec, vgSchema); if (!isVgValid) {
70995bb7eac31e2fe1864448c56bbb9969a5bc20
src/components/Checkbox/Checkbox.tsx
src/components/Checkbox/Checkbox.tsx
import { Fragment } from 'react' import styled from 'styled-components' import type { Nodes } from '../../types' const List = styled.ul` list-style-type: none; ` const StyledCheckbox = styled.input` margin-right: 0.5rem; cursor: pointer; ` interface Props { id: string nodes: Nodes onToggle: (id: string)...
import { Fragment } from 'react' import styled from 'styled-components' import type { Nodes } from '../../types' const List = styled.ul` list-style-type: none; ` const StyledCheckbox = styled.input` margin-right: 0.5rem; cursor: pointer; ` interface Props { id: string nodes: Nodes onToggle: (id: string)...
Use logical && in place of ternary condition
Use logical && in place of ternary condition
TypeScript
mit
joelgeorgev/react-checkbox-tree,joelgeorgev/react-checkbox-tree
--- +++ @@ -36,7 +36,7 @@ </label> </li> )} - {childIds.length ? ( + {childIds.length > 0 && ( <li> <List> {childIds.map((childId) => ( @@ -49,7 +49,7 @@ ))} </List> </li> - ) : null} + )} </Fragment>...
4c1254a880633a6ea153a0ee7d5d5c8a8b7c9048
common/Toolbox.ts
common/Toolbox.ts
import { escapeRegExp } from "lodash"; export interface KeyValueSet<T> { [key: string]: T; } export function toModifierString(number: number): string { if (number >= 0) { return `+${number}`; } return number.toString(); } export function probablyUniqueString(): string { //string contains only easily re...
import { escapeRegExp } from "lodash"; export interface KeyValueSet<T> { [key: string]: T; } export function toModifierString(number: number): string { if (number >= 0) { return `+${number}`; } return number.toString(); } export function probablyUniqueString(): string { //string contains only easily re...
Add safe JSON parsing method
Add safe JSON parsing method
TypeScript
mit
cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative
--- +++ @@ -34,4 +34,12 @@ return new RegExp(`\\b(${allStrings.join("|")})\\b`, "gim"); } +export function ParseJSONOrDefault<T>(json, defaultValue: T) { + try { + return JSON.parse(json); + } catch { + return defaultValue; + } +} + export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>...
ab08e8b4dd81b5e3b046e29f67101870a5f6a57c
src/app/home/top-page/top-page.component.spec.ts
src/app/home/top-page/top-page.component.spec.ts
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { TopPageComponent } from './top-page.component'; describe('TopPageComponent', () => { let component: TopPageComponent; let fixture: ComponentFixture<TopPageComponent>; beforeEach(async(() => { TestBed.configureTestingModule({...
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { ImageService } from '../../gallery/image.service'; import { MockImageService } from '../../gallery/mocks/mock-image.service'; import { GalleryFormatPipe } from '../../galler...
Fix top page component test
Fix top page component test
TypeScript
apache-2.0
jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog
--- +++ @@ -1,14 +1,33 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; + +import { ImageService } from '../../gallery/image.service'; +import { MockImageService } from '../../gallery/mocks/mock-image.service'; +import { Gall...
ddc79b8b549290423420bb7e46d2a315b34d1b4c
src/dom/assignProperties.ts
src/dom/assignProperties.ts
import {DeepPartial} from '../extra/DeepPartial' /** * Assign properties to an object of type `HTMLElement` or `SVGElement`. */ export function assignProperties<E extends Element, P extends DeepPartial<E>>(elem: E, props: P): void { doAssignProperties(elem, props) } function doAssignProperties<E extends Element...
import {DeepPartial} from '../extra/DeepPartial' /** * Assign properties to an object of type `HTMLElement` or `SVGElement`. */ export function assignProperties<E extends Element, P extends DeepPartial<E>>(elem: E, props: P): void { for (const p in props) { if (props.hasOwnProperty(p)) { if (...
Remove private function not needed anymore.
Remove private function not needed anymore.
TypeScript
agpl-3.0
inad9300/Soil,inad9300/Soil
--- +++ @@ -4,10 +4,6 @@ * Assign properties to an object of type `HTMLElement` or `SVGElement`. */ export function assignProperties<E extends Element, P extends DeepPartial<E>>(elem: E, props: P): void { - doAssignProperties(elem, props) -} - -function doAssignProperties<E extends Element, P extends DeepPart...
4406da75773d6adffd1f2249ccebf677c48e5b58
src/impl/네이버뉴스.ts
src/impl/네이버뉴스.ts
import { clearStyles } from '../util'; import { Article } from '..'; export const cleanup = () => { document.querySelectorAll('#tooltipLayer_english, .u_cbox_layer_wrap').forEach((v) => { v.remove(); }); } export function parse(): Article { return { title: $('#articleTitle').text(), ...
import { clearStyles } from '../util'; import { Article } from '..'; export const cleanup = () => { document.querySelectorAll('#tooltipLayer_english, .u_cbox_layer_wrap').forEach((v) => { v.remove(); }); } export function parse(): Article { const parseTime = (timeInfo: Nullable<string>) => { ...
Fix parsing error on naver news date
Fix parsing error on naver news date
TypeScript
mit
disjukr/jews,disjukr/just-news,disjukr/just-news,disjukr/jews,disjukr/just-news
--- +++ @@ -8,6 +8,19 @@ } export function parse(): Article { + const parseTime = (timeInfo: Nullable<string>) => { + if (timeInfo) { + const iso8601 = timeInfo.replace(/(\d{4}).(\d{2}).(\d{2}). (오전|오후) (\d{1,2}):(\d{2})/, function(_, year, month, day, ampm, hour, minuate) { + ...
d56522b88d9204f090ccffc94f2773b34faab712
src/lib/stitching/vortex/schema.ts
src/lib/stitching/vortex/schema.ts
import { createVortexLink } from "./link" import { makeRemoteExecutableSchema, transformSchema, RenameTypes, RenameRootFields, FilterRootFields, } from "graphql-tools" import { readFileSync } from "fs" export const executableVortexSchema = ({ removeRootFields = true, }: { removeRootFields?: boolean } = {})...
import { createVortexLink } from "./link" import { makeRemoteExecutableSchema, transformSchema, RenameTypes, RenameRootFields, FilterRootFields, } from "graphql-tools" import { readFileSync } from "fs" export const executableVortexSchema = ({ removeRootFields = true, }: { removeRootFields?: boolean } = {})...
Use better name for list of fields to filter
Use better name for list of fields to filter
TypeScript
mit
artsy/metaphysics,artsy/metaphysics,artsy/metaphysics
--- +++ @@ -20,7 +20,7 @@ link: vortexLink, }) - const removeRootFieldList = [ + const rootFieldsToFilter = [ "pricingContext", "partnerStat", "userStat", @@ -28,7 +28,7 @@ ] const filterTransform = new FilterRootFields( - (_operation, name) => !removeRootFieldList.includes(name)...
b9f54a8cee2de1dea672a1267bbee824c70c3f93
src/public_api.ts
src/public_api.ts
/* * Public API Surface of papaparse */ export * from './lib/papa'; export * from './lib/papa-parse.module';
/* * Public API Surface of papaparse */ export * from './lib/papa';
Remove module from Public api
fix: Remove module from Public api
TypeScript
mit
Alberthaff/ngx-papaparse,Alberthaff/ngx-papaparse
--- +++ @@ -3,4 +3,3 @@ */ export * from './lib/papa'; -export * from './lib/papa-parse.module';
77bb6f36e9651c846f6b0c6148f40b96e2f7598f
src/vmware/VMwareForm.tsx
src/vmware/VMwareForm.tsx
import * as React from 'react'; import { required } from '@waldur/core/validators'; import { FormContainer, StringField, NumberField, SecretField } from '@waldur/form-react'; export const VMwareForm = ({ translate, container }) => ( <FormContainer {...container}> <StringField name="backend_url" labe...
import * as React from 'react'; import { required } from '@waldur/core/validators'; import { FormContainer, StringField, NumberField, SecretField } from '@waldur/form-react'; export const VMwareForm = ({ translate, container }) => ( <FormContainer {...container}> <StringField name="backend_url" labe...
Allow setting cluster label instead of ID when creating a VMware offering
Allow setting cluster label instead of ID when creating a VMware offering [WAL-2536]
TypeScript
mit
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
--- +++ @@ -24,8 +24,8 @@ validate={required} /> <StringField - name="default_cluster_id" - label={translate('Default cluster ID')} + name="default_cluster_label" + label={translate('Default cluster label')} required={true} validate={required} />
68779294a2de0d31bfc6fd3b6d2b66b751e9a286
src/Debug/babylon.debugLayer.ts
src/Debug/babylon.debugLayer.ts
module BABYLON { // declare INSPECTOR namespace for compilation issue declare var INSPECTOR : any; export class DebugLayer { private _scene: Scene; public static InspectorURL = 'http://www.babylonjs.com/babylon.inspector.bundle.js'; // The inspector instance privat...
module BABYLON { // declare INSPECTOR namespace for compilation issue declare var INSPECTOR : any; export class DebugLayer { private _scene: Scene; public static InspectorURL = 'http://www.babylonjs.com/babylon.inspector.bundle.js'; // The inspector instance privat...
Fix isVisible method of debuglayer
Fix isVisible method of debuglayer
TypeScript
apache-2.0
Hersir88/Babylon.js,sebavan/Babylon.js,sebavan/Babylon.js,Hersir88/Babylon.js,RaananW/Babylon.js,NicolasBuecher/Babylon.js,abow/Babylon.js,abow/Babylon.js,BabylonJS/Babylon.js,abow/Babylon.js,Kesshi/Babylon.js,Temechon/Babylon.js,BabylonJS/Babylon.js,jbousquie/Babylon.js,Kesshi/Babylon.js,Hersir88/Babylon.js,Temechon/B...
--- +++ @@ -21,7 +21,10 @@ } public isVisible(): boolean { - return false; + if (!this._inspector) { + return false; + } + return true; } public hide() {
d0ed2be8fc8caaad107e6768cc352f8f15eb10f1
src/app/nav/storage/storage.component.ts
src/app/nav/storage/storage.component.ts
import { Component, Input, OnInit } from '@angular/core' import { AbstractStorageService } from 'core/AbstractStorageService' @Component({ selector: 'mute-storage', templateUrl: './storage.component.html', styleUrls: ['./storage.component.scss'] }) export class StorageComponent implements OnInit { private av...
import { Component, Input, OnInit } from '@angular/core' import { AbstractStorageService } from 'core/AbstractStorageService' @Component({ selector: 'mute-storage', templateUrl: './storage.component.html', styleUrls: ['./storage.component.scss'] }) export class StorageComponent implements OnInit { private is...
Rename property from 'available' to 'isAvailable'
fix(storage): Rename property from 'available' to 'isAvailable'
TypeScript
agpl-3.0
oster/mute,coast-team/mute,oster/mute,coast-team/mute,oster/mute,coast-team/mute,coast-team/mute
--- +++ @@ -9,7 +9,7 @@ }) export class StorageComponent implements OnInit { - private available: boolean + private isAvailable: boolean private tooltipMsg: string @Input() storageService: AbstractStorageService @@ -18,21 +18,17 @@ ngOnInit () { this.storageService.isReachable() .then((is...
fbb6d692b7075e4dcea5dbae1ff6dd20cc4ccb37
lib/ts/unicorn.ts
lib/ts/unicorn.ts
var prepareHello = (name:string) => { return 'Hello, ' + name; } console.log(prepareHello('Unicorns')); class fixOnScroll { constructor(element){ this.element = element; window.addEventListener('scroll', this.handleScroll.bind(this)) } getElement(){ switch (typeof this.element){ case 'functi...
var prepareHello = (name:string) => { return 'Hello, ' + name; } console.log(prepareHello('Unicorns')); class UnicornPlugin { getElement(providedElement){ var element = providedElement || this.element; switch (typeof element){ case 'function': return element(); case 'string': r...
Make a UnicornPlugin master class
Make a UnicornPlugin master class
TypeScript
mit
SevereOverfl0w/Unicorn-UI-Kit,SevereOverfl0w/Unicorn-UI-Kit
--- +++ @@ -4,21 +4,28 @@ console.log(prepareHello('Unicorns')); -class fixOnScroll { +class UnicornPlugin { + getElement(providedElement){ + var element = providedElement || this.element; + switch (typeof element){ + case 'function': + return element(); + case 'string': + return d...
e5a1935a2b42aa983f7a216e99c70543485564e6
src/app/core/voice.service.ts
src/app/core/voice.service.ts
import { Injectable } from '@angular/core'; import artyomjs = require('artyom.js'); @Injectable() export class VoiceService { private voiceProvider: IVoiceProvider = new ArtyomProvider(); constructor() { } public say(text: string) { console.log("Saying: ", text); this.voiceProvider.say(text); } ...
import { Injectable } from '@angular/core'; import artyomjs = require('artyom.js'); import ArtyomCommand = Artyom.ArtyomCommand; import * as _ from "lodash"; @Injectable() export class VoiceService { private voiceProvider: IVoiceProvider = new ArtyomProvider(); constructor() { } public say(text: string) { ...
Add new public addCommand functions
Add new public addCommand functions
TypeScript
mit
ABAPlan/abaplan-core,ABAPlan/abaplan-core,ABAPlan/abaplan-core
--- +++ @@ -1,6 +1,7 @@ import { Injectable } from '@angular/core'; import artyomjs = require('artyom.js'); - +import ArtyomCommand = Artyom.ArtyomCommand; +import * as _ from "lodash"; @Injectable() export class VoiceService { @@ -43,4 +44,10 @@ public say(text: string): void { this.artyom.say(text); ...
6220ca8eb640114e225f49638a19a92ef60737e8
cli.ts
cli.ts
import * as sourceMapSupport from "source-map-support"; sourceMapSupport.install(); import * as commander from "commander"; import * as fs from "fs-extra"; import * as lib from "./lib"; import * as path from "path"; function printUsage(): void { console.log("Usage: eta <subcommand> [options]"); } export default a...
import * as sourceMapSupport from "source-map-support"; sourceMapSupport.install(); import * as commander from "commander"; import * as fs from "fs-extra"; import * as lib from "./lib"; import * as path from "path"; function printUsage(): void { console.log("Usage: eta <subcommand> [options]"); } export default a...
Fix a bug in argument handling
Fix a bug in argument handling
TypeScript
mit
crossroads-education/eta-cli,crossroads-education/eta-cli
--- +++ @@ -32,5 +32,5 @@ } const action: (args: string[]) => Promise<boolean> = require(actionPath).default; if (!action) throw new Error(`Internal error: invalid action defined for "${action}"`); - return await action(args.splice(i + 1)); + return await action(args.splice(i)); }
62a437e8fecf82503b3f7943eed76a0dc1aceb63
webpack/connectivity/reducer_support.ts
webpack/connectivity/reducer_support.ts
import { ConnectionStatus } from "./interfaces"; import * as m from "moment"; import { isString, max } from "lodash"; export function maxDate(l: m.Moment, r: m.Moment): string { const dates = [l, r].map(y => y.toDate()); return (max(dates) || dates[0]).toJSON(); } export function getStatus(cs: ConnectionStatus | ...
import { ConnectionStatus } from "./interfaces"; import * as m from "moment"; import { isString, max } from "lodash"; export function maxDate(l: m.Moment, r: m.Moment): string { const dates = [l, r].map(y => y.toDate()); return (max(dates) || dates[0]).toJSON(); } export function getStatus(cs: ConnectionStatus | ...
Fix logical error in `computeBestTime`
[STABLE] Fix logical error in `computeBestTime`
TypeScript
mit
FarmBot/farmbot-web-app,RickCarlino/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,FarmBot/farmbot-web-app,RickCarlino/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,RickCarlino/farmbot-web-app,FarmBot/Farmbot-Web-API,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,FarmBot/Farmbot-Web-API,RickCarlino/farmb...
--- +++ @@ -17,12 +17,11 @@ * the two is most relevant. It is a heuristic process that gives up when * unable to make a determination. */ export function computeBestTime(cs: ConnectionStatus | undefined, - lastSawMq: string | undefined, - now = m()): ConnectionStatus | undefined { + lastSawMq: string | undefi...
75b4c030af608ae0538c832d37339ba5ee59224b
src/Apps/Search/Components/SearchResultsSkeleton/index.tsx
src/Apps/Search/Components/SearchResultsSkeleton/index.tsx
import { Box, Col, Flex, Grid, Row } from "@artsy/palette" import { AppContainer } from "Apps/Components/AppContainer" import { HorizontalPadding } from "Apps/Components/HorizontalPadding" import React from "react" import { FilterSidebar } from "./FilterSidebar" import { GridItem } from "./GridItem" import { Header } f...
import { Box, Col, Flex, Grid, Row } from "@artsy/palette" import { AppContainer } from "Apps/Components/AppContainer" import React from "react" import { FilterSidebar } from "./FilterSidebar" import { GridItem } from "./GridItem" import { Header } from "./Header" export const SearchResultsSkeleton: React.FC<any> = pr...
Update responsive grid styling for search results skeleton
Update responsive grid styling for search results skeleton This commit updates styling for various responsive breakpoints.
TypeScript
mit
artsy/reaction,xtina-starr/reaction,artsy/reaction,artsy/reaction,xtina-starr/reaction,xtina-starr/reaction,artsy/reaction-force,artsy/reaction-force,xtina-starr/reaction
--- +++ @@ -1,6 +1,5 @@ import { Box, Col, Flex, Grid, Row } from "@artsy/palette" import { AppContainer } from "Apps/Components/AppContainer" -import { HorizontalPadding } from "Apps/Components/HorizontalPadding" import React from "react" import { FilterSidebar } from "./FilterSidebar" import { GridItem } from ...
395d8701914b03e330d226335bbbd374792ed7be
tasks/listings.ts
tasks/listings.ts
///<reference path="../typings/main.d.ts" /> import fs = require('fs'); function listings(grunt: IGrunt) { grunt.registerMultiTask('listings', 'Generates listings.json', function() { var done: (status?: boolean) => void = this.async(), cwd = process.cwd(), options = this.options(); grunt.util.spaw...
///<reference path="../typings/main.d.ts" /> import fs = require('fs'); function listings(grunt: IGrunt) { grunt.registerMultiTask('listings', 'Generates listings.json', function() { var done: (status?: boolean) => void = this.async(), cwd = process.cwd(), options = this.options(); // Make sure t...
Create `programs` folder if it doesn't exist
Create `programs` folder if it doesn't exist
TypeScript
mit
jvilk/doppio-demo,jvilk/doppio-demo,jvilk/doppio-demo,jvilk/doppio-demo
--- +++ @@ -6,16 +6,27 @@ var done: (status?: boolean) => void = this.async(), cwd = process.cwd(), options = this.options(); + + // Make sure that `programs` folder exists. grunt.util.spawn({ - cmd: 'node', - args: [`${cwd}/node_modules/coffee-script/bin/coffee`, `${cwd}/node_mod...
e690a506d9267fc4798bb1dbc90bab36e85f161f
app/src/ui/autocompletion/emoji-autocompletion-provider.tsx
app/src/ui/autocompletion/emoji-autocompletion-provider.tsx
import * as React from 'react' import { IAutocompletionProvider } from './index' /** Autocompletion provider for emoji. */ export default class EmojiAutocompletionProvider implements IAutocompletionProvider<string> { private emoji: Map<string, string> public constructor(emoji: Map<string, string>) { this.emoj...
import * as React from 'react' import { IAutocompletionProvider } from './index' /** Autocompletion provider for emoji. */ export default class EmojiAutocompletionProvider implements IAutocompletionProvider<string> { private emoji: Map<string, string> public constructor(emoji: Map<string, string>) { this.emoj...
Stop double escaping and match the start of the line
Stop double escaping and match the start of the line
TypeScript
mit
hjobrien/desktop,BugTesterTest/desktops,shiftkey/desktop,kactus-io/kactus,j-f1/forked-desktop,hjobrien/desktop,kactus-io/kactus,hjobrien/desktop,artivilla/desktop,kactus-io/kactus,desktop/desktop,hjobrien/desktop,artivilla/desktop,desktop/desktop,artivilla/desktop,say25/desktop,BugTesterTest/desktops,j-f1/forked-deskto...
--- +++ @@ -10,7 +10,7 @@ } public getRegExp(): RegExp { - return /(\\A|\\n| )(:)([a-z0-9\\+\\-][a-z0-9_]*)?/g + return /(^|\n| )(:)([a-z0-9\\+\\-][a-z0-9_]*)?/g } public getAutocompletionItems(text: string) {
b80dd72ea9cf5f81102825abb7e250e52ec842ce
client/components/Avatar.tsx
client/components/Avatar.tsx
import React, { SyntheticEvent } from 'react'; const avatarFallback = '/avatar/0.jpg'; const failTimes = new Map(); /** * 处理头像加载失败的情况, 展示默认头像 * @param e 事件 */ function handleError(e: SyntheticEvent) { const times = failTimes.get(e.target) || 0; if (times >= 2) { return; } (e.target as HTMLI...
import React, { SyntheticEvent } from 'react'; const avatarFallback = '/avatar/0.jpg'; const failTimes = new Map(); /** * 处理头像加载失败的情况, 展示默认头像 * @param e 事件 */ function handleError(e: SyntheticEvent) { const times = failTimes.get(e.target) || 0; if (times >= 2) { return; } (e.target as HTMLI...
Change avatar image alt to emtry string
feat: Change avatar image alt to emtry string
TypeScript
mit
yinxin630/fiora,yinxin630/fiora,yinxin630/fiora
--- +++ @@ -45,7 +45,7 @@ className={className} style={{ width: size, height: size, borderRadius: size / 2 }} src={/(blob|data):/.test(src) ? src : `${src}?imageView2/3/w/${size * 2}/h/${size * 2}`} - alt="头像图" + alt="" onClick={onClick} ...
5af13d48e2e6265356fb305bdb5b44d02e0583ed
ui/src/Navbar.tsx
ui/src/Navbar.tsx
import React, { CSSProperties, useContext } from 'react'; import { Navbar, Nav } from 'react-bootstrap'; import { useLocation } from 'react-router-dom'; import { JwtContext } from './App'; export default () => { const location = useLocation(); const jwtContext = useContext(JwtContext); return ( <...
import React, { CSSProperties, useContext } from 'react'; import { Navbar, Nav } from 'react-bootstrap'; import { useLocation, Link } from 'react-router-dom'; import { JwtContext } from './App'; export default () => { const location = useLocation(); const jwtContext = useContext(JwtContext); return ( ...
Use Link component in navbar
Use Link component in navbar
TypeScript
apache-2.0
dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web
--- +++ @@ -1,6 +1,6 @@ import React, { CSSProperties, useContext } from 'react'; import { Navbar, Nav } from 'react-bootstrap'; -import { useLocation } from 'react-router-dom'; +import { useLocation, Link } from 'react-router-dom'; import { JwtContext } from './App'; export default () => { @@ -12,9 +12,15 @@ ...
d918d81e102bdd563e78df3d4e0060ebc44c69f1
client/src/app/rp/services/banner-message.service.ts
client/src/app/rp/services/banner-message.service.ts
import { Injectable } from '@angular/core'; import { of } from 'rxjs'; @Injectable() export class BannerMessageService { public message$ = of( 'This is the beta version of RPNow. Please report problems to <a href="mailto:rpnow.net@gmail.com">rpnow.net@gmail.com</a>!' ); }
import { Injectable } from '@angular/core'; import { of } from 'rxjs'; @Injectable() export class BannerMessageService { public message$ = of( 'By using RPNow, you agree to its <a target="_blank" href="/terms">terms of use.</a>' ); }
Change "beta" warning message to "terms of use" message
Change "beta" warning message to "terms of use" message
TypeScript
mit
shamblesides/rpnow,shamblesides/rpnow
--- +++ @@ -5,7 +5,7 @@ export class BannerMessageService { public message$ = of( - 'This is the beta version of RPNow. Please report problems to <a href="mailto:rpnow.net@gmail.com">rpnow.net@gmail.com</a>!' + 'By using RPNow, you agree to its <a target="_blank" href="/terms">terms of use.</a>' ); ...
e15ee82c3c108dbe061a0ed531186846498117b2
src/helpers.ts
src/helpers.ts
import * as vscode from 'vscode'; export function isTerraformDocument(document: vscode.TextDocument): boolean { return document.languageId === "terraform"; }
import * as vscode from 'vscode'; import { readFile } from 'fs'; export function isTerraformDocument(document: vscode.TextDocument): boolean { return document.languageId === "terraform"; } export function read(path: string): Promise<string> { return new Promise<string>((resolve, reject) => { readFile(path, (e...
Add simple async readFile helper
Add simple async readFile helper
TypeScript
mpl-2.0
mauve/vscode-terraform,hashicorp/vscode-terraform,hashicorp/vscode-terraform,mauve/vscode-terraform,mauve/vscode-terraform,mauve/vscode-terraform,hashicorp/vscode-terraform
--- +++ @@ -1,5 +1,18 @@ import * as vscode from 'vscode'; +import { readFile } from 'fs'; export function isTerraformDocument(document: vscode.TextDocument): boolean { return document.languageId === "terraform"; } + +export function read(path: string): Promise<string> { + return new Promise<string>((resolve...
f21b95cd74b4f16c0e0434569e1b4d850e2bc5bd
ng2-bootstrap.ts
ng2-bootstrap.ts
export * from './components/accordion'; export * from './components/alert'; export * from './components/buttons'; export * from './components/carousel'; export * from './components/collapse'; export * from './components/datepicker'; export * from './components/dropdown'; export * from './components/pagination';...
import {Accordion, AccordionPanel} from './components/accordion'; import {Alert} from './components/alert'; import {ButtonCheckbox, ButtonRadio} from './components/buttons'; import {Carousel, Slide} from './components/carousel'; import {Collapse} from './components/collapse'; import {DatePicker} from './components/date...
Make it compatible with angular-cli
chore(): Make it compatible with angular-cli
TypeScript
mit
imribarr-compit/ng2-bootstrap,felixkubli/ng2-bootstrap,buchslava/angular2-bootstrap,IlyaSurmay/ngx-bootstrap-versioning,lanocturne/ng2-bootstrap,macroorganizm/ng2-bootstrap,buchslava/angular2-bootstrap,valor-software/ng2-bootstrap,vvpanchenko/ng2-bootstrap,BojanKogoj/ng2-bootstrap,valor-software/ngx-bootstrap,Betrozov/...
--- +++ @@ -1,3 +1,18 @@ +import {Accordion, AccordionPanel} from './components/accordion'; +import {Alert} from './components/alert'; +import {ButtonCheckbox, ButtonRadio} from './components/buttons'; +import {Carousel, Slide} from './components/carousel'; +import {Collapse} from './components/collapse'; +import {Da...
9c1879f85bb288ecbf139d38df62648a04441d3c
src/rxjs-redux.ts
src/rxjs-redux.ts
import {Observable} from "rxjs/Observable"; import "rxjs/add/observable/merge"; import "rxjs/add/operator/scan"; import "rxjs/add/operator/publishReplay"; // THIS FILE CONTAINS THE BOILERPLATE CODE YOU NEED TO COPY export interface Reducer<S> { (state: S): S; } export function createState<S>(reducers: Observable...
import {Observable} from "rxjs/Observable"; import "rxjs/add/observable/merge"; import "rxjs/add/operator/scan"; import "rxjs/add/operator/publishReplay"; // THIS FILE CONTAINS THE BOILERPLATE CODE YOU NEED TO COPY export type Reducer<S> = (state: S) => S; export function createState<S>(reducers: Observable<Reducer<...
Replace Reducer interface with a type alias to avoid having to import the interface in some cases
Replace Reducer interface with a type alias to avoid having to import the interface in some cases
TypeScript
mit
Dynalon/redux-pattern-with-rx,Dynalon/redux-pattern-with-rx
--- +++ @@ -5,9 +5,7 @@ // THIS FILE CONTAINS THE BOILERPLATE CODE YOU NEED TO COPY -export interface Reducer<S> { - (state: S): S; -} +export type Reducer<S> = (state: S) => S; export function createState<S>(reducers: Observable<Reducer<S>>, initialState: S): Observable<S> { return reducers
e6be73fc9dabf873078f0ca9b44ef71d6ac8b091
src/skinview3d.ts
src/skinview3d.ts
export { SkinObject, CapeObject, PlayerObject } from "./model"; export { SkinViewer } from "./viewer"; export { OrbitControls, createOrbitControls } from "./orbit_controls"; export { invokeAnimation, CompositeAnimation, WalkingAnimation, RunningAnimation, RotatingAnimation } from "./animation"; export { ...
Add back in the main entry point content
Add back in the main entry point content
TypeScript
mit
to2mbn/skinview3d
--- +++ @@ -0,0 +1,26 @@ +export { + SkinObject, + CapeObject, + PlayerObject +} from "./model"; + +export { + SkinViewer +} from "./viewer"; + +export { + OrbitControls, + createOrbitControls +} from "./orbit_controls"; + +export { + invokeAnimation, + CompositeAnimation, + WalkingAnimation, + RunningAnimation, + Ro...
9e869babbcb737303b7966cea4447741a01783b0
src/code/data/migrations/26_remove_minigraphs_visibility.ts
src/code/data/migrations/26_remove_minigraphs_visibility.ts
/* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const _ = require("lodash"); import { MigrationMixin } from "./migra...
const _ = require("lodash"); import { MigrationMixin } from "./migration-mixin"; const migration = { version: "1.25.0", description: "Removes minigraphs settings", date: "2018-11-23", doUpdate(data) { if (data.settings == null) { data.settings = {}; } delete data.settings.showMinigraphs; } }; expo...
Remove autogenerated header from the last migration
Remove autogenerated header from the last migration [#162022659]
TypeScript
mit
concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models
--- +++ @@ -1,10 +1,3 @@ -/* - * decaffeinate suggestions: - * DS102: Remove unnecessary code created because of implicit returns - * DS207: Consider shorter variations of null checks - * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md - */ - const _ = require("lodash"); im...
0ab1c71cb66930d396b8e2dcbec4117ddba03611
src/components/MediaTypeSwitch/MediaTypesSwitch.tsx
src/components/MediaTypeSwitch/MediaTypesSwitch.tsx
import { observer } from 'mobx-react'; import * as React from 'react'; import { MediaContentModel, SchemaModel, MediaTypeModel } from '../../services/models'; import { DropdownProps } from '../../common-elements/dropdown'; export interface MediaTypeChildProps { schema: SchemaModel; mime?: string; } export interf...
import { observer } from 'mobx-react'; import * as React from 'react'; import { MediaContentModel, SchemaModel, MediaTypeModel } from '../../services/models'; import { DropdownProps } from '../../common-elements/dropdown'; export interface MediaTypeChildProps { schema: SchemaModel; mime?: string; } export interf...
Fix crash when content is empty map
Fix crash when content is empty map
TypeScript
mit
Rebilly/ReDoc,Rebilly/ReDoc,Rebilly/ReDoc,Rebilly/ReDoc
--- +++ @@ -23,7 +23,7 @@ render() { const { content } = this.props; - if (!content || !content.mediaTypes) return null; + if (!content || !content.mediaTypes || !content.mediaTypes.length) return null; const activeMimeIdx = content.activeMimeIdx; let options = content.mediaTypes.map((mime...
92e9cba8e3a0a9520267c8688c6a0f1b51404e7c
src/css.ts
src/css.ts
import { isBrowser } from './browser' /** * Injects a string of CSS styles to a style node in <head> */ export function injectCSS(css: string): void { if (isBrowser) { const style = document.createElement('style') style.type = 'text/css' style.textContent = css style.setAttribute('data-tippy-styles...
import { isBrowser } from './browser' /** * Injects a string of CSS styles to a style node in <head> */ export function injectCSS(css: string): void { if (isBrowser) { const style = document.createElement('style') style.type = 'text/css' style.textContent = css style.setAttribute('data-__NAMESPACE_...
Use namespace prefix for style tag
Use namespace prefix for style tag
TypeScript
mit
atomiks/tippyjs,atomiks/tippyjs,atomiks/tippyjs,atomiks/tippyjs
--- +++ @@ -8,7 +8,7 @@ const style = document.createElement('style') style.type = 'text/css' style.textContent = css - style.setAttribute('data-tippy-stylesheet', '') + style.setAttribute('data-__NAMESPACE_PREFIX__-stylesheet', '') const head = document.head const { firstChild } = head...
3d0140fdfa40c77c6a760355a915480e73e692de
src/noExpressionStatementRule.ts
src/noExpressionStatementRule.ts
import * as ts from "typescript"; import * as Lint from "tslint/lib/lint"; export class Rule extends Lint.Rules.AbstractRule { public static FAILURE_STRING = "Using expressions to cause side-effects not allowed."; public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { const noExpressionStatementWalker ...
import * as ts from "typescript"; import * as Lint from "tslint/lib/lint"; export class Rule extends Lint.Rules.AbstractRule { public static FAILURE_STRING = "Using expressions to cause side-effects not allowed."; public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { const noExpressionStatementWalker ...
Fix for no expression statement rule
Fix for no expression statement rule
TypeScript
mit
jonaskello/tslint-immutable
--- +++ @@ -12,9 +12,12 @@ class NoExpressionStatementWalker extends Lint.RuleWalker { - public visitNode(node: ts.Node) { + public visitNode(node: ts.Node): void { if (node && node.kind === ts.SyntaxKind.ExpressionStatement) { - this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Ru...
a8ce879f105a7bafd05bc71e1fe345d95425405e
pages/_app.tsx
pages/_app.tsx
import type { AppProps } from "next/app"; import Router from "next/router"; import NProgress from "nprogress"; import "nprogress/nprogress.css"; import "../styles/index.scss"; NProgress.configure({ showSpinner: false }); Router.events.on("routeChangeStart", () => NProgress.start()); Router.events.on("routeChangeCompl...
import type { AppProps } from "next/app"; import Router from "next/router"; import NProgress from "nprogress"; import "nprogress/nprogress.css"; import "../styles/index.scss"; NProgress.configure({ showSpinner: false, minimum: 0 }); Router.events.on("routeChangeStart", () => NProgress.start()); Router.events.on("rout...
Set nprogress minimum at 0
Set nprogress minimum at 0
TypeScript
isc
sobstel/golazon,sobstel/golazon,sobstel/golazon
--- +++ @@ -5,7 +5,7 @@ import "nprogress/nprogress.css"; import "../styles/index.scss"; -NProgress.configure({ showSpinner: false }); +NProgress.configure({ showSpinner: false, minimum: 0 }); Router.events.on("routeChangeStart", () => NProgress.start()); Router.events.on("routeChangeComplete", () => NProgress....
d3d40c75e569f582ccfd8f4aa70f294786337743
packages/schematics/src/scam/index.ts
packages/schematics/src/scam/index.ts
import { chain, externalSchematic, Rule } from '@angular-devkit/schematics'; import { Schema as NgComponentOptions } from '@schematics/angular/component/schema'; export interface ScamOptions extends NgComponentOptions { separateModule: boolean; } export function scam(options: ScamOptions): Rule { const ruleL...
import { chain, externalSchematic, Rule } from '@angular-devkit/schematics'; import { Schema as NgComponentOptions } from '@schematics/angular/component/schema'; export interface ScamOptions extends NgComponentOptions { separateModule: boolean; } export function scam(options: ScamOptions): Rule { let ruleLis...
Merge module and component as default behavior.
@wishtack/schematics:scam: Merge module and component as default behavior.
TypeScript
mit
wishtack/ng-steroids,wishtack/wishtack-steroids,wishtack/wishtack-steroids,wishtack/ng-steroids,wishtack/wishtack-steroids
--- +++ @@ -7,7 +7,7 @@ export function scam(options: ScamOptions): Rule { - const ruleList = [ + let ruleList = [ externalSchematic('@schematics/angular', 'module', options), externalSchematic('@schematics/angular', 'component', { ...options, @@ -16,6 +16,12 @@ }) ...
8f31bcb0f63b781d038f63af54316983d40675cd
src/bakeCharts.ts
src/bakeCharts.ts
import {ChartBaker} from './ChartBaker' import * as parseArgs from 'minimist' import * as os from 'os' import * as path from 'path' const argv = parseArgs(process.argv.slice(2)) async function main(email: string, name: string, slug: string) { const baker = new ChartBaker({ canonicalRoot: 'https://ourworldi...
import {ChartBaker} from './ChartBaker' import * as parseArgs from 'minimist' import * as os from 'os' import * as path from 'path' const argv = parseArgs(process.argv.slice(2)) async function main(email: string, name: string, slug: string) { const baker = new ChartBaker({ canonicalRoot: 'https://ourworldi...
Allow force regen from command line
Allow force regen from command line
TypeScript
mit
aaldaber/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/our-world-in-data-grapher,OurWorldInData/our-world-in-data-grapher,OurWorldInData/owid-grapher,aaldaber/owid-grapher,OurWorldInData/our-world-in-data-grapher,aaldaber/owid-grapher,OurWorldInData/our-world-in-data-grapher,aaldaber/owid-grapher,owid/owid-gr...
--- +++ @@ -8,7 +8,8 @@ const baker = new ChartBaker({ canonicalRoot: 'https://ourworldindata.org', pathRoot: '/grapher', - repoDir: path.join(__dirname, `../../public`) + repoDir: path.join(__dirname, `../../public`), + regenConfig: argv.regenConfig }) try {
b338ed1ed273f6d109f5515d6f87ad7aa90b8a7c
packages/@sanity/desk-tool/src/diffs/annotationTooltip/annotationTooltip.tsx
packages/@sanity/desk-tool/src/diffs/annotationTooltip/annotationTooltip.tsx
import React from 'react' import {useUser, LOADING_USER} from '@sanity/react-hooks' import {Tooltip} from 'react-tippy' import {UserAvatar} from '@sanity/components/presence' import {Annotation, AnnotationChanged} from '../../panes/documentPane/history/types' import styles from './annotationTooltip.css' interface Ann...
import React from 'react' import {useUser} from '@sanity/react-hooks' import {Tooltip} from 'react-tippy' import {UserAvatar} from '@sanity/components/presence' import {Annotation, AnnotationChanged} from '../../panes/documentPane/history/types' import styles from './annotationTooltip.css' interface AnnotationTooltip...
Use new useUser API for annotation tooltips
[desk-tool] Use new useUser API for annotation tooltips
TypeScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
--- +++ @@ -1,5 +1,5 @@ import React from 'react' -import {useUser, LOADING_USER} from '@sanity/react-hooks' +import {useUser} from '@sanity/react-hooks' import {Tooltip} from 'react-tippy' import {UserAvatar} from '@sanity/components/presence' import {Annotation, AnnotationChanged} from '../../panes/documentPane...
36016d34220f6a7e24dc2465d24e4858ae88d03c
index.ts
index.ts
import { Component, OnInit, Input, Output, EventEmitter } from "@angular/core"; import { AirOptions } from "./lib/options"; import { AirCalendar } from "./lib/calendar"; import { LANGUAGES, AirLanguage } from "./lib/languages"; @Component({ selector: 'air-datepicker', templateUrl: './template.html', style...
import { Component, OnInit, Input, Output, EventEmitter } from "@angular/core"; import { AirOptions } from "./lib/options"; import { AirCalendar } from "./lib/calendar"; import { LANGUAGES, AirLanguage } from "./lib/languages"; @Component({ selector: 'air-datepicker', templateUrl: './template.html', style...
Make sure default options are used when partial options are supplied
Make sure default options are used when partial options are supplied Closes #6
TypeScript
mit
kesarion/angular2-air-datepicker,kesarion/angular2-air-datepicker,kesarion/angular2-air-datepicker
--- +++ @@ -19,9 +19,7 @@ airCalendar: AirCalendar; ngOnInit () { - if (!this.airOptions) { - this.airOptions = new AirOptions; - } + this.airOptions = Object.assign(new AirOptions, this.airOptions || {}); this.airLanguage = LANGUAGES.get(this.airOptions.language);...
360b22e9dad9b3d44d31c761a05a865fcd4e70e4
cypress/integration/navigation.spec.ts
cypress/integration/navigation.spec.ts
import { visitExample } from '../helper'; describe('Navigation', () => { beforeEach(() => { visitExample('official-storybook'); }); it('should search navigation item', () => { cy.get('#storybook-explorer-searchfield') .click() .type('persisting the action logger'); cy.get('.sidebar-cont...
/* eslint-disable jest/expect-expect */ import { visitExample } from '../helper'; describe('Navigation', () => { before(() => { visitExample('official-storybook'); }); it('should search navigation item', () => { cy.get('#storybook-explorer-searchfield') .click() .clear() .type('persist...
IMPROVE the navigation e2e cypress test
IMPROVE the navigation e2e cypress test
TypeScript
mit
storybooks/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook
--- +++ @@ -1,13 +1,15 @@ +/* eslint-disable jest/expect-expect */ import { visitExample } from '../helper'; describe('Navigation', () => { - beforeEach(() => { + before(() => { visitExample('official-storybook'); }); it('should search navigation item', () => { cy.get('#storybook-explorer-sear...
f1ebe811731f6bd3c4789ac09f120793633e73ad
src/actions/blockHitGroup.ts
src/actions/blockHitGroup.ts
import { BLOCK_HIT, UNBLOCK_HIT, UNBLOCK_MULTIPLE_HITS } from '../constants'; import { BlockedHit } from '../types'; import { Set } from 'immutable'; export interface BlockHit { readonly type: BLOCK_HIT; readonly data: BlockedHit; } export interface UnblockHit { readonly type: UNBLOCK_HIT; readonly...
import { BLOCK_HIT, UNBLOCK_HIT, UNBLOCK_MULTIPLE_HITS } from '../constants'; import { BlockedHit, GroupId } from '../types'; import { Set } from 'immutable'; export interface BlockHit { readonly type: BLOCK_HIT; readonly data: BlockedHit; } export interface UnblockHit { readonly type: UNBLOCK_HIT; ...
Use more expressive type name for UnblockMultipleHits.
Use more expressive type name for UnblockMultipleHits.
TypeScript
mit
Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine
--- +++ @@ -1,5 +1,5 @@ import { BLOCK_HIT, UNBLOCK_HIT, UNBLOCK_MULTIPLE_HITS } from '../constants'; -import { BlockedHit } from '../types'; +import { BlockedHit, GroupId } from '../types'; import { Set } from 'immutable'; export interface BlockHit { @@ -14,7 +14,7 @@ export interface UnblockMultipleHits { ...
84bb977f278e88b6250ff429d54ff0dfbd6bb640
src/gui/storage.ts
src/gui/storage.ts
class WebStorage { private storageObj: Storage; public constructor(storageObj: Storage) { this.storageObj = storageObj; } public get(key: string): string { if (!this.isCompatible()) { return; } return this.storageObj.getItem(key); } public getObj(key: string): any { ...
class WebStorage { private storageObj: Storage; public constructor(storageObj: Storage) { this.storageObj = storageObj; } public get(key: string): string { if (!this.isCompatible()) { return; } return this.storageObj.getItem(key); } public getObj(key: string): any { ...
Add more descriptive error messages on JSON exceptions
Add more descriptive error messages on JSON exceptions
TypeScript
mit
CAAL/CAAL,CAAL/CAAL,CAAL/CAAL,CAAL/CAAL
--- +++ @@ -17,7 +17,7 @@ try { return JSON.parse(this.get(key)); } catch (e) { - console.log(e.message); + console.log('Invalid JSON: ' + e.message); } } @@ -33,7 +33,7 @@ try { this.set(key, JSON.stringify(value)); }...
6e6cb3bb651740ff87df93d1190110c169cfdd59
src/geometries/ConeGeometry.d.ts
src/geometries/ConeGeometry.d.ts
import { CylinderGeometry } from './CylinderGeometry'; export class ConeGeometry extends CylinderGeometry { /** * @param [radius=1] — Radius of the cone base. * @param [height=1] — Height of the cone. * @param [radiusSegments=8] — Number of segmented faces around the circumference of the cone. * @param [heig...
import { CylinderGeometry } from './CylinderGeometry'; export class ConeGeometry extends CylinderGeometry { /** * @param [radius=1] — Radius of the cone base. * @param [height=1] — Height of the cone. * @param [radialSegments=8] — Number of segmented faces around the circumference of the cone. * @param [heig...
Fix typo in ConeGeometry (again)
Fix typo in ConeGeometry (again)
TypeScript
mit
fyoudine/three.js,Liuer/three.js,fyoudine/three.js,gero3/three.js,WestLangley/three.js,06wj/three.js,looeee/three.js,kaisalmen/three.js,mrdoob/three.js,greggman/three.js,aardgoose/three.js,WestLangley/three.js,mrdoob/three.js,gero3/three.js,donmccurdy/three.js,jpweeks/three.js,kaisalmen/three.js,makc/three.js.fork,Liue...
--- +++ @@ -5,7 +5,7 @@ /** * @param [radius=1] — Radius of the cone base. * @param [height=1] — Height of the cone. - * @param [radiusSegments=8] — Number of segmented faces around the circumference of the cone. + * @param [radialSegments=8] — Number of segmented faces around the circumference of the cone....
65798c7539eb90c19804cd0cbc8bb86fb2022430
packages/components/hooks/useOnline.ts
packages/components/hooks/useOnline.ts
import { useEffect, useState } from 'react'; const getOnlineStatus = () => { return typeof navigator !== 'undefined' && typeof navigator.onLine === 'boolean' ? navigator.onLine : true; }; const useOnline = () => { const [onlineStatus, setOnlineStatus] = useState(getOnlineStatus()); useEffect(() => { ...
import { useEffect, useState } from 'react'; const getOnlineStatus = () => { return typeof navigator !== 'undefined' && typeof navigator.onLine === 'boolean' ? navigator.onLine : true; }; const useOnline = () => { const [onlineStatus, setOnlineStatus] = useState(getOnlineStatus()); useEffect(() => { ...
Read online status in effect
Read online status in effect If the online status would have changed between render and effect, it'd use a stale value. Re-read it to make sure it's up-to-date.
TypeScript
mit
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
--- +++ @@ -10,6 +10,8 @@ useEffect(() => { const goOnline = () => setOnlineStatus(true); const goOffline = () => setOnlineStatus(false); + + setOnlineStatus(getOnlineStatus()); window.addEventListener('online', goOnline); window.addEventListener('offline', goOffline)...
c4ddc9f53862b2104a1bb19fd555d5f674035d02
test/isaac-generator.test.ts
test/isaac-generator.test.ts
/// <reference path="../typings/tape/tape.d.ts"/> import * as test from 'tape'; import { IsaacGenerator } from '../src/isaac-generator'; test("getValue calls _randomise if count is 0", (t) => { let generator = new IsaacGenerator(); generator["_count"] = 0; let _randomiseCalled = false; generator["_randomise"...
/// <reference path="../typings/tape/tape.d.ts"/> import * as test from 'tape'; import { IsaacGenerator } from '../src/isaac-generator'; test("getValue calls _randomise if count is 0", (t) => { t.plan(1); let generator = new IsaacGenerator(); generator["_randomise"] = () => { t.pass("_randomise called"); ...
Use plan/pass rather than booleans where possible
Use plan/pass rather than booleans where possible
TypeScript
mit
Jameskmonger/isaac-crypto
--- +++ @@ -4,44 +4,37 @@ import { IsaacGenerator } from '../src/isaac-generator'; test("getValue calls _randomise if count is 0", (t) => { + t.plan(1); let generator = new IsaacGenerator(); + + generator["_randomise"] = () => { + t.pass("_randomise called"); + } + generator["_count"] = 0; + generato...
92397aa1cc6469b9ef977f0754aaa2a254e7f6e3
src/environment.ts
src/environment.ts
// Angular 2 import {enableDebugTools} from "@angular/platform-browser"; import {enableProdMode, ApplicationRef} from "@angular/core"; // Angular debug tools in the dev console // https://github.com/angular/angular/blob/86405345b781a9dc2438c0fbe3e9409245647019/TOOLS_JS.md let _decorateModuleRef = function identity<T>(...
// Angular 2 import {enableDebugTools} from "@angular/platform-browser"; import {enableProdMode} from "@angular/core"; // Angular debug tools in the dev console // https://github.com/angular/angular/blob/86405345b781a9dc2438c0fbe3e9409245647019/TOOLS_JS.md let _decorateModuleRef = function identity<T>(value: T): T { ...
Remove no longer required workaround for enabling the angular debug tools
(cleanup): Remove no longer required workaround for enabling the angular debug tools
TypeScript
mit
DorianGrey/ng2-webpack-template,DorianGrey/ng2-webpack-template,DorianGrey/ng-webpack-template,DorianGrey/ng-webpack-template,DorianGrey/ng-webpack-template,DorianGrey/ng2-webpack-template
--- +++ @@ -1,6 +1,6 @@ // Angular 2 import {enableDebugTools} from "@angular/platform-browser"; -import {enableProdMode, ApplicationRef} from "@angular/core"; +import {enableProdMode} from "@angular/core"; // Angular debug tools in the dev console // https://github.com/angular/angular/blob/86405345b781a9dc2438...
fda898e14a4914579851c5988ee2f6ba53d1f630
saleor/static/dashboard-next/storybook/stories/products/ProductCreatePage.tsx
saleor/static/dashboard-next/storybook/stories/products/ProductCreatePage.tsx
import { storiesOf } from "@storybook/react"; import * as React from "react"; import ProductCreatePage from "../../../products/components/ProductCreatePage"; import { product as productFixture } from "../../../products/fixtures"; import { productTypes } from "../../../productTypes/fixtures"; import Decorator from "../...
import { storiesOf } from "@storybook/react"; import * as React from "react"; import ProductCreatePage, { FormData } from "../../../products/components/ProductCreatePage"; import { formError } from "../../misc"; import { product as productFixture } from "../../../products/fixtures"; import { productTypes } from "....
Add new product error view to storybook
Add new product error view to storybook
TypeScript
bsd-3-clause
UITools/saleor,maferelo/saleor,mociepka/saleor,UITools/saleor,mociepka/saleor,mociepka/saleor,UITools/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,maferelo/saleor
--- +++ @@ -1,7 +1,12 @@ import { storiesOf } from "@storybook/react"; import * as React from "react"; -import ProductCreatePage from "../../../products/components/ProductCreatePage"; +import ProductCreatePage, { + FormData +} from "../../../products/components/ProductCreatePage"; + +import { formError } from "....
4d2c0e41616111b6b13f8688bd7b15d0867b0bdd
src/misc/dependencyInfo.ts
src/misc/dependencyInfo.ts
import Logger from './logger'; import { execSync } from 'child_process'; export default class { private logger: Logger; constructor() { this.logger = new Logger('Deps'); } public showAll(): void { this.show('MongoDB', 'mongo --version', x => x.match(/^MongoDB shell version:? (.*)\r?\n/)); this.show('Redis'...
import Logger from './logger'; import { execSync } from 'child_process'; export default class { private logger: Logger; constructor() { this.logger = new Logger('Deps'); } public showAll(): void { this.show('MongoDB', 'mongo --version', x => x.match(/^MongoDB shell version:? (.*)\r?\n/)); this.show('Redis'...
Update dependency checking for ImageMagick
Update dependency checking for ImageMagick
TypeScript
mit
syuilo/Misskey,Tosuke/misskey,Tosuke/misskey,ha-dai/Misskey,Tosuke/misskey,Tosuke/misskey,syuilo/Misskey,ha-dai/Misskey,Tosuke/misskey
--- +++ @@ -11,7 +11,7 @@ public showAll(): void { this.show('MongoDB', 'mongo --version', x => x.match(/^MongoDB shell version:? (.*)\r?\n/)); this.show('Redis', 'redis-server --version', x => x.match(/v=([0-9\.]*)/)); - this.show('ImageMagick', 'magick -version', x => x.match(/^Version: ImageMagick (.+?)\r...
4d689b06112bd5b6113dca8272c87a5ddefcc09b
src/game.ts
src/game.ts
import { Grid, Move } from './definitions'; export function makeMove(grid: Grid, move: Move, forX: (grid: Grid) => boolean): Grid { const newValue = forX(grid); return grid.map((value, index) => index == move ? newValue : value); } function hasXWon(grid: Grid): boolean { return false; } function hasOWon(grid: ...
import { Grid, Move } from './definitions'; import { getRows, getColumns, getDiagonals } from './utils'; export function makeMove(grid: Grid, move: Move, forX: (grid: Grid) => boolean): Grid { const newValue = forX(grid); return grid.map((value, index) => index == move ? newValue : value); } function hasXWon(grid...
Implement hasXWon, hasOWon, and isDraw methods
Implement hasXWon, hasOWon, and isDraw methods
TypeScript
mit
artfuldev/tictactoe-ai,artfuldev/tictactoe-ai
--- +++ @@ -1,4 +1,5 @@ import { Grid, Move } from './definitions'; +import { getRows, getColumns, getDiagonals } from './utils'; export function makeMove(grid: Grid, move: Move, forX: (grid: Grid) => boolean): Grid { const newValue = forX(grid); @@ -6,15 +7,19 @@ } function hasXWon(grid: Grid): boolean { ...
e746218ba8915ee395e178e7e30dcbbdda4dfc50
types/react-router/test/WithRouter.tsx
types/react-router/test/WithRouter.tsx
import * as React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; interface TOwnProps extends RouteComponentProps { username: string; } const ComponentFunction = (props: TOwnProps) => ( <h2>Welcome {props.username}</h2> ); class ComponentClass extends React.Component<TOwnPro...
import * as React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; interface TOwnProps extends RouteComponentProps { username: string; } const ComponentFunction = (props: TOwnProps) => ( <h2>Welcome {props.username}</h2> ); class ComponentClass extends React.Component<TOwnPro...
Add failing test for union props
[react-router] Add failing test for union props
TypeScript
mit
georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,dsebastien/DefinitelyTyped,markogresak/DefinitelyTyped,dsebastien/DefinitelyTyped,borisyankov/DefinitelyTyped,mcliment/DefinitelyTyped
--- +++ @@ -22,3 +22,31 @@ <WithRouterComponentFunction username="John" /> ); const WithRouterTestClass = () => <WithRouterComponentClass username="John" />; + +// union props +{ + interface Book { + kind: 'book'; + author: string; + } + + interface Magazine { + kind: 'magazine'; ...
8d76b14790b6f15e50b50031eac4ed1ccdddd049
src/main/components/App/App.tsx
src/main/components/App/App.tsx
import React from "react" import { bindKeyboardShortcut } from "main/services/KeyboardShortcut.ts" import RootStore from "stores/RootStore.ts" import { theme } from "common/theme/muiTheme" import { ThemeProvider } from "@material-ui/styles" import { applyThemeToCSS } from "common/theme/applyThemeToCSS" import { defa...
import React from "react" import { bindKeyboardShortcut } from "main/services/KeyboardShortcut.ts" import RootStore from "stores/RootStore.ts" import { theme } from "common/theme/muiTheme" import { ThemeProvider } from "@material-ui/styles" import { applyThemeToCSS } from "common/theme/applyThemeToCSS" import { defa...
Support using styled-component with Material-UI
Support using styled-component with Material-UI
TypeScript
mit
ryohey/signal,ryohey/signal,ryohey/signal
--- +++ @@ -13,6 +13,7 @@ import RootView from "../RootView/RootView" import "./App.css" +import { StylesProvider } from "@material-ui/core" const rootStore = new RootStore() @@ -25,7 +26,9 @@ <StoreContext.Provider value={{ rootStore: new RootStore() }}> <ThemeContext.Provider value={defaultThem...
e0dc82ab6565e06417cf4aad5a59a8fb80b70c2b
js/appconfig.ts
js/appconfig.ts
class GameHandHistory { /** * Show game history with cards. */ public showPictureHistory = true; /** * Show game history as text. */ public showTextHistory = true; } class GameActionBlock { /** * Wherether action panel is present on the application */ public hasS...
class GameHandHistory { /** * Show game history with cards. */ public showPictureHistory = true; /** * Show game history as text. */ public showTextHistory = true; } class GameActionBlock { /** * Wherether action panel is present on the application */ public hasS...
Add setings variable for enabling/disabling round notification
Add setings variable for enabling/disabling round notification
TypeScript
apache-2.0
online-poker/poker-html-client,online-poker/poker-html-client,online-poker/poker-html-client
--- +++ @@ -31,6 +31,7 @@ useSignalR: false, noTableMoneyLimit: true, showTournamentTables: true, + isRoundNotificationEnabled: true, }; public tournament = { enabled: false,
92a04a3e2731adfbfb742f4da72105ab67ccf8b6
src/app/menu/menu.component.ts
src/app/menu/menu.component.ts
import { Component, OnInit, AnimationTransitionEvent } from '@angular/core'; import { routerTransition } from '../app.routes.animations'; import { GameStateService } from "../services/game-state.service"; import { SoundService } from "../services/sound.service"; @Component({ selector: 'app-menu', templateUrl: './m...
import { Component, OnInit, AnimationTransitionEvent } from '@angular/core'; import { routerTransition } from '../app.routes.animations'; import { GameStateService } from "../services/game-state.service"; import { SoundService } from "../services/sound.service"; @Component({ selector: 'app-menu', templateUrl: './m...
Add some console.log statements for home router animation started/done (take 3)
Add some console.log statements for home router animation started/done (take 3)
TypeScript
mit
nmarsden/make-em-green,nmarsden/make-em-green,nmarsden/make-em-green
--- +++ @@ -29,6 +29,8 @@ } routerAnimationStarted($event: AnimationTransitionEvent) { + console.log(`menu: [routerAnimationStarted] $event.toState=${$event.toState}`); + if ($event.toState === 'void') { this.soundService.playTransitionSound(); this.gameState.isRouteLeaveAnimationInProgr...
094c82b75a7c2ac0e56c6a340ddee51cbe1039b0
console/src/app/common/BasicTab/BasicTab.ts
console/src/app/common/BasicTab/BasicTab.ts
export class BasicTab { public isActive: boolean = false private name: String; private link: String; private id: String; // MARK: - Getters & Setters public getId(): String { return this.id; } public getLink(): String { return this.link; } public onTabSel...
export class BasicTab { public isActive: boolean = false private name: String; private link: String; private id: String; // MARK: - Getters & Setters public getId(): String { return this.id; } public getLink(): String { return this.link; } public onTabSel...
Change logic of generating ID for tab.
Change logic of generating ID for tab.
TypeScript
mit
emc-mongoose/console,emc-mongoose/console,emc-mongoose/console
--- +++ @@ -36,7 +36,7 @@ // MARK: - Private private getUniqueIdentifier(): string { - const currentDateTime = Date.now(); + const currentDateTime = new Date().getMilliseconds(); const hexNumericSystemBase = 16; return currentDateTime.toString(hexNumericSystemBase) + this...
d1ac4df089ec54513c28dd9f4b9ae45ef6706384
src/utils.ts
src/utils.ts
/* * Copyright (C) 2016 wikiwi.io * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ import {Rule } from "jss"; import createHash = require("murmurhash-js/murmurhash3_gc"); export function generateClassName(str: string, rule: Rule): string...
/* * Copyright (C) 2016 wikiwi.io * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ import {Rule } from "jss"; import createHash = require("murmurhash-js/murmurhash3_gc"); export function generateClassName(str: string, rule: Rule): string...
Change camel case to dash
Change camel case to dash
TypeScript
mit
wikiwi/react-jss-theme,wikiwi/react-jss-theme,wikiwi/react-jss-theme
--- +++ @@ -10,14 +10,15 @@ export function generateClassName(str: string, rule: Rule): string { if (rule.name) { + const dashedRuleName = rule.name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); if (rule.options.sheet) { const sheet = rule.options.sheet; if (sheet.options.meta) { ...
1bca022b184abab90430ad092e1436c300eeb0e8
src/app/views/sessions/session/leftpanel/adddatasetmodal/adddatasetmodal.content.ts
src/app/views/sessions/session/leftpanel/adddatasetmodal/adddatasetmodal.content.ts
import Dataset from "../../../../../model/session/dataset"; import {Component, Input, ChangeDetectorRef, ViewChild, AfterViewInit} from '@angular/core'; import {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap'; import {UploadService} from "../../../../../shared/services/upload.service"; @Component({ selector: 'ch-a...
import Dataset from "../../../../../model/session/dataset"; import { Component, Input, ChangeDetectorRef, ViewChild, AfterViewInit, OnInit } from "@angular/core"; import { NgbActiveModal } from "@ng-bootstrap/ng-bootstrap"; import { UploadService } from "../../../../../shared/services/upload.service"; @Com...
Reformat and fix linting errors
Reformat and fix linting errors
TypeScript
mit
chipster/chipster-web,chipster/chipster-web,chipster/chipster-web
--- +++ @@ -1,30 +1,38 @@ import Dataset from "../../../../../model/session/dataset"; -import {Component, Input, ChangeDetectorRef, ViewChild, AfterViewInit} from '@angular/core'; -import {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap'; -import {UploadService} from "../../../../../shared/services/upload.service";...
4e49ee6d87f3b922ea7ba7456f87ac235fed180d
frontend/applications/auth/src/modules/login/Authenticated.tsx
frontend/applications/auth/src/modules/login/Authenticated.tsx
import React from 'react'; import { Redirect } from 'react-router'; export const Authenticated = ({ location }) => location.referrer !== location.url ? ( <Redirect to={{ pathname: location.referrer }} /> ) : ( <div>You have been successfully logged in</div> );
import React from 'react'; import { Redirect } from 'react-router'; //TODO: Redirect back to correct path export const Authenticated = ({ location }) => location.referrer !== location.url ? ( <Redirect to={{ pathname: location.referrer }} /> ) : ( <div>You have been successfully log...
Add todo for fixing auth
Add todo for fixing auth
TypeScript
mit
CodeForCharlotte/cmpd-holiday-gift-backend,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/cmpd-holiday-gift-backend,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/cmpd-holiday-gift-backend
--- +++ @@ -1,6 +1,7 @@ import React from 'react'; import { Redirect } from 'react-router'; +//TODO: Redirect back to correct path export const Authenticated = ({ location }) => location.referrer !== location.url ? ( <Redirect
8c45898245072158e6ff0e70244fdf75739f46ab
packages/lesswrong/server/startupSanityChecks.ts
packages/lesswrong/server/startupSanityChecks.ts
import { onStartup } from '../lib/executionEnvironment'; import process from 'process'; import { DatabaseMetadata } from '../lib/collections/databaseMetadata/collection'; import { PublicInstanceSetting } from '../lib/instanceSettings'; // Database ID string that this config file should match with const expectedDatabas...
import { onStartup } from '../lib/executionEnvironment'; import process from 'process'; import { DatabaseMetadata } from '../lib/collections/databaseMetadata/collection'; import { PublicInstanceSetting } from '../lib/instanceSettings'; // Database ID string that this config file should match with const expectedDatabas...
Fix an undefined-vs-null issue that prevented starting without a database
Fix an undefined-vs-null issue that prevented starting without a database
TypeScript
mit
Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2
--- +++ @@ -9,13 +9,14 @@ onStartup(() => { const expectedDatabaseId = expectedDatabaseIdSetting.get(); const databaseIdObject = DatabaseMetadata.findOne({ name: "databaseId" }); + const databaseId = databaseIdObject?.value || null; // If either the database or the settings config file contains an ID, ...
8e10cf1308dce3c6d8187bd9e702a62ac96d3d90
functions/amazon.ts
functions/amazon.ts
import * as apac from "apac"; import * as functions from "firebase-functions"; const amazonClient = new apac.OperationHelper({ assocId: functions.config().aws.tag, awsId: functions.config().aws.id, awsSecret: functions.config().aws.secret, endPoint: "webservices.amazon.co.jp", }); export async functio...
import * as apac from "apac"; import * as functions from "firebase-functions"; const amazonClient = new apac.OperationHelper({ assocId: functions.config().aws.tag, awsId: functions.config().aws.id, awsSecret: functions.config().aws.secret, endPoint: "webservices.amazon.co.jp", }); export async functio...
Throw error from books function
Throw error from books function
TypeScript
mit
raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d
--- +++ @@ -9,14 +9,18 @@ }); export async function books(): Promise<any[]> { - const { result: { ItemSearchResponse: { Items: { Item } } } } + const { result: { ItemSearchErrorResponse, ItemSearchResponse } } = await amazonClient.execute("ItemSearch", { BrowseNode: "466298", ...
9c7fd609d041a75c578e180c2fd46251f8b81dc4
packages/core/src/classes/http-request.ts
packages/core/src/classes/http-request.ts
export class HttpRequest { params: { [key: string]: any } = {}; body: any = undefined; query: { [key: string]: any } = {}; constructor(private expressRequest?) { if (expressRequest) { this.query = expressRequest.query; this.params = expressRequest.params; this.body = expressRequest.body; ...
import { HttpMethod } from '../interfaces'; export class HttpRequest { params: { [key: string]: any } = {}; body: any = undefined; query: { [key: string]: any } = {}; method: HttpMethod = 'GET'; path: string = ''; constructor(private expressRequest?) { if (expressRequest) { this.query = expressR...
Add path and method to HttpRequest.
Add path and method to HttpRequest.
TypeScript
mit
FoalTS/foal,FoalTS/foal,FoalTS/foal,FoalTS/foal
--- +++ @@ -1,13 +1,19 @@ +import { HttpMethod } from '../interfaces'; + export class HttpRequest { params: { [key: string]: any } = {}; body: any = undefined; query: { [key: string]: any } = {}; + method: HttpMethod = 'GET'; + path: string = ''; constructor(private expressRequest?) { if (expres...
f5a47bf4008068c34cb825af5777059adba48191
app/services/alert.service.ts
app/services/alert.service.ts
import * as config from '../common/config'; import {Injectable, EventEmitter} from '@angular/core'; import {Subject} from 'rxjs/Subject'; import {UUID} from 'angular2-uuid'; @Injectable() export class AlertService { private alertEmitSource = new Subject(); alertEmit$ = this.alertEmitSource.asObservable(); alertT...
import * as config from '../common/config'; import {Injectable, EventEmitter} from '@angular/core'; import {contains} from '../common/utils'; import {Subject} from 'rxjs/Subject'; import {UUID} from 'angular2-uuid'; @Injectable() export class AlertService { private alertEmitSource = new Subject(); alertEmit$ = thi...
Change alertTypes to an array since we don't use the automatic titles anymore
Change alertTypes to an array since we don't use the automatic titles anymore
TypeScript
mit
MyMICDS/MyMICDS-v2-Angular,MyMICDS/MyMICDS-v2-Angular,MyMICDS/MyMICDS-v2-Angular,michaelgira23/MyMICDS-v2-Angular,michaelgira23/MyMICDS-v2-Angular,michaelgira23/MyMICDS-v2-Angular
--- +++ @@ -1,6 +1,7 @@ import * as config from '../common/config'; import {Injectable, EventEmitter} from '@angular/core'; +import {contains} from '../common/utils'; import {Subject} from 'rxjs/Subject'; import {UUID} from 'angular2-uuid'; @@ -10,16 +11,16 @@ private alertEmitSource = new Subject(); aler...
6b44626b784ab4446945216f6781c80642ed17fa
tools/tasks/seed/karma.run.with_coverage.ts
tools/tasks/seed/karma.run.with_coverage.ts
import * as karma from 'karma'; import { join } from 'path'; import Config from '../../config'; let repeatableStartKarma = (done: any, config: any = {}) => { return new (<any>karma).Server(Object.assign({ configFile: join(process.cwd(), 'karma.conf.js'), singleRun: true }, config), (exitCode: any) => { ...
import * as karma from 'karma'; import { join } from 'path'; import Config from '../../config'; let repeatableStartKarma = (done: any, config: any = {}) => { return new (<any>karma).Server(Object.assign({ configFile: join(process.cwd(), 'karma.conf.js'), singleRun: true }, config), (exitCode: any) => { ...
Exclude index.ts and *.module.ts from coverage
chore: Exclude index.ts and *.module.ts from coverage These files are scaffolding files that are skewing the test coverage. They are tested through the use of the moldule's components so they are always covered.
TypeScript
mit
pratheekhegde/a2-redux,idready/Philosophers,fart-one/monitor-ngx,tiagomapmarques/angular-examples_books,alexmanning23/uafl-web,sanastasiadis/angular-seed-openlayers,pocmanu/angular2-seed-advanced,oblong-antelope/oblong-web,natarajanmca11/angular2-seed,arun-awnics/mesomeds-ng2,ppanthony/angular-seed-tutorial,Sn3b/angula...
--- +++ @@ -16,7 +16,7 @@ export = (done: any) => { return repeatableStartKarma(done, { preprocessors: { - 'dist/**/!(*spec).js': ['coverage'] + 'dist/**/!(*spec|index|*.module).js': ['coverage'] }, reporters: ['mocha', 'coverage', 'karma-remap-istanbul'], coverageReporter: {
91342f4eac48bc241764124f4883dc888e0a5665
examples/MeteorCLI/all-in-one/imports/app/app.module.ts
examples/MeteorCLI/all-in-one/imports/app/app.module.ts
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; import { AppComponent } from './app.component'; import { TodoAddModule } from './todo-add/todo-add.module'; imp...
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; import { AppComponent } from './app.component'; import { TodoListComponent } from './todo-list/todo-list.compo...
Use Meteor's dynamic loading syntax.
Use Meteor's dynamic loading syntax.
TypeScript
mit
Urigo/angular-meteor
--- +++ @@ -7,7 +7,7 @@ import { RouterModule } from '@angular/router'; import { AppComponent } from './app.component'; -import { TodoAddModule } from './todo-add/todo-add.module'; + import { TodoListComponent } from './todo-list/todo-list.component'; import { PageNotFoundComponent } from './page-not-found/page...
af2043c5592546b626ff1e75154cc77fc9650cea
src/main.ts
src/main.ts
/* This is the main module, it exports the 'render' API. The compiled modules are bundled by Webpack into 'var' (script tag) and 'commonjs' (npm) formatted libraries. */ /* tslint:disable */ import {renderSource} from './render' import * as options from './options' import * as quotes from './quotes' /* tslint:...
/* This is the main module, it exports the 'render' API. The compiled modules are bundled by Webpack into 'var' (script tag) and 'commonjs' (npm) formatted libraries. */ /* tslint:disable */ import {renderSource} from './render' import * as options from './options' import * as quotes from './quotes' /* tslint:...
Check render() API arguments at runtime.
feature: Check render() API arguments at runtime.
TypeScript
mit
srackham/rimu
--- +++ @@ -29,6 +29,12 @@ * */ export function render(source: string, opts: options.RenderOptions = {}): string { + if (typeof source !== 'string') { + throw new TypeError('render(): source argument is not a string') + } + if (opts !== undefined && typeof opts !== 'object') { + throw new TypeError('ren...
a4cef559aa13e3fbb3053c2683030105115c85ca
src/shadowbox/model/access_key.ts
src/shadowbox/model/access_key.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 agr...
// 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 agr...
Add blank line after copyright
Add blank line after copyright
TypeScript
apache-2.0
Jigsaw-Code/outline-server,Jigsaw-Code/outline-server,Jigsaw-Code/outline-server,Jigsaw-Code/outline-server
--- +++ @@ -12,6 +12,7 @@ // 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. + export type AccessKeyId = string; export interface ProxyParams {
018af2378a70de0e0fec4c1430285bf48037e36f
ng2-timetable/app/main.ts
ng2-timetable/app/main.ts
import {bootstrap} from 'angular2/platform/browser' import {AppComponent} from './app.component' bootstrap(AppComponent);
///<reference path="../../node_modules/angular2/typings/browser.d.ts"/> import {bootstrap} from 'angular2/platform/browser' import {AppComponent} from './app.component' bootstrap(AppComponent);
Fix broken dependencies while compiling TS
Fix broken dependencies while compiling TS
TypeScript
mit
bluebirrrrd/nau-timetable,bluebirrrrd/nau-timetable,bluebirrd/nau-timetable,bluebirrd/nau-timetable,bluebirrd/nau-timetable,bluebirrd/nau-timetable,bluebirrrrd/nau-timetable,bluebirrrrd/nau-timetable
--- +++ @@ -1,3 +1,5 @@ +///<reference path="../../node_modules/angular2/typings/browser.d.ts"/> + import {bootstrap} from 'angular2/platform/browser' import {AppComponent} from './app.component'
52b94ad763575b3c67139ed5ed378e26ee104b94
src/client/app/+play/play.component.ts
src/client/app/+play/play.component.ts
import { Component } from '@angular/core'; /** * This class represents the lazy loaded PlayComponent. */ @Component({ moduleId: module.id, selector: 'sd-play', templateUrl: 'play.component.html', styleUrls: ['play.component.css'] }) export class PlayComponent { audioContext: AudioContext; currentOscillat...
import { Component } from '@angular/core'; /** * This class represents the lazy loaded PlayComponent. */ @Component({ moduleId: module.id, selector: 'sd-play', templateUrl: 'play.component.html', styleUrls: ['play.component.css'] }) export class PlayComponent { audioContext: AudioContext; currentOscillat...
Fix undefined error in PlayComponent.stopNote
Fix undefined error in PlayComponent.stopNote
TypeScript
mit
Ecafracs/flatthirteen,Ecafracs/flatthirteen,Ecafracs/flatthirteen
--- +++ @@ -28,6 +28,10 @@ stopNote() { console.log("stopNote()"); - this.currentOscillator.stop(0); + if (this.currentOscillator !== undefined) + { + this.currentOscillator.stop(0); + } + } }
84938c6001b7d7028498d4df9d01a254f37d5afa
src/app/map/home/home.component.spec.ts
src/app/map/home/home.component.spec.ts
/* tslint:disable:no-unused-variable */ /*! * Home Component Test * * Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph> * Licensed under MIT */ import { Renderer } from '@angular/core'; import { TestBed, async, inject } from '@angular/core/testing'; import { Http, HttpModule} from '@angular/http'; ...
/* tslint:disable:no-unused-variable */ /*! * Home Component Test * * Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph> * Licensed under MIT */ import { Renderer } from '@angular/core'; import { TestBed, async, inject } from '@angular/core/testing'; import { Http, HttpModule} from '@angular/http'; ...
Fix test due to DI mismatch
Fix test due to DI mismatch
TypeScript
mit
ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-interactive-maps
--- +++ @@ -13,6 +13,7 @@ import { CookieService } from 'angular2-cookie/core'; import { TranslateModule, TranslateLoader, TranslateStaticLoader, TranslateService } from 'ng2-translate'; import { WindowService } from '../window.service'; +import { AppLoggerService } from '../../app-logger.service'; import { HomeC...
e8de26ff202e862da95d1c69dea5d0e7fafef761
src/website/pages/MainPage/MainPage.tsx
src/website/pages/MainPage/MainPage.tsx
import * as React from "react"; import { observer } from "mobx-react"; import style from "./style.scss"; import { WebsiteModel } from "../../WebsiteModel"; interface MainPageProps { websiteModel: WebsiteModel; } @observer class MainPage extends React.Component<MainPageProps> { render() { const websiteModel = ...
import * as React from "react"; import { observer } from "mobx-react"; import style from "./style.scss"; import { WebsiteModel } from "../../WebsiteModel"; interface MainPageProps { websiteModel: WebsiteModel; } const MainPage = observer(function(props: MainPageProps) { const websiteModel = props.websiteModel; ...
Convert class component to function component
Convert class component to function component
TypeScript
apache-2.0
gamliela/starter-react-mobx-css-modules,gamliela/starter-react-mobx-css-modules,gamliela/starter-react-mobx-css-modules
--- +++ @@ -7,17 +7,14 @@ websiteModel: WebsiteModel; } -@observer -class MainPage extends React.Component<MainPageProps> { - render() { - const websiteModel = this.props.websiteModel; - return ( - <div> - <h1 className={style.header}>Hello World!</h1> - <span>version: {websiteModel.ve...
bf1f789e17eba94aa2875954a53046750a5274dc
resources/assets/lib/utils/css.ts
resources/assets/lib/utils/css.ts
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. // See the LICENCE file in the repository root for full licence text. import { forEach } from 'lodash'; export function classWithModifiers(className: string, modifiers?: string[] | Record<string, boolean>) { le...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. // See the LICENCE file in the repository root for full licence text. import { forEach } from 'lodash'; type Modifiers = (string | null | undefined)[] | Record<string, boolean | null | undefined>; export functio...
Revert "Apparently null is a-ok for array/record of things"
Revert "Apparently null is a-ok for array/record of things" This reverts commit d182845e558bef14edf1978498c5c964f6187060. It's a bug. Fixed somewhere between 3.7.2 and 3.9.5
TypeScript
agpl-3.0
nekodex/osu-web,notbakaneko/osu-web,LiquidPL/osu-web,omkelderman/osu-web,notbakaneko/osu-web,notbakaneko/osu-web,LiquidPL/osu-web,nanaya/osu-web,notbakaneko/osu-web,nanaya/osu-web,nekodex/osu-web,omkelderman/osu-web,nekodex/osu-web,ppy/osu-web,nekodex/osu-web,nanaya/osu-web,LiquidPL/osu-web,nanaya/osu-web,notbakaneko/o...
--- +++ @@ -3,7 +3,9 @@ import { forEach } from 'lodash'; -export function classWithModifiers(className: string, modifiers?: string[] | Record<string, boolean>) { +type Modifiers = (string | null | undefined)[] | Record<string, boolean | null | undefined>; + +export function classWithModifiers(className: string,...
39ebbf87e6c54dabb0df4383de86fe76d946fcab
desktop/core/src/desktop/js/apps/notebook2/apiUtils.ts
desktop/core/src/desktop/js/apps/notebook2/apiUtils.ts
// Licensed to Cloudera, Inc. under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. Cloudera, Inc. licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this f...
// Licensed to Cloudera, Inc. under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. Cloudera, Inc. licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this f...
Switch to axios for the format SQL ajax request
[editor] Switch to axios for the format SQL ajax request
TypeScript
apache-2.0
kawamon/hue,cloudera/hue,kawamon/hue,cloudera/hue,kawamon/hue,kawamon/hue,cloudera/hue,kawamon/hue,cloudera/hue,kawamon/hue,cloudera/hue,cloudera/hue,kawamon/hue,cloudera/hue,cloudera/hue,cloudera/hue,kawamon/hue,kawamon/hue,kawamon/hue,cloudera/hue,kawamon/hue,cloudera/hue,cloudera/hue,cloudera/hue,cloudera/hue,cloude...
--- +++ @@ -14,25 +14,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { simplePost } from 'api/apiUtilsV2'; -import { FORMAT_SQL_API } from 'api/urls'; +import axios from 'axios'; + +type FormatSqlApiResponse = { + formatted_statements?: stri...
496af05201408614fdecabde5905b24eaf0948a7
e2e/cypress/support/commands.ts
e2e/cypress/support/commands.ts
Cypress.Commands.add('login', (username = 'admin') => { window.localStorage.setItem('USER', JSON.stringify({ username })); });
Cypress.Commands.add('login', (username = 'admin') => { window.localStorage.setItem('USER', JSON.stringify({ username })); }); export {};
Fix issue with missing export
Fix issue with missing export
TypeScript
mit
sheldarr/Votenger,sheldarr/Votenger
--- +++ @@ -1,3 +1,5 @@ Cypress.Commands.add('login', (username = 'admin') => { window.localStorage.setItem('USER', JSON.stringify({ username })); }); + +export {};
bc979a3615e893fa6ea044da47b3fcb102687fb8
app/javascript/packs/application.ts
app/javascript/packs/application.ts
require('sweetalert/dist/sweetalert.css'); import start from 'retrospring/common'; import initAnswerbox from 'retrospring/features/answerbox/index'; import initInbox from 'retrospring/features/inbox/index'; import initUser from 'retrospring/features/user'; import initSettings from 'retrospring/features/settings/index'...
require('sweetalert/dist/sweetalert.css'); import start from 'retrospring/common'; import initAnswerbox from 'retrospring/features/answerbox/index'; import initInbox from 'retrospring/features/inbox/index'; import initUser from 'retrospring/features/user'; import initSettings from 'retrospring/features/settings/index'...
Use proper event for global event handlers in answerbox
Use proper event for global event handlers in answerbox
TypeScript
agpl-3.0
Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring
--- +++ @@ -11,7 +11,7 @@ import initModeration from 'retrospring/features/moderation'; start(); -document.addEventListener('turbolinks:load', initAnswerbox); +document.addEventListener('DOMContentLoaded', initAnswerbox); document.addEventListener('DOMContentLoaded', initInbox); document.addEventListener('DOMCo...
408cf6185ab8f81197f2d404c10fb1afa5caa87c
src/models/request-promise.ts
src/models/request-promise.ts
import * as request from 'request'; function requestPromise(options: request.Options) { 'use strict'; return new Promise<string>((resolve, reject) => { request(options, (error, response, body) => { error ? reject(error) : resolve(body); }); }); } export default requestPromise;
import * as request from 'request'; function requestPromise(options: request.Options) { 'use strict'; return new Promise<string>((resolve, reject) => { request(options, (error, response, body) => { if (error) { reject(error); } else { resolve(body); } }); }); } export default requestPromise;
Use if statement instead of conditional operator
Use if statement instead of conditional operator
TypeScript
mit
AyaMorisawa/Disskey,AyaMorisawa/Disskey,AyaMorisawa/Disskey
--- +++ @@ -4,7 +4,11 @@ 'use strict'; return new Promise<string>((resolve, reject) => { request(options, (error, response, body) => { - error ? reject(error) : resolve(body); + if (error) { + reject(error); + } else { + resolve(body); + } }); }); }
784950cfdf5661b343341cefbe346357438e64b9
lib/msal-common/src/authority/AuthorityOptions.ts
lib/msal-common/src/authority/AuthorityOptions.ts
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { ProtocolMode } from "./ProtocolMode"; import { AzureRegionConfiguration } from "./AzureRegionConfiguration"; export type AuthorityOptions = { protocolMode: ProtocolMode; knownAuthorities: Array<stri...
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { ProtocolMode } from "./ProtocolMode"; import { AzureRegionConfiguration } from "./AzureRegionConfiguration"; export type AuthorityOptions = { protocolMode: ProtocolMode; knownAuthorities: Array<stri...
Add PPE to azure cloud instance enum
Add PPE to azure cloud instance enum
TypeScript
mit
AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication...
--- +++ @@ -21,6 +21,9 @@ // Microsoft Azure public cloud AzurePublic = "https://login.microsoftonline.com", + // Microsoft PPE + AzurePpe = "https://login.windows-ppe.net", + // Microsoft Chinese national cloud AzureChina = "https://login.chinacloudapi.cn",
a524363a3eedd2e81e60bb0ad0f0c0380b076c1e
server/playerviewmanager.ts
server/playerviewmanager.ts
import { PlayerView } from "../common/PlayerView"; import { probablyUniqueString } from "../common/Toolbox"; export class PlayerViewManager { private playerViews: { [encounterId: string]: PlayerView } = {}; constructor() {} public Get(id: string) { return this.playerViews[id]; } public UpdateEncounter...
import { PlayerViewState } from "../common/PlayerViewState"; import { probablyUniqueString } from "../common/Toolbox"; export class PlayerViewManager { private playerViews: { [encounterId: string]: PlayerViewState } = {}; constructor() {} public Get(id: string) { return this.playerViews[id]; } public ...
Fix missed file during rename
Fix missed file during rename
TypeScript
mit
cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative
--- +++ @@ -1,8 +1,8 @@ -import { PlayerView } from "../common/PlayerView"; +import { PlayerViewState } from "../common/PlayerViewState"; import { probablyUniqueString } from "../common/Toolbox"; export class PlayerViewManager { - private playerViews: { [encounterId: string]: PlayerView } = {}; + private player...
fbfffcfc8b6b9431bc345a797dd846d5d2625fb9
src/Generation/Elements/ObjectNode.ts
src/Generation/Elements/ObjectNode.ts
import { IElement } from '../Element'; import { DomElementParent } from '../DomElementParent'; export default class ObjNode extends DomElementParent implements IElement { public data?: string; public form?: string; public height?: string; public name?: string; public type?: string; public usemap...
import { IElement } from '../Element'; import { DomElementParent } from '../DomElementParent'; export default class ObjectNode extends DomElementParent implements IElement { public data?: string; public form?: string; public height?: string; public name?: string; public type?: string; public use...
Change object node's name back
Change object node's name back
TypeScript
mit
Flatline4/Flatline4,Flatline4/Flatline4,Flatline4/Flatline4
--- +++ @@ -1,6 +1,6 @@ import { IElement } from '../Element'; import { DomElementParent } from '../DomElementParent'; -export default class ObjNode extends DomElementParent implements IElement { +export default class ObjectNode extends DomElementParent implements IElement { public data?: string; public f...
c08c6f249c2136a9396866fe7b0d0f6d47c96077
src/components/ThemeProvider/types.ts
src/components/ThemeProvider/types.ts
import { MediaAliases, Media } from '../../media/types'; export type Breakpoints = { [key in Media]: number }; export type PartialBreakpoints = Partial<Breakpoints>; interface GridTheme { breakpoints?: PartialBreakpoints; row?: { padding?: number; }; col?: { padding?: number; }; container?: { ...
import { MediaAliases, Media } from '../../media/types'; export type Breakpoints = { [key in Media]: number }; export type PartialBreakpoints = Partial<Breakpoints>; interface GridTheme { breakpoints?: PartialBreakpoints; row?: { padding?: number; }; col?: { padding?: number; }; container?: { ...
Add children as prop to gridThemeProvider
Add children as prop to gridThemeProvider
TypeScript
mit
dragma/styled-bootstrap-grid,dragma/styled-bootstrap-grid,dragma/styled-bootstrap-grid,dragma/styled-bootstrap-grid
--- +++ @@ -19,6 +19,7 @@ export interface ThemeProps { gridTheme?: GridTheme; + children: React.ReactNode; } export type DefaultContainerMaxWidth = { [K in MediaAliases]: number };
e0ca413c54538f979ecd416eb9f38c5e9f303751
src/mol-model/structure/query/queries/atom-set.ts
src/mol-model/structure/query/queries/atom-set.ts
/** * Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Koya Sakuma * Adapted from MolQL implemtation of atom-set.ts * * Copyright (c) 2017 MolQL contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com...
/** * Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Koya Sakuma * Adapted from MolQL implemtation of atom-set.ts * * Copyright (c) 2017 MolQL contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal <david.sehnal@gmail.com...
Remove needless substitutions to a temporary variable x
Remove needless substitutions to a temporary variable x
TypeScript
mit
molstar/molstar,molstar/molstar,molstar/molstar
--- +++ @@ -23,16 +23,14 @@ export function countQuery(query: StructureQuery) { return (ctx: QueryContext) => { const sel = query(ctx); - const x: number = StructureSelection.structureCount(sel); - return x; + return StructureSelection.structureCount(sel); }; } export func...
020cbbf358e54d55265d42086e7dbfe46f3d5123
src/lib/interface/IRoute.ts
src/lib/interface/IRoute.ts
type Dictionary<T> = { [key: string]: T }; /** * @description This should be the vue router type but it causes a lot of issues with mismatching versions so create * a separate interface for the route */ interface IRoute { path: string; name?: string; hash: string; query: Dictionary<string>; params: Dictionary<...
/** * @description This should be the vue router type but it causes a lot of issues with mismatching versions so create * a separate interface for the route */ interface IRoute { path: string; name?: string; hash: string; query: { [key: string]: string }; params: { [key: string]: string }; fullPath: string; m...
Replace type dictionary with hardcoded type
Replace type dictionary with hardcoded type
TypeScript
mit
larsvanbraam/vue-transition-component,larsvanbraam/vue-transition-component,larsvanbraam/vue-transition-component
--- +++ @@ -1,5 +1,3 @@ -type Dictionary<T> = { [key: string]: T }; - /** * @description This should be the vue router type but it causes a lot of issues with mismatching versions so create * a separate interface for the route @@ -8,8 +6,8 @@ path: string; name?: string; hash: string; - query: Dictionary<s...
0a4d0e5ea2c633f8e248d0d84a54b167edf40058
app/src/renderer/components/paper/paper-button.tsx
app/src/renderer/components/paper/paper-button.tsx
// Copyright (c) 2016 Vadim Macagon // MIT License, see LICENSE file for full terms. import * as React from 'react'; import { PolymerComponent } from './polymer'; import { omitOwnProps } from '../../../common/utils'; /** * React component that wraps a Polymer paper-button custom element. */ export class PaperButton...
// Copyright (c) 2016 Vadim Macagon // MIT License, see LICENSE file for full terms. import * as React from 'react'; import { PolymerComponent } from './polymer'; import { omitOwnProps } from '../../../common/utils'; /** * React component that wraps a Polymer paper-button custom element. */ export class PaperButton...
Fix PaperButtonComponent style overrides not being applied
Fix PaperButtonComponent style overrides not being applied Not sure if it was the limitations of the CSS vars shim Polymer uses, or just a scope issue.
TypeScript
mit
debugworkbench/hydragon,debugworkbench/hydragon,debugworkbench/hydragon
--- +++ @@ -16,11 +16,12 @@ const vars: any = {}; if (styles) { + vars['--paper-button'] = {}; if (styles.backgroundColor) { - vars['--paper-button-background-color'] = styles.backgroundColor; + vars['--paper-button']['background-color'] = styles.backgroundColor; } ...
ce5fe238ffa1fd7208bd7f2be05c5e217e0d142b
src/server/lib/TestTask.ts
src/server/lib/TestTask.ts
/** * Created by Home on 1/1/2016. */ import Log = require('../api/RTSLog') import RtsIo = require("../api/io"); export class TestTask { //Constructor for task public name:string; constructor(public name:string, public duration:number) { this.name = name; } execute() { var time0 = D...
/** * Created by Home on 1/1/2016. */ import Log = require('../api/RTSLog') import RtsIo = require("../api/io"); export class TestTask { //Constructor for task public name:string; constructor(public name:string, public duration:number) { this.name = name; } execute() { var time0 = D...
Send data in json format
Send data in json format
TypeScript
mit
rtsjs/rts,rtsjs/rts,rtsjs/rts
--- +++ @@ -20,9 +20,10 @@ if (elapsed >= this.duration) break; } - var msg = this.name + " started at: " + time0 + " ran for: " + elapsed; - console.log(msg); - Log.log.info(msg); - RtsIo.io.emit('Task data',msg); + + var json = JSON.stringify...
cbb9209b9578ffbe23432bce6d16495b0cee50ef
src/utils/general-utils.ts
src/utils/general-utils.ts
import * as toBuffer from 'blob-to-buffer' import * as domtoimage from 'dom-to-image' import { remote, shell } from 'electron' import * as fs from 'fs' const container = document.getElementById('app-container') export function saveImage(fileName: string): Promise<string> { return domtoimage.toBlob(container).then...
import * as toBuffer from 'blob-to-buffer' import * as domtoimage from 'dom-to-image' import { remote, shell } from 'electron' import * as fs from 'fs' const container = document.getElementById('app-container') export function saveImage(fileName: string): Promise<string> { return domtoimage.toBlob(container).then...
Replace forEach.call with for each loop
Replace forEach.call with for each loop
TypeScript
mit
nrlquaker/nfov,nrlquaker/nfov
--- +++ @@ -15,7 +15,7 @@ export function openLinksInExternalBrowser(): void { const links = document.querySelectorAll('a[href]') - Array.prototype.forEach.call(links, (link: Element) => { + for (const link of links) { const url = link.getAttribute('href') if (url!.indexOf('http') === ...
aef05e74b9e20ecceaa58bd019056e42991d27ae
client/app/accounts/services/account-guard.service.ts
client/app/accounts/services/account-guard.service.ts
import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router'; import { CurrentAccountService } from './current-account.service'; @Injectable() export class AccountGuardService impleme...
import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router'; import { CurrentAccountService } from './current-account.service'; @Injectable() export class AccountGuardService impleme...
Use query params for the redirect url
Use query params for the redirect url
TypeScript
mit
fvilers/angular2-training,fvilers/angular2-training,fvilers/angular2-training
--- +++ @@ -22,11 +22,8 @@ checkLogin(url: string): Observable<boolean> { return this.currentAccountService.get().map((account: string) => { - if (! account) { - // Store the attempted URL for redirecting after login - this.currentAccountService.redirectUrl = url; - - this.router.n...
0a21fb633dc2ca6416857d4e5cee7ae0aaa72a52
client-react/components/Routes.tsx
client-react/components/Routes.tsx
import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { Route, Redirect, Switch } from 'react-router-dom'; import { Login, Register, ConfirmEmail } from './Auth'; import { Landing } from './Landing'; import { Header } from './Header'; import auth from '../services/authentication'; export defaul...
import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { Route, Redirect, Switch } from 'react-router-dom'; import { Login, Register, ConfirmEmail } from './Auth'; import { Landing } from './Landing'; import { Header } from './Header'; import auth from '../services/authentication'; export defaul...
Fix invalid /login route reference (should be /)
Fix invalid /login route reference (should be /)
TypeScript
mit
bradyholt/aspnet-core-react-template,bradyholt/aspnet-core-react-template,bradyholt/aspnet-core-react-template,bradyholt/aspnet-core-react-template,bradyholt/aspnet-core-react-template
--- +++ @@ -28,7 +28,7 @@ </div> ) : ( <Redirect to={{ - pathname: '/login', + pathname: '/', state: { from: props.location } }} /> )
3183e39527e1c9008a2d9abdfe4db7486894c4cf
app/src/ui/lib/theme-change-monitor.ts
app/src/ui/lib/theme-change-monitor.ts
import { remote } from 'electron' import { ApplicationTheme } from './application-theme' import { IDisposable, Disposable, Emitter } from 'event-kit' import { supportsDarkMode, isDarkModeEnabled } from './dark-theme' class ThemeChangeMonitor implements IDisposable { private readonly emitter = new Emitter() public...
import { remote } from 'electron' import { ApplicationTheme } from './application-theme' import { IDisposable, Disposable, Emitter } from 'event-kit' import { supportsDarkMode, isDarkModeEnabled } from './dark-theme' class ThemeChangeMonitor implements IDisposable { private readonly emitter = new Emitter() public...
Revert "Fix nativeTheme errors in tests on Windows 10 1809+ and Server 2019+"
Revert "Fix nativeTheme errors in tests on Windows 10 1809+ and Server 2019+" This reverts commit b8a7c8c5c73439e20df6398d62709f72a5206e0d.
TypeScript
mit
shiftkey/desktop,shiftkey/desktop,say25/desktop,say25/desktop,shiftkey/desktop,desktop/desktop,desktop/desktop,desktop/desktop,j-f1/forked-desktop,desktop/desktop,artivilla/desktop,j-f1/forked-desktop,say25/desktop,shiftkey/desktop,artivilla/desktop,artivilla/desktop,j-f1/forked-desktop,j-f1/forked-desktop,artivilla/de...
--- +++ @@ -11,13 +11,11 @@ } public dispose() { - if (remote.nativeTheme) { - remote.nativeTheme.removeAllListeners() - } + remote.nativeTheme.removeAllListeners() } private subscribe = () => { - if (!supportsDarkMode() || !remote.nativeTheme) { + if (!supportsDarkMode()) { ...
1a44445f9e1e82eb976a0bca424e9230c0e06a97
src/api/hosts/index.ts
src/api/hosts/index.ts
import { Router } from 'express' import * as hosts from './get' import * as containers from './get-containers' const router = Router() router.get('/', hosts.getAll) router.get('/containers', containers.getAll) router.get('/:id', hosts.getOne) router.get('/containers/:id', containers.getOne) export default router
import { Router } from 'express' import * as hosts from './get' import * as containers from './get-containers' const router = Router() router.get('/', hosts.getAll) router.get('/containers', containers.getAll) router.get('/:id', hosts.getOne) router.get('/:id/containers', containers.getOne) export default router
Change host specific containers route
Change host specific containers route
TypeScript
mit
paypac/node-concierge,paypac/node-concierge,the-concierge/concierge,paypac/node-concierge,the-concierge/concierge,paypac/node-concierge,the-concierge/concierge
--- +++ @@ -8,6 +8,6 @@ router.get('/containers', containers.getAll) router.get('/:id', hosts.getOne) -router.get('/containers/:id', containers.getOne) +router.get('/:id/containers', containers.getOne) export default router
0cb83c5f629541838fdc5432fe6b3e5e48a06b77
src/scroll-listener.ts
src/scroll-listener.ts
import 'rxjs/add/observable/fromEvent'; import 'rxjs/add/operator/startWith'; import 'rxjs/add/operator/sampleTime'; import 'rxjs/add/operator/share'; import { Observable } from 'rxjs/Observable'; const scrollListeners = {}; // Only create one scroll listener per target and share the observable. // Typical, there wil...
import 'rxjs/add/observable/fromEvent'; import 'rxjs/add/operator/startWith'; import 'rxjs/add/operator/sampleTime'; import 'rxjs/add/operator/share'; import { Observable } from 'rxjs/Observable'; const scrollListeners = {}; // Only create one scroll listener per target and share the observable. // Typical, there wil...
Put a default value on all subscriptions
:bug: Put a default value on all subscriptions
TypeScript
mit
tjoskar/ng2-lazyload-image,tjoskar/ng-lazyload-image,tjoskar/ng-lazyload-image,tjoskar/ng2-lazyload-image,tjoskar/ng2-lazyload-image
--- +++ @@ -14,7 +14,7 @@ } scrollListeners[scrollTarget] = Observable.fromEvent(scrollTarget, 'scroll') .sampleTime(100) - .startWith('') - .share(); + .share() + .startWith(''); return scrollListeners[scrollTarget]; };
be2c7bb7ddf70132246cb04b6c338a1528fbf079
APM-Final/src/app/products/product-edit-info.component.ts
APM-Final/src/app/products/product-edit-info.component.ts
import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { NgForm } from '@angular/forms'; import { IProduct } from './product'; @Component({ templateUrl: './app/products/product-edit-info.component.html' }) export class ProductEditInfoComponent implem...
import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { NgForm } from '@angular/forms'; import { IProduct } from './product'; @Component({ templateUrl: './app/products/product-edit-info.component.html' }) export class ProductEditInfoComponent implemen...
Reorder where the form is reset.
Reorder where the form is reset.
TypeScript
mit
DeborahK/Angular-Routing,DeborahK/Angular-Routing,DeborahK/Angular-Routing
--- +++ @@ -5,23 +5,23 @@ import { IProduct } from './product'; @Component({ - templateUrl: './app/products/product-edit-info.component.html' + templateUrl: './app/products/product-edit-info.component.html' }) export class ProductEditInfoComponent implements OnInit { - @ViewChild(NgForm) productForm: NgF...
e88192e981de0fa19e3be3eb2d440003a4a8d246
assets/src/images.ts
assets/src/images.ts
export function get(href: string): Promise<SVGSVGElement> { return new Promise((resolve, reject) => { const request = new XMLHttpRequest(); request.open('GET', href); request.addEventListener('load', (event: ProgressEvent) => { const request = <XMLHttpRequest>event.currentTarget; const xml ...
export function get(href: string): Promise<SVGSVGElement> { return new Promise((resolve, reject) => { const request = new XMLHttpRequest(); request.open('GET', href); request.addEventListener('load', (event: ProgressEvent) => { const request = <XMLHttpRequest>event.currentTarget; const xml ...
Remove timeout on image loading.
Remove timeout on image loading.
TypeScript
agpl-3.0
Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake
--- +++ @@ -36,8 +36,7 @@ image.src = url; - const promise: Promise<Image> = new Promise((resolve, reject) => { - window.setTimeout(reject, 100); + const promise: Promise<Image> = new Promise((resolve) => { image.onload = () => resolve(image); });
65eb6747411bb48f314952c1f2b5a61c576d6435
client/LauncherViewModel.ts
client/LauncherViewModel.ts
import * as ko from "knockout"; import { env } from "./Environment"; import { Metrics } from "./Utility/Metrics"; import { Store } from "./Utility/Store"; export class LauncherViewModel { constructor() { const pageLoadData = { referrer: document.referrer, userAgent: navigator.userA...
import * as ko from "knockout"; import { env } from "./Environment"; import { Metrics } from "./Utility/Metrics"; import { Store } from "./Utility/Store"; export class LauncherViewModel { constructor() { const pageLoadData = { referrer: document.referrer, userAgent: navigator.userA...
Add stub call to transferLocalStorageToCanonicalUrl()
Add stub call to transferLocalStorageToCanonicalUrl()
TypeScript
mit
cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative
--- +++ @@ -11,10 +11,16 @@ userAgent: navigator.userAgent }; Metrics.TrackEvent("LandingPageLoad", pageLoadData); - const firstVisit = Store.Load(Store.User, "SkipIntro") === null; - if (firstVisit && window.location.href != env.CanonicalURL + "/") { - window.l...
56b12b46551f8e831ea65522bade14c73eb6d18c
client/src/components/forms/errorsField.tsx
client/src/components/forms/errorsField.tsx
import * as _ from 'lodash'; import * as React from 'react'; export const ErrorsField = (errors: any) => { if (_.isArray(errors)) { return ( <div className="has-error form-group"> <div className="col-sm-10 col-lg-offset-2"> {errors.map((error) => <div className="help-block" key={error}>{e...
import * as _ from 'lodash'; import * as React from 'react'; export const ErrorsField = (errors: any) => { if (_.isArray(errors)) { return ( <div className="has-error form-group"> <div className="col-sm-10 col-lg-offset-2"> {errors.map((error) => <div className="help-block" key={error}>{e...
Update errors field to handle string errors as well
Update errors field to handle string errors as well
TypeScript
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
--- +++ @@ -10,6 +10,14 @@ </div> </div> ); + } else if (typeof errors === 'string') { + return ( + <div className="has-error form-group"> + <div className="col-sm-10 col-lg-offset-2"> + <div className="help-block">{errors}</div> + </div> + </div> + ); }...
5092855a3d5552264d2d6f5c52da470267d0dba3
src/SyntaxNodes/InlineSyntaxNode.ts
src/SyntaxNodes/InlineSyntaxNode.ts
import { SyntaxNode } from './SyntaxNode' export interface InlineSyntaxNode extends SyntaxNode { // Represents the text of the syntax node as it should appear inline. Some inline conventions // don't have any e.g. (footnotes, images). // // This method is used help to determine whether table cells are numeric...
import { SyntaxNode } from './SyntaxNode' export interface InlineSyntaxNode extends SyntaxNode { // Represents the text of the syntax node as it should appear inline. Some inline conventions // don't have any e.g. (footnotes, images). // // This method is ultimately used to help determine whether table cells ...
Clarify a couple of comments
Clarify a couple of comments
TypeScript
mit
start/up,start/up
--- +++ @@ -5,13 +5,14 @@ // Represents the text of the syntax node as it should appear inline. Some inline conventions // don't have any e.g. (footnotes, images). // - // This method is used help to determine whether table cells are numeric. + // This method is ultimately used to help determine whether ta...
cfa1b339d3524659319f10aa6d681e9c74618d6f
lib/model/AbstractEntity.ts
lib/model/AbstractEntity.ts
import {isPresent} from "../utils/core"; import {attribute} from "../annotations"; import {AttributesMetadata} from "../metadata/AttributesMetadata"; export abstract class AbstractEntity<T> { @attribute() id?:string; constructor(params:Partial<T> = {}) { let attributesMetadata = AttributesMetadata.get...
import {isPresent} from "../utils/core"; import {attribute} from "../annotations"; import {AttributesMetadata} from "../metadata/AttributesMetadata"; export abstract class AbstractEntity<T> { @attribute() readonly id?:string; constructor(params:Partial<T> = {}) { if (isPresent((params as any).id)) { ...
Add assertion for id property
Add assertion for id property
TypeScript
mit
robak86/neography
--- +++ @@ -3,11 +3,14 @@ import {AttributesMetadata} from "../metadata/AttributesMetadata"; export abstract class AbstractEntity<T> { - @attribute() id?:string; + @attribute() readonly id?:string; constructor(params:Partial<T> = {}) { + if (isPresent((params as any).id)) { + throw ...
62015fbd40cc15e8da471951854b79a525faf722
src/Calque/test/workspace-tests.ts
src/Calque/test/workspace-tests.ts
import Workspace = require('../core/Workspace'); describe("Workspace", () => { context("input = 1\r\n\2", () => { it("should split to 2 lines", () => { var workspace = new Workspace(); workspace.input("1\r\n\2"); chai.assert.equal(workspace.lines.length, 2); })...
import Workspace = require('../core/Workspace'); describe("Workspace", () => { context("1; 2", () => { it("should split to 2 lines", () => { var workspace = new Workspace(); workspace.input("1 \n 2"); chai.assert.equal(workspace.lines.length, 2); }); }); ...
Cover all help examples with workspace tests
Cover all help examples with workspace tests
TypeScript
mit
arthot/calque,arthot/calque,arthot/calque
--- +++ @@ -1,12 +1,59 @@ import Workspace = require('../core/Workspace'); describe("Workspace", () => { - context("input = 1\r\n\2", () => { + context("1; 2", () => { it("should split to 2 lines", () => { var workspace = new Workspace(); - workspace.input("1\r\n\2"); - + ...
9e8ac7765160161b02eb9a97d6fc66edec508aba
lib/commands/list-platforms.ts
lib/commands/list-platforms.ts
///<reference path="../.d.ts"/> import helpers = require("./../common/helpers"); import util = require("util") export class ListPlatformsCommand implements ICommand { constructor(private $platformService: IPlatformService, private $logger: ILogger) { } execute(args: string[]): IFuture<void> { return (() => { ...
///<reference path="../.d.ts"/> import helpers = require("./../common/helpers"); import util = require("util") export class ListPlatformsCommand implements ICommand { constructor(private $platformService: IPlatformService, private $logger: ILogger) { } execute(args: string[]): IFuture<void> { return (() => { ...
Fix message from platform list command
Fix message from platform list command
TypeScript
apache-2.0
tsvetie/nativescript-cli,NathanaelA/nativescript-cli,tsvetie/nativescript-cli,jbristowe/nativescript-cli,NativeScript/nativescript-cli,NathanaelA/nativescript-cli,lokilandon/nativescript-cli,e2l3n/nativescript-cli,lokilandon/nativescript-cli,NativeScript/nativescript-cli,NathanaelA/nativescript-cli,e2l3n/nativescript-c...
--- +++ @@ -9,7 +9,11 @@ execute(args: string[]): IFuture<void> { return (() => { var availablePlatforms = this.$platformService.getAvailablePlatforms().wait(); - this.$logger.out("Available platforms: %s", helpers.formatListOfNames(availablePlatforms)); + if(availablePlatforms.length > 0) { + this.$l...
abb229e91b83c06799d2f51200ff364afdc989b3
tests/cases/fourslash/unusedImports14FS.ts
tests/cases/fourslash/unusedImports14FS.ts
/// <reference path='fourslash.ts' /> // @noUnusedLocals: true // @Filename: file2.ts //// [| import /* 1 */ A /* 2 */, /* 3 */ { x } from './a'; |] //// console.log(A); // @Filename: file1.ts //// export default 10; //// export var x = 10; verify.rangeAfterCodeFix("import /* 1 */ A /* 2 */ from './a';");
/// <reference path='fourslash.ts' /> // @noUnusedLocals: true // @Filename: file2.ts //// [| import /* 1 */ A /* 2 */, /* 3 */ { /* 4 */ x /* 5 */ } /* 6 */ from './a'; |] //// console.log(A); // @Filename: file1.ts //// export default 10; //// export var x = 10; // It's ambiguous which token comment /...
Add a bit more validation around comments
Add a bit more validation around comments
TypeScript
apache-2.0
SaschaNaz/TypeScript,TukekeSoft/TypeScript,weswigham/TypeScript,basarat/TypeScript,TukekeSoft/TypeScript,chuckjaz/TypeScript,RyanCavanaugh/TypeScript,Eyas/TypeScript,kpreisser/TypeScript,Eyas/TypeScript,donaldpipowitch/TypeScript,microsoft/TypeScript,Eyas/TypeScript,donaldpipowitch/TypeScript,weswigham/TypeScript,micro...
--- +++ @@ -2,11 +2,14 @@ // @noUnusedLocals: true // @Filename: file2.ts -//// [| import /* 1 */ A /* 2 */, /* 3 */ { x } from './a'; |] +//// [| import /* 1 */ A /* 2 */, /* 3 */ { /* 4 */ x /* 5 */ } /* 6 */ from './a'; |] //// console.log(A); // @Filename: file1.ts //// export default 10; //// export va...
3be0c86dc8dedb49a055b04b8dd6fbe329ba5ba3
src/polyfills.ts
src/polyfills.ts
// This file includes polyfills needed by Angular 2 and is loaded before // the app. You can add your own extra polyfills to this file. import 'core-js/es6/symbol'; import 'core-js/es6/object'; import 'core-js/es6/function'; import 'core-js/es6/parse-int'; import 'core-js/es6/parse-float'; import 'core-js/es6/number'; ...
// This file includes polyfills needed by Angular 2 and is loaded before // the app. You can add your own extra polyfills to this file. import 'core-js/es6/symbol'; import 'core-js/es6/object'; import 'core-js/es6/function'; import 'core-js/es6/parse-int'; import 'core-js/es6/parse-float'; import 'core-js/es6/number'; ...
Remove Proxy stub from build
test(proxy): Remove Proxy stub from build
TypeScript
mit
gund/ng-http-interceptor,gund/ng2-http-interceptor,gund/ng-http-interceptor,gund/ng2-http-interceptor,gund/ng-http-interceptor,gund/ng2-http-interceptor
--- +++ @@ -17,8 +17,3 @@ import 'core-js/es7/reflect'; import 'zone.js/dist/zone'; - -// Proxy stub -if (!('Proxy' in window)) { - window['Proxy'] = {}; -}
a4d573e816813280cf37b6b984bd2dd782c2e84d
modules/statics/src/index.ts
modules/statics/src/index.ts
export * from './base'; export * from './coins'; export * from './networks'; export * from './errors'; export * from './tokenConfig'; export { OfcCoin } from './ofc'; export { UtxoCoin } from './utxo'; export { AccountCoin, CeloCoin, ContractAddressDefinedToken, Erc20Coin, StellarCoin, EosCoin, AlgoCoin, ...
export * from './base'; export * from './coins'; export * from './networks'; export * from './errors'; export * from './tokenConfig'; export { OfcCoin } from './ofc'; export { UtxoCoin } from './utxo'; export { AccountCoin, CeloCoin, ContractAddressDefinedToken, Erc20Coin, StellarCoin, EosCoin, AlgoCoin, ...
Revert "chore: export AcaCoin in statics"
Revert "chore: export AcaCoin in statics" This reverts commit 3cde22595192feddaa1bda7994c2886d5a7f7965.
TypeScript
apache-2.0
BitGo/BitGoJS,BitGo/BitGoJS,BitGo/BitGoJS,BitGo/BitGoJS
--- +++ @@ -16,6 +16,5 @@ AvaxERC20Token, SolCoin, HederaToken, - AcaCoin, } from './account'; export { CoinMap } from './map';
7ef9406a3024dc17e43ae4391b75a90b3c4dccab
client/src/constants/paginate.ts
client/src/constants/paginate.ts
export const PAGE_SIZE = 30; export function getOffset(page?: number): number | null { if (page == null || page <= 1) { return null; } return (page - 1) * PAGE_SIZE; } export function paginate(count: number): boolean { return count > PAGE_SIZE; } export function getNumPages(count: number): number { ret...
import * as queryString from 'query-string'; export const PAGE_SIZE = 30; export function getOffset(page?: number): number | null { if (page == null || page <= 1) { return null; } return (page - 1) * PAGE_SIZE; } export function paginate(count: number): boolean { return count > PAGE_SIZE; } export funct...
Update pagination slice to use directly the query params for detecting the offset
Update pagination slice to use directly the query params for detecting the offset
TypeScript
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
--- +++ @@ -1,3 +1,5 @@ +import * as queryString from 'query-string'; + export const PAGE_SIZE = 30; export function getOffset(page?: number): number | null { @@ -23,8 +25,14 @@ return currentPage > 1; } -export function getPaginatedSlice(list: Array<any>, currentPage: number): Array<any> { - let start = g...
6c5336c41658381788ef0269a168eaa6e5cd6f8c
src/index.ts
src/index.ts
import { SandboxParameter } from './interfaces'; import nativeAddon from './nativeAddon'; import { SandboxProcess } from './sandboxProcess'; import { existsSync } from 'fs'; if (!existsSync('/sys/fs/cgroup/memory/memory.memsw.usage_in_bytes')) { throw new Error("Your linux kernel doesn't support memory-swap accoun...
import { SandboxParameter } from './interfaces'; import nativeAddon from './nativeAddon'; import { SandboxProcess } from './sandboxProcess'; import { existsSync } from 'fs'; if (!existsSync('/sys/fs/cgroup/memory/memory.memsw.usage_in_bytes')) { throw new Error("Your linux kernel doesn't support memory-swap accoun...
Change the error message when the memsw is disabled.
Change the error message when the memsw is disabled.
TypeScript
mit
t123yh/simple-sandbox,t123yh/simple-sandbox
--- +++ @@ -4,7 +4,7 @@ import { existsSync } from 'fs'; if (!existsSync('/sys/fs/cgroup/memory/memory.memsw.usage_in_bytes')) { - throw new Error("Your linux kernel doesn't support memory-swap account. To turn it on, add `cgroup_enable=memory swapaccount=1` to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub a...
080e8bc364b06ea86f51711cccecf503a46628d3
tests/api.spec.ts
tests/api.spec.ts
import skift from '../src/index'; import { SplitTest } from '../src/splittest'; describe('Top-level api', () => { it('should export the object', () => { expect(typeof skift).toBe('object'); expect(skift).toBeDefined(); }); it('should be impossible to create an empty test', () => { ...
import skift from '../src/index'; import { SplitTest } from '../src/splittest'; describe('Top-level api', () => { it('should export the object', () => { expect(typeof skift).toBe('object'); expect(skift).toBeDefined(); }); it('should be impossible to create an empty test', () => { ...
Add the test for the UI
Add the test for the UI
TypeScript
mit
trustpilot/skift,trustpilot/skift
--- +++ @@ -32,4 +32,18 @@ expect(skift.getTest('Another awesome test!')).toBeDefined(); expect(test === skift.getTest('Another awesome test!')).toBeTruthy(); }); + + it('should be possible to show the UI', () => { + const testName = 'The test to check out!'; + skift + ...
5eaf2814894e53d7f32d53193989f55d51fe3273
ui/src/tasks/api/v2/index.ts
ui/src/tasks/api/v2/index.ts
import AJAX from 'src/utils/ajax' import {Task} from 'src/types/v2/tasks' export const submitNewTask = async ( url, owner, org, flux: string ): Promise<Task> => { const request = { flux, organizationId: org.id, status: 'active', owner, } const {data} = await AJAX({url, data: request, met...
import AJAX from 'src/utils/ajax' import {Task} from 'src/types/v2/tasks' export const submitNewTask = async ( url, owner, org, flux: string ): Promise<Task> => { const request = { flux, organizationId: org.id, status: 'active', owner, } const {data} = await AJAX({url, data: request, met...
Fix api calls for tasks, tasks are now nested in response
Fix api calls for tasks, tasks are now nested in response
TypeScript
mit
influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,nooproblem/influxdb,nooproblem/influxdb,li-ang/influxdb,influxdb/influxdb,nooproblem/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,...
--- +++ @@ -33,16 +33,20 @@ export const getUserTasks = async (url, user): Promise<Task[]> => { const completeUrl = `${url}?user=${user.id}` - const {data} = await AJAX({url: completeUrl}) + const { + data: {tasks}, + } = await AJAX({url: completeUrl}) - return data + return tasks } export const g...
04599bb207195ad126a51124d87a597825a3fa73
app/src/lib/stores/updates/update-remote-url.ts
app/src/lib/stores/updates/update-remote-url.ts
import { Repository } from '../../../models/repository' import { IAPIRepository } from '../../api' import { GitStore } from '../git-store' export const updateRemoteUrl = async ( gitStore: GitStore, repository: Repository, apiRepo: IAPIRepository ): Promise<void> => { // I'm not sure when these early exit condi...
import { Repository } from '../../../models/repository' import { IAPIRepository } from '../../api' import { GitStore } from '../git-store' export async function updateRemoteUrl( gitStore: GitStore, repository: Repository, apiRepo: IAPIRepository ): Promise<void> { // I'm not sure when these early exit conditio...
Use the export function-style rather than export const
Use the export function-style rather than export const Co-Authored-By: Markus Olsson <c00736d1ddeb2cd1f4e803cdc39630b5b2784893@users.noreply.github.com>
TypeScript
mit
j-f1/forked-desktop,j-f1/forked-desktop,shiftkey/desktop,shiftkey/desktop,kactus-io/kactus,artivilla/desktop,shiftkey/desktop,say25/desktop,j-f1/forked-desktop,kactus-io/kactus,artivilla/desktop,shiftkey/desktop,say25/desktop,desktop/desktop,desktop/desktop,kactus-io/kactus,artivilla/desktop,kactus-io/kactus,desktop/de...
--- +++ @@ -2,11 +2,11 @@ import { IAPIRepository } from '../../api' import { GitStore } from '../git-store' -export const updateRemoteUrl = async ( +export async function updateRemoteUrl( gitStore: GitStore, repository: Repository, apiRepo: IAPIRepository -): Promise<void> => { +): Promise<void> { //...