author
int64 4.98k
943k
| date
stringdate 2017-04-15 16:45:02
2022-02-25 15:32:15
| timezone
int64 -46,800
39.6k
| hash
stringlengths 40
40
| message
stringlengths 8
468
| mods
listlengths 1
16
| language
stringclasses 9
values | license
stringclasses 2
values | repo
stringclasses 119
values | original_message
stringlengths 12
491
| is_CCS
int64 1
1
| commit_type
stringclasses 129
values | commit_scope
stringlengths 1
44
⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
217,922
|
02.05.2018 19:03:10
| -7,200
|
cf3b64fa1ca7e3819c74f061f1d00bdac86a695c
|
chore(simulator): fixed various bugs
|
[
{
"change_type": "MODIFY",
"diff": "@@ -16,7 +16,7 @@ export class BasicTouch extends QualityAction {\n}\ngetBaseCPCost(simulationState: Simulation): number {\n- return 0;\n+ return 18;\n}\ngetIds(): number[] {\n",
"new_path": "src/app/pages/simulator/model/actions/quality/basic-touch.ts",
"old_path": "src/app/pages/simulator/model/actions/quality/basic-touch.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,7 +6,7 @@ export class PreciseTouch extends QualityAction {\nexecute(simulation: Simulation): void {\nsuper.execute(simulation);\n- if (simulation.getBuff(Buff.INNER_QUIET).stacks < 11) {\n+ if (simulation.hasBuff(Buff.INNER_QUIET) && simulation.getBuff(Buff.INNER_QUIET).stacks < 11) {\nsimulation.getBuff(Buff.INNER_QUIET).stacks++;\n}\n}\n",
"new_path": "src/app/pages/simulator/model/actions/quality/precise-touch.ts",
"old_path": "src/app/pages/simulator/model/actions/quality/precise-touch.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -86,7 +86,7 @@ export class Simulation {\npublic run(linear = false): SimulationResult {\nthis.actions.forEach((action: CraftingAction, index: number) => {\n// If we're starting and the crafter is specialist\n- if (index === 0 && this.crafterStats.specialist) {\n+ if (index === 0 && this.crafterStats.specialist && this.crafterStats.level >= 70) {\n// Push stroke of genius buff\nthis.buffs.push({\nbuff: Buff.STROKE_OF_GENIUS,\n",
"new_path": "src/app/pages/simulator/simulation/simulation.ts",
"old_path": "src/app/pages/simulator/simulation/simulation.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): fixed various bugs
| 1
|
chore
|
simulator
|
217,922
|
02.05.2018 19:06:11
| -7,200
|
50c33382ca21a071ccd1e9ff418ab9b04526c05f
|
chore(simulator): fixed a bug with patient touch without inner quiet crashing the sim
|
[
{
"change_type": "MODIFY",
"diff": "@@ -6,7 +6,7 @@ export class PatientTouch extends QualityAction {\nexecute(simulation: Simulation): void {\nsuper.execute(simulation);\n- if (simulation.getBuff(Buff.INNER_QUIET).stacks < 11) {\n+ if (simulation.hasBuff(Buff.INNER_QUIET) && simulation.getBuff(Buff.INNER_QUIET).stacks < 11) {\nsimulation.getBuff(Buff.INNER_QUIET).stacks++;\n}\n}\n",
"new_path": "src/app/pages/simulator/model/actions/quality/patient-touch.ts",
"old_path": "src/app/pages/simulator/model/actions/quality/patient-touch.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): fixed a bug with patient touch without inner quiet crashing the sim
| 1
|
chore
|
simulator
|
217,922
|
02.05.2018 19:49:28
| -7,200
|
b5c91f4d1922a2bd57de703a1a0e7d1485bc4b37
|
chore(simulator): fixed a bug with uglified action classes
|
[
{
"change_type": "MODIFY",
"diff": "<h1>{{'SIMULATOR.Rotations' | translate}}</h1>\n<div *ngIf=\"rotations$ | async as rotations\">\n<div *ngIf=\"rotations.length > 0; else noRotations\">\n- <mat-expansion-panel *ngFor=\"let rotation of rotations\">\n+ <mat-expansion-panel *ngFor=\"let rotation of rotations; trackBy: trackByRotation\">\n<mat-expansion-panel-header>\n<mat-panel-title>\n{{rotation.getName()}}\n",
"new_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.html",
"old_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,8 +5,9 @@ import {Observable} from 'rxjs/Observable';\nimport {UserService} from '../../../../core/database/user.service';\nimport {CraftingAction} from '../../model/actions/crafting-action';\nimport {CraftingActionsRegistry} from '../../model/crafting-actions-registry';\n-import {MatSnackBar} from '@angular/material';\n+import {MatDialog, MatSnackBar} from '@angular/material';\nimport {TranslateService} from '@ngx-translate/core';\n+import {ConfirmationPopupComponent} from '../../../../modules/common-components/confirmation-popup/confirmation-popup.component';\n@Component({\nselector: 'app-rotations-page',\n@@ -20,7 +21,7 @@ export class RotationsPageComponent {\nconstructor(private rotationsService: CraftingRotationService, private userService: UserService,\nprivate craftingActionsRegistry: CraftingActionsRegistry, private snack: MatSnackBar,\n- private translator: TranslateService) {\n+ private translator: TranslateService, private dialog: MatDialog) {\nthis.rotations$ = this.userService.getUserData().mergeMap(user => {\nreturn this.rotationsService.getUserRotations(user.$key);\n});\n@@ -30,8 +31,16 @@ export class RotationsPageComponent {\nreturn this.craftingActionsRegistry.deserializeRotation(rotation.rotation);\n}\n+ trackByRotation(index: number, rotation: CraftingRotation): string {\n+ return rotation.$key;\n+ }\n+\npublic deleteRotation(rotationId: string): void {\n- this.rotationsService.remove(rotationId).subscribe();\n+ this.dialog.open(ConfirmationPopupComponent, {data: 'SIMULATOR.Confirm_delete'})\n+ .afterClosed()\n+ .filter(res => res)\n+ .mergeMap(() => this.rotationsService.remove(rotationId))\n+ .subscribe();\n}\npublic getLink(rotation: CraftingRotation): string {\n",
"new_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.ts",
"old_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -144,7 +144,7 @@ export class SimulatorComponent implements OnInit {\nthis.simulation$ = Observable.combineLatest(\nthis.recipe$,\n- this.actions$,\n+ this.actions$.debounceTime(200),\nthis.crafterStats$,\nthis.hqIngredients$,\n(recipe, actions, stats, hqIngredients) => new Simulation(recipe, actions, stats, hqIngredients)\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.ts",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -4,6 +4,10 @@ import {Buff} from '../../buff.enum';\nexport class HeartOfTheCrafter extends BuffAction {\n+ canBeUsed(simulation: Simulation): boolean {\n+ return simulation.crafterStats.specialist;\n+ }\n+\ngetBaseCPCost(simulationState: Simulation): number {\nreturn 45;\n}\n",
"new_path": "src/app/pages/simulator/model/actions/buff/heart-of-the-crafter.ts",
"old_path": "src/app/pages/simulator/model/actions/buff/heart-of-the-crafter.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -165,8 +165,4 @@ export abstract class CraftingAction {\n}\nreturn baseQuality * (1 + levelCorrectionFactor) * (1 + recipeLevelPenalty);\n}\n-\n- public getName(): string {\n- return this.constructor.name;\n- }\n}\n",
"new_path": "src/app/pages/simulator/model/actions/crafting-action.ts",
"old_path": "src/app/pages/simulator/model/actions/crafting-action.ts"
},
{
"change_type": "MODIFY",
"diff": "import {ProgressAction} from '../progress-action';\nimport {Simulation} from '../../../simulation/simulation';\n+import {Observe} from '../other/observe';\nexport class FocusedSynthesis extends ProgressAction {\n@@ -16,7 +17,7 @@ export class FocusedSynthesis extends ProgressAction {\n}\ngetBaseSuccessRate(simulationState: Simulation): number {\n- return simulationState.lastStep !== undefined && simulationState.lastStep.action.getName() === 'Observe' ? 100 : 50;\n+ return simulationState.lastStep !== undefined && simulationState.lastStep.action.getIds() === new Observe().getIds() ? 100 : 50;\n}\ngetIds(): number[] {\n",
"new_path": "src/app/pages/simulator/model/actions/progression/focused-synthesis.ts",
"old_path": "src/app/pages/simulator/model/actions/progression/focused-synthesis.ts"
},
{
"change_type": "MODIFY",
"diff": "import {QualityAction} from '../quality-action';\nimport {Simulation} from '../../../simulation/simulation';\n+import {Observe} from '../other/observe';\nexport class FocusedTouch extends QualityAction {\n@@ -16,7 +17,7 @@ export class FocusedTouch extends QualityAction {\n}\ngetBaseSuccessRate(simulationState: Simulation): number {\n- return simulationState.lastStep !== undefined && simulationState.lastStep.action.getName() === 'Observe' ? 100 : 50;\n+ return simulationState.lastStep !== undefined && simulationState.lastStep.action.getIds() === new Observe().getIds() ? 100 : 50;\n}\ngetIds(): number[] {\n",
"new_path": "src/app/pages/simulator/model/actions/quality/focused-touch.ts",
"old_path": "src/app/pages/simulator/model/actions/quality/focused-touch.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -135,87 +135,88 @@ export class CraftingActionsRegistry {\n{short: 'finishingTouches', full: 'FinishingTouches'},\n];\n- private static readonly ALL_ACTIONS: CraftingAction[] = [\n+ private static readonly ALL_ACTIONS: { name: string, action: CraftingAction }[] = [\n// Progress actions\n- new BasicSynthesis(),\n- new StandardSynthesis(),\n- new FlawlessSynthesis(),\n- new CarefulSynthesis(),\n- new CarefulSynthesisII(),\n- new CarefulSynthesisIII(),\n- new PieceByPiece(),\n- new RapidSynthesis(),\n- new RapidSynthesisII(),\n- new FocusedSynthesis(),\n- new MuscleMemory(),\n- new BrandOfWind(),\n- new BrandOfFire(),\n- new BrandOfIce(),\n- new BrandOfEarth(),\n- new BrandOfLightning(),\n- new BrandOfWater(),\n+ {name: 'BasicSynthesis', action: new BasicSynthesis()},\n+ {name: 'StandardSynthesis', action: new StandardSynthesis()},\n+ {name: 'FlawlessSynthesis', action: new FlawlessSynthesis()},\n+ {name: 'CarefulSynthesis', action: new CarefulSynthesis()},\n+ {name: 'CarefulSynthesisII', action: new CarefulSynthesisII()},\n+ {name: 'CarefulSynthesisIII', action: new CarefulSynthesisIII()},\n+ {name: 'PieceByPiece', action: new PieceByPiece()},\n+ {name: 'RapidSynthesis', action: new RapidSynthesis()},\n+ {name: 'RapidSynthesisII', action: new RapidSynthesisII()},\n+ {name: 'FocusedSynthesis', action: new FocusedSynthesis()},\n+ {name: 'MuscleMemory', action: new MuscleMemory()},\n+ {name: 'BrandOfWind', action: new BrandOfWind()},\n+ {name: 'BrandOfFire', action: new BrandOfFire()},\n+ {name: 'BrandOfIce', action: new BrandOfIce()},\n+ {name: 'BrandOfEarth', action: new BrandOfEarth()},\n+ {name: 'BrandOfLightning', action: new BrandOfLightning()},\n+ {name: 'BrandOfWater', action: new BrandOfWater()},\n// Quality actions\n- new BasicTouch(),\n- new StandardTouch(),\n- new AdvancedTouch(),\n- new HastyTouch(),\n- new HastyTouchII(),\n- new ByregotsBlessing(),\n- new ByregotsBrow(),\n- new ByregotsMiracle(),\n- new PreciseTouch(),\n- new FocusedTouch(),\n- new PatientTouch(),\n- new PrudentTouch(),\n- new InnovativeTouch(),\n+ {name: 'BasicTouch', action: new BasicTouch()},\n+ {name: 'StandardTouch', action: new StandardTouch()},\n+ {name: 'AdvancedTouch', action: new AdvancedTouch()},\n+ {name: 'HastyTouch', action: new HastyTouch()},\n+ {name: 'HastyTouchII', action: new HastyTouchII()},\n+ {name: 'ByregotsBlessing', action: new ByregotsBlessing()},\n+ {name: 'ByregotsBrow', action: new ByregotsBrow()},\n+ {name: 'ByregotsMiracle', action: new ByregotsMiracle()},\n+ {name: 'PreciseTouch', action: new PreciseTouch()},\n+ {name: 'FocusedTouch', action: new FocusedTouch()},\n+ {name: 'PatientTouch', action: new PatientTouch()},\n+ {name: 'PrudentTouch', action: new PrudentTouch()},\n+ {name: 'InnovativeTouch', action: new InnovativeTouch()},\n// CP recovery\n- new ComfortZone(),\n- new Rumination(),\n- new TricksOfTheTrade(),\n- new Satisfaction(),\n+ {name: 'ComfortZone', action: new ComfortZone()},\n+ {name: 'Rumination', action: new Rumination()},\n+ {name: 'TricksOfTheTrade', action: new TricksOfTheTrade()},\n+ {name: 'Satisfaction', action: new Satisfaction()},\n// Repair\n- new MastersMend(),\n- new MastersMendII(),\n- new Manipulation(),\n- new ManipulationII(),\n- new NymeiasWheel(),\n+ {name: 'MastersMend', action: new MastersMend()},\n+ {name: 'MastersMendII', action: new MastersMendII()},\n+ {name: 'Manipulation', action: new Manipulation()},\n+ {name: 'ManipulationII', action: new ManipulationII()},\n+ {name: 'NymeiasWheel', action: new NymeiasWheel()},\n// Buffs\n- new InnerQuiet(),\n- new SteadyHand(),\n- new SteadyHandII(),\n- new WasteNot(),\n- new WasteNotII(),\n- new Ingenuity(),\n- new IngenuityII(),\n- new GreatStrides(),\n- new Innovation(),\n- new MakersMark(),\n- new InitialPreparations(),\n- new WhistleWhileYouWork(),\n- new HeartOfTheCrafter(),\n- new NameOfTheWind(),\n- new NameOfFire(),\n- new NameOfIce(),\n- new NameOfEarth(),\n- new NameOfLightning(),\n- new NameOfWater(),\n+ {name: 'InnerQuiet', action: new InnerQuiet()},\n+ {name: 'SteadyHand', action: new SteadyHand()},\n+ {name: 'SteadyHandII', action: new SteadyHandII()},\n+ {name: 'WasteNot', action: new WasteNot()},\n+ {name: 'WasteNotII', action: new WasteNotII()},\n+ {name: 'Ingenuity', action: new Ingenuity()},\n+ {name: 'IngenuityII', action: new IngenuityII()},\n+ {name: 'GreatStrides', action: new GreatStrides()},\n+ {name: 'Innovation', action: new Innovation()},\n+ {name: 'MakersMark', action: new MakersMark()},\n+ {name: 'InitialPreparations', action: new InitialPreparations()},\n+ {name: 'WhistleWhileYouWork', action: new WhistleWhileYouWork()},\n+ {name: 'HeartOfTheCrafter', action: new HeartOfTheCrafter()},\n+ {name: 'NameOfTheWind', action: new NameOfTheWind()},\n+ {name: 'NameOfFire', action: new NameOfFire()},\n+ {name: 'NameOfIce', action: new NameOfIce()},\n+ {name: 'NameOfEarth', action: new NameOfEarth()},\n+ {name: 'NameOfLightning', action: new NameOfLightning()},\n+ {name: 'NameOfWater', action: new NameOfWater()},\n// Specialties\n- new SpecialtyRefurbish(),\n- new SpecialtyReinforce(),\n- new SpecialtyReflect(),\n+ {name: 'SpecialtyRefurbish', action: new SpecialtyRefurbish()},\n+ {name: 'SpecialtyReinforce', action: new SpecialtyReinforce()},\n+ {name: 'SpecialtyReflect', action: new SpecialtyReflect()},\n// Other\n- new Observe(),\n- new TrainedHand(),\n+ {name: 'Observe', action: new Observe()},\n+ {name: 'TrainedHand', action: new TrainedHand()},\n];\npublic getActionsByType(type: ActionType): CraftingAction[] {\n- return CraftingActionsRegistry.ALL_ACTIONS.filter(action => action.getType() === type);\n+ return CraftingActionsRegistry.ALL_ACTIONS.filter(row => row.action.getType() === type)\n+ .map(row => row.action);\n}\npublic importFromCraftOpt(importArray: string[]): CraftingAction[] {\n@@ -227,17 +228,26 @@ export class CraftingActionsRegistry {\n}\nreturn CraftingActionsRegistry.ALL_ACTIONS\n.find(el => {\n- return el.getName() === found.full;\n+ return el.name === found.full;\n});\n- }).filter(action => action !== undefined);\n+ })\n+ .filter(action => action !== undefined)\n+ .map(row => row.action);\n}\npublic serializeRotation(rotation: CraftingAction[]): string[] {\n- return rotation.map(action => action.getName());\n+ return rotation.map(action => {\n+ const actionRow = CraftingActionsRegistry.ALL_ACTIONS.find(row => row.action === action);\n+ if (actionRow !== undefined) {\n+ return actionRow.name;\n+ }\n+ return undefined;\n+ }).filter(action => action !== undefined);\n}\npublic deserializeRotation(rotation: string[]): CraftingAction[] {\n- return rotation.map(actionName => CraftingActionsRegistry.ALL_ACTIONS.find(el => el.getName() === actionName))\n- .filter(action => action !== undefined);\n+ return rotation.map(actionName => CraftingActionsRegistry.ALL_ACTIONS.find(row => row.name === actionName))\n+ .filter(action => action !== undefined)\n+ .map(row => row.action);\n}\n}\n",
"new_path": "src/app/pages/simulator/model/crafting-actions-registry.ts",
"old_path": "src/app/pages/simulator/model/crafting-actions-registry.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): fixed a bug with uglified action classes
| 1
|
chore
|
simulator
|
821,196
|
02.05.2018 21:15:08
| 25,200
|
84d16a21ecabcc89b21a036728f25a23d1da50a5
|
fix: rename oclif manifest to not be a dotfile
|
[
{
"change_type": "MODIFY",
"diff": "\"bin\": \"./bin/run\",\n\"bugs\": \"https://github.com/oclif/oclif/issues\",\n\"dependencies\": {\n- \"@oclif/command\": \"^1.4.18\",\n- \"@oclif/config\": \"^1.6.16\",\n- \"@oclif/errors\": \"^1.0.7\",\n- \"@oclif/plugin-help\": \"^1.2.7\",\n+ \"@oclif/command\": \"^1.4.19\",\n+ \"@oclif/config\": \"^1.6.17\",\n+ \"@oclif/errors\": \"^1.0.8\",\n+ \"@oclif/plugin-help\": \"^1.2.8\",\n\"@oclif/plugin-not-found\": \"^1.0.8\",\n- \"@oclif/plugin-warn-if-update-available\": \"^1.3.7\",\n+ \"@oclif/plugin-warn-if-update-available\": \"^1.3.8\",\n\"debug\": \"^3.1.0\",\n\"fixpack\": \"^2.3.1\",\n\"lodash\": \"^4.17.10\",\n\"yosay\": \"^2.0.2\"\n},\n\"devDependencies\": {\n- \"@oclif/dev-cli\": \"^1.13.13\",\n+ \"@oclif/dev-cli\": \"^1.13.14\",\n\"@oclif/tslint\": \"^1.1.0\",\n\"@types/lodash\": \"^4.14.108\",\n\"@types/read-pkg\": \"^3.0.0\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -266,9 +266,9 @@ class App extends Generator {\n}\nif (['plugin', 'multi'].includes(this.type)) {\nthis.pjson.scripts.prepack = nps.series(this.pjson.scripts.prepack, 'oclif-dev manifest', 'oclif-dev readme')\n- this.pjson.scripts.postpack = nps.series(this.pjson.scripts.postpack, 'rm -f .oclif.manifest.json')\n+ this.pjson.scripts.postpack = nps.series(this.pjson.scripts.postpack, 'rm -f oclif.manifest.json')\nthis.pjson.scripts.version = nps.series('oclif-dev readme', 'git add README.md')\n- this.pjson.files.push('/.oclif.manifest.json')\n+ this.pjson.files.push('/oclif.manifest.json')\n}\nthis.pjson.keywords = defaults.keywords || [this.type === 'plugin' ? 'oclif-plugin' : 'oclif']\nthis.pjson.homepage = defaults.homepage || `https://github.com/${this.pjson.repository}`\n@@ -460,7 +460,6 @@ class App extends Generator {\nprivate _gitignore(): string {\nconst existing = this.fs.exists(this.destinationPath('.gitignore')) ? this.fs.read(this.destinationPath('.gitignore')).split('\\n') : []\nreturn _([\n- '.oclif.manifest.json',\n'*-debug.log',\n'*-error.log',\n'node_modules',\n",
"new_path": "src/generators/app.ts",
"old_path": "src/generators/app.ts"
},
{
"change_type": "MODIFY",
"diff": "debug \"^3.1.0\"\nsemver \"^5.5.0\"\n-\"@oclif/config@^1.6.16\":\n- version \"1.6.16\"\n- resolved \"https://registry.yarnpkg.com/@oclif/config/-/config-1.6.16.tgz#6bcb03bf30ee54eeafa788777d965bf47bb5047d\"\n+\"@oclif/command@^1.4.19\":\n+ version \"1.4.19\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/command/-/command-1.4.19.tgz#7158eec97d9b4c4a109181e6a71bd83d34757254\"\ndependencies:\n+ \"@oclif/errors\" \"^1.0.6\"\n+ \"@oclif/parser\" \"^3.3.3\"\ndebug \"^3.1.0\"\n+ semver \"^5.5.0\"\n-\"@oclif/dev-cli@^1.13.13\":\n- version \"1.13.13\"\n- resolved \"https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.13.13.tgz#40f60c002f2f915c11d9f7a09d2f46967ecc072a\"\n+\"@oclif/config@^1.6.17\":\n+ version \"1.6.17\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/config/-/config-1.6.17.tgz#e9608f56e5acd49fcaf3bbfcc3e8818d81b1ba12\"\ndependencies:\n- \"@oclif/command\" \"^1.4.18\"\n- \"@oclif/config\" \"^1.6.16\"\n- \"@oclif/errors\" \"^1.0.7\"\n+ debug \"^3.1.0\"\n+\n+\"@oclif/dev-cli@^1.13.14\":\n+ version \"1.13.14\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.13.14.tgz#fcfb899f6da512c6cdaf21e01667ec58217c677a\"\n+ dependencies:\n+ \"@oclif/command\" \"^1.4.19\"\n+ \"@oclif/config\" \"^1.6.17\"\n+ \"@oclif/errors\" \"^1.0.8\"\n\"@oclif/plugin-help\" \"^1.2.7\"\ncli-ux \"^3.4.1\"\ndebug \"^3.1.0\"\nstrip-ansi \"^4.0.0\"\nwrap-ansi \"^3.0.1\"\n-\"@oclif/errors@^1.0.7\":\n- version \"1.0.7\"\n- resolved \"https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.7.tgz#13d7205801944c341534370e65140d21ab929e24\"\n+\"@oclif/errors@^1.0.8\":\n+ version \"1.0.8\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.8.tgz#2f8239267506bb7c3f5fd776144c2686e5b7fff7\"\ndependencies:\nclean-stack \"^1.3.0\"\nfs-extra \"^6.0.0\"\nwidest-line \"^2.0.0\"\nwrap-ansi \"^3.0.1\"\n+\"@oclif/plugin-help@^1.2.8\":\n+ version \"1.2.8\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-1.2.8.tgz#35c3edd97d192d5bd741f95cc9e3642dfa6d9902\"\n+ dependencies:\n+ \"@oclif/command\" \"^1.4.19\"\n+ chalk \"^2.4.1\"\n+ indent-string \"^3.2.0\"\n+ lodash.template \"^4.4.0\"\n+ string-width \"^2.1.1\"\n+ widest-line \"^2.0.0\"\n+ wrap-ansi \"^3.0.1\"\n+\n\"@oclif/plugin-not-found@^1.0.8\":\nversion \"1.0.8\"\nresolved \"https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-1.0.8.tgz#5d71f8b9acfc5b45563196eebd3214313a06a14b\"\n\"@oclif/command\" \"^1.4.18\"\nstring-similarity \"^1.2.0\"\n-\"@oclif/plugin-warn-if-update-available@^1.3.7\":\n- version \"1.3.7\"\n- resolved \"https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-1.3.7.tgz#175aef19d0aa2caf8d75e3d3e97124664d5670a4\"\n+\"@oclif/plugin-warn-if-update-available@^1.3.8\":\n+ version \"1.3.8\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-1.3.8.tgz#bc42e86b83a29a138c8b7ee4e8c38ac066f9adf3\"\ndependencies:\n- \"@oclif/command\" \"^1.4.18\"\n- \"@oclif/config\" \"^1.6.16\"\n- \"@oclif/errors\" \"^1.0.7\"\n+ \"@oclif/command\" \"^1.4.19\"\n+ \"@oclif/config\" \"^1.6.17\"\n+ \"@oclif/errors\" \"^1.0.8\"\nchalk \"^2.4.1\"\ndebug \"^3.1.0\"\nfs-extra \"^6.0.0\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
TypeScript
|
MIT License
|
oclif/oclif
|
fix: rename oclif manifest to not be a dotfile
| 1
|
fix
| null |
217,922
|
02.05.2018 21:24:14
| -7,200
|
837404e01398fdaeff83120b605b3f4c3ad193b9
|
chore(simulator): new snapshot mode and fix to focused actions
|
[
{
"change_type": "MODIFY",
"diff": "<mat-card-subtitle *ngIf=\"itemId !== undefined\">\n<span *ngIf=\"recipe$ | async as recipeData\">{{recipeData.lvl}} {{getStars(recipeData.stars)}}</span>\n</mat-card-subtitle>\n- <span class=\"steps\">\n- {{'SIMULATOR.Step_counter' | translate}} {{resultData.simulation.steps.length}}\n- </span>\n+ <div class=\"steps\">\n+ {{'SIMULATOR.Step_counter' | translate}}\n+ <mat-input-container *ngIf=\"snapshotMode\" class=\"snapshot-input\">\n+ <input type=\"number\" min=\"0\" max=\"{{resultData.simulation.steps.length}}\"\n+ [ngModel]=\"resultData.simulation.steps.length\"\n+ (ngModelChange)=\"snapshotStep$.next($event)\"\n+ matInput>\n+ </mat-input-container>\n+ <span *ngIf=\"!snapshotMode\">{{resultData.simulation.steps.length}}</span>\n+ <button mat-icon-button (click)=\"snapshotMode = !snapshotMode; snapshotStep$.next(Infinity)\"\n+ matTooltip=\"{{'SIMULATOR.Toggle_snapshot_mode' | translate}}\">\n+ <mat-icon>camera_roll</mat-icon>\n+ </button>\n+ </div>\n</mat-card-header>\n<mat-card-content class=\"result\">\n<div class=\"durability\">\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Progression' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true)\n+ <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Quality' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true)\n+ <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Cp_recovery' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true)\n+ <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Buff' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true)\n+ <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Repair' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true)\n+ <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Specialty' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true)\n+ <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Other' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true)\n+ <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.html",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.html"
},
{
"change_type": "MODIFY",
"diff": "}\n}\n+.snapshot-input {\n+ margin: 0 10px;\n+ min-width: 50px;\n+}\n+\n.steps {\nwhite-space: nowrap;\nfont-size: 1.2rem;\nmargin-right: 20px;\npadding-bottom: 10px;\ndisplay: flex;\n- align-items: flex-end;\n+ align-items: center;\n}\n.configuration {\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.scss",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -117,6 +117,10 @@ export class SimulatorComponent implements OnInit {\nprivate recipeSync: Craft;\n+ public snapshotStep$: BehaviorSubject<number> = new BehaviorSubject<number>(Infinity);\n+\n+ public snapshotMode = false;\n+\nconstructor(private registry: CraftingActionsRegistry, private media: ObservableMedia, private userService: UserService,\nprivate dataService: DataService, private htmlTools: HtmlToolsService, private dialog: MatDialog) {\n@@ -144,14 +148,17 @@ export class SimulatorComponent implements OnInit {\nthis.simulation$ = Observable.combineLatest(\nthis.recipe$,\n- this.actions$.debounceTime(200),\n+ this.actions$.debounceTime(300),\nthis.crafterStats$,\nthis.hqIngredients$,\n(recipe, actions, stats, hqIngredients) => new Simulation(recipe, actions, stats, hqIngredients)\n);\n- this.result$ = this.simulation$.map(simulation => {\n+ this.result$ = Observable.combineLatest(this.snapshotStep$, this.simulation$, (step, simulation) => {\nsimulation.reset();\n+ if (this.snapshotMode) {\n+ return simulation.run(true, step);\n+ }\nreturn simulation.run(true);\n});\n@@ -179,8 +186,10 @@ export class SimulatorComponent implements OnInit {\n}\nreturn userSet;\n}).subscribe(set => {\n+ setTimeout(() => {\nthis.selectedSet = set;\nthis.applyStats(set);\n+ }, 500);\n});\n}\n}\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.ts",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -17,7 +17,8 @@ export class FocusedSynthesis extends ProgressAction {\n}\ngetBaseSuccessRate(simulationState: Simulation): number {\n- return simulationState.lastStep !== undefined && simulationState.lastStep.action.getIds() === new Observe().getIds() ? 100 : 50;\n+ return simulationState.lastStep !== undefined &&\n+ simulationState.lastStep.action.getIds()[0] === new Observe().getIds()[0] ? 100 : 50;\n}\ngetIds(): number[] {\n",
"new_path": "src/app/pages/simulator/model/actions/progression/focused-synthesis.ts",
"old_path": "src/app/pages/simulator/model/actions/progression/focused-synthesis.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -17,7 +17,8 @@ export class FocusedTouch extends QualityAction {\n}\ngetBaseSuccessRate(simulationState: Simulation): number {\n- return simulationState.lastStep !== undefined && simulationState.lastStep.action.getIds() === new Observe().getIds() ? 100 : 50;\n+ return simulationState.lastStep !== undefined\n+ && simulationState.lastStep.action.getIds()[0] === new Observe().getIds()[0] ? 100 : 50;\n}\ngetIds(): number[] {\n",
"new_path": "src/app/pages/simulator/model/actions/quality/focused-touch.ts",
"old_path": "src/app/pages/simulator/model/actions/quality/focused-touch.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -81,9 +81,10 @@ export class Simulation {\n/**\n* Run the simulation.\n* @param {boolean} linear should everything be linear (aka no fail on actions, Initial preparations never procs)\n+ * @param maxTurns\n* @returns {ActionResult[]}\n*/\n- public run(linear = false): SimulationResult {\n+ public run(linear = false, maxTurns = Infinity): SimulationResult {\nthis.actions.forEach((action: CraftingAction, index: number) => {\n// If we're starting and the crafter is specialist\nif (index === 0 && this.crafterStats.specialist && this.crafterStats.level >= 70) {\n@@ -99,7 +100,8 @@ export class Simulation {\nthis.maxCP += 15;\n}\n// If we can use the action\n- if (this.success === undefined && action.getBaseCPCost(this) <= this.availableCP && action.canBeUsed(this, linear)) {\n+ if (this.success === undefined && action.getBaseCPCost(this) <= this.availableCP && action.canBeUsed(this, linear)\n+ && this.steps.length < maxTurns) {\nthis.runAction(action, linear);\n} else {\n// If we can't, add the step to the result but skip it.\n",
"new_path": "src/app/pages/simulator/simulation/simulation.ts",
"old_path": "src/app/pages/simulator/simulation/simulation.ts"
},
{
"change_type": "MODIFY",
"diff": "\"Share_link_copied\": \"Rotation share link copied to clipboard\",\n\"Persist\": \"Save this rotation\",\n\"Rotation_not_found\": \"Rotation not found\",\n+ \"Confirm_delete\": \"Do you really want to delete this rotation?\",\n\"CUSTOM\": {\n\"Recipe_configuration\": \"Recipe configuration\",\n\"Recipe_level\": \"Recipe level\",\n",
"new_path": "src/assets/i18n/en.json",
"old_path": "src/assets/i18n/en.json"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): new snapshot mode and fix to focused actions
| 1
|
chore
|
simulator
|
730,412
|
02.05.2018 21:28:46
| 0
|
df17cf87bfb2fa845582d3b38e5260ca4c461fb6
|
chore(release): 0.1.290
|
[
{
"change_type": "MODIFY",
"diff": "All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n+<a name=\"0.1.290\"></a>\n+## [0.1.290](https://github.com/webex/react-ciscospark/compare/v0.1.289...v0.1.290) (2018-05-02)\n+\n+\n+\n<a name=\"0.1.289\"></a>\n## [0.1.289](https://github.com/webex/react-ciscospark/compare/v0.1.288...v0.1.289) (2018-05-01)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.289\",\n+ \"version\": \"0.1.290\",\n\"description\": \"The Cisco Spark for React library allows developers to easily incorporate Spark functionality into an application.\",\n\"scripts\": {\n\"build\": \"./scripts/build/index.js\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(release): 0.1.290
| 1
|
chore
|
release
|
217,922
|
02.05.2018 21:46:49
| -7,200
|
9cc89c1f43e795288b584bc5173ae76b149a8081
|
chore(simulator): fixed missing translation key
|
[
{
"change_type": "MODIFY",
"diff": "\"Persist\": \"Save this rotation\",\n\"Rotation_not_found\": \"Rotation not found\",\n\"Confirm_delete\": \"Do you really want to delete this rotation?\",\n+ \"Toggle_snapshot_mode\": \"Toggle snapshot mode\",\n\"CUSTOM\": {\n\"Recipe_configuration\": \"Recipe configuration\",\n\"Recipe_level\": \"Recipe level\",\n",
"new_path": "src/assets/i18n/en.json",
"old_path": "src/assets/i18n/en.json"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): fixed missing translation key
| 1
|
chore
|
simulator
|
217,922
|
02.05.2018 22:35:27
| -7,200
|
64ed1abf81004a49697bcd965ed80ef6ca3f333d
|
chore(simulator): disabled auto saving
|
[
{
"change_type": "MODIFY",
"diff": "+<div *ngIf=\"!notFound; else notFoundTemplate\">\n<mat-expansion-panel expanded=\"true\">\n<mat-expansion-panel-header>\n<mat-panel-title>\n</mat-expansion-panel>\n<app-simulator [recipe]=\"recipe\" [inputGearSet]=\"stats\" [actions]=\"actions\"\n- [customMode]=\"true\" [canSave]=\"canSave\" [rotationId]=\"rotationId\" (onsave)=\"save($event)\"></app-simulator>\n+ [customMode]=\"true\" [canSave]=\"canSave\" [rotationId]=\"rotationId\"\n+ (onsave)=\"save($event)\"></app-simulator>\n+\n+</div>\n+<ng-template #notFoundTemplate>\n+ <div class=\"not-found\">\n+ {{'SIMULATOR.Rotation_not_found' | translate}}\n+ </div>\n+</ng-template>\n",
"new_path": "src/app/pages/simulator/components/custom-simulator-page/custom-simulator-page.component.html",
"old_path": "src/app/pages/simulator/components/custom-simulator-page/custom-simulator-page.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,3 +5,11 @@ mat-expansion-panel {\nflex-wrap: wrap;\n}\n}\n+.not-found {\n+ width: 100%;\n+ opacity: .7;\n+ font-size: 40px;\n+ text-align: center;\n+ height: 300px;\n+ padding-top: 50px;\n+}\n",
"new_path": "src/app/pages/simulator/components/custom-simulator-page/custom-simulator-page.component.scss",
"old_path": "src/app/pages/simulator/components/custom-simulator-page/custom-simulator-page.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -4,7 +4,6 @@ import {CustomCraftingRotation} from '../../../../model/other/custom-crafting-ro\nimport {UserService} from '../../../../core/database/user.service';\nimport {CraftingRotationService} from '../../../../core/database/crafting-rotation.service';\nimport {Observable} from 'rxjs/Observable';\n-import {CraftingRotation} from '../../../../model/other/crafting-rotation';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {CraftingActionsRegistry} from '../../model/crafting-actions-registry';\nimport {CraftingAction} from '../../model/actions/crafting-action';\n@@ -35,6 +34,8 @@ export class CustomSimulatorPageComponent {\npublic rotationId: string;\n+ public notFound = false;\n+\nconstructor(private userService: UserService, private rotationsService: CraftingRotationService,\nprivate router: Router, activeRoute: ActivatedRoute, private registry: CraftingActionsRegistry) {\n@@ -49,12 +50,13 @@ export class CustomSimulatorPageComponent {\n.map(res => <CustomCraftingRotation>res),\n(userId, rotation) => ({userId: userId, rotation: rotation})\n).subscribe((res) => {\n+ this.notFound = false;\nthis.recipe = res.rotation.recipe;\nthis.actions = this.registry.deserializeRotation(res.rotation.rotation);\nthis.stats = res.rotation.stats;\nthis.canSave = res.userId === res.rotation.authorId;\nthis.rotationId = res.rotation.$key;\n- });\n+ }, () => this.notFound = true);\n}\nsave(rotation: Partial<CustomCraftingRotation>): void {\n",
"new_path": "src/app/pages/simulator/components/custom-simulator-page/custom-simulator-page.component.ts",
"old_path": "src/app/pages/simulator/components/custom-simulator-page/custom-simulator-page.component.ts"
},
{
"change_type": "MODIFY",
"diff": "<mat-spinner></mat-spinner>\n</ng-template>\n<ng-template #notFoundTemplate>\n+ <div class=\"not-found\">\n{{'SIMULATOR.Rotation_not_found' | translate}}\n+ </div>\n</ng-template>\n",
"new_path": "src/app/pages/simulator/components/simulator-page/simulator-page.component.html",
"old_path": "src/app/pages/simulator/components/simulator-page/simulator-page.component.html"
},
{
"change_type": "MODIFY",
"diff": "+.not-found {\n+ width: 100%;\n+ opacity: .7;\n+ font-size: 40px;\n+ text-align: center;\n+ height: 300px;\n+ padding-top: 50px;\n+}\n",
"new_path": "src/app/pages/simulator/components/simulator-page/simulator-page.component.scss",
"old_path": "src/app/pages/simulator/components/simulator-page/simulator-page.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -69,12 +69,13 @@ export class SimulatorPageComponent {\n.map(res => res),\n(userId, rotation) => ({userId: userId, rotation: rotation})\n).subscribe((res) => {\n+ this.notFound = false;\nthis.actions = this.registry.deserializeRotation(res.rotation.rotation);\nthis.canSave = res.userId === res.rotation.authorId;\nthis.rotationId = res.rotation.$key;\nthis.selectedFood = res.rotation.consumables.food;\nthis.selectedMedicine = res.rotation.consumables.medicine;\n- });\n+ }, () => this.notFound = true);\n}\nsave(rotation: Partial<CraftingRotation>): void {\n",
"new_path": "src/app/pages/simulator/components/simulator-page/simulator-page.component.ts",
"old_path": "src/app/pages/simulator/components/simulator-page/simulator-page.component.ts"
},
{
"change_type": "MODIFY",
"diff": "<button mat-mini-fab\nmatTooltip=\"{{'SIMULATOR.Persist' | translate}}\"\nmatTooltipPosition=\"{{isMobile()?'below':'right'}}\"\n- *ngIf=\"(actions$ | async).length > 0 && rotationId === undefined\" (click)=\"save()\">\n+ *ngIf=\"(actions$ | async).length > 0 && ((dirty && canSave) || rotationId === undefined)\" (click)=\"save()\">\n<mat-icon>save</mat-icon>\n</button>\n<button mat-mini-fab\n<mat-card-subtitle *ngIf=\"itemId !== undefined\">\n<span *ngIf=\"recipe$ | async as recipeData\">{{recipeData.lvl}} {{getStars(recipeData.stars)}}</span>\n</mat-card-subtitle>\n- <span class=\"steps\">\n- {{'SIMULATOR.Step_counter' | translate}} {{resultData.simulation.steps.length}}\n- </span>\n+ <div class=\"steps mobile\">\n+ {{'SIMULATOR.Step_counter' | translate}}\n+ <mat-input-container *ngIf=\"snapshotMode\" class=\"snapshot-input mobile\">\n+ <input type=\"number\" min=\"0\" max=\"{{resultData.simulation.steps.length}}\"\n+ [ngModel]=\"resultData.simulation.steps.length\"\n+ (ngModelChange)=\"snapshotStep$.next($event)\"\n+ matInput>\n+ </mat-input-container>\n+ <span *ngIf=\"!snapshotMode\">{{resultData.simulation.steps.length}}</span>\n+ <button mat-icon-button (click)=\"snapshotMode = !snapshotMode; snapshotStep$.next(Infinity)\"\n+ matTooltip=\"{{'SIMULATOR.Toggle_snapshot_mode' | translate}}\">\n+ <mat-icon>camera_roll</mat-icon>\n+ </button>\n+ </div>\n</mat-card-header>\n<mat-card-content class=\"mobile-result\">\n<span class=\"durability-value\">{{'SIMULATOR.Durability' | translate}} : {{resultData.simulation.durability}} / {{resultData.simulation.recipe.durability}}</span>\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.html",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.html"
},
{
"change_type": "MODIFY",
"diff": ".snapshot-input {\nmargin: 0 10px;\nmin-width: 50px;\n+ &.mobile {\n+ min-width: 30px;\n+ }\n}\n.steps {\npadding-bottom: 10px;\ndisplay: flex;\nalign-items: center;\n+ &.mobile{\n+ font-size: .8rem;\n+ margin-right: 0;\n+ }\n}\n.configuration {\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.scss",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -121,6 +121,8 @@ export class SimulatorComponent implements OnInit {\npublic snapshotMode = false;\n+ public dirty = false;\n+\nconstructor(private registry: CraftingActionsRegistry, private media: ObservableMedia, private userService: UserService,\nprivate dataService: DataService, private htmlTools: HtmlToolsService, private dialog: MatDialog) {\n@@ -128,6 +130,7 @@ export class SimulatorComponent implements OnInit {\nthis.medicines = Consumable.fromData(medicines);\nthis.actions$.subscribe(actions => {\n+ this.dirty = false;\nthis.serializedRotation = this.registry.serializeRotation(actions);\n});\n@@ -148,7 +151,7 @@ export class SimulatorComponent implements OnInit {\nthis.simulation$ = Observable.combineLatest(\nthis.recipe$,\n- this.actions$.debounceTime(300),\n+ this.actions$,\nthis.crafterStats$,\nthis.hqIngredients$,\n(recipe, actions, stats, hqIngredients) => new Simulation(recipe, actions, stats, hqIngredients)\n@@ -163,7 +166,7 @@ export class SimulatorComponent implements OnInit {\n});\nthis.report$ = this.result$\n- .debounceTime(500)\n+ .debounceTime(250)\n.filter(res => res.success)\n.mergeMap(() => this.simulation$)\n.map(simulation => simulation.getReliabilityReport());\n@@ -200,7 +203,10 @@ export class SimulatorComponent implements OnInit {\n.filter(res => res !== undefined && res.length > 0 && res.indexOf('[') > -1)\n.map(importString => <string[]>JSON.parse(importString))\n.map(importArray => this.registry.importFromCraftOpt(importArray))\n- .subscribe(rotation => this.actions = rotation);\n+ .subscribe(rotation => {\n+ this.actions = rotation;\n+ this.dirty = true;\n+ });\n}\ngenerateMacro(): void {\n@@ -238,10 +244,7 @@ export class SimulatorComponent implements OnInit {\nconst actions = this.actions$.getValue();\nactions.splice(targetIndex, 0, actions.splice(originIndex, 1)[0]);\nthis.actions$.next(actions);\n- // If we can edit this rotation and it's a persisted one, autosave on edit\n- if (this.canSave && this.rotationId !== undefined) {\n- this.save();\n- }\n+ this.dirty = true;\n}\ngetBonusValue(bonusType: BonusType, baseValue: number): number {\n@@ -276,36 +279,24 @@ export class SimulatorComponent implements OnInit {\nset.cp + this.getBonusValue('CP', set.cp),\nset.specialist,\nset.level);\n- // If we can edit this rotation and it's a persisted one, autosave on edit\n- if (this.canSave && this.rotationId !== undefined) {\n- this.save();\n- }\n+ this.dirty = true;\n}\naddAction(action: CraftingAction): void {\nthis.actions$.next(this.actions$.getValue().concat(action));\n- // If we can edit this rotation and it's a persisted one, autosave on edit\n- if (this.canSave && this.rotationId !== undefined) {\n- this.save();\n- }\n+ this.dirty = true;\n}\nremoveAction(index: number): void {\nconst rotation = this.actions$.getValue();\nrotation.splice(index, 1);\nthis.actions$.next(rotation);\n- // If we can edit this rotation and it's a persisted one, autosave on edit\n- if (this.canSave && this.rotationId !== undefined) {\n- this.save();\n- }\n+ this.dirty = true;\n}\nclearRotation(): void {\nthis.actions = [];\n- // If we can edit this rotation and it's a persisted one, autosave on edit\n- if (this.canSave && this.rotationId !== undefined) {\n- this.save();\n- }\n+ this.dirty = true;\n}\ngetProgressActions(): CraftingAction[] {\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.ts",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -116,8 +116,10 @@ export class Simulation {\nstate: this.state,\n});\n}\n+ if (this.steps.length < maxTurns) {\n// Tick buffs after checking synth result, so if we reach 0 durability, synth fails.\nthis.tickBuffs(linear);\n+ }\n// Tick state to change it for next turn if not in linear mode\nif (!linear) {\nthis.tickState();\n",
"new_path": "src/app/pages/simulator/simulation/simulation.ts",
"old_path": "src/app/pages/simulator/simulation/simulation.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): disabled auto saving
| 1
|
chore
|
simulator
|
217,922
|
02.05.2018 22:48:46
| -7,200
|
7b816329dc900779ca0ea23f63668a0a30ae3cef
|
chore(simulator): connected pending changes service to simulator page
|
[
{
"change_type": "MODIFY",
"diff": "<h1>{{'SIMULATOR.Rotations' | translate}}</h1>\n<div *ngIf=\"rotations$ | async as rotations\">\n<div *ngIf=\"rotations.length > 0; else noRotations\">\n- <mat-expansion-panel *ngFor=\"let rotation of rotations; trackBy: trackByRotation\">\n+ <mat-expansion-panel *ngFor=\"let rotation of rotations; trackBy: trackByRotation\" class=\"rotation-panel\">\n<mat-expansion-panel-header>\n<mat-panel-title>\n{{rotation.getName()}}\n",
"new_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.html",
"old_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.html"
},
{
"change_type": "MODIFY",
"diff": "margin-top: 25px;\nwidth: 100%;\n}\n+\n+.rotation-panel {\n+ margin: 10px 0;\n+}\n",
"new_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.scss",
"old_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.scss"
},
{
"change_type": "MODIFY",
"diff": "-import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\n+import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';\nimport {Craft} from '../../../../model/garland-tools/craft';\nimport {Simulation} from '../../simulation/simulation';\nimport {Observable} from 'rxjs/Observable';\n@@ -26,13 +26,14 @@ import {CustomCraftingRotation} from '../../../../model/other/custom-crafting-ro\nimport {MatDialog} from '@angular/material';\nimport {ImportRotationPopupComponent} from '../import-rotation-popup/import-rotation-popup.component';\nimport {MacroPopupComponent} from '../macro-popup/macro-popup.component';\n+import {PendingChangesService} from 'app/core/database/pending-changes/pending-changes.service';\n@Component({\nselector: 'app-simulator',\ntemplateUrl: './simulator.component.html',\nstyleUrls: ['./simulator.component.scss']\n})\n-export class SimulatorComponent implements OnInit {\n+export class SimulatorComponent implements OnInit, OnDestroy {\n@Input()\nitemId: number;\n@@ -124,13 +125,15 @@ export class SimulatorComponent implements OnInit {\npublic dirty = false;\nconstructor(private registry: CraftingActionsRegistry, private media: ObservableMedia, private userService: UserService,\n- private dataService: DataService, private htmlTools: HtmlToolsService, private dialog: MatDialog) {\n+ private dataService: DataService, private htmlTools: HtmlToolsService, private dialog: MatDialog,\n+ private pendingChanges: PendingChangesService) {\nthis.foods = Consumable.fromData(foods);\nthis.medicines = Consumable.fromData(medicines);\nthis.actions$.subscribe(actions => {\nthis.dirty = false;\n+ this.pendingChanges.removePendingChange('rotation');\nthis.serializedRotation = this.registry.serializeRotation(actions);\n});\n@@ -191,7 +194,7 @@ export class SimulatorComponent implements OnInit {\n}).subscribe(set => {\nsetTimeout(() => {\nthis.selectedSet = set;\n- this.applyStats(set);\n+ this.applyStats(set, false);\n}, 500);\n});\n}\n@@ -205,7 +208,7 @@ export class SimulatorComponent implements OnInit {\n.map(importArray => this.registry.importFromCraftOpt(importArray))\n.subscribe(rotation => {\nthis.actions = rotation;\n- this.dirty = true;\n+ this.markAsDirty();\n});\n}\n@@ -213,6 +216,11 @@ export class SimulatorComponent implements OnInit {\nthis.dialog.open(MacroPopupComponent, {data: this.actions$.getValue()});\n}\n+ private markAsDirty(): void {\n+ this.pendingChanges.addPendingChange('rotation');\n+ this.dirty = true;\n+ }\n+\nsave(): void {\nif (!this.customMode) {\nthis.onsave.emit({\n@@ -244,7 +252,7 @@ export class SimulatorComponent implements OnInit {\nconst actions = this.actions$.getValue();\nactions.splice(targetIndex, 0, actions.splice(originIndex, 1)[0]);\nthis.actions$.next(actions);\n- this.dirty = true;\n+ this.markAsDirty();\n}\ngetBonusValue(bonusType: BonusType, baseValue: number): number {\n@@ -271,7 +279,7 @@ export class SimulatorComponent implements OnInit {\nreturn bonusFromFood + bonusFromMedicine;\n}\n- applyStats(set: GearSet): void {\n+ applyStats(set: GearSet, markDirty = true): void {\nthis.crafterStats = new CrafterStats(\nset.jobId,\nset.craftsmanship + this.getBonusValue('Craftsmanship', set.craftsmanship),\n@@ -279,24 +287,26 @@ export class SimulatorComponent implements OnInit {\nset.cp + this.getBonusValue('CP', set.cp),\nset.specialist,\nset.level);\n- this.dirty = true;\n+ if (markDirty) {\n+ this.markAsDirty();\n+ }\n}\naddAction(action: CraftingAction): void {\nthis.actions$.next(this.actions$.getValue().concat(action));\n- this.dirty = true;\n+ this.markAsDirty();\n}\nremoveAction(index: number): void {\nconst rotation = this.actions$.getValue();\nrotation.splice(index, 1);\nthis.actions$.next(rotation);\n- this.dirty = true;\n+ this.markAsDirty();\n}\nclearRotation(): void {\nthis.actions = [];\n- this.dirty = true;\n+ this.markAsDirty();\n}\ngetProgressActions(): CraftingAction[] {\n@@ -330,4 +340,8 @@ export class SimulatorComponent implements OnInit {\nisMobile(): boolean {\nreturn this.media.isActive('xs') || this.media.isActive('sm');\n}\n+\n+ ngOnDestroy(): void {\n+ this.pendingChanges.removePendingChange('rotation');\n+ }\n}\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.ts",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): connected pending changes service to simulator page
| 1
|
chore
|
simulator
|
807,849
|
03.05.2018 09:49:23
| 25,200
|
d57f3b70d54de85becf499523d1dc6cd2476e379
|
refactor: publish tweaks
Move isBreakingChange into lib
Refactor fixed version mapping
Add comment to collect-updates
|
[
{
"change_type": "MODIFY",
"diff": "@@ -33,6 +33,7 @@ const gitCommit = require(\"./lib/git-commit\");\nconst gitPush = require(\"./lib/git-push\");\nconst gitTag = require(\"./lib/git-tag\");\nconst isBehindUpstream = require(\"./lib/is-behind-upstream\");\n+const isBreakingChange = require(\"./lib/is-breaking-change\");\nmodule.exports = factory;\n@@ -40,22 +41,6 @@ function factory(argv) {\nreturn new PublishCommand(argv);\n}\n-function isBreakingChange(currentVersion, nextVersion) {\n- const releaseType = semver.diff(currentVersion, nextVersion);\n- switch (releaseType) { //eslint-disable-line\n- case \"major\":\n- return true;\n- case \"minor\":\n- return semver.lt(currentVersion, \"1.0.0\");\n- case \"patch\":\n- return semver.lt(currentVersion, \"0.1.0\");\n- case \"premajor\":\n- case \"preminor\":\n- case \"prepatch\":\n- case \"prerelease\":\n- return false;\n- }\n-}\nclass PublishCommand extends Command {\nget defaultOptions() {\nreturn Object.assign({}, super.defaultOptions, {\n@@ -172,20 +157,20 @@ class PublishCommand extends Command {\nthis.updatesVersions = versions;\n} else {\nlet hasBreakingChange;\n+\nfor (const [name, bump] of versions) {\nhasBreakingChange =\nhasBreakingChange || isBreakingChange(this.packageGraph.get(name).version, bump);\n}\n+\nif (hasBreakingChange) {\nconst packages =\nthis.filteredPackages.length === this.packageGraph.size\n? this.packageGraph\n: new Map(this.filteredPackages.map(({ name }) => [name, this.packageGraph.get(name)]));\n+\nthis.updates = Array.from(packages.values());\n- this.updatesVersions = new Map();\n- this.updates.forEach(pkg => {\n- this.updatesVersions.set(pkg.name, this.globalVersion);\n- });\n+ this.updatesVersions = new Map(this.updates.map(({ name }) => [name, this.globalVersion]));\n} else {\nthis.updatesVersions = versions;\n}\n",
"new_path": "commands/publish/index.js",
"old_path": "commands/publish/index.js"
},
{
"change_type": "ADD",
"diff": "+\"use strict\";\n+\n+const semver = require(\"semver\");\n+\n+module.exports = isBreakingChange;\n+\n+function isBreakingChange(currentVersion, nextVersion) {\n+ const releaseType = semver.diff(currentVersion, nextVersion);\n+ let breaking;\n+\n+ if (releaseType === \"major\") {\n+ // self-evidently\n+ breaking = true;\n+ } else if (releaseType === \"minor\") {\n+ // 0.1.9 => 0.2.0 is breaking\n+ breaking = semver.lt(currentVersion, \"1.0.0\");\n+ } else if (releaseType === \"patch\") {\n+ // 0.0.1 => 0.0.2 is breaking(?)\n+ breaking = semver.lt(currentVersion, \"0.1.0\");\n+ } else {\n+ // versions are equal, or any prerelease\n+ breaking = false;\n+ }\n+\n+ return breaking;\n+}\n",
"new_path": "commands/publish/lib/is-breaking-change.js",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -65,6 +65,7 @@ function collectUpdates({\nconst dependents = collectDependents(candidates);\ndependents.forEach(node => candidates.add(node));\n+ // The result should always be in the same order as the input\nconst updates = [];\npackages.forEach((node, name) => {\n",
"new_path": "utils/collect-updates/collect-updates.js",
"old_path": "utils/collect-updates/collect-updates.js"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
refactor: publish tweaks
- Move isBreakingChange into lib
- Refactor fixed version mapping
- Add comment to collect-updates
| 1
|
refactor
| null |
791,723
|
03.05.2018 11:42:14
| 25,200
|
734e09b98722e3d557ddfff430bed731836f4a69
|
report: error'd audits get 'Error!' treatment
|
[
{
"change_type": "MODIFY",
"diff": "@@ -31,19 +31,16 @@ class CategoryRenderer {\nconst tmpl = this.dom.cloneTemplate('#tmpl-lh-audit', this.templateContext);\nconst auditEl = this.dom.find('.lh-audit', tmpl);\nauditEl.id = audit.result.name;\n-\nconst scoreDisplayMode = audit.result.scoreDisplayMode;\n- const description = audit.result.helpText;\nlet title = audit.result.description;\n-\nif (audit.result.displayValue) {\ntitle += `: ${audit.result.displayValue}`;\n}\n- if (audit.result.debugString) {\n- const debugStrEl = auditEl.appendChild(this.dom.createElement('div', 'lh-debug'));\n- debugStrEl.textContent = audit.result.debugString;\n- }\n+ this.dom.find('.lh-audit__title', auditEl).appendChild(\n+ this.dom.convertMarkdownCodeSnippets(title));\n+ this.dom.find('.lh-audit__description', auditEl)\n+ .appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.helpText));\n// Append audit details to header section so the entire audit is within a <details>.\nconst header = /** @type {!HTMLDetailsElement} */ (this.dom.find('.lh-audit__header', auditEl));\n@@ -58,29 +55,36 @@ class CategoryRenderer {\nauditEl.classList.add('lh-audit--manual');\n}\n- return this._populateScore(auditEl, audit.result.score, scoreDisplayMode, title, description);\n+ this._populateScore(auditEl, audit.result.score, scoreDisplayMode, audit.result.error);\n+\n+ if (audit.result.error) {\n+ auditEl.classList.add(`lh-audit--error`);\n+ const valueEl = this.dom.find('.lh-score__value', auditEl);\n+ valueEl.textContent = 'Error';\n+ valueEl.classList.add('tooltip-boundary');\n+ const tooltip = this.dom.createChildOf(valueEl, 'div', 'lh-error-tooltip-content tooltip');\n+ tooltip.textContent = audit.result.debugString || 'Report error: no audit information';\n+ } else if (audit.result.debugString) {\n+ const debugStrEl = auditEl.appendChild(this.dom.createElement('div', 'lh-debug'));\n+ debugStrEl.textContent = audit.result.debugString;\n+ }\n+ return auditEl;\n}\n/**\n* @param {!DocumentFragment|!Element} element DOM node to populate with values.\n* @param {number} score\n* @param {string} scoreDisplayMode\n- * @param {string} title\n- * @param {string} description\n+ * @param {boolean} isError\n* @return {!Element}\n*/\n- _populateScore(element, score, scoreDisplayMode, title, description) {\n- // Fill in the blanks.\n+ _populateScore(element, score, scoreDisplayMode, isError) {\nconst scoreOutOf100 = Math.round(score * 100);\nconst valueEl = this.dom.find('.lh-score__value', element);\nvalueEl.textContent = Util.formatNumber(scoreOutOf100);\n- valueEl.classList.add(`lh-score__value--${Util.calculateRating(score)}`,\n- `lh-score__value--${scoreDisplayMode}`);\n-\n- this.dom.find('.lh-audit__title, .lh-category-header__title', element).appendChild(\n- this.dom.convertMarkdownCodeSnippets(title));\n- this.dom.find('.lh-audit__description, .lh-category-header__description', element)\n- .appendChild(this.dom.convertMarkdownLinkSnippets(description));\n+ // FIXME(paulirish): this'll have to deal with null scores and scoreDisplayMode stuff..\n+ const rating = isError ? 'error' : Util.calculateRating(score);\n+ valueEl.classList.add(`lh-score__value--${rating}`, `lh-score__value--${scoreDisplayMode}`);\nreturn /** @type {!Element} **/ (element);\n}\n@@ -96,8 +100,12 @@ class CategoryRenderer {\nconst gaugeEl = this.renderScoreGauge(category);\ngaugeContainerEl.appendChild(gaugeEl);\n- const {score, name, description} = category;\n- return this._populateScore(tmpl, score, 'numeric', name, description);\n+ this.dom.find('.lh-category-header__title', tmpl).appendChild(\n+ this.dom.convertMarkdownCodeSnippets(category.name));\n+ this.dom.find('.lh-category-header__description', tmpl)\n+ .appendChild(this.dom.convertMarkdownLinkSnippets(category.description));\n+\n+ return this._populateScore(tmpl, category.score, 'numeric', false);\n}\n/**\n",
"new_path": "lighthouse-core/report/html/renderer/category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -16,21 +16,25 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\nconst tmpl = this.dom.cloneTemplate('#tmpl-lh-perf-metric', this.templateContext);\nconst element = this.dom.find('.lh-perf-metric', tmpl);\nelement.id = audit.result.name;\n+ // FIXME(paulirish): currently this sets a 'lh-perf-metric--fail' class on error'd audits\nelement.classList.add(`lh-perf-metric--${Util.calculateRating(audit.result.score)}`);\nconst titleEl = this.dom.find('.lh-perf-metric__title', tmpl);\ntitleEl.textContent = audit.result.description;\n- const valueEl = this.dom.find('.lh-perf-metric__value span', tmpl);\n+ const valueEl = this.dom.find('.lh-perf-metric__value', tmpl);\nvalueEl.textContent = audit.result.displayValue;\nconst descriptionEl = this.dom.find('.lh-perf-metric__description', tmpl);\ndescriptionEl.appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.helpText));\n- if (typeof audit.result.rawValue !== 'number') {\n- const debugStrEl = this.dom.createChildOf(element, 'div', 'lh-debug');\n- debugStrEl.textContent = audit.result.debugString || 'Report error: no metric information';\n- return element;\n+ if (audit.result.error) {\n+ element.classList.remove(`lh-perf-metric--fail`);\n+ element.classList.add(`lh-perf-metric--error`);\n+ descriptionEl.textContent = '';\n+ valueEl.textContent = 'Error!';\n+ const tooltip = this.dom.createChildOf(descriptionEl, 'span', 'lh-error-tooltip-content');\n+ tooltip.textContent = audit.result.debugString || 'Report error: no metric information';\n}\nreturn element;\n",
"new_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "--lh-audit-hgap: 12px;\n--lh-audit-group-vpadding: 12px;\n--lh-section-vpadding: 12px;\n- --pass-icon-url: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke=\"%23007F04\" stroke-width=\"1.5\" d=\"M1 5.75l3.5 3.5 6.5-6.5\" fill=\"none\" fill-rule=\"evenodd\"/></svg>');\n- --fail-icon-url: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke=\"%23EE1D0A\" stroke-width=\"1.5\" fill=\"none\" fill-rule=\"evenodd\"><path d=\"M2 10l8-8M10 10L2 2\"/></g></svg>');\n+ --pass-icon-url: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke=\"hsl(139, 70%, 30%)\" stroke-width=\"1.5\" d=\"M1 5.75l3.5 3.5 6.5-6.5\" fill=\"none\" fill-rule=\"evenodd\"/></svg>');\n+ --fail-icon-url: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke=\"hsl(1, 73%, 45%)\" stroke-width=\"1.5\" fill=\"none\" fill-rule=\"evenodd\"><path d=\"M2 10l8-8M10 10L2 2\"/></g></svg>');\n--collapsed-icon-url: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><g fill=\"none\" fill-rule=\"evenodd\"><path fill=\"none\" d=\"M0 0h12v12H0z\"/><path fill=\"hsl(0, 0%, 60%)\" d=\"M3 2l6 4-6 4z\"/></g></svg>');\n--expanded-icon-url: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><g fill=\"none\" fill-rule=\"evenodd\"><path fill=\"none\" d=\"M0 0h12v12H0z\"/><path fill=\"hsl(0, 0%, 60%)\" d=\"M10 3L6 9 2 3z\"/></g></svg>');\n}\n@@ -202,29 +202,9 @@ summary {\nwidth: 16px;\n}\n-.lh-audit--informative .lh-score__value {\n- color: var(--informative-color);\n- border-radius: 50%;\n- top: 3px;\n-}\n-\n-.lh-audit--informative .lh-score__value::after {\n+.lh-audit--informative .lh-score__value,\n+.lh-audit--manual .lh-score__value {\ndisplay: none;\n- background: url('data:image/svg+xml;utf8,<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><title>info</title><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z\" fill=\"hsl(218, 89%, 41%)\"/></svg>') no-repeat 50% 50%;\n- background-size: var(--lh-score-icon-background-size);\n-}\n-\n-.lh-audit--manual .lh-score__value::after {\n- background: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><title>manual</title><path d=\"M2 5h8v2H2z\" fill=\"hsl(0, 0%, 100%)\" fill-rule=\"evenodd\"/></svg>') no-repeat 50% 50%;\n- background-size: 18px;\n- background-color: var(--medium-75-gray);\n- width: 20px;\n- height: 20px;\n- position: relative;\n-}\n-\n-.lh-score__value--binary {\n- color: transparent !important;\n}\n/* No icon for audits with number scores. */\n@@ -263,6 +243,11 @@ summary {\nbackground: var(--fail-icon-url) no-repeat center center / 12px 12px;\n}\n+/* This must override the above styles */\n+.lh-audit .lh-score__value--binary {\n+ color: transparent;\n+}\n+\n.lh-audit__description, .lh-category-header__description {\nfont-size: var(--body-font-size);\ncolor: var(--secondary-text-color);\n@@ -390,7 +375,7 @@ summary {\ncolor: var(--pass-color);\n}\n-.lh-perf-metric .lh-perf-metric__value span::after {\n+.lh-perf-metric .lh-perf-metric__value::after {\ncontent: '';\nwidth: var(--body-font-size);\nheight: var(--body-font-size);\n@@ -400,7 +385,7 @@ summary {\nmargin-left: calc(var(--body-font-size) / 2);\n}\n-.lh-perf-metric--pass .lh-perf-metric__value span::after {\n+.lh-perf-metric--pass .lh-perf-metric__value::after {\nbackground: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>check</title><path fill=\"hsl(139, 70%, 30%)\" d=\"M24 4C12.95 4 4 12.95 4 24c0 11.04 8.95 20 20 20 11.04 0 20-8.96 20-20 0-11.05-8.96-20-20-20zm-4 30L10 24l2.83-2.83L20 28.34l15.17-15.17L38 16 20 34z\"/></svg>') no-repeat 50% 50%;\n}\n@@ -408,7 +393,7 @@ summary {\n.lh-perf-metric--average .lh-perf-metric__value {\ncolor: var(--average-color);\n}\n-.lh-perf-metric--average .lh-perf-metric__value span::after {\n+.lh-perf-metric--average .lh-perf-metric__value::after {\nbackground: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>info</title><path fill=\"hsl(31, 100%, 45%)\" d=\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm2 30h-4V22h4v12zm0-16h-4v-4h4v4z\"/></svg>') no-repeat 50% 50%;\n}\n@@ -416,12 +401,18 @@ summary {\n.lh-perf-metric--fail .lh-perf-metric__value {\ncolor: var(--fail-color);\n}\n-.lh-perf-metric--fail .lh-perf-metric__value span::after {\n+.lh-perf-metric--fail .lh-perf-metric__value::after {\nbackground: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>warn</title><path fill=\"hsl(1, 73%, 45%)\" d=\"M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z\"/></svg>') no-repeat 50% 50%;\n}\n-.lh-perf-metric .lh-debug {\n- margin-left: var(--expandable-indent);\n+.lh-perf-metric--error .lh-perf-metric__value,\n+.lh-perf-metric--error .lh-perf-metric__description {\n+ color: var(--fail-color);\n+}\n+\n+/* Hide icon if there was an error */\n+.lh-perf-metric--error .lh-perf-metric__value::after {\n+ display: none;\n}\n/* Perf Hint */\n@@ -601,6 +592,11 @@ summary {\nmargin-right: var(--lh-audit-score-width);\n}\n+.lh-audit--error .lh-score__value {\n+ color: var(--fail-color);\n+ font-weight: normal;\n+}\n+\n/* Audit Group */\n.lh-audit-group {\n@@ -953,13 +949,14 @@ summary.lh-passed-audits-summary {\nanimation: fadeInTooltip 150ms;\nanimation-fill-mode: forwards;\nanimation-delay: 900ms;\n- min-width: 15em;\n+ min-width: 23em;\nbackground: #ffffff;\npadding: 15px;\nborder-radius: 5px;\nbottom: 100%;\nz-index: 1;\nwill-change: opacity;\n+ right: 0;\n}\n.tooltip::before {\n",
"new_path": "lighthouse-core/report/html/report-styles.css",
"old_path": "lighthouse-core/report/html/report-styles.css"
},
{
"change_type": "MODIFY",
"diff": "<div class=\"lh-perf-metric\">\n<div class=\"lh-perf-metric__innerwrap tooltip-boundary\">\n<span class=\"lh-perf-metric__title\"></span>\n- <div class=\"lh-perf-metric__value\"><span></span></div>\n+ <div class=\"lh-perf-metric__value\"></div>\n<div class=\"lh-perf-metric__description tooltip\"></div>\n</div>\n</div>\n",
"new_path": "lighthouse-core/report/html/templates.html",
"old_path": "lighthouse-core/report/html/templates.html"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report: error'd audits get 'Error!' treatment (#5077)
| 1
|
report
| null |
730,424
|
03.05.2018 11:43:49
| 14,400
|
c1152272e31ba1f6de7da803b1dff5b68e70e5ea
|
chore(tooling): Add pipeline build number to sauce tests
|
[
{
"change_type": "MODIFY",
"diff": "@@ -157,10 +157,11 @@ ansiColor('xterm') {\n]) {\n// set -m sets all integration commands under the same job process\n// || kill 0 after each integration command will kill all other jobs in the parent process if the integration command preceding it fails with a non-zero exit code\n- sh '''#!/bin/bash -e\n+ sh \"\"\"#!/bin/bash -e\nsource ~/.nvm/nvm.sh\nnvm use 8.11.1\nNODE_ENV=test npm run build:package widget-space && npm run build:package widget-recents\n+ export BUILD_NUMBER=\"pipeline-build-$BUILD_NUMBER\"\nset -m\n(\n(CISCOSPARK_CLIENT_ID=C873b64d70536ed26df6d5f81e01dafccbd0a0af2e25323f7f69c7fe46a7be340 SAUCE=true PORT=4569 SAUCE_CONNECT_PORT=5006 BROWSER=firefox npm run test:integration || kill 0) &\n@@ -168,7 +169,7 @@ ansiColor('xterm') {\n(sleep 120; CISCOSPARK_CLIENT_ID=C873b64d70536ed26df6d5f81e01dafccbd0a0af2e25323f7f69c7fe46a7be340 SAUCE=true PORT=4567 SAUCE_CONNECT_PORT=5004 BROWSER=chrome PLATFORM=\"windows 10\" npm run test:integration || kill 0) &\nwait\n)\n- '''\n+ \"\"\"\narchiveArtifacts 'reports/**/*'\njunit '**/reports/junit/wdio/*.xml'\n}\n",
"new_path": "Jenkinsfile",
"old_path": "Jenkinsfile"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): Add pipeline build number to sauce tests
| 1
|
chore
|
tooling
|
679,913
|
03.05.2018 13:27:15
| -3,600
|
500dfa3bf0a23140c63c4d77a4debdd62014f4b2
|
feat(dot): initial import
|
[
{
"change_type": "ADD",
"diff": "+digraph g {\n+rankdir=\"LR\";\n+dpi=192;\n+fontname=\"Inconsolata\";\n+fontsize=\"9\";\n+fontcolor=\"gray\";\n+label=\"Generated with @thi.ng/dot\";\n+labeljust=\"l\";\n+labelloc=\"b\";\n+node[style=\"filled\", fontname=\"Inconsolata\", fontsize=\"11\"];\n+edge[arrowsize=\"0.75\", fontname=\"Inconsolata\", fontsize=\"9\"];\n+\"x\"[color=\"black\", fontcolor=\"white\", label=\"x (12)\"];\n+\"y\"[color=\"black\", fontcolor=\"white\", label=\"y (23)\"];\n+\"res\"[color=\"black\", fontcolor=\"white\", label=\"res (805)\", peripheries=\"2\"];\n+\"op1\"[fillcolor=\"green\", shape=\"Mrecord\", label=\"{ <0> a | <1> b } | op1\\n(+) | { <out> out }\"];\n+\"op2\"[fillcolor=\"yellow\", shape=\"Mrecord\", label=\"{ <0> a | <1> b } | op2\\n(*) | { <out> out }\"];\n+\"x\" -> \"op1\":\"1\";\n+\"y\" -> \"op1\":\"0\";\n+\"y\" -> \"op2\":\"0\"[label=\"xform\", color=\"blue\"];\n+\"op1\":\"out\" -> \"op2\":\"1\";\n+\"op2\":\"out\" -> \"res\";\n+}\n\\ No newline at end of file\n",
"new_path": "assets/dot-example.dot",
"old_path": null
},
{
"change_type": "ADD",
"diff": "Binary files /dev/null and b/assets/dot-example.png differ\n",
"new_path": "assets/dot-example.png",
"old_path": "assets/dot-example.png"
},
{
"change_type": "ADD",
"diff": "+build\n+coverage\n+dev\n+doc\n+src*\n+test\n+.nyc_output\n+tsconfig.json\n+*.tgz\n+*.html\n",
"new_path": "packages/dot/.npmignore",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+ Apache License\n+ Version 2.0, January 2004\n+ http://www.apache.org/licenses/\n+\n+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n+\n+ 1. Definitions.\n+\n+ \"License\" shall mean the terms and conditions for use, reproduction,\n+ and distribution as defined by Sections 1 through 9 of this document.\n+\n+ \"Licensor\" shall mean the copyright owner or entity authorized by\n+ the copyright owner that is granting the License.\n+\n+ \"Legal Entity\" shall mean the union of the acting entity and all\n+ other entities that control, are controlled by, or are under common\n+ control with that entity. For the purposes of this definition,\n+ \"control\" means (i) the power, direct or indirect, to cause the\n+ direction or management of such entity, whether by contract or\n+ otherwise, or (ii) ownership of fifty percent (50%) or more of the\n+ outstanding shares, or (iii) beneficial ownership of such entity.\n+\n+ \"You\" (or \"Your\") shall mean an individual or Legal Entity\n+ exercising permissions granted by this License.\n+\n+ \"Source\" form shall mean the preferred form for making modifications,\n+ including but not limited to software source code, documentation\n+ source, and configuration files.\n+\n+ \"Object\" form shall mean any form resulting from mechanical\n+ transformation or translation of a Source form, including but\n+ not limited to compiled object code, generated documentation,\n+ and conversions to other media types.\n+\n+ \"Work\" shall mean the work of authorship, whether in Source or\n+ Object form, made available under the License, as indicated by a\n+ copyright notice that is included in or attached to the work\n+ (an example is provided in the Appendix below).\n+\n+ \"Derivative Works\" shall mean any work, whether in Source or Object\n+ form, that is based on (or derived from) the Work and for which the\n+ editorial revisions, annotations, elaborations, or other modifications\n+ represent, as a whole, an original work of authorship. For the purposes\n+ of this License, Derivative Works shall not include works that remain\n+ separable from, or merely link (or bind by name) to the interfaces of,\n+ the Work and Derivative Works thereof.\n+\n+ \"Contribution\" shall mean any work of authorship, including\n+ the original version of the Work and any modifications or additions\n+ to that Work or Derivative Works thereof, that is intentionally\n+ submitted to Licensor for inclusion in the Work by the copyright owner\n+ or by an individual or Legal Entity authorized to submit on behalf of\n+ the copyright owner. For the purposes of this definition, \"submitted\"\n+ means any form of electronic, verbal, or written communication sent\n+ to the Licensor or its representatives, including but not limited to\n+ communication on electronic mailing lists, source code control systems,\n+ and issue tracking systems that are managed by, or on behalf of, the\n+ Licensor for the purpose of discussing and improving the Work, but\n+ excluding communication that is conspicuously marked or otherwise\n+ designated in writing by the copyright owner as \"Not a Contribution.\"\n+\n+ \"Contributor\" shall mean Licensor and any individual or Legal Entity\n+ on behalf of whom a Contribution has been received by Licensor and\n+ subsequently incorporated within the Work.\n+\n+ 2. Grant of Copyright License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ copyright license to reproduce, prepare Derivative Works of,\n+ publicly display, publicly perform, sublicense, and distribute the\n+ Work and such Derivative Works in Source or Object form.\n+\n+ 3. Grant of Patent License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ (except as stated in this section) patent license to make, have made,\n+ use, offer to sell, sell, import, and otherwise transfer the Work,\n+ where such license applies only to those patent claims licensable\n+ by such Contributor that are necessarily infringed by their\n+ Contribution(s) alone or by combination of their Contribution(s)\n+ with the Work to which such Contribution(s) was submitted. If You\n+ institute patent litigation against any entity (including a\n+ cross-claim or counterclaim in a lawsuit) alleging that the Work\n+ or a Contribution incorporated within the Work constitutes direct\n+ or contributory patent infringement, then any patent licenses\n+ granted to You under this License for that Work shall terminate\n+ as of the date such litigation is filed.\n+\n+ 4. Redistribution. You may reproduce and distribute copies of the\n+ Work or Derivative Works thereof in any medium, with or without\n+ modifications, and in Source or Object form, provided that You\n+ meet the following conditions:\n+\n+ (a) You must give any other recipients of the Work or\n+ Derivative Works a copy of this License; and\n+\n+ (b) You must cause any modified files to carry prominent notices\n+ stating that You changed the files; and\n+\n+ (c) You must retain, in the Source form of any Derivative Works\n+ that You distribute, all copyright, patent, trademark, and\n+ attribution notices from the Source form of the Work,\n+ excluding those notices that do not pertain to any part of\n+ the Derivative Works; and\n+\n+ (d) If the Work includes a \"NOTICE\" text file as part of its\n+ distribution, then any Derivative Works that You distribute must\n+ include a readable copy of the attribution notices contained\n+ within such NOTICE file, excluding those notices that do not\n+ pertain to any part of the Derivative Works, in at least one\n+ of the following places: within a NOTICE text file distributed\n+ as part of the Derivative Works; within the Source form or\n+ documentation, if provided along with the Derivative Works; or,\n+ within a display generated by the Derivative Works, if and\n+ wherever such third-party notices normally appear. The contents\n+ of the NOTICE file are for informational purposes only and\n+ do not modify the License. You may add Your own attribution\n+ notices within Derivative Works that You distribute, alongside\n+ or as an addendum to the NOTICE text from the Work, provided\n+ that such additional attribution notices cannot be construed\n+ as modifying the License.\n+\n+ You may add Your own copyright statement to Your modifications and\n+ may provide additional or different license terms and conditions\n+ for use, reproduction, or distribution of Your modifications, or\n+ for any such Derivative Works as a whole, provided Your use,\n+ reproduction, and distribution of the Work otherwise complies with\n+ the conditions stated in this License.\n+\n+ 5. Submission of Contributions. Unless You explicitly state otherwise,\n+ any Contribution intentionally submitted for inclusion in the Work\n+ by You to the Licensor shall be under the terms and conditions of\n+ this License, without any additional terms or conditions.\n+ Notwithstanding the above, nothing herein shall supersede or modify\n+ the terms of any separate license agreement you may have executed\n+ with Licensor regarding such Contributions.\n+\n+ 6. Trademarks. This License does not grant permission to use the trade\n+ names, trademarks, service marks, or product names of the Licensor,\n+ except as required for reasonable and customary use in describing the\n+ origin of the Work and reproducing the content of the NOTICE file.\n+\n+ 7. Disclaimer of Warranty. Unless required by applicable law or\n+ agreed to in writing, Licensor provides the Work (and each\n+ Contributor provides its Contributions) on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+ implied, including, without limitation, any warranties or conditions\n+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n+ PARTICULAR PURPOSE. You are solely responsible for determining the\n+ appropriateness of using or redistributing the Work and assume any\n+ risks associated with Your exercise of permissions under this License.\n+\n+ 8. Limitation of Liability. In no event and under no legal theory,\n+ whether in tort (including negligence), contract, or otherwise,\n+ unless required by applicable law (such as deliberate and grossly\n+ negligent acts) or agreed to in writing, shall any Contributor be\n+ liable to You for damages, including any direct, indirect, special,\n+ incidental, or consequential damages of any character arising as a\n+ result of this License or out of the use or inability to use the\n+ Work (including but not limited to damages for loss of goodwill,\n+ work stoppage, computer failure or malfunction, or any and all\n+ other commercial damages or losses), even if such Contributor\n+ has been advised of the possibility of such damages.\n+\n+ 9. Accepting Warranty or Additional Liability. While redistributing\n+ the Work or Derivative Works thereof, You may choose to offer,\n+ and charge a fee for, acceptance of support, warranty, indemnity,\n+ or other liability obligations and/or rights consistent with this\n+ License. However, in accepting such obligations, You may act only\n+ on Your own behalf and on Your sole responsibility, not on behalf\n+ of any other Contributor, and only if You agree to indemnify,\n+ defend, and hold each Contributor harmless for any liability\n+ incurred by, or claims asserted against, such Contributor by reason\n+ of your accepting any such warranty or additional liability.\n+\n+ END OF TERMS AND CONDITIONS\n+\n+ APPENDIX: How to apply the Apache License to your work.\n+\n+ To apply the Apache License to your work, attach the following\n+ boilerplate notice, with the fields enclosed by brackets \"{}\"\n+ replaced with your own identifying information. (Don't include\n+ the brackets!) The text should be enclosed in the appropriate\n+ comment syntax for the file format. We also recommend that a\n+ file or class name and description of purpose be included on the\n+ same \"printed page\" as the copyright notice for easier\n+ identification within third-party archives.\n+\n+ Copyright {yyyy} {name of copyright owner}\n+\n+ Licensed under the Apache License, Version 2.0 (the \"License\");\n+ you may not use this file except in compliance with the License.\n+ You may obtain a copy of the License at\n+\n+ http://www.apache.org/licenses/LICENSE-2.0\n+\n+ Unless required by applicable law or agreed to in writing, software\n+ distributed under the License is distributed on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ See the License for the specific language governing permissions and\n+ limitations under the License.\n",
"new_path": "packages/dot/LICENSE",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+# @thi.ng/dot\n+\n+[](https://www.npmjs.com/package/@thi.ng/dot)\n+\n+This project is part of the\n+[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.\n+\n+## About\n+\n+[Graphviz](http://www.graphviz.org/) DOM abstraction as vanilla JS\n+objects & serialization to DOT format. Provides several [interfaces and\n+enums](https://github.com/thi-ng/umbrella/tree/master/packages/dot/src/api.ts)\n+covering a large subset of GraphViz options and\n+[functions]((https://github.com/thi-ng/umbrella/tree/master/packages/dot/src/serialize.ts)\n+to serialize whole graphs (incl. subgraphs), nodes or edges. Supports\n+both directed and undirected graphs.\n+\n+Please see the [GraphViz DOT\n+guide](https://graphviz.gitlab.io/_pages/pdf/dotguide.pdf) for further\n+details.\n+\n+## Installation\n+\n+```\n+yarn add @thi.ng/dot\n+```\n+\n+## Usage examples\n+\n+\n+\n+```typescript\n+import * as dot from \"@thi.ng/dot\";\n+\n+// node type style presets\n+const terminal = {\n+ color: \"black\",\n+ fontcolor: \"white\",\n+};\n+\n+// operator nodes use \"Mrecord\" shape\n+// with input and output port declarations\n+const operator = {\n+ fillcolor: \"yellow\",\n+ shape: dot.NodeShape.M_RECORD,\n+ ins: { 0: \"a\", 1: \"b\" },\n+ outs: { \"out\": \"out\" }\n+};\n+\n+dot.serializeGraph({\n+ directed: true, // default\n+ // graph attributes\n+ attribs: {\n+ rankdir: \"LR\",\n+ fontname: \"Inconsolata\",\n+ fontsize: 9,\n+ fontcolor: \"gray\",\n+ label: \"Generated with @thi.ng/dot\",\n+ labeljust: \"l\",\n+ labelloc: \"b\",\n+ // node defaults\n+ node: {\n+ style: \"filled\",\n+ fontname: \"Inconsolata\",\n+ fontsize: 11\n+ },\n+ // edge defaults\n+ edge: {\n+ arrowsize: 0.75,\n+ fontname: \"Inconsolata\",\n+ fontsize: 9\n+ }\n+ },\n+ // graph nodes (the keys are used as node IDs)\n+ nodes: {\n+ x: { ...terminal, label: \"x (12)\" },\n+ y: { ...terminal, label: \"y (23)\" },\n+ res: { ...terminal, label: \"res (8050)\", peripheries: 2 },\n+ op1: { ...operator, fillcolor: \"green\", label: \"op1\\n(+)\" },\n+ op2: { ...operator, label: \"op2\\n(*)\" },\n+ },\n+ // graph edges (w/ optional ports & extra attribs)\n+ edges: [\n+ { src: \"x\", dest: \"op1\", destPort: 1 },\n+ { src: \"y\", dest: \"op1\", destPort: 0 },\n+ { src: \"y\", dest: \"op2\", destPort: 0, label: \"xform\", color: \"blue\" },\n+ { src: \"op1\", srcPort: \"out\", dest: \"op2\", destPort: 1 },\n+ { src: \"op2\", srcPort: \"out\", dest: \"res\"},\n+ ]\n+});\n+```\n+\n+Resulting output:\n+\n+```dot\n+digraph g {\n+rankdir=\"LR\";\n+node[style=\"filled\", fontname=\"Inconsolata\", fontsize=\"11\"];\n+edge[arrowsize=\"0.75\", fontname=\"Inconsolata\", fontsize=\"9\"];\n+\"x\"[color=\"black\", fontcolor=\"white\", label=\"x (12)\"];\n+\"y\"[color=\"black\", fontcolor=\"white\", label=\"y (23)\"];\n+\"op1\"[fillcolor=\"yellow\", shape=Mrecord, label=\"{ <0> a | <1> b } | op1\\n(+) | { <out> out }\"];\n+\"op2\"[fillcolor=\"yellow\", shape=Mrecord, label=\"{ <0> a | <1> b } | op2\\n(*) | { <out> out }\"];\n+\"res\"[color=\"black\", fontcolor=\"white\", label=\"res (805)\", peripheries=\"2\"];\n+\"x\" -> \"op1\":\"1\";\n+\"y\" -> \"op1\":\"0\";\n+\"op1\":\"out\" -> \"op2\":\"1\";\n+\"y\" -> \"op2\":\"0\"[label=\"xform\", color=\"blue\"];\n+\"op2\":\"out\" -> \"res\";\n+}\n+```\n+\n+## Authors\n+\n+- Karsten Schmidt\n+\n+## License\n+\n+© 2018 Karsten Schmidt // Apache Software License 2.0\n",
"new_path": "packages/dot/README.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"@thi.ng/dot\",\n+ \"version\": \"0.0.1\",\n+ \"description\": \"TODO\",\n+ \"main\": \"./index.js\",\n+ \"typings\": \"./index.d.ts\",\n+ \"repository\": \"https://github.com/thi-ng/umbrella\",\n+ \"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n+ \"license\": \"Apache-2.0\",\n+ \"scripts\": {\n+ \"build\": \"yarn run clean && tsc --declaration\",\n+ \"clean\": \"rm -rf *.js *.d.ts .nyc_output build coverage doc\",\n+ \"cover\": \"yarn test && nyc report --reporter=lcov\",\n+ \"doc\": \"node_modules/.bin/typedoc --mode modules --out doc src\",\n+ \"pub\": \"yarn run build && yarn publish --access public\",\n+ \"test\": \"rm -rf build && tsc -p test && nyc mocha build/test/*.js\"\n+ },\n+ \"devDependencies\": {\n+ \"@types/mocha\": \"^5.2.0\",\n+ \"@types/node\": \"^10.0.2\",\n+ \"mocha\": \"^5.1.1\",\n+ \"nyc\": \"^11.7.1\",\n+ \"typedoc\": \"^0.11.1\",\n+ \"typescript\": \"^2.8.3\"\n+ },\n+ \"dependencies\": {\n+ \"@thi.ng/api\": \"^2.3.1\",\n+ \"@thi.ng/checks\": \"^1.5.1\"\n+ },\n+ \"keywords\": [\n+ \"ES6\",\n+ \"typescript\"\n+ ],\n+ \"publishConfig\": {\n+ \"access\": \"public\"\n+ }\n+}\n\\ No newline at end of file\n",
"new_path": "packages/dot/package.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+\n+export enum NodeShape {\n+ BOX,\n+ CIRCLE,\n+ DIAMOND,\n+ DOUBLE_CIRCLE,\n+ DOUBLE_OCTAGON,\n+ EGG,\n+ ELLIPSE,\n+ HEXAGON,\n+ HOUSE,\n+ INV_HOUSE,\n+ INV_TRAPEZIUM,\n+ INV_TRIANGLE,\n+ M_CIRCLE,\n+ M_DIAMOND,\n+ M_RECORD,\n+ M_SQUARE,\n+ NONE,\n+ OCTAGON,\n+ PARALLELOGRAM,\n+ PLAINTEXT,\n+ POINT,\n+ POLYGON,\n+ RECORD,\n+ TRAPEZIUM,\n+ TRIANGLE,\n+ TRIPLE_OCTAGON,\n+}\n+\n+export type Color = string | number[];\n+\n+export interface GraphAttribs {\n+ bgcolor: Color;\n+ clusterrank: \"global\" | \"local\" | \"none\";\n+ color: Color;\n+ compound: boolean;\n+ concentrate: boolean;\n+ dpi: number;\n+ edge: Partial<EdgeAttribs>;\n+ fillcolor: Color;\n+ fontcolor: Color;\n+ fontname: string;\n+ fontsize: number;\n+ label: string;\n+ labeljust: \"l\" | \"r\" | \"c\";\n+ labelloc: \"t\" | \"b\";\n+ landscape: boolean;\n+ margin: number;\n+ node: Partial<NodeAttribs>;\n+ nodesep: number;\n+ orientation: \"portrait\" | \"landscape\";\n+ rank: \"same\" | \"min\" | \"max\" | \"source\" | \"sink\";\n+ rankdir: \"LR\" | \"TB\";\n+ ranksep: number;\n+ ratio: string;\n+ [id: string]: any;\n+}\n+\n+export interface Graph {\n+ attribs?: Partial<GraphAttribs>;\n+ directed?: boolean;\n+ edges: Edge[];\n+ id?: string;\n+ nodes: IObjectOf<Partial<Node>>;\n+ sub?: IObjectOf<Graph>;\n+}\n+\n+export interface NodeAttribs {\n+ color: Color;\n+ fillcolor: Color;\n+ fontcolor: Color;\n+ fontname: string;\n+ fontsize: number;\n+ penwidth: number;\n+ peripheries: number;\n+ shape: NodeShape;\n+ sides: number;\n+ skew: number;\n+ style: string;\n+ [id: string]: any;\n+}\n+\n+export interface Node extends NodeAttribs {\n+ ins: IObjectOf<string>;\n+ outs: IObjectOf<string>;\n+ label: string;\n+ tooltip: string;\n+ target: string;\n+ url: string;\n+}\n+\n+export interface EdgeAttribs {\n+ color: Color;\n+ fontcolor: Color;\n+ fontname: string;\n+ fontsize: number;\n+ label: string;\n+ style: string;\n+ [id: string]: any;\n+}\n+\n+export interface Edge extends Partial<EdgeAttribs> {\n+ src: string;\n+ dest: string;\n+ srcPort?: string;\n+ destPort?: string;\n+}\n",
"new_path": "packages/dot/src/api.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export * from \"./api\";\n+export * from \"./serialize\";\n",
"new_path": "packages/dot/src/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+import { isArray } from \"@thi.ng/checks/is-array\";\n+\n+import { Graph, NodeShape, Node, Edge, GraphAttribs } from \"./api\";\n+\n+const shapeIDs: IObjectOf<string> = {\n+ [NodeShape.DOUBLE_CIRCLE]: \"doublecircle\",\n+ [NodeShape.DOUBLE_OCTAGON]: \"doubleoctagon\",\n+ [NodeShape.INV_HOUSE]: \"invhouse\",\n+ [NodeShape.INV_TRAPEZIUM]: \"invtrapezium\",\n+ [NodeShape.INV_TRIANGLE]: \"invtriangle\",\n+ [NodeShape.M_CIRCLE]: \"Mcircle\",\n+ [NodeShape.M_DIAMOND]: \"Mdiamond\",\n+ [NodeShape.M_RECORD]: \"Mrecord\",\n+ [NodeShape.M_SQUARE]: \"Msquare\",\n+ [NodeShape.TRIPLE_OCTAGON]: \"tripleoctagon\",\n+};\n+\n+const wrapQ = (x) => `\"${x}\"`;\n+\n+const escape = (x: any) =>\n+ String(x).replace(/\\\"/g, `\\\\\"`)\n+ .replace(/\\n/g, \"\\\\n\");\n+\n+export const formatGraphAttribs = (attribs: Partial<GraphAttribs>, acc: string[]) => {\n+ for (let a in attribs) {\n+ let v = attribs[a];\n+ switch (a) {\n+ case \"bgcolor\":\n+ case \"color\":\n+ case \"fillcolor\":\n+ case \"fontcolor\":\n+ isArray(v) && (v = v.join(\",\"));\n+ break;\n+ case \"edge\":\n+ acc.push(`edge[${formatAttribs(v)}];`);\n+ continue;\n+ case \"node\":\n+ acc.push(`node[${formatAttribs(v)}];`);\n+ continue;\n+ default:\n+ break;\n+ }\n+ acc.push(`${a}=\"${escape(v)}\";`);\n+ }\n+ return acc;\n+};\n+\n+export const formatAttribs = (attribs: Partial<Node | Edge>) => {\n+ const acc: string[] = [];\n+ for (let a in attribs) {\n+ let v = attribs[a];\n+ switch (a) {\n+ case \"color\":\n+ case \"fillcolor\":\n+ case \"fontcolor\":\n+ isArray(v) && (v = v.join(\",\"));\n+ break;\n+ case \"label\":\n+ if ((<Node>attribs).ins || (<Node>attribs).outs) {\n+ v = formatPortLabel(attribs, v);\n+ }\n+ break;\n+ case \"url\":\n+ a = \"URL\";\n+ break;\n+ case \"shape\":\n+ v = shapeIDs[v] || NodeShape[v].toLowerCase();\n+ break;\n+ case \"ins\":\n+ case \"outs\":\n+ case \"src\":\n+ case \"dest\":\n+ case \"srcPort\":\n+ case \"destPort\":\n+ continue;\n+ default:\n+ }\n+ acc.push(`${a}=\"${escape(v)}\"`);\n+ }\n+ return acc.join(\", \");\n+};\n+\n+const formatPorts = (ports: IObjectOf<string>) => {\n+ const acc: string[] = [];\n+ for (let i in ports) {\n+ acc.push(`<${i}> ${escape(ports[i])}`);\n+ }\n+ return `{ ${acc.join(\" | \")} }`;\n+};\n+\n+export const formatPortLabel = (node: Partial<Node>, label: string) => {\n+ const acc: string[] = [];\n+ node.ins && acc.push(formatPorts(node.ins));\n+ acc.push(escape(label));\n+ node.outs && acc.push(formatPorts(node.outs));\n+ return acc.join(\" | \");\n+};\n+\n+export const serializeNode = (id: string, n: Partial<Node>) => {\n+ const attribs = formatAttribs(n);\n+ return attribs.length ?\n+ `\"${id}\"[${attribs}];` :\n+ `\"${id}\";`;\n+}\n+\n+export const serializeEdge = (e: Edge, directed = true) => {\n+ const acc: string[] = [wrapQ(e.src)];\n+ e.srcPort != null && acc.push(\":\", wrapQ(e.srcPort));\n+ acc.push(directed ? \" -> \" : \" -- \");\n+ acc.push(wrapQ(e.dest));\n+ e.destPort != null && acc.push(\":\", wrapQ(e.destPort));\n+ const attribs = formatAttribs(e);\n+ attribs.length && acc.push(\"[\", attribs, \"]\");\n+ acc.push(\";\");\n+ return acc.join(\"\");\n+};\n+\n+export const serializeGraph = (graph: Graph, acc?: string[]) => {\n+ const directed = graph.directed !== false;\n+ acc || (acc = [`${directed ? \"di\" : \"\"}graph ${graph.id || \"g\"} {`]);\n+ if (graph.attribs) {\n+ formatGraphAttribs(graph.attribs, acc);\n+ }\n+ for (let id in graph.nodes) {\n+ acc.push(serializeNode(id, graph.nodes[id]));\n+ }\n+ for (let e of graph.edges) {\n+ acc.push(serializeEdge(e, directed));\n+ }\n+ if (graph.sub) {\n+ for (let id in graph.sub) {\n+ acc.push(serializeGraph(graph.sub[id], [`subgraph ${id} {`]));\n+ }\n+ }\n+ acc.push(\"}\");\n+ return acc.join(\"\\n\");\n+};\n",
"new_path": "packages/dot/src/serialize.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+// import * as assert from \"assert\";\n+// import * as dot from \"../src/index\";\n+\n+describe(\"dot\", () => {\n+ it(\"tests pending\");\n+});\n",
"new_path": "packages/dot/test/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \"../build\"\n+ },\n+ \"include\": [\n+ \"./**/*.ts\",\n+ \"../src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/dot/test/tsconfig.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \".\"\n+ },\n+ \"include\": [\n+ \"./src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/dot/tsconfig.json",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(dot): initial import @thi.ng/dot
| 1
|
feat
|
dot
|
730,424
|
03.05.2018 14:45:47
| 14,400
|
30f7d03b2948bca583ededd6e9679b49a3e76e09
|
chore: remove unused index.js
|
[
{
"change_type": "MODIFY",
"diff": "\"url\": \"https://github.com/webex/react-ciscospark/issues\"\n},\n\"homepage\": \"https://github.com/webex/react-ciscospark#readme\",\n- \"main\": \"src/index.js\",\n\"dependencies\": {\n\"@ciscospark/common\": \"1.32.22\",\n\"@ciscospark/helper-html\": \"1.32.22\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "DELETE",
"diff": "-export {default as Button} from '@ciscospark/react-component-button';\n-export {default as Icon} from '@ciscospark/react-component-icon';\n-export {default as AddFileButton} from '@ciscospark/react-component-add-file-button';\n-export {default as Avatar} from '@ciscospark/react-component-avatar';\n-export {default as ChipBase} from '@ciscospark/react-component-chip-base';\n-export {default as ChipFile} from '@ciscospark/react-component-chip-file';\n-export {default as ConfirmationModal} from '@ciscospark/react-component-confirmation-modal';\n-export {default as ListSeparator} from '@ciscospark/react-component-list-separator';\n-export {default as DaySeparator} from '@ciscospark/react-component-day-separator';\n-export {default as NewMessagesSeparator} from '@ciscospark/react-component-new-messages-separator';\n-export {default as FileStagingArea} from '@ciscospark/react-component-file-staging-area';\n-export {default as Spinner} from '@ciscospark/react-component-spinner';\n-export {default as LoadingScreen} from '@ciscospark/react-component-loading-screen';\n-export {default as ScrollToBottomButton} from '@ciscospark/react-component-scroll-to-bottom-button';\n-export {default as TextArea} from '@ciscospark/react-component-textarea';\n-export {default as TitleBar} from '@ciscospark/react-component-title-bar';\n-export {default as TypingAvatar} from '@ciscospark/react-component-typing-avatar';\n-export {default as TypingIndicator} from '@ciscospark/react-component-typing-indicator';\n-export {default as WidgetSpace} from '@ciscospark/widget-space';\n-export {default as WidgetRecents} from '@ciscospark/widget-recents';\n",
"new_path": null,
"old_path": "src/index.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore: remove unused index.js
| 1
|
chore
| null |
791,690
|
03.05.2018 14:45:56
| 25,200
|
a3737fe69a668f7339c41bb6b22f39a6902b8b38
|
core(category): add manualDescription
|
[
{
"change_type": "MODIFY",
"diff": "@@ -51,23 +51,24 @@ function validateCategories(categories, audits, groups) {\nreturn;\n}\n- const auditIds = audits.map(audit => audit.implementation.meta.name);\nObject.keys(categories).forEach(categoryId => {\n- categories[categoryId].audits.forEach((audit, index) => {\n- if (!audit.id) {\n+ categories[categoryId].audits.forEach((auditRef, index) => {\n+ if (!auditRef.id) {\nthrow new Error(`missing an audit id at ${categoryId}[${index}]`);\n}\n- if (!auditIds.includes(audit.id)) {\n- throw new Error(`could not find ${audit.id} audit for category ${categoryId}`);\n+ const audit = audits.find(a => a.implementation.meta.name === auditRef.id);\n+ if (!audit) {\n+ throw new Error(`could not find ${auditRef.id} audit for category ${categoryId}`);\n}\n- if (categoryId === 'accessibility' && !audit.group) {\n- throw new Error(`${audit.id} accessibility audit does not have a group`);\n+ const auditImpl = audit.implementation;\n+ if (categoryId === 'accessibility' && !auditRef.group && !auditImpl.meta.manual) {\n+ throw new Error(`${auditRef.id} accessibility audit does not have a group`);\n}\n- if (audit.group && !groups[audit.group]) {\n- throw new Error(`${audit.id} references unknown group ${audit.group}`);\n+ if (auditRef.group && !groups[auditRef.group]) {\n+ throw new Error(`${auditRef.id} references unknown group ${auditRef.group}`);\n}\n});\n});\n",
"new_path": "lighthouse-core/config/config.js",
"old_path": "lighthouse-core/config/config.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -196,21 +196,14 @@ class CategoryRenderer {\n/**\n* @param {!Array<!ReportRenderer.AuditJSON>} manualAudits\n- * @param {!Object<string, !ReportRenderer.GroupJSON>} groupDefinitions\n+ * @param {string} manualDescription\n* @param {!Element} element Parent container to add the manual audits to.\n*/\n- _renderManualAudits(manualAudits, groupDefinitions, element) {\n- // While we could support rendering multiple groups of manual audits, it doesn't\n- // seem desirable for UX or renderer complexity. So we'll throw.\n- const groupsIds = new Set(manualAudits.map(a => a.group));\n- /* eslint-disable no-console */\n- console.assert(groupsIds.size <= 1, 'More than 1 manual audit group found.');\n- console.assert(!groupsIds.has(undefined), 'Some manual audits don\\'t belong to a group');\n- /* eslint-enable no-console */\n- if (!groupsIds.size) return;\n-\n- const groupId = /** @type {string} */ (Array.from(groupsIds)[0]);\n- const auditGroupElem = this.renderAuditGroup(groupDefinitions[groupId], {expandable: true});\n+ _renderManualAudits(manualAudits, manualDescription, element) {\n+ if (!manualAudits.length) return;\n+\n+ const group = {title: 'Additional items to manually check', description: manualDescription};\n+ const auditGroupElem = this.renderAuditGroup(group, {expandable: true});\nauditGroupElem.classList.add('lh-audit-group--manual');\nmanualAudits.forEach(audit => {\n@@ -354,7 +347,7 @@ class CategoryRenderer {\n}\n// Render manual audits after passing.\n- this._renderManualAudits(manualAudits, groupDefinitions, element);\n+ this._renderManualAudits(manualAudits, category.manualDescription, element);\nreturn element;\n}\n",
"new_path": "lighthouse-core/report/html/renderer/category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -239,6 +239,7 @@ ReportRenderer.AuditJSON; // eslint-disable-line no-unused-expressions\n* id: string,\n* score: number,\n* description: string,\n+ * manualDescription: string,\n* audits: !Array<!ReportRenderer.AuditJSON>\n* }}\n*/\n",
"new_path": "lighthouse-core/report/html/renderer/report-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/report-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -46,6 +46,8 @@ declare global {\nname: string;\n/** A more detailed description of the category and its importance. */\ndescription: string;\n+ /** A description for the manual audits in the category. */\n+ manualDescription?: string;\n/** The overall score of the category, the weighted average of all its audits. */\nscore: number;\n/** An array of references to all the audit members of this category. */\n",
"new_path": "typings/lhr.d.ts",
"old_path": "typings/lhr.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(category): add manualDescription (#5100)
| 1
|
core
|
category
|
730,424
|
03.05.2018 16:08:17
| 14,400
|
c5728cb5cd1c3219e2070db6998a0bdd57e88bce
|
fix(widget-meet): Render error page when webrtc isn't supported
|
[
{
"change_type": "MODIFY",
"diff": "@@ -2,7 +2,6 @@ import React from 'react';\nimport classNames from 'classnames';\nimport {intlShape} from 'react-intl';\nimport {\n- compose,\nbranch,\nrenderComponent\n} from 'recompose';\n@@ -29,14 +28,11 @@ NoWebRTCSupport.propTypes = {\nintl: intlShape.isRequired\n};\n-const errorWhenNoSupport = (isNotSupported) =>\n- branch(\n+const isNotSupported = ({media}) =>\n+ media.getIn(['webRTC', 'hasCheckedSupport']) &&\n+ !media.getIn(['webRTC', 'isSupported']);\n+\n+export default branch(\nisNotSupported,\nrenderComponent(NoWebRTCSupport)\n);\n-\n-export default compose(\n- errorWhenNoSupport(({media}) =>\n- media.getIn(['webRTC', 'hasCheckedSupport']) &&\n- !media.getIn(['webRTC', 'isSupported']))\n-);\n",
"new_path": "packages/node_modules/@ciscospark/widget-meet/src/enhancers/withWebRtcSupport.js",
"old_path": "packages/node_modules/@ciscospark/widget-meet/src/enhancers/withWebRtcSupport.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
fix(widget-meet): Render error page when webrtc isn't supported
| 1
|
fix
|
widget-meet
|
730,424
|
03.05.2018 16:10:09
| 14,400
|
671a792be64c80fbcc3d50de6f76fbdf00364635
|
refactor(widget-meet): Add displayName to enhancers
|
[
{
"change_type": "MODIFY",
"diff": "@@ -134,5 +134,5 @@ export default compose(\nconnect(\ngetMeetWidgetProps\n),\n- ...enhancers\n+ enhancers\n)(MeetWidget);\n",
"new_path": "packages/node_modules/@ciscospark/widget-meet/src/container.js",
"old_path": "packages/node_modules/@ciscospark/widget-meet/src/container.js"
},
{
"change_type": "MODIFY",
"diff": "+import {setDisplayName, compose} from 'recompose';\n+\nimport withCallMemberships from './withCallMemberships';\nimport withErrors from './withErrors';\nimport withWebRtcSupport from './withWebRtcSupport';\n@@ -7,7 +9,8 @@ import withDestinationType from './withDestinationType';\nimport withMeetDetails from './withMeetDetails';\nimport withExternalCall from './withExternalCall';\n-export default [\n+export default compose(\n+ setDisplayName('WidgetMeetEnhancers'),\nwithEventHandler,\nwithExternalCall,\nwithDestinationType,\n@@ -16,4 +19,4 @@ export default [\nwithCallHandlers,\nwithErrors,\nwithWebRtcSupport\n-];\n+);\n",
"new_path": "packages/node_modules/@ciscospark/widget-meet/src/enhancers/index.js",
"old_path": "packages/node_modules/@ciscospark/widget-meet/src/enhancers/index.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
refactor(widget-meet): Add displayName to enhancers
| 1
|
refactor
|
widget-meet
|
791,723
|
03.05.2018 16:13:25
| 25,200
|
9eb7882a24bb48d257253b626cec983614bcffc6
|
core(lhr): rename perf-hint, perf-info, etc
|
[
{
"change_type": "MODIFY",
"diff": "@@ -153,9 +153,9 @@ The categories property controls how to score and organize the audit results in\nname: 'Performance',\ndescription: 'This category judges your performance',\naudits: [\n- {id: 'first-meaningful-paint', weight: 2, group: 'perf-metric'},\n- {id: 'first-interactive', weight: 3, group: 'perf-metric'},\n- {id: 'consistently-interactive', weight: 5, group: 'perf-metric'},\n+ {id: 'first-meaningful-paint', weight: 2, group: 'metrics'},\n+ {id: 'first-interactive', weight: 3, group: 'metrics'},\n+ {id: 'consistently-interactive', weight: 5, group: 'metrics'},\n],\n}\n}\n@@ -184,12 +184,12 @@ The groups property controls how to visually group audits within a category. For\ncategories: {\nperformance: {\naudits: [\n- {id: 'my-performance-metric', weight: 2, group: 'perf-metric'},\n+ {id: 'my-performance-metric', weight: 2, group: 'metrics'},\n],\n}\n},\ngroups: {\n- 'perf-metric': {\n+ 'metrics': {\ntitle: 'Metrics',\ndescription: 'These metrics encapsulate your web app\\'s performance across a number of dimensions.'\n},\n",
"new_path": "docs/configuration.md",
"old_path": "docs/configuration.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -226,7 +226,7 @@ An object containing the display groups of audits for the report, keyed by the g\n### Example\n```json\n{\n- \"perf-metric\": {\n+ \"metrics\": {\n\"title\": \"Metrics\",\n\"description\": \"These metrics are super cool.\"\n},\n",
"new_path": "docs/understanding-results.md",
"old_path": "docs/understanding-results.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -188,15 +188,15 @@ module.exports = {\n],\ngroups: {\n- 'perf-metric': {\n+ 'metrics': {\ntitle: 'Metrics',\ndescription: 'These metrics encapsulate your web app\\'s performance across a number of dimensions.',\n},\n- 'perf-hint': {\n+ 'load-opportunities': {\ntitle: 'Opportunities',\ndescription: 'These are opportunities to speed up your application by optimizing the following resources.',\n},\n- 'perf-info': {\n+ 'diagnostics': {\ntitle: 'Diagnostics',\ndescription: 'More information about the performance of your application.',\n},\n@@ -251,38 +251,38 @@ module.exports = {\nname: 'Performance',\ndescription: 'These encapsulate your web app\\'s current performance and opportunities to improve it.',\naudits: [\n- {id: 'first-contentful-paint', weight: 3, group: 'perf-metric'},\n- {id: 'first-meaningful-paint', weight: 1, group: 'perf-metric'},\n- {id: 'speed-index', weight: 4, group: 'perf-metric'},\n- {id: 'interactive', weight: 5, group: 'perf-metric'},\n- {id: 'first-cpu-idle', weight: 2, group: 'perf-metric'},\n- {id: 'estimated-input-latency', weight: 0, group: 'perf-metric'},\n+ {id: 'first-contentful-paint', weight: 3, group: 'metrics'},\n+ {id: 'first-meaningful-paint', weight: 1, group: 'metrics'},\n+ {id: 'speed-index', weight: 4, group: 'metrics'},\n+ {id: 'interactive', weight: 5, group: 'metrics'},\n+ {id: 'first-cpu-idle', weight: 2, group: 'metrics'},\n+ {id: 'estimated-input-latency', weight: 0, group: 'metrics'},\n- {id: 'render-blocking-resources', weight: 0, group: 'perf-hint'},\n- {id: 'uses-responsive-images', weight: 0, group: 'perf-hint'},\n- {id: 'offscreen-images', weight: 0, group: 'perf-hint'},\n- {id: 'unminified-css', weight: 0, group: 'perf-hint'},\n- {id: 'unminified-javascript', weight: 0, group: 'perf-hint'},\n- {id: 'unused-css-rules', weight: 0, group: 'perf-hint'},\n- {id: 'uses-optimized-images', weight: 0, group: 'perf-hint'},\n- {id: 'uses-webp-images', weight: 0, group: 'perf-hint'},\n- {id: 'uses-text-compression', weight: 0, group: 'perf-hint'},\n- {id: 'uses-rel-preconnect', weight: 0, group: 'perf-hint'},\n- {id: 'time-to-first-byte', weight: 0, group: 'perf-hint'},\n- {id: 'redirects', weight: 0, group: 'perf-hint'},\n- {id: 'uses-rel-preload', weight: 0, group: 'perf-hint'},\n- {id: 'efficient-animated-content', weight: 0, group: 'perf-hint'},\n- {id: 'total-byte-weight', weight: 0, group: 'perf-info'},\n- {id: 'uses-long-cache-ttl', weight: 0, group: 'perf-info'},\n- {id: 'dom-size', weight: 0, group: 'perf-info'},\n- {id: 'critical-request-chains', weight: 0, group: 'perf-info'},\n+ {id: 'render-blocking-resources', weight: 0, group: 'load-opportunities'},\n+ {id: 'uses-responsive-images', weight: 0, group: 'load-opportunities'},\n+ {id: 'offscreen-images', weight: 0, group: 'load-opportunities'},\n+ {id: 'unminified-css', weight: 0, group: 'load-opportunities'},\n+ {id: 'unminified-javascript', weight: 0, group: 'load-opportunities'},\n+ {id: 'unused-css-rules', weight: 0, group: 'load-opportunities'},\n+ {id: 'uses-optimized-images', weight: 0, group: 'load-opportunities'},\n+ {id: 'uses-webp-images', weight: 0, group: 'load-opportunities'},\n+ {id: 'uses-text-compression', weight: 0, group: 'load-opportunities'},\n+ {id: 'uses-rel-preconnect', weight: 0, group: 'load-opportunities'},\n+ {id: 'time-to-first-byte', weight: 0, group: 'load-opportunities'},\n+ {id: 'redirects', weight: 0, group: 'load-opportunities'},\n+ {id: 'uses-rel-preload', weight: 0, group: 'load-opportunities'},\n+ {id: 'efficient-animated-content', weight: 0, group: 'load-opportunities'},\n+ {id: 'total-byte-weight', weight: 0, group: 'diagnostics'},\n+ {id: 'uses-long-cache-ttl', weight: 0, group: 'diagnostics'},\n+ {id: 'dom-size', weight: 0, group: 'diagnostics'},\n+ {id: 'critical-request-chains', weight: 0, group: 'diagnostics'},\n{id: 'network-requests', weight: 0},\n{id: 'metrics', weight: 0},\n- {id: 'user-timings', weight: 0, group: 'perf-info'},\n- {id: 'bootup-time', weight: 0, group: 'perf-info'},\n+ {id: 'user-timings', weight: 0, group: 'diagnostics'},\n+ {id: 'bootup-time', weight: 0, group: 'diagnostics'},\n{id: 'screenshot-thumbnails', weight: 0},\n- {id: 'mainthread-work-breakdown', weight: 0, group: 'perf-info'},\n- {id: 'font-display', weight: 0, group: 'perf-info'},\n+ {id: 'mainthread-work-breakdown', weight: 0, group: 'diagnostics'},\n+ {id: 'font-display', weight: 0, group: 'diagnostics'},\n],\n},\n'pwa': {\n",
"new_path": "lighthouse-core/config/default-config.js",
"old_path": "lighthouse-core/config/default-config.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -22,7 +22,7 @@ module.exports = {\ncategories: {\n'performance': {\naudits: [\n- {id: 'unused-javascript', weight: 0, group: 'perf-hint'},\n+ {id: 'unused-javascript', weight: 0, group: 'load-opportunities'},\n],\n},\n},\n",
"new_path": "lighthouse-core/config/full-config.js",
"old_path": "lighthouse-core/config/full-config.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -13,24 +13,24 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\n* @return {!Element}\n*/\n_renderMetric(audit) {\n- const tmpl = this.dom.cloneTemplate('#tmpl-lh-perf-metric', this.templateContext);\n- const element = this.dom.find('.lh-perf-metric', tmpl);\n+ const tmpl = this.dom.cloneTemplate('#tmpl-lh-metric', this.templateContext);\n+ const element = this.dom.find('.lh-metric', tmpl);\nelement.id = audit.result.name;\n- // FIXME(paulirish): currently this sets a 'lh-perf-metric--fail' class on error'd audits\n- element.classList.add(`lh-perf-metric--${Util.calculateRating(audit.result.score)}`);\n+ // FIXME(paulirish): currently this sets a 'lh-metric--fail' class on error'd audits\n+ element.classList.add(`lh-metric--${Util.calculateRating(audit.result.score)}`);\n- const titleEl = this.dom.find('.lh-perf-metric__title', tmpl);\n+ const titleEl = this.dom.find('.lh-metric__title', tmpl);\ntitleEl.textContent = audit.result.description;\n- const valueEl = this.dom.find('.lh-perf-metric__value', tmpl);\n+ const valueEl = this.dom.find('.lh-metric__value', tmpl);\nvalueEl.textContent = audit.result.displayValue;\n- const descriptionEl = this.dom.find('.lh-perf-metric__description', tmpl);\n+ const descriptionEl = this.dom.find('.lh-metric__description', tmpl);\ndescriptionEl.appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.helpText));\nif (audit.result.error) {\n- element.classList.remove(`lh-perf-metric--fail`);\n- element.classList.add(`lh-perf-metric--error`);\n+ element.classList.remove(`lh-metric--fail`);\n+ element.classList.add(`lh-metric--error`);\ndescriptionEl.textContent = '';\nvalueEl.textContent = 'Error!';\nconst tooltip = this.dom.createChildOf(descriptionEl, 'span', 'lh-error-tooltip-content');\n@@ -45,19 +45,17 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\n* @param {number} scale\n* @return {!Element}\n*/\n- _renderPerfHintAudit(audit, scale) {\n- const tooltipAttrs = {title: audit.result.displayValue};\n-\n+ _renderOpportunity(audit, scale) {\nconst element = this.dom.createElement('details', [\n- 'lh-perf-hint',\n- `lh-perf-hint--${Util.calculateRating(audit.result.score)}`,\n+ 'lh-load-opportunity',\n+ `lh-load-opportunity--${Util.calculateRating(audit.result.score)}`,\n'lh-expandable-details',\n].join(' '));\nelement.id = audit.result.name;\n- const summary = this.dom.createChildOf(element, 'summary', 'lh-perf-hint__summary ' +\n+ const summary = this.dom.createChildOf(element, 'summary', 'lh-load-opportunity__summary ' +\n'lh-expandable-details__summary');\n- const titleEl = this.dom.createChildOf(summary, 'div', 'lh-perf-hint__title');\n+ const titleEl = this.dom.createChildOf(summary, 'div', 'lh-load-opportunity__title');\ntitleEl.textContent = audit.result.description;\nthis.dom.createChildOf(summary, 'div', 'lh-toggle-arrow', {title: 'See resources'});\n@@ -72,30 +70,33 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\nconst summaryInfo = /** @type {!DetailsRenderer.OpportunitySummary}\n*/ (details && details.summary);\n// eslint-disable-next-line no-console\n- console.assert(summaryInfo, 'Missing `summary` for perf-hint audit');\n+ console.assert(summaryInfo, 'Missing `summary` for load-opportunities audit');\n// eslint-disable-next-line no-console\nconsole.assert(typeof summaryInfo.wastedMs === 'number',\n- 'Missing numeric `summary.wastedMs` for perf-hint audit');\n+ 'Missing numeric `summary.wastedMs` for load-opportunities audit');\nif (!summaryInfo || !summaryInfo.wastedMs) {\nreturn element;\n}\n- const sparklineContainerEl = this.dom.createChildOf(summary, 'div', 'lh-perf-hint__sparkline',\n- tooltipAttrs);\n+ const elemAttrs = {title: audit.result.displayValue};\n+ const sparklineContainerEl = this.dom.createChildOf(summary, 'div',\n+ 'lh-load-opportunity__sparkline', elemAttrs);\nconst sparklineEl = this.dom.createChildOf(sparklineContainerEl, 'div', 'lh-sparkline');\nconst sparklineBarEl = this.dom.createChildOf(sparklineEl, 'div', 'lh-sparkline__bar');\nsparklineBarEl.style.width = summaryInfo.wastedMs / scale * 100 + '%';\n- const statsEl = this.dom.createChildOf(summary, 'div', 'lh-perf-hint__stats', tooltipAttrs);\n- const statsMsEl = this.dom.createChildOf(statsEl, 'div', 'lh-perf-hint__primary-stat');\n+ const statsEl = this.dom.createChildOf(summary, 'div', 'lh-load-opportunity__stats', elemAttrs);\n+ const statsMsEl = this.dom.createChildOf(statsEl, 'div', 'lh-load-opportunity__primary-stat');\nstatsMsEl.textContent = Util.formatMilliseconds(summaryInfo.wastedMs);\nif (summaryInfo.wastedBytes) {\n- const statsKbEl = this.dom.createChildOf(statsEl, 'div', 'lh-perf-hint__secondary-stat');\n+ const statsKbEl = this.dom.createChildOf(statsEl, 'div',\n+ 'lh-load-opportunity__secondary-stat');\nstatsKbEl.textContent = Util.formatBytesToKB(summaryInfo.wastedBytes);\n}\n- const descriptionEl = this.dom.createChildOf(element, 'div', 'lh-perf-hint__description');\n+ const descriptionEl = this.dom.createChildOf(element, 'div',\n+ 'lh-load-opportunity__description');\ndescriptionEl.appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.helpText));\nif (audit.result.debugString) {\n@@ -119,16 +120,16 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\nthis.createPermalinkSpan(element, category.id);\nelement.appendChild(this.renderCategoryScore(category));\n- const metricAudits = category.audits.filter(audit => audit.group === 'perf-metric');\n- const metricAuditsEl = this.renderAuditGroup(groups['perf-metric'], {expandable: false});\n+ const metricAudits = category.audits.filter(audit => audit.group === 'metrics');\n+ const metricAuditsEl = this.renderAuditGroup(groups['metrics'], {expandable: false});\n// Metrics\nconst keyMetrics = metricAudits.filter(a => a.weight >= 3);\nconst otherMetrics = metricAudits.filter(a => a.weight < 3);\n- const metricsBoxesEl = this.dom.createChildOf(metricAuditsEl, 'div', 'lh-metrics-container');\n- const metricsColumn1El = this.dom.createChildOf(metricsBoxesEl, 'div', 'lh-metrics-column');\n- const metricsColumn2El = this.dom.createChildOf(metricsBoxesEl, 'div', 'lh-metrics-column');\n+ const metricsBoxesEl = this.dom.createChildOf(metricAuditsEl, 'div', 'lh-metric-container');\n+ const metricsColumn1El = this.dom.createChildOf(metricsBoxesEl, 'div', 'lh-metric-column');\n+ const metricsColumn2El = this.dom.createChildOf(metricsBoxesEl, 'div', 'lh-metric-column');\nkeyMetrics.forEach(item => {\nmetricsColumn1El.appendChild(this._renderMetric(item));\n@@ -153,30 +154,30 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\nelement.appendChild(metricAuditsEl);\n// Opportunities\n- const hintAudits = category.audits\n- .filter(audit => audit.group === 'perf-hint' && audit.result.score < 1)\n+ const opportunityAudits = category.audits\n+ .filter(audit => audit.group === 'load-opportunities' && audit.result.score < 1)\n.sort((auditA, auditB) => auditB.result.rawValue - auditA.result.rawValue);\n- if (hintAudits.length) {\n- const maxWaste = Math.max(...hintAudits.map(audit => audit.result.rawValue));\n+ if (opportunityAudits.length) {\n+ const maxWaste = Math.max(...opportunityAudits.map(audit => audit.result.rawValue));\nconst scale = Math.ceil(maxWaste / 1000) * 1000;\n- const hintAuditsEl = this.renderAuditGroup(groups['perf-hint'], {expandable: false});\n- hintAudits.forEach(item => hintAuditsEl.appendChild(this._renderPerfHintAudit(item, scale)));\n- hintAuditsEl.open = true;\n- element.appendChild(hintAuditsEl);\n+ const groupEl = this.renderAuditGroup(groups['load-opportunities'], {expandable: false});\n+ opportunityAudits.forEach(item => groupEl.appendChild(this._renderOpportunity(item, scale)));\n+ groupEl.open = true;\n+ element.appendChild(groupEl);\n}\n// Diagnostics\n- const infoAudits = category.audits\n- .filter(audit => audit.group === 'perf-info' && audit.result.score < 1);\n- if (infoAudits.length) {\n- const infoAuditsEl = this.renderAuditGroup(groups['perf-info'], {expandable: false});\n- infoAudits.forEach(item => infoAuditsEl.appendChild(this.renderAudit(item)));\n- infoAuditsEl.open = true;\n- element.appendChild(infoAuditsEl);\n+ const diagnosticAudits = category.audits\n+ .filter(audit => audit.group === 'diagnostics' && audit.result.score < 1);\n+ if (diagnosticAudits.length) {\n+ const groupEl = this.renderAuditGroup(groups['diagnostics'], {expandable: false});\n+ diagnosticAudits.forEach(item => groupEl.appendChild(this.renderAudit(item)));\n+ groupEl.open = true;\n+ element.appendChild(groupEl);\n}\nconst passedElements = category.audits\n- .filter(audit => (audit.group === 'perf-hint' || audit.group === 'perf-info') &&\n+ .filter(audit => (audit.group === 'load-opportunities' || audit.group === 'diagnostics') &&\naudit.result.score === 1)\n.map(audit => this.renderAudit(audit));\n",
"new_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -328,54 +328,54 @@ summary {\n/* Perf Timeline Metric */\n-.lh-metrics-container {\n+.lh-metric-container {\ndisplay: flex;\n}\n-.lh-metrics-column {\n+.lh-metric-column {\nflex: 1;\nmargin-right: 20px;\n}\n-.lh-perf-metric {\n+.lh-metric {\nborder-top: 1px solid var(--report-secondary-border-color);\n}\n-.lh-perf-metric__innerwrap {\n+.lh-metric__innerwrap {\ndisplay: flex;\njustify-content: space-between;\nmargin: var(--lh-audit-vpadding) 0;\npadding: var(--lh-audit-vpadding) var(--text-indent);\n}\n-.lh-perf-metric__header {\n+.lh-metric__header {\ndisplay: flex;\n}\n-.lh-perf-metric__details {\n+.lh-metric__details {\norder: -1;\n}\n-.lh-perf-metric__title {\n+.lh-metric__title {\nfont-size: var(--body-font-size);\nline-height: var(--body-line-height);\ndisplay: flex;\n}\n-.lh-perf-metric__name {\n+.lh-metric__name {\nflex: 1;\n}\n-.lh-perf-metric__description {\n+.lh-metric__description {\ncolor: var(--secondary-text-color);\n}\n-.lh-perf-metric--pass .lh-perf-metric__value {\n+.lh-metric--pass .lh-metric__value {\ncolor: var(--pass-color);\n}\n-.lh-perf-metric .lh-perf-metric__value::after {\n+.lh-metric .lh-metric__value::after {\ncontent: '';\nwidth: var(--body-font-size);\nheight: var(--body-font-size);\n@@ -385,121 +385,122 @@ summary {\nmargin-left: calc(var(--body-font-size) / 2);\n}\n-.lh-perf-metric--pass .lh-perf-metric__value::after {\n+.lh-metric--pass .lh-metric__value::after {\nbackground: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>check</title><path fill=\"hsl(139, 70%, 30%)\" d=\"M24 4C12.95 4 4 12.95 4 24c0 11.04 8.95 20 20 20 11.04 0 20-8.96 20-20 0-11.05-8.96-20-20-20zm-4 30L10 24l2.83-2.83L20 28.34l15.17-15.17L38 16 20 34z\"/></svg>') no-repeat 50% 50%;\n}\n-.lh-perf-metric--average .lh-perf-metric__value {\n+.lh-metric--average .lh-metric__value {\ncolor: var(--average-color);\n}\n-.lh-perf-metric--average .lh-perf-metric__value::after {\n+.lh-metric--average .lh-metric__value::after {\nbackground: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>info</title><path fill=\"hsl(31, 100%, 45%)\" d=\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm2 30h-4V22h4v12zm0-16h-4v-4h4v4z\"/></svg>') no-repeat 50% 50%;\n}\n-.lh-perf-metric--fail .lh-perf-metric__value {\n+.lh-metric--fail .lh-metric__value {\ncolor: var(--fail-color);\n}\n-.lh-perf-metric--fail .lh-perf-metric__value::after {\n+\n+.lh-metric--fail .lh-metric__value::after {\nbackground: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>warn</title><path fill=\"hsl(1, 73%, 45%)\" d=\"M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z\"/></svg>') no-repeat 50% 50%;\n}\n-.lh-perf-metric--error .lh-perf-metric__value,\n-.lh-perf-metric--error .lh-perf-metric__description {\n+.lh-metric--error .lh-metric__value,\n+.lh-metric--error .lh-metric__description {\ncolor: var(--fail-color);\n}\n/* Hide icon if there was an error */\n-.lh-perf-metric--error .lh-perf-metric__value::after {\n+.lh-metric--error .lh-metric__value::after {\ndisplay: none;\n}\n-/* Perf Hint */\n+/* Perf load opportunity */\n-.lh-perf-hint {\n+.lh-load-opportunity {\npadding-top: var(--lh-audit-vpadding);\npadding-bottom: var(--lh-audit-vpadding);\nborder-top: 1px solid var(--report-secondary-border-color);\n}\n-.lh-perf-hint:last-of-type {\n+.lh-load-opportunity:last-of-type {\nborder-bottom: none;\n}\n-.lh-perf-hint__summary {\n+.lh-load-opportunity__summary {\ndisplay: flex;\nalign-items: flex-start;\nflex-wrap: wrap;\nmin-height: calc(var(--body-line-height) + var(--caption-line-height));\n}\n-.lh-perf-hint__summary .lh-toggle-arrow {\n+.lh-load-opportunity__summary .lh-toggle-arrow {\nmargin-top: calc((var(--subheader-line-height) - 12px) / 2);\n}\n-.lh-perf-hint__summary .lh-debug {\n+.lh-load-opportunity__summary .lh-debug {\nwidth: calc(100% - var(--expandable-indent));\nmargin: 0 var(--expandable-indent);\n}\n-.lh-perf-hint__title {\n+.lh-load-opportunity__title {\nfont-size: var(--body-font-size);\nflex: 10;\n}\n-.lh-perf-hint__sparkline {\n+.lh-load-opportunity__sparkline {\nflex: 0 0 50%;\nmargin-top: calc((var(--body-line-height) - var(--lh-sparkline-height)) / 2);\n}\n-.lh-perf-hint__sparkline .lh-sparkline {\n+.lh-load-opportunity__sparkline .lh-sparkline {\nwidth: 100%;\nfloat: right;\nmargin: 0;\n}\n-.lh-perf-hint__stats {\n+.lh-load-opportunity__stats {\ntext-align: right;\nflex: 0 0 var(--lh-audit-score-width);\n}\n-.lh-perf-hint__primary-stat {\n+.lh-load-opportunity__primary-stat {\nfont-size: var(--body-font-size);\nline-height: var(--body-line-height);\n}\n-.lh-perf-hint__secondary-stat {\n+.lh-load-opportunity__secondary-stat {\nfont-size: var(--caption-font-size);\nline-height: var(--caption-line-height);\n}\n-.lh-perf-hint__description {\n+.lh-load-opportunity__description {\ncolor: var(--secondary-text-color);\nmargin-top: calc(var(--default-padding) / 2);\n}\n-.lh-perf-hint--pass .lh-perf-hint__stats {\n+.lh-load-opportunity--pass .lh-load-opportunity__stats {\ncolor: var(--pass-color);\n}\n-.lh-perf-hint--pass .lh-sparkline__bar {\n+.lh-load-opportunity--pass .lh-sparkline__bar {\nbackground: var(--pass-color);\n}\n-.lh-perf-hint--average .lh-sparkline__bar {\n+.lh-load-opportunity--average .lh-sparkline__bar {\nbackground: var(--average-color);\n}\n-.lh-perf-hint--average .lh-perf-hint__stats {\n+.lh-load-opportunity--average .lh-load-opportunity__stats {\ncolor: var(--average-color);\n}\n-.lh-perf-hint--fail .lh-sparkline__bar {\n+.lh-load-opportunity--fail .lh-sparkline__bar {\nbackground: var(--fail-color);\n}\n-.lh-perf-hint--fail .lh-perf-hint__stats {\n+.lh-load-opportunity--fail .lh-load-opportunity__stats {\ncolor: var(--fail-color);\n}\n@@ -561,7 +562,7 @@ summary {\n}\n/* correlate metric end location with sparkline */\n-.lh-perf-metric:hover .lh-sparkline__bar::after {\n+.lh-metric:hover .lh-sparkline__bar::after {\ncontent: '';\nheight: 100vh;\nwidth: 2px;\n",
"new_path": "lighthouse-core/report/html/report-styles.css",
"old_path": "lighthouse-core/report/html/report-styles.css"
},
{
"change_type": "MODIFY",
"diff": "</template>\n<!-- Lighthouse perf metric -->\n-<template id=\"tmpl-lh-perf-metric\">\n+<template id=\"tmpl-lh-metric\">\n- <div class=\"lh-perf-metric\">\n- <div class=\"lh-perf-metric__innerwrap tooltip-boundary\">\n- <span class=\"lh-perf-metric__title\"></span>\n- <div class=\"lh-perf-metric__value\"></div>\n- <div class=\"lh-perf-metric__description tooltip\"></div>\n+ <div class=\"lh-metric\">\n+ <div class=\"lh-metric__innerwrap tooltip-boundary\">\n+ <span class=\"lh-metric__title\"></span>\n+ <div class=\"lh-metric__value\"></div>\n+ <div class=\"lh-metric__description tooltip\"></div>\n</div>\n</div>\n",
"new_path": "lighthouse-core/report/html/templates.html",
"old_path": "lighthouse-core/report/html/templates.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -76,32 +76,32 @@ describe('PerfCategoryRenderer', () => {\nconst categoryDOM = renderer.render(category, sampleResults.reportGroups);\nconst metricsSection = categoryDOM.querySelectorAll('.lh-category > .lh-audit-group')[0];\n- const metricAudits = category.audits.filter(audit => audit.group === 'perf-metric');\n- const timelineElements = metricsSection.querySelectorAll('.lh-perf-metric');\n+ const metricAudits = category.audits.filter(audit => audit.group === 'metrics');\n+ const timelineElements = metricsSection.querySelectorAll('.lh-metric');\nconst nontimelineElements = metricsSection.querySelectorAll('.lh-audit');\nassert.equal(timelineElements.length + nontimelineElements.length, metricAudits.length);\n});\n- it('renders the failing performance hints', () => {\n+ it('renders the failing performance opportunities', () => {\nconst categoryDOM = renderer.render(category, sampleResults.reportGroups);\n- const hintAudits = category.audits.filter(audit => audit.group === 'perf-hint' &&\n+ const oppAudits = category.audits.filter(audit => audit.group === 'load-opportunities' &&\naudit.result.score !== 1);\n- const hintElements = categoryDOM.querySelectorAll('.lh-perf-hint');\n- assert.equal(hintElements.length, hintAudits.length);\n-\n- const hintElement = hintElements[0];\n- const hintSparklineElement = hintElement.querySelector('.lh-perf-hint__sparkline');\n- assert.ok(hintElement.querySelector('.lh-perf-hint__title'), 'did not render title');\n- assert.ok(hintSparklineElement, 'did not render sparkline');\n- assert.ok(hintElement.querySelector('.lh-perf-hint__stats'), 'did not render stats');\n- assert.ok(hintSparklineElement.title, 'did not render tooltip');\n+ const oppElements = categoryDOM.querySelectorAll('.lh-load-opportunity');\n+ assert.equal(oppElements.length, oppAudits.length);\n+\n+ const oppElement = oppElements[0];\n+ const oppSparklineElement = oppElement.querySelector('.lh-load-opportunity__sparkline');\n+ assert.ok(oppElement.querySelector('.lh-load-opportunity__title'), 'did not render title');\n+ assert.ok(oppSparklineElement, 'did not render sparkline');\n+ assert.ok(oppElement.querySelector('.lh-load-opportunity__stats'), 'did not render stats');\n+ assert.ok(oppSparklineElement.title, 'did not render tooltip');\n});\n- it('renders the performance hints with a debug string', () => {\n+ it('renders the performance opportunities with a debug string', () => {\nconst auditWithDebug = {\nscore: 0,\n- group: 'perf-hint',\n+ group: 'load-opportunities',\nresult: {\nrawValue: 100, debugString: 'Yikes!', description: 'Bug',\nhelpText: '', score: 0.32,\n@@ -112,14 +112,14 @@ describe('PerfCategoryRenderer', () => {\nconst fakeCategory = Object.assign({}, category, {audits: [auditWithDebug]});\nconst categoryDOM = renderer.render(fakeCategory, sampleResults.reportGroups);\n- const debugEl = categoryDOM.querySelector('.lh-perf-hint .lh-debug');\n+ const debugEl = categoryDOM.querySelector('.lh-load-opportunity .lh-debug');\nassert.ok(debugEl, 'did not render debug');\n});\n- it('renders errored performance hint with a debug string', () => {\n+ it('renders errored performance opportunities with a debug string', () => {\nconst auditWithDebug = {\nscore: 0,\n- group: 'perf-hint',\n+ group: 'load-opportunities',\nresult: {\nerror: true, score: 0,\nrawValue: 100, debugString: 'Yikes!!', description: 'Bug #2',\n@@ -130,14 +130,14 @@ describe('PerfCategoryRenderer', () => {\nconst fakeCategory = Object.assign({}, category, {audits: [auditWithDebug]});\nconst categoryDOM = renderer.render(fakeCategory, sampleResults.reportGroups);\n- const debugEl = categoryDOM.querySelector('.lh-perf-hint .lh-debug');\n+ const debugEl = categoryDOM.querySelector('.lh-load-opportunity .lh-debug');\nassert.ok(debugEl, 'did not render debug');\n});\n- it('throws if a performance hint is missing summary.wastedMs', () => {\n+ it('throws if a performance opportunities is missing summary.wastedMs', () => {\nconst auditWithDebug = {\nscore: 0,\n- group: 'perf-hint',\n+ group: 'load-opportunities',\nresult: {\nrawValue: 100, description: 'Bug',\nhelpText: '', score: 0.32,\n@@ -154,7 +154,7 @@ describe('PerfCategoryRenderer', () => {\nconst categoryDOM = renderer.render(category, sampleResults.reportGroups);\nconst diagnosticSection = categoryDOM.querySelectorAll('.lh-category > .lh-audit-group')[2];\n- const diagnosticAudits = category.audits.filter(audit => audit.group === 'perf-info' &&\n+ const diagnosticAudits = category.audits.filter(audit => audit.group === 'diagnostics' &&\naudit.result.score !== 1);\nconst diagnosticElements = diagnosticSection.querySelectorAll('.lh-audit');\nassert.equal(diagnosticElements.length, diagnosticAudits.length);\n@@ -165,7 +165,7 @@ describe('PerfCategoryRenderer', () => {\nconst passedSection = categoryDOM.querySelector('.lh-category > .lh-passed-audits');\nconst passedAudits = category.audits.filter(audit =>\n- audit.group && audit.group !== 'perf-metric' &&\n+ audit.group && audit.group !== 'metrics' &&\naudit.result.score === 1);\nconst passedElements = passedSection.querySelectorAll('.lh-audit');\nassert.equal(passedElements.length, passedAudits.length);\n",
"new_path": "lighthouse-core/test/report/html/renderer/performance-category-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/performance-category-renderer-test.js"
},
{
"change_type": "MODIFY",
"diff": "{\n\"id\": \"first-contentful-paint\",\n\"weight\": 3,\n- \"group\": \"perf-metric\"\n+ \"group\": \"metrics\"\n},\n{\n\"id\": \"first-meaningful-paint\",\n\"weight\": 1,\n- \"group\": \"perf-metric\"\n+ \"group\": \"metrics\"\n},\n{\n\"id\": \"speed-index\",\n\"weight\": 4,\n- \"group\": \"perf-metric\"\n+ \"group\": \"metrics\"\n},\n{\n\"id\": \"interactive\",\n\"weight\": 5,\n- \"group\": \"perf-metric\"\n+ \"group\": \"metrics\"\n},\n{\n\"id\": \"first-cpu-idle\",\n\"weight\": 2,\n- \"group\": \"perf-metric\"\n+ \"group\": \"metrics\"\n},\n{\n\"id\": \"estimated-input-latency\",\n\"weight\": 0,\n- \"group\": \"perf-metric\"\n+ \"group\": \"metrics\"\n},\n{\n\"id\": \"render-blocking-resources\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"uses-responsive-images\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"offscreen-images\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"unminified-css\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"unminified-javascript\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"unused-css-rules\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"uses-optimized-images\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"uses-webp-images\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"uses-text-compression\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"uses-rel-preconnect\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"time-to-first-byte\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"redirects\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"uses-rel-preload\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"efficient-animated-content\",\n\"weight\": 0,\n- \"group\": \"perf-hint\"\n+ \"group\": \"load-opportunities\"\n},\n{\n\"id\": \"total-byte-weight\",\n\"weight\": 0,\n- \"group\": \"perf-info\"\n+ \"group\": \"diagnostics\"\n},\n{\n\"id\": \"uses-long-cache-ttl\",\n\"weight\": 0,\n- \"group\": \"perf-info\"\n+ \"group\": \"diagnostics\"\n},\n{\n\"id\": \"dom-size\",\n\"weight\": 0,\n- \"group\": \"perf-info\"\n+ \"group\": \"diagnostics\"\n},\n{\n\"id\": \"critical-request-chains\",\n\"weight\": 0,\n- \"group\": \"perf-info\"\n+ \"group\": \"diagnostics\"\n},\n{\n\"id\": \"network-requests\",\n{\n\"id\": \"user-timings\",\n\"weight\": 0,\n- \"group\": \"perf-info\"\n+ \"group\": \"diagnostics\"\n},\n{\n\"id\": \"bootup-time\",\n\"weight\": 0,\n- \"group\": \"perf-info\"\n+ \"group\": \"diagnostics\"\n},\n{\n\"id\": \"screenshot-thumbnails\",\n{\n\"id\": \"mainthread-work-breakdown\",\n\"weight\": 0,\n- \"group\": \"perf-info\"\n+ \"group\": \"diagnostics\"\n},\n{\n\"id\": \"font-display\",\n\"weight\": 0,\n- \"group\": \"perf-info\"\n+ \"group\": \"diagnostics\"\n}\n],\n\"id\": \"performance\",\n}\n],\n\"reportGroups\": {\n- \"perf-metric\": {\n+ \"metrics\": {\n\"title\": \"Metrics\",\n\"description\": \"These metrics encapsulate your web app's performance across a number of dimensions.\"\n},\n- \"perf-hint\": {\n+ \"load-opportunities\": {\n\"title\": \"Opportunities\",\n\"description\": \"These are opportunities to speed up your application by optimizing the following resources.\"\n},\n- \"perf-info\": {\n+ \"diagnostics\": {\n\"title\": \"Diagnostics\",\n\"description\": \"More information about the performance of your application.\"\n},\n",
"new_path": "lighthouse-core/test/results/sample_v2.json",
"old_path": "lighthouse-core/test/results/sample_v2.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -117,8 +117,8 @@ describe('Lighthouse chrome extension', function() {\nconst selectors = {\n- audits: '.lh-audit,.lh-perf-metric,.lh-perf-hint',\n- titles: '.lh-audit__title, .lh-perf-hint__title, .lh-perf-metric__title',\n+ audits: '.lh-audit,.lh-metric,.lh-load-opportunity',\n+ titles: '.lh-audit__title, .lh-load-opportunity__title, .lh-metric__title',\n};\nit('should contain all categories', async () => {\n",
"new_path": "lighthouse-extension/test/extension-test.js",
"old_path": "lighthouse-extension/test/extension-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -74,8 +74,8 @@ describe('Lighthouse Viewer', function() {\nconst selectors = {\n- audits: '.lh-audit, .lh-perf-metric, .lh-perf-hint',\n- titles: '.lh-audit__title, .lh-perf-hint__title, .lh-perf-metric__title',\n+ audits: '.lh-audit, .lh-metric, .lh-load-opportunity',\n+ titles: '.lh-audit__title, .lh-load-opportunity__title, .lh-metric__title',\n};\nit('should load with no errors', async () => {\n",
"new_path": "lighthouse-viewer/test/viewer-test-pptr.js",
"old_path": "lighthouse-viewer/test/viewer-test-pptr.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(lhr): rename perf-hint, perf-info, etc (#5102)
| 1
|
core
|
lhr
|
791,723
|
03.05.2018 16:27:38
| 25,200
|
aad3aa653e4a16cc5a87e3b982395e4e3708c831
|
tests: node 10 compat
|
[
{
"change_type": "MODIFY",
"diff": "@@ -235,7 +235,7 @@ describe('Config', () => {\n],\n},\n},\n- }), 'missing an audit id at pwa[0]');\n+ }), /missing an audit id at pwa\\[0\\]/);\n});\nit('throws when an accessibility audit does not have a group', () => {\n",
"new_path": "lighthouse-core/test/config/config-test.js",
"old_path": "lighthouse-core/test/config/config-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
tests: node 10 compat (#5106)
| 1
|
tests
| null |
217,922
|
03.05.2018 17:25:20
| -7,200
|
ece88f53513dbc5d5d775778299a1f4a527c22ef
|
fix: fixed a bug with xivdb links in non-EN languages
closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -5,10 +5,10 @@ export class XivdbLinkBase extends AbstractLinkBase {\ngetItemLink(name: I18nName, id: number): I18nName {\nreturn {\n- fr: `http://fr.xivdb.com/item/${id}/${this.toUrl(name.fr)}`,\n- en: `http://xivdb.com/item/${id}/${this.toUrl(name.en)}`,\n- de: `http://de.xivdb.com/item/${id}/${this.toUrl(name.de)}`,\n- ja: `http://ja.xivdb.com/item/${id}/${this.toUrl(name.ja)}`\n+ fr: `https://fr.xivdb.com/item/${id}/${this.toUrl(name.fr)}`,\n+ en: `https://xivdb.com/item/${id}/${this.toUrl(name.en)}`,\n+ de: `https://de.xivdb.com/item/${id}/${this.toUrl(name.de)}`,\n+ ja: `https://ja.xivdb.com/item/${id}/${this.toUrl(name.ja)}`\n};\n}\n",
"new_path": "src/app/pages/settings/link-base/bases/xivdb-link-base.ts",
"old_path": "src/app/pages/settings/link-base/bases/xivdb-link-base.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix: fixed a bug with xivdb links in non-EN languages
closes #332
| 1
|
fix
| null |
217,922
|
03.05.2018 19:08:23
| -7,200
|
3896fdaf5dd4cea4bf8b49f908fa591b3430f1f6
|
chore(simulator): remove action cost on free actions in rotation
|
[
{
"change_type": "MODIFY",
"diff": "[ngClass]=\"{'wasted': wasted, 'disabled': disabled || notEnoughCp, 'not-enough-cp': notEnoughCp}\">\n<img src=\"{{action.getId(getJobId()) | actionIcon}}\" alt=\"\">\n<span class=\"cost\"\n- *ngIf=\"!hideCost && action.getBaseCPCost(simulation) > 0\">{{action.getBaseCPCost(simulation)}}</span>\n+ *ngIf=\"!hideCost && action.getBaseCPCost(simulation) > 0 && cpCost > 0\">\n+ {{cpCost === undefined ? action.getBaseCPCost(simulation) : cpCost}}\n+ </span>\n</div>\n</div>\n",
"new_path": "src/app/pages/simulator/components/action/action.component.html",
"old_path": "src/app/pages/simulator/components/action/action.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -37,6 +37,9 @@ export class ActionComponent {\n@Input()\nignoreDisabled = false;\n+ @Input()\n+ cpCost: number;\n+\ngetJobId(): number {\nreturn this.simulation !== undefined ? this.simulation.crafterStats.jobId : this.jobId;\n}\n",
"new_path": "src/app/pages/simulator/components/action/action.component.ts",
"old_path": "src/app/pages/simulator/components/action/action.component.ts"
},
{
"change_type": "MODIFY",
"diff": "(actionclick)=\"removeAction(index)\"\n[action]=\"step.action\"\n[simulation]=\"resultData.simulation\"\n- [ignoreDisabled]=\"true\"></app-action>\n+ [ignoreDisabled]=\"true\"\n+ [cpCost]=\"step.cpDifference\"></app-action>\n<div class=\"end-drag-zone\" droppable\ndragOverClass=\"drag-over\"\n(onDrop)=\"moveSkill($event.dragData, resultData.simulation.steps.length - 1)\"></div>\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.html",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.html"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): remove action cost on free actions in rotation
| 1
|
chore
|
simulator
|
724,000
|
03.05.2018 20:47:27
| -3,600
|
f3dfb1e81f43c05d8ae871dba9184d83a3b3548e
|
fix: add cheerio as dependency to server-test-utils
fixes 571
|
[
{
"change_type": "MODIFY",
"diff": "\"babel-preset-flow-vue\": \"^1.0.0\",\n\"babel-preset-stage-2\": \"^6.24.1\",\n\"chai\": \"^4.0.0\",\n- \"cheerio\": \"^1.0.0-rc.2\",\n\"cross-env\": \"^5.0.0\",\n\"css-loader\": \"^0.28.4\",\n\"eslint\": \"^4.18.1\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "},\n\"homepage\": \"https://github.com/vuejs/vue-test-utils#readme\",\n\"dependencies\": {\n- \"@vue/test-utils\": \"1.0.0-beta.15\"\n+ \"cheerio\": \"^1.0.0-rc.2\"\n},\n\"devDependencies\": {\n\"chalk\": \"^2.1.0\",\n\"peerDependencies\": {\n\"vue\": \"2.x\",\n\"vue-server-renderer\": \"2.x\",\n- \"vue-template-compiler\": \"^2.x\"\n+ \"vue-template-compiler\": \"^2.x\",\n+ \"@vue/test-utils\": \"1.0.0-beta.15\"\n}\n}\n",
"new_path": "packages/server-test-utils/package.json",
"old_path": "packages/server-test-utils/package.json"
}
] |
JavaScript
|
MIT License
|
vuejs/vue-test-utils
|
fix: add cheerio as dependency to server-test-utils
fixes 571
| 1
|
fix
| null |
791,834
|
03.05.2018 21:28:28
| 25,200
|
b49e6ced3d8e285eb239a429572379c7623902c6
|
core(displayValue): fancier displayValue type
|
[
{
"change_type": "MODIFY",
"diff": "@@ -77,9 +77,9 @@ class BootupTime extends Audit {\n* @param {LH.Audit.Context} context\n* @return {Promise<LH.Audit.Product>}\n*/\n- static audit(artifacts, context) {\n+ static async audit(artifacts, context) {\nconst trace = artifacts.traces[BootupTime.DEFAULT_PASS];\n- return artifacts.requestDevtoolsTimelineModel(trace).then(devtoolsTimelineModel => {\n+ const devtoolsTimelineModel = await artifacts.requestDevtoolsTimelineModel(trace);\nconst executionTimings = BootupTime.getExecutionTimingsByURL(devtoolsTimelineModel);\nlet totalBootupTime = 0;\n/** @type {Object<string, Object<string, number>>} */\n@@ -130,7 +130,6 @@ class BootupTime extends Audit {\nvalue: extendedInfo,\n},\n};\n- });\n}\n}\n",
"new_path": "lighthouse-core/audits/bootup-time.js",
"old_path": "lighthouse-core/audits/bootup-time.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -42,12 +42,13 @@ class TotalByteWeight extends ByteEfficiencyAudit {\n* @param {LH.Audit.Context} context\n* @return {Promise<LH.Audit.Product>}\n*/\n- static audit(artifacts, context) {\n+ static async audit(artifacts, context) {\nconst devtoolsLogs = artifacts.devtoolsLogs[ByteEfficiencyAudit.DEFAULT_PASS];\n- return Promise.all([\n+ const [networkRecords, networkThroughput] = await Promise.all([\nartifacts.requestNetworkRecords(devtoolsLogs),\nartifacts.requestNetworkThroughput(devtoolsLogs),\n- ]).then(([networkRecords, networkThroughput]) => {\n+ ]);\n+\nlet totalBytes = 0;\n/** @type {Array<{url: string, totalBytes: number, totalMs: number}>} */\nlet results = [];\n@@ -103,7 +104,6 @@ class TotalByteWeight extends ByteEfficiencyAudit {\n},\ndetails: tableDetails,\n};\n- });\n}\n}\n",
"new_path": "lighthouse-core/audits/byte-efficiency/total-byte-weight.js",
"old_path": "lighthouse-core/audits/byte-efficiency/total-byte-weight.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -61,11 +61,10 @@ class MainThreadWorkBreakdown extends Audit {\n* @param {LH.Audit.Context} context\n* @return {Promise<LH.Audit.Product>}\n*/\n- static audit(artifacts, context) {\n+ static async audit(artifacts, context) {\nconst trace = artifacts.traces[MainThreadWorkBreakdown.DEFAULT_PASS];\n- return artifacts.requestDevtoolsTimelineModel(trace)\n- .then(devtoolsTimelineModel => {\n+ const devtoolsTimelineModel = await artifacts.requestDevtoolsTimelineModel(trace);\nconst executionTimings = MainThreadWorkBreakdown.getExecutionTimingsByCategory(\ndevtoolsTimelineModel\n);\n@@ -112,7 +111,6 @@ class MainThreadWorkBreakdown extends Audit {\nvalue: extendedInfo,\n},\n};\n- });\n}\n}\n",
"new_path": "lighthouse-core/audits/mainthread-work-breakdown.js",
"old_path": "lighthouse-core/audits/mainthread-work-breakdown.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -140,19 +140,20 @@ class UsesRelPreloadAudit extends Audit {\n* @param {LH.Audit.Context} context\n* @return {Promise<LH.Audit.Product>}\n*/\n- static audit(artifacts, context) {\n+ static async audit(artifacts, context) {\nconst trace = artifacts.traces[UsesRelPreloadAudit.DEFAULT_PASS];\nconst devtoolsLog = artifacts.devtoolsLogs[UsesRelPreloadAudit.DEFAULT_PASS];\nconst URL = artifacts.URL;\nconst simulatorOptions = {trace, devtoolsLog, settings: context.settings};\n- return Promise.all([\n+ const [critChains, mainResource, graph, simulator] = await Promise.all([\n// TODO(phulce): eliminate dependency on CRC\nartifacts.requestCriticalRequestChains({devtoolsLog, URL}),\nartifacts.requestMainResource({devtoolsLog, URL}),\nartifacts.requestPageDependencyGraph({trace, devtoolsLog}),\nartifacts.requestLoadSimulator(simulatorOptions),\n- ]).then(([critChains, mainResource, graph, simulator]) => {\n+ ]);\n+\n// get all critical requests 2 + mainResourceIndex levels deep\nconst mainResourceIndex = mainResource.redirects ? mainResource.redirects.length : 0;\n@@ -188,7 +189,6 @@ class UsesRelPreloadAudit extends Audit {\n},\ndetails,\n};\n- });\n}\n}\n",
"new_path": "lighthouse-core/audits/uses-rel-preload.js",
"old_path": "lighthouse-core/audits/uses-rel-preload.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -23,7 +23,11 @@ declare global {\nexport type ScoringModeValue = Audit.ScoringModes[keyof Audit.ScoringModes];\n- export type DisplayValue = string | Array<string|number>;\n+ interface DisplayValueArray extends Array<string|number> {\n+ 0: string;\n+ }\n+\n+ export type DisplayValue = string | DisplayValueArray;\nexport interface Meta {\nname: string;\n",
"new_path": "typings/audit.d.ts",
"old_path": "typings/audit.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(displayValue): fancier displayValue type (#5111)
| 1
|
core
|
displayValue
|
730,412
|
03.05.2018 21:34:22
| 0
|
dca7089904b6026edb06fbfda8121af804bad70a
|
chore(release): 0.1.291
|
[
{
"change_type": "MODIFY",
"diff": "All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n+<a name=\"0.1.291\"></a>\n+## [0.1.291](https://github.com/webex/react-ciscospark/compare/v0.1.290...v0.1.291) (2018-05-03)\n+\n+\n+\n<a name=\"0.1.290\"></a>\n## [0.1.290](https://github.com/webex/react-ciscospark/compare/v0.1.289...v0.1.290) (2018-05-02)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.290\",\n+ \"version\": \"0.1.291\",\n\"description\": \"The Cisco Spark for React library allows developers to easily incorporate Spark functionality into an application.\",\n\"scripts\": {\n\"build\": \"./scripts/build/index.js\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(release): 0.1.291
| 1
|
chore
|
release
|
730,412
|
03.05.2018 23:06:12
| 0
|
c2aa5ade0caa439ec2cd27ace1a39e326537524d
|
chore(release): 0.1.292
|
[
{
"change_type": "MODIFY",
"diff": "All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n+<a name=\"0.1.292\"></a>\n+## [0.1.292](https://github.com/webex/react-ciscospark/compare/v0.1.291...v0.1.292) (2018-05-03)\n+\n+\n+\n<a name=\"0.1.291\"></a>\n## [0.1.291](https://github.com/webex/react-ciscospark/compare/v0.1.290...v0.1.291) (2018-05-03)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.291\",\n+ \"version\": \"0.1.292\",\n\"description\": \"The Cisco Spark for React library allows developers to easily incorporate Spark functionality into an application.\",\n\"scripts\": {\n\"build\": \"./scripts/build/index.js\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(release): 0.1.292
| 1
|
chore
|
release
|
217,922
|
03.05.2018 23:08:22
| -7,200
|
0288b2b6fd8900242582652ee3cebf0445b35f40
|
chore(simulator): fixed a bug with CP costs
|
[
{
"change_type": "MODIFY",
"diff": "[ngClass]=\"{'wasted': wasted, 'disabled': disabled || notEnoughCp, 'not-enough-cp': notEnoughCp}\">\n<img src=\"{{action.getId(getJobId()) | actionIcon}}\" alt=\"\">\n<span class=\"cost\"\n- *ngIf=\"!hideCost && action.getBaseCPCost(simulation) > 0 && cpCost > 0\">\n+ *ngIf=\"!hideCost && action.getBaseCPCost(simulation) > 0 && (cpCost === undefined || cpCost > 0)\">\n{{cpCost === undefined ? action.getBaseCPCost(simulation) : cpCost}}\n</span>\n</div>\n",
"new_path": "src/app/pages/simulator/components/action/action.component.html",
"old_path": "src/app/pages/simulator/components/action/action.component.html"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): fixed a bug with CP costs
| 1
|
chore
|
simulator
|
807,884
|
04.05.2018 02:16:51
| -36,000
|
9cebed17c8214af2150a824499a8c343615ccc36
|
fix(publish): Include all packages during global major bump
Fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -52,6 +52,104 @@ packages/package-5/CHANGELOG.md\npackages/package-5/package.json\"\n`;\n+exports[`PublishCommand fixed mode major bump should bump all packages: commit 1`] = `\n+\"v2.0.0\n+\n+HEAD -> master, tag: v2.0.0\n+\n+diff --git a/lerna.json b/lerna.json\n+index SHA..SHA 100644\n+--- a/lerna.json\n++++ b/lerna.json\n+@@ -2 +2 @@\n+- \\\\\"version\\\\\": \\\\\"1.0.0\\\\\"\n++ \\\\\"version\\\\\": \\\\\"2.0.0\\\\\"\n+diff --git a/packages/package-1/package.json b/packages/package-1/package.json\n+index SHA..SHA 100644\n+--- a/packages/package-1/package.json\n++++ b/packages/package-1/package.json\n+@@ -3 +3 @@\n+- \\\\\"version\\\\\": \\\\\"1.0.0\\\\\"\n++ \\\\\"version\\\\\": \\\\\"2.0.0\\\\\"\n+diff --git a/packages/package-2/package.json b/packages/package-2/package.json\n+index SHA..SHA 100644\n+--- a/packages/package-2/package.json\n++++ b/packages/package-2/package.json\n+@@ -3 +3 @@\n+- \\\\\"version\\\\\": \\\\\"1.0.0\\\\\",\n++ \\\\\"version\\\\\": \\\\\"2.0.0\\\\\",\n+@@ -5 +5 @@\n+- \\\\\"package-1\\\\\": \\\\\"^1.0.0\\\\\"\n++ \\\\\"package-1\\\\\": \\\\\"^2.0.0\\\\\"\n+diff --git a/packages/package-3/package.json b/packages/package-3/package.json\n+index SHA..SHA 100644\n+--- a/packages/package-3/package.json\n++++ b/packages/package-3/package.json\n+@@ -3 +3 @@\n+- \\\\\"version\\\\\": \\\\\"1.0.0\\\\\",\n++ \\\\\"version\\\\\": \\\\\"2.0.0\\\\\",\n+@@ -8 +8 @@\n+- \\\\\"package-2\\\\\": \\\\\"^1.0.0\\\\\"\n++ \\\\\"package-2\\\\\": \\\\\"^2.0.0\\\\\"\n+diff --git a/packages/package-4/package.json b/packages/package-4/package.json\n+index SHA..SHA 100644\n+--- a/packages/package-4/package.json\n++++ b/packages/package-4/package.json\n+@@ -3 +3 @@\n+- \\\\\"version\\\\\": \\\\\"1.0.0\\\\\",\n++ \\\\\"version\\\\\": \\\\\"2.0.0\\\\\",\n+diff --git a/packages/package-5/package.json b/packages/package-5/package.json\n+index SHA..SHA 100644\n+--- a/packages/package-5/package.json\n++++ b/packages/package-5/package.json\n+@@ -4 +4 @@\n+- \\\\\"package-1\\\\\": \\\\\"^1.0.0\\\\\"\n++ \\\\\"package-1\\\\\": \\\\\"^2.0.0\\\\\"\n+@@ -7 +7 @@\n+- \\\\\"package-3\\\\\": \\\\\"^1.0.0\\\\\"\n++ \\\\\"package-3\\\\\": \\\\\"^2.0.0\\\\\"\n+@@ -10 +10 @@\n+- \\\\\"version\\\\\": \\\\\"1.0.0\\\\\"\n++ \\\\\"version\\\\\": \\\\\"2.0.0\\\\\"\"\n+`;\n+\n+exports[`PublishCommand fixed mode major bump should bump all packages: updated packages 1`] = `\n+Object {\n+ \"package-1\": \"2.0.0\",\n+ \"package-2\": \"2.0.0\",\n+ \"package-3\": \"2.0.0\",\n+ \"package-4\": \"2.0.0\",\n+ \"package-5\": \"2.0.0\",\n+}\n+`;\n+\n+exports[`PublishCommand fixed mode minor bump should only bump changed: commit 1`] = `\n+\"v1.0.1\n+\n+HEAD -> master, tag: v1.0.1\n+\n+diff --git a/lerna.json b/lerna.json\n+index SHA..SHA 100644\n+--- a/lerna.json\n++++ b/lerna.json\n+@@ -2 +2 @@\n+- \\\\\"version\\\\\": \\\\\"1.0.0\\\\\"\n++ \\\\\"version\\\\\": \\\\\"1.0.1\\\\\"\n+diff --git a/packages/package-1/package.json b/packages/package-1/package.json\n+index SHA..SHA 100644\n+--- a/packages/package-1/package.json\n++++ b/packages/package-1/package.json\n+@@ -3 +3 @@\n+- \\\\\"version\\\\\": \\\\\"1.0.0\\\\\"\n++ \\\\\"version\\\\\": \\\\\"1.0.1\\\\\"\"\n+`;\n+\n+exports[`PublishCommand fixed mode minor bump should only bump changed: updated packages 1`] = `\n+Object {\n+ \"package-1\": \"1.0.1\",\n+}\n+`;\n+\nexports[`PublishCommand indepdendent mode with --cd-version should bump to prerelease versions with --cd-version prerelease (no --preid): commit 1`] = `\n\"Publish\n@@ -1081,6 +1179,7 @@ Object {\n\"package-3\": \"2.0.0\",\n\"package-4\": \"2.0.0\",\n\"package-5\": \"2.0.0\",\n+ \"package-6\": \"2.0.0\",\n\"package-7\": \"2.0.0\",\n}\n`;\n",
"new_path": "commands/publish/__tests__/__snapshots__/publish-command.test.js.snap",
"old_path": "commands/publish/__tests__/__snapshots__/publish-command.test.js.snap"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,6 +6,7 @@ jest.mock(\"@lerna/conventional-commits\");\njest.mock(\"@lerna/npm-dist-tag\");\njest.mock(\"@lerna/npm-publish\");\njest.mock(\"@lerna/run-lifecycle\");\n+jest.mock(\"@lerna/collect-updates\");\njest.mock(\"../lib/git-push\");\njest.mock(\"../lib/is-behind-upstream\");\n@@ -17,10 +18,12 @@ const semver = require(\"semver\");\n// mocked or stubbed modules\nconst writePkg = require(\"write-pkg\");\nconst ConventionalCommitUtilities = require(\"@lerna/conventional-commits\");\n+const Package = require(\"@lerna/package\");\nconst PromptUtilities = require(\"@lerna/prompt\");\nconst npmDistTag = require(\"@lerna/npm-dist-tag\");\nconst npmPublish = require(\"@lerna/npm-publish\");\nconst runLifecycle = require(\"@lerna/run-lifecycle\");\n+const collectUpdates = require(\"@lerna/collect-updates\");\nconst gitPush = require(\"../lib/git-push\");\nconst isBehindUpstream = require(\"../lib/is-behind-upstream\");\n@@ -37,6 +40,7 @@ const showCommit = require(\"@lerna-test/show-commit\");\n// file under test\nconst lernaPublish = require(\"@lerna-test/command-runner\")(require(\"../command\"));\n+const collectUpdatesActual = require.requireActual(\"@lerna/collect-updates\");\n// assertion helpers\nconst gitCommitMessage = cwd =>\nexeca(\"git\", [\"show\", \"--no-patch\", \"--pretty=%B\"], { cwd }).then(result => result.stdout.trim());\n@@ -70,6 +74,7 @@ describe(\"PublishCommand\", () => {\n// we've already tested these utilities elsewhere\nnpmPublish.mockResolvedValue();\nrunLifecycle.mockImplementation(() => Promise.resolve());\n+ collectUpdates.mockImplementation(collectUpdatesActual);\nnpmDistTag.check.mockReturnValue(true);\nPromptUtilities.select.mockResolvedValue(\"1.0.1\");\n@@ -115,6 +120,49 @@ describe(\"PublishCommand\", () => {\n});\n});\n+ /** =========================================================================\n+ * FIXED\n+ * ======================================================================= */\n+\n+ describe(\"fixed mode\", () => {\n+ it(\"minor bump should only bump changed\", async () => {\n+ const testDir = await initFixture(\"normal\");\n+ const package1 = new Package(\n+ {\n+ name: \"package-1\",\n+ version: \"1.0.0\",\n+ },\n+ `${testDir}/packages/package-1`\n+ );\n+ collectUpdates.mockImplementationOnce(() => [{ pkg: package1, localDependencies: [] }]);\n+\n+ await lernaPublish(testDir)();\n+\n+ const patch = await showCommit(testDir);\n+ expect(patch).toMatchSnapshot(\"commit\");\n+ expect(updatedPackageVersions(testDir)).toMatchSnapshot(\"updated packages\");\n+ });\n+\n+ it(\"major bump should bump all packages\", async () => {\n+ const testDir = await initFixture(\"normal\");\n+ PromptUtilities.select.mockResolvedValueOnce(\"2.0.0\");\n+ const package1 = new Package(\n+ {\n+ name: \"package-1\",\n+ version: \"1.0.0\",\n+ },\n+ `${testDir}/packages/package-1`\n+ );\n+ collectUpdates.mockImplementationOnce(() => [{ pkg: package1, localDependencies: [] }]);\n+\n+ await lernaPublish(testDir)();\n+\n+ const patch = await showCommit(testDir);\n+ expect(patch).toMatchSnapshot(\"commit\");\n+ expect(updatedPackageVersions(testDir)).toMatchSnapshot(\"updated packages\");\n+ });\n+ });\n+\n/** =========================================================================\n* INDEPENDENT\n* ======================================================================= */\n@@ -1122,7 +1170,7 @@ describe(\"PublishCommand\", () => {\nexpect(updatedPackageJSON(\"package-5\").dependencies).toMatchObject({\n\"package-4\": \"^2.0.0\",\n// FIXME: awkward... (_intentional_, for now)\n- \"package-6\": \"^1.0.0\",\n+ \"package-6\": \"^2.0.0\",\n});\n// private packages do not need local version resolution\nexpect(updatedPackageJSON(\"package-7\").dependencies).toMatchObject({\n",
"new_path": "commands/publish/__tests__/publish-command.test.js",
"old_path": "commands/publish/__tests__/publish-command.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -40,6 +40,22 @@ function factory(argv) {\nreturn new PublishCommand(argv);\n}\n+function isBreakingChange(currentVersion, nextVersion) {\n+ const releaseType = semver.diff(currentVersion, nextVersion);\n+ switch (releaseType) { //eslint-disable-line\n+ case \"major\":\n+ return true;\n+ case \"minor\":\n+ return semver.lt(currentVersion, \"1.0.0\");\n+ case \"patch\":\n+ return semver.lt(currentVersion, \"0.1.0\");\n+ case \"premajor\":\n+ case \"preminor\":\n+ case \"prepatch\":\n+ case \"prerelease\":\n+ return false;\n+ }\n+}\nclass PublishCommand extends Command {\nget defaultOptions() {\nreturn Object.assign({}, super.defaultOptions, {\n@@ -147,7 +163,33 @@ class PublishCommand extends Command {\nconst tasks = [\n() => this.getVersionsForUpdates(),\nversions => {\n+ if (\n+ this.project.isIndependent() ||\n+ versions.size === this.filteredPackages.size ||\n+ this.options.canary\n+ ) {\n+ // independent, force-publish=*, or canary, we don't bump all\nthis.updatesVersions = versions;\n+ } else {\n+ let hasBreakingChange;\n+ for (const [name, bump] of versions) {\n+ hasBreakingChange =\n+ hasBreakingChange || isBreakingChange(this.packageGraph.get(name).version, bump);\n+ }\n+ if (hasBreakingChange) {\n+ const packages =\n+ this.filteredPackages.length === this.packageGraph.size\n+ ? this.packageGraph\n+ : new Map(this.filteredPackages.map(({ name }) => [name, this.packageGraph.get(name)]));\n+ this.updates = Array.from(packages.values());\n+ this.updatesVersions = new Map();\n+ this.updates.forEach(pkg => {\n+ this.updatesVersions.set(pkg.name, this.globalVersion);\n+ });\n+ } else {\n+ this.updatesVersions = versions;\n+ }\n+ }\n},\n() => this.confirmVersions(),\n];\n",
"new_path": "commands/publish/index.js",
"old_path": "commands/publish/index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -307,6 +307,13 @@ index SHA..SHA 100644\n- \"version\": \"1.0.0\",\n+ \"version\": \"2.0.0\",\n+diff --git a/packages/package-6/package.json b/packages/package-6/package.json\n+index SHA..SHA 100644\n+--- a/packages/package-6/package.json\n++++ b/packages/package-6/package.json\n+@@ -3 +3 @@\n+- \"version\": \"1.0.0\",\n++ \"version\": \"2.0.0\",\ndiff --git a/packages/package-7/package.json b/packages/package-7/package.json\nindex SHA..SHA 100644\n--- a/packages/package-7/package.json\n",
"new_path": "integration/__snapshots__/lerna-publish.test.js.snap",
"old_path": "integration/__snapshots__/lerna-publish.test.js.snap"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
fix(publish): Include all packages during global major bump (#1391)
Fixes #1383
| 1
|
fix
|
publish
|
807,884
|
04.05.2018 02:17:54
| -36,000
|
2bcdd3536476259a14a6670b5db873de26a5db7a
|
fix(collect-updates): Remove redundant short-circuit
|
[
{
"change_type": "MODIFY",
"diff": "@@ -65,12 +65,6 @@ function collectUpdates({\nconst dependents = collectDependents(candidates);\ndependents.forEach(node => candidates.add(node));\n- if (canary || packages.size === candidates.size) {\n- logger.verbose(\"updated\", \"(short-circuit)\");\n-\n- return Array.from(candidates);\n- }\n-\nconst updates = [];\npackages.forEach((node, name) => {\n",
"new_path": "utils/collect-updates/collect-updates.js",
"old_path": "utils/collect-updates/collect-updates.js"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
fix(collect-updates): Remove redundant short-circuit (#1406)
| 1
|
fix
|
collect-updates
|
679,913
|
04.05.2018 02:27:56
| -3,600
|
23b645172f8bddd0e6b1eab4801ee6d83e033ae0
|
refactor(dot): replace NodeShape enum, minor other refactoring, add example
|
[
{
"change_type": "MODIFY",
"diff": "digraph g {\nrankdir=\"LR\";\n-dpi=192;\nfontname=\"Inconsolata\";\nfontsize=\"9\";\nfontcolor=\"gray\";\n@@ -11,7 +10,7 @@ node[style=\"filled\", fontname=\"Inconsolata\", fontsize=\"11\"];\nedge[arrowsize=\"0.75\", fontname=\"Inconsolata\", fontsize=\"9\"];\n\"x\"[color=\"black\", fontcolor=\"white\", label=\"x (12)\"];\n\"y\"[color=\"black\", fontcolor=\"white\", label=\"y (23)\"];\n-\"res\"[color=\"black\", fontcolor=\"white\", label=\"res (805)\", peripheries=\"2\"];\n+\"res\"[color=\"black\", fontcolor=\"white\", label=\"res (8050)\", peripheries=\"2\"];\n\"op1\"[fillcolor=\"green\", shape=\"Mrecord\", label=\"{ <0> a | <1> b } | op1\\n(+) | { <out> out }\"];\n\"op2\"[fillcolor=\"yellow\", shape=\"Mrecord\", label=\"{ <0> a | <1> b } | op2\\n(*) | { <out> out }\"];\n\"x\" -> \"op1\":\"1\";\n",
"new_path": "assets/dot-example.dot",
"old_path": "assets/dot-example.dot"
},
{
"change_type": "MODIFY",
"diff": "Binary files a/assets/dot-example.png and b/assets/dot-example.png differ\n",
"new_path": "assets/dot-example.png",
"old_path": "assets/dot-example.png"
},
{
"change_type": "MODIFY",
"diff": "@@ -8,10 +8,10 @@ This project is part of the\n## About\n[Graphviz](http://www.graphviz.org/) DOM abstraction as vanilla JS\n-objects & serialization to DOT format. Provides several [interfaces and\n-enums](https://github.com/thi-ng/umbrella/tree/master/packages/dot/src/api.ts)\n+objects & serialization to DOT format. Provides several\n+[interfaces](https://github.com/thi-ng/umbrella/tree/master/packages/dot/src/api.ts)\ncovering a large subset of GraphViz options and\n-[functions]((https://github.com/thi-ng/umbrella/tree/master/packages/dot/src/serialize.ts)\n+[functions](https://github.com/thi-ng/umbrella/tree/master/packages/dot/src/serialize.ts)\nto serialize whole graphs (incl. subgraphs), nodes or edges. Supports\nboth directed and undirected graphs.\n@@ -29,6 +29,9 @@ yarn add @thi.ng/dot\n\n+The source code of this example is also available in\n+[/test/example.ts](https://github.com/thi-ng/umbrella/tree/master/packages/dot/test/example.ts).\n+\n```typescript\nimport * as dot from \"@thi.ng/dot\";\n@@ -42,7 +45,7 @@ const terminal = {\n// with input and output port declarations\nconst operator = {\nfillcolor: \"yellow\",\n- shape: dot.NodeShape.M_RECORD,\n+ shape: \"Mrecord\",\nins: { 0: \"a\", 1: \"b\" },\nouts: { \"out\": \"out\" }\n};\n@@ -72,10 +75,11 @@ dot.serializeGraph({\n}\n},\n// graph nodes (the keys are used as node IDs)\n+ // use spread operator to inject style presets\nnodes: {\nx: { ...terminal, label: \"x (12)\" },\ny: { ...terminal, label: \"y (23)\" },\n- res: { ...terminal, label: \"res (8050)\", peripheries: 2 },\n+ res: { ...terminal, label: \"result (8050)\", peripheries: 2 },\nop1: { ...operator, fillcolor: \"green\", label: \"op1\\n(+)\" },\nop2: { ...operator, label: \"op2\\n(*)\" },\n},\n",
"new_path": "packages/dot/README.md",
"old_path": "packages/dot/README.md"
},
{
"change_type": "MODIFY",
"diff": "import { IObjectOf } from \"@thi.ng/api/api\";\n-export enum NodeShape {\n- BOX,\n- CIRCLE,\n- DIAMOND,\n- DOUBLE_CIRCLE,\n- DOUBLE_OCTAGON,\n- EGG,\n- ELLIPSE,\n- HEXAGON,\n- HOUSE,\n- INV_HOUSE,\n- INV_TRAPEZIUM,\n- INV_TRIANGLE,\n- M_CIRCLE,\n- M_DIAMOND,\n- M_RECORD,\n- M_SQUARE,\n- NONE,\n- OCTAGON,\n- PARALLELOGRAM,\n- PLAINTEXT,\n- POINT,\n- POLYGON,\n- RECORD,\n- TRAPEZIUM,\n- TRIANGLE,\n- TRIPLE_OCTAGON,\n-}\n+export type NodeShape =\n+ \"box\" |\n+ \"circle\" |\n+ \"diamond\" |\n+ \"doublecircle\" |\n+ \"doubleoctagon\" |\n+ \"egg\" |\n+ \"ellipse\" |\n+ \"hexagon\" |\n+ \"house\" |\n+ \"invhouse\" |\n+ \"invtrapezium\" |\n+ \"invtriangle\" |\n+ \"Mcircle\" |\n+ \"Mdiamond\" |\n+ \"Mrecord\" |\n+ \"Msquare\" |\n+ \"none\" |\n+ \"octagon\" |\n+ \"parallelogram\" |\n+ \"plaintext\" |\n+ \"point\" |\n+ \"polygon\" |\n+ \"record\" |\n+ \"trapezium\" |\n+ \"triangle\" |\n+ \"triple_octagon\";\nexport type Color = string | number[];\n@@ -102,8 +101,8 @@ export interface EdgeAttribs {\n}\nexport interface Edge extends Partial<EdgeAttribs> {\n- src: string;\n- dest: string;\n- srcPort?: string;\n- destPort?: string;\n+ src: PropertyKey;\n+ dest: PropertyKey;\n+ srcPort?: PropertyKey;\n+ destPort?: PropertyKey;\n}\n",
"new_path": "packages/dot/src/api.ts",
"old_path": "packages/dot/src/api.ts"
},
{
"change_type": "MODIFY",
"diff": "import { IObjectOf } from \"@thi.ng/api/api\";\nimport { isArray } from \"@thi.ng/checks/is-array\";\n-import { Graph, NodeShape, Node, Edge, GraphAttribs } from \"./api\";\n-\n-const shapeIDs: IObjectOf<string> = {\n- [NodeShape.DOUBLE_CIRCLE]: \"doublecircle\",\n- [NodeShape.DOUBLE_OCTAGON]: \"doubleoctagon\",\n- [NodeShape.INV_HOUSE]: \"invhouse\",\n- [NodeShape.INV_TRAPEZIUM]: \"invtrapezium\",\n- [NodeShape.INV_TRIANGLE]: \"invtriangle\",\n- [NodeShape.M_CIRCLE]: \"Mcircle\",\n- [NodeShape.M_DIAMOND]: \"Mdiamond\",\n- [NodeShape.M_RECORD]: \"Mrecord\",\n- [NodeShape.M_SQUARE]: \"Msquare\",\n- [NodeShape.TRIPLE_OCTAGON]: \"tripleoctagon\",\n-};\n+import {\n+ Edge,\n+ Graph,\n+ GraphAttribs,\n+ Node\n+} from \"./api\";\nconst wrapQ = (x) => `\"${x}\"`;\n@@ -22,7 +14,7 @@ const escape = (x: any) =>\nString(x).replace(/\\\"/g, `\\\\\"`)\n.replace(/\\n/g, \"\\\\n\");\n-export const formatGraphAttribs = (attribs: Partial<GraphAttribs>, acc: string[]) => {\n+const formatGraphAttribs = (attribs: Partial<GraphAttribs>, acc: string[]) => {\nfor (let a in attribs) {\nlet v = attribs[a];\nswitch (a) {\n@@ -46,7 +38,7 @@ export const formatGraphAttribs = (attribs: Partial<GraphAttribs>, acc: string[]\nreturn acc;\n};\n-export const formatAttribs = (attribs: Partial<Node | Edge>) => {\n+const formatAttribs = (attribs: Partial<Node | Edge>) => {\nconst acc: string[] = [];\nfor (let a in attribs) {\nlet v = attribs[a];\n@@ -64,9 +56,6 @@ export const formatAttribs = (attribs: Partial<Node | Edge>) => {\ncase \"url\":\na = \"URL\";\nbreak;\n- case \"shape\":\n- v = shapeIDs[v] || NodeShape[v].toLowerCase();\n- break;\ncase \"ins\":\ncase \"outs\":\ncase \"src\":\n@@ -89,7 +78,7 @@ const formatPorts = (ports: IObjectOf<string>) => {\nreturn `{ ${acc.join(\" | \")} }`;\n};\n-export const formatPortLabel = (node: Partial<Node>, label: string) => {\n+const formatPortLabel = (node: Partial<Node>, label: string) => {\nconst acc: string[] = [];\nnode.ins && acc.push(formatPorts(node.ins));\nacc.push(escape(label));\n",
"new_path": "packages/dot/src/serialize.ts",
"old_path": "packages/dot/src/serialize.ts"
},
{
"change_type": "ADD",
"diff": "+import * as dot from \"../src/\";\n+import * as fs from \"fs\";\n+\n+// node type style presets\n+const terminal: Partial<dot.Node> = {\n+ color: \"black\",\n+ fontcolor: \"white\",\n+};\n+\n+// operator nodes use \"Mrecord\" shape\n+// with input and output port declarations\n+const operator: Partial<dot.Node> = {\n+ fillcolor: \"yellow\",\n+ shape: \"Mrecord\",\n+ ins: { 0: \"a\", 1: \"b\" },\n+ outs: { \"out\": \"out\" }\n+};\n+\n+fs.writeFileSync(\n+ \"../../assets/dot-example.dot\",\n+ dot.serializeGraph({\n+ directed: true, // default\n+ // graph attributes\n+ attribs: {\n+ rankdir: \"LR\",\n+ fontname: \"Inconsolata\",\n+ fontsize: 9,\n+ fontcolor: \"gray\",\n+ label: \"Generated with @thi.ng/dot\",\n+ labeljust: \"l\",\n+ labelloc: \"b\",\n+ // node defaults\n+ node: {\n+ style: \"filled\",\n+ fontname: \"Inconsolata\",\n+ fontsize: 11\n+ },\n+ // edge defaults\n+ edge: {\n+ arrowsize: 0.75,\n+ fontname: \"Inconsolata\",\n+ fontsize: 9\n+ }\n+ },\n+ // graph nodes (the keys are used as node IDs)\n+ // use spread operator to inject style presets\n+ nodes: {\n+ x: { ...terminal, label: \"x (12)\" },\n+ y: { ...terminal, label: \"y (23)\" },\n+ res: { ...terminal, label: \"res (8050)\", peripheries: 2 },\n+ op1: { ...operator, fillcolor: \"green\", label: \"op1\\n(+)\" },\n+ op2: { ...operator, label: \"op2\\n(*)\" },\n+ },\n+ // graph edges (w/ optional ports & extra attribs)\n+ edges: [\n+ { src: \"x\", dest: \"op1\", destPort: 1 },\n+ { src: \"y\", dest: \"op1\", destPort: 0 },\n+ { src: \"y\", dest: \"op2\", destPort: 0, label: \"xform\", color: \"blue\" },\n+ { src: \"op1\", srcPort: \"out\", dest: \"op2\", destPort: 1 },\n+ { src: \"op2\", srcPort: \"out\", dest: \"res\" },\n+ ]\n+ })\n+);\n\\ No newline at end of file\n",
"new_path": "packages/dot/test/example.ts",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(dot): replace NodeShape enum, minor other refactoring, add example
| 1
|
refactor
|
dot
|
724,111
|
04.05.2018 04:29:12
| -28,800
|
79854cb81601dc22a652cf49b63bab44e05e3ae9
|
docs: updated f3d4086...b555477
|
[
{
"change_type": "MODIFY",
"diff": "- [`context`](#context)\n- [`slots`](#slots)\n-- [scopedSlots](#scopedslots)\n+- [`scopedSlots`](#scopedslots)\n- [`stubs`](#stubs)\n- [`mocks`](#mocks)\n- [`localVue`](#localvue)\n",
"new_path": "docs/zh-cn/api/options.md",
"old_path": "docs/zh-cn/api/options.md"
}
] |
JavaScript
|
MIT License
|
vuejs/vue-test-utils
|
docs: updated f3d4086...b555477 (#575)
| 1
|
docs
| null |
730,413
|
04.05.2018 09:51:24
| 14,400
|
c522f028aa78eb0a51ddcb37b286fed83c07bd12
|
fix(react-container-notifications): undefined browser notification for space widget messages
|
[
{
"change_type": "MODIFY",
"diff": "-export const NOTIFICATION_TYPE_POST = 'NOTIFICATION_TYPE_POST';\n-export const NOTIFICATION_TYPE_OTHER = 'NOTIFICATION_TYPE_OTHER';\nexport const ADD_NOTIFICATION = 'notifications/ADD_NOTIFICATION';\nexport const DELETE_NOTIFICATION = 'notifications/DELETE_NOTIFICATION';\nexport const UPDATE_NOTIFICATION_SETTING = 'notifications/UPDATE_NOTIFICATION_SETTING';\n@@ -36,15 +34,14 @@ function updateNotificationSetting(setting) {\n* Creates a new notification for processing\n*\n* @param {string} notificationId\n- * @param {string} type\n* @param {object} details\n* @param {string} details.message\n* @param {string} details.avatar\n* @param {string} details.username\n* @returns {function}\n*/\n-export function createNotification(notificationId, type, details) {\n- return (dispatch) => dispatch(addNotification({notificationId, type, details}));\n+export function createNotification(notificationId, details) {\n+ return (dispatch) => dispatch(addNotification({notificationId, details}));\n}\n/**\n",
"new_path": "packages/node_modules/@ciscospark/react-container-notifications/src/actions.js",
"old_path": "packages/node_modules/@ciscospark/react-container-notifications/src/actions.js"
},
{
"change_type": "MODIFY",
"diff": "import {createSelector} from 'reselect';\n-import {NOTIFICATION_TYPE_OTHER, NOTIFICATION_TYPE_POST} from './actions';\n-\n-const getActivities = (state) => state.activities.byId;\nconst getNotifications = (state) => state.notifications.get('items');\nconst getNotificationSettings = (state) => state.notifications.get('settings');\n-const getAvatars = (state) => state.avatar.get('items').toJS();\n-\n-function findActivityWithUrl(activities, url) {\n- if (activities) {\n- return activities.find((activity) => activity.url === url);\n- }\n- return {};\n-}\nconst getUnsentNotifications = createSelector(\n- [getActivities, getNotifications, getAvatars],\n- (activities, notifications, avatars) =>\n+ [getNotifications],\n+ (notifications) =>\nnotifications\n.map((notification) => {\n- if (notification.type === NOTIFICATION_TYPE_POST) {\n- const notificationActivity = findActivityWithUrl(activities, notification.notificationId);\n- if (notificationActivity) {\n- return Object.assign({}, notification, {\n- username: notificationActivity.actor.displayName,\n- message: notificationActivity.object.displayName,\n- avatar: avatars[notificationActivity.actor.id]\n- });\n- }\n- }\n- if (notification.type === NOTIFICATION_TYPE_OTHER) {\nconst {username, message, avatar} = notification.details;\nreturn Object.assign({}, notification, {\nusername,\nmessage,\navatar\n});\n- }\n- return notification;\n})\n);\n",
"new_path": "packages/node_modules/@ciscospark/react-container-notifications/src/selectors.js",
"old_path": "packages/node_modules/@ciscospark/react-container-notifications/src/selectors.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -10,10 +10,7 @@ import {\nconstructCallObject,\nCallRecord\n} from '@ciscospark/redux-module-media';\n-import {\n- NOTIFICATION_TYPE_OTHER,\n- createNotification\n-} from '@ciscospark/react-container-notifications';\n+import {createNotification} from '@ciscospark/react-container-notifications';\nimport {addError, removeError} from '@ciscospark/redux-module-errors';\nimport {constructHydraId, hydraTypes} from '@ciscospark/react-component-utils';\n@@ -135,7 +132,7 @@ function handleCallNotification(props) {\nmessage: formatMessage(messages.incomingCallMessage),\navatar: avatarImage\n};\n- props.createNotification(incomingCall.id, NOTIFICATION_TYPE_OTHER, details);\n+ props.createNotification(incomingCall.id, details);\n};\n}\n",
"new_path": "packages/node_modules/@ciscospark/widget-meet/src/enhancers/withCallHandlers.js",
"old_path": "packages/node_modules/@ciscospark/widget-meet/src/enhancers/withCallHandlers.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -55,10 +55,7 @@ import ErrorDisplay from '@ciscospark/react-component-error-display';\nimport wrapConversationMercury from '@ciscospark/react-hoc-conversation-mercury';\n-import Notifications, {\n- NOTIFICATION_TYPE_POST,\n- createNotification\n-} from '@ciscospark/react-container-notifications';\n+import Notifications, {createNotification} from '@ciscospark/react-container-notifications';\nimport {\nconfirmDeleteActivity,\n@@ -201,7 +198,13 @@ export class MessageWidget extends Component {\n&& objectType !== 'locusSessionSummary'\n) {\n// Send notification of new message\n- props.createNotification(lastActivityFromThis.url, NOTIFICATION_TYPE_POST);\n+ const avatars = props.avatar.get('items');\n+ const details = {\n+ username: lastActivityFromThis.actor.displayName,\n+ message: lastActivityFromThis.object.displayName,\n+ avatar: avatars.get(lastActivityFromThis.actor.id)\n+ };\n+ props.createNotification(lastActivityFromThis.id, details);\n}\nthis.updateScroll(firstActivity, previousFirstActivity, prevProps.widgetMessage.get('scrollPosition').scrollTop);\n",
"new_path": "packages/node_modules/@ciscospark/widget-message/src/container.js",
"old_path": "packages/node_modules/@ciscospark/widget-message/src/container.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
fix(react-container-notifications): undefined browser notification for space widget messages
| 1
|
fix
|
react-container-notifications
|
791,723
|
04.05.2018 11:14:00
| 25,200
|
af87207cefe59c8a337ef3bdd817d287f0bbd58c
|
report: new audit list display, indexes & new icons
|
[
{
"change_type": "MODIFY",
"diff": "@@ -25,29 +25,33 @@ class CategoryRenderer {\n/**\n* @param {!ReportRenderer.AuditJSON} audit\n+ * @param {number} index\n* @return {!Element}\n*/\n- renderAudit(audit) {\n+ renderAudit(audit, index) {\nconst tmpl = this.dom.cloneTemplate('#tmpl-lh-audit', this.templateContext);\nconst auditEl = this.dom.find('.lh-audit', tmpl);\nauditEl.id = audit.result.name;\nconst scoreDisplayMode = audit.result.scoreDisplayMode;\n- let title = audit.result.description;\n+\nif (audit.result.displayValue) {\n- title += `: ${Util.formatDisplayValue(audit.result.displayValue)}`;\n+ const displayValue = Util.formatDisplayValue(audit.result.displayValue);\n+ this.dom.find('.lh-audit__display-text', auditEl).textContent = displayValue;\n}\nthis.dom.find('.lh-audit__title', auditEl).appendChild(\n- this.dom.convertMarkdownCodeSnippets(title));\n+ this.dom.convertMarkdownCodeSnippets(audit.result.description));\nthis.dom.find('.lh-audit__description', auditEl)\n.appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.helpText));\n// Append audit details to header section so the entire audit is within a <details>.\n- const header = /** @type {!HTMLDetailsElement} */ (this.dom.find('.lh-audit__header', auditEl));\n+ const header = /** @type {!HTMLDetailsElement} */ (this.dom.find('details', auditEl));\nif (audit.result.details && audit.result.details.type) {\nheader.appendChild(this.detailsRenderer.render(audit.result.details));\n}\n+ this.dom.find('.lh-audit__index', auditEl).textContent = `${index + 1}`;\n+\nif (audit.result.informative) {\nauditEl.classList.add('lh-audit--informative');\n}\n@@ -55,14 +59,14 @@ class CategoryRenderer {\nauditEl.classList.add('lh-audit--manual');\n}\n- this._populateScore(auditEl, audit.result.score, scoreDisplayMode, audit.result.error);\n+ this._setRatingClass(auditEl, audit.result.score, scoreDisplayMode, audit.result.error);\nif (audit.result.error) {\nauditEl.classList.add(`lh-audit--error`);\n- const valueEl = this.dom.find('.lh-score__value', auditEl);\n- valueEl.textContent = 'Error';\n- valueEl.classList.add('tooltip-boundary');\n- const tooltip = this.dom.createChildOf(valueEl, 'div', 'lh-error-tooltip-content tooltip');\n+ const textEl = this.dom.find('.lh-audit__display-text', auditEl);\n+ textEl.textContent = 'Error!';\n+ textEl.classList.add('tooltip-boundary');\n+ const tooltip = this.dom.createChildOf(textEl, 'div', 'lh-error-tooltip-content tooltip');\ntooltip.textContent = audit.result.debugString || 'Report error: no audit information';\n} else if (audit.result.debugString) {\nconst debugStrEl = auditEl.appendChild(this.dom.createElement('div', 'lh-debug'));\n@@ -72,21 +76,18 @@ class CategoryRenderer {\n}\n/**\n- * @param {!DocumentFragment|!Element} element DOM node to populate with values.\n+ * @param {!Element} element DOM node to populate with values.\n* @param {number} score\n* @param {string} scoreDisplayMode\n* @param {boolean} isError\n* @return {!Element}\n*/\n- _populateScore(element, score, scoreDisplayMode, isError) {\n- const scoreOutOf100 = Math.round(score * 100);\n- const valueEl = this.dom.find('.lh-score__value', element);\n- valueEl.textContent = Util.formatNumber(scoreOutOf100);\n+ _setRatingClass(element, score, scoreDisplayMode, isError) {\n// FIXME(paulirish): this'll have to deal with null scores and scoreDisplayMode stuff..\nconst rating = isError ? 'error' : Util.calculateRating(score);\n- valueEl.classList.add(`lh-score__value--${rating}`, `lh-score__value--${scoreDisplayMode}`);\n-\n- return /** @type {!Element} **/ (element);\n+ element.classList.add(`lh-audit--${rating}`,\n+ `lh-audit--${scoreDisplayMode}`);\n+ return element;\n}\n/**\n@@ -105,34 +106,38 @@ class CategoryRenderer {\nthis.dom.find('.lh-category-header__description', tmpl)\n.appendChild(this.dom.convertMarkdownLinkSnippets(category.description));\n- return this._populateScore(tmpl, category.score, 'numeric', false);\n+ return /** @type {!Element} */ (tmpl.firstElementChild);\n}\n/**\n* Renders the group container for a group of audits. Individual audit elements can be added\n* directly to the returned element.\n* @param {!ReportRenderer.GroupJSON} group\n- * @param {{expandable: boolean}} opts\n+ * @param {{expandable: boolean, itemCount: (number|undefined)}} opts\n* @return {!Element}\n*/\nrenderAuditGroup(group, opts) {\nconst expandable = opts.expandable;\n- const element = this.dom.createElement(expandable ? 'details' : 'div', 'lh-audit-group');\n- const summmaryEl = this.dom.createChildOf(element, 'summary', 'lh-audit-group__summary');\n+ const groupEl = this.dom.createElement(expandable ? 'details' : 'div', 'lh-audit-group');\n+ const summmaryEl = this.dom.createChildOf(groupEl, 'summary', 'lh-audit-group__summary');\nconst headerEl = this.dom.createChildOf(summmaryEl, 'div', 'lh-audit-group__header');\n+ const itemCountEl = this.dom.createChildOf(summmaryEl, 'div', 'lh-audit-group__itemcount');\nthis.dom.createChildOf(summmaryEl, 'div',\n`lh-toggle-arrow ${expandable ? '' : ' lh-toggle-arrow-unexpandable'}`, {\n- title: 'See audits',\n+ title: 'Show audits',\n});\nif (group.description) {\nconst auditGroupDescription = this.dom.createElement('div', 'lh-audit-group__description');\nauditGroupDescription.appendChild(this.dom.convertMarkdownLinkSnippets(group.description));\n- element.appendChild(auditGroupDescription);\n+ groupEl.appendChild(auditGroupDescription);\n}\nheaderEl.textContent = group.title;\n- return element;\n+ if (opts.itemCount) {\n+ itemCountEl.textContent = `${opts.itemCount} audits`;\n+ }\n+ return groupEl;\n}\n/**\n@@ -161,8 +166,8 @@ class CategoryRenderer {\n*/\n_renderFailedAuditsSection(elements) {\nconst failedElem = this.renderAuditGroup({\n- title: `${this._getTotalAuditsLength(elements)} Failed Audits`,\n- }, {expandable: false});\n+ title: `Failed audits`,\n+ }, {expandable: false, itemCount: this._getTotalAuditsLength(elements)});\nfailedElem.classList.add('lh-failed-audits');\nelements.forEach(elem => failedElem.appendChild(elem));\nreturn failedElem;\n@@ -174,8 +179,8 @@ class CategoryRenderer {\n*/\nrenderPassedAuditsSection(elements) {\nconst passedElem = this.renderAuditGroup({\n- title: `${this._getTotalAuditsLength(elements)} Passed Audits`,\n- }, {expandable: true});\n+ title: `Passed audits`,\n+ }, {expandable: true, itemCount: this._getTotalAuditsLength(elements)});\npassedElem.classList.add('lh-passed-audits');\nelements.forEach(elem => passedElem.appendChild(elem));\nreturn passedElem;\n@@ -187,8 +192,8 @@ class CategoryRenderer {\n*/\n_renderNotApplicableAuditsSection(elements) {\nconst notApplicableElem = this.renderAuditGroup({\n- title: `${this._getTotalAuditsLength(elements)} Not Applicable Audits`,\n- }, {expandable: true});\n+ title: `Not applicable`,\n+ }, {expandable: true, itemCount: this._getTotalAuditsLength(elements)});\nnotApplicableElem.classList.add('lh-audit-group--notapplicable');\nelements.forEach(elem => notApplicableElem.appendChild(elem));\nreturn notApplicableElem;\n@@ -197,20 +202,17 @@ class CategoryRenderer {\n/**\n* @param {!Array<!ReportRenderer.AuditJSON>} manualAudits\n* @param {string} manualDescription\n- * @param {!Element} element Parent container to add the manual audits to.\n+ * @return {!Element}\n*/\n- _renderManualAudits(manualAudits, manualDescription, element) {\n- if (!manualAudits.length) return;\n-\n+ _renderManualAudits(manualAudits, manualDescription) {\nconst group = {title: 'Additional items to manually check', description: manualDescription};\n- const auditGroupElem = this.renderAuditGroup(group, {expandable: true});\n+ const auditGroupElem = this.renderAuditGroup(group,\n+ {expandable: true, itemCount: manualAudits.length});\nauditGroupElem.classList.add('lh-audit-group--manual');\n-\n- manualAudits.forEach(audit => {\n- auditGroupElem.appendChild(this.renderAudit(audit));\n+ manualAudits.forEach((audit, i) => {\n+ auditGroupElem.appendChild(this.renderAudit(audit, i));\n});\n-\n- element.appendChild(auditGroupElem);\n+ return auditGroupElem;\n}\n/**\n@@ -291,12 +293,12 @@ class CategoryRenderer {\nconst passedElements = /** @type {!Array<!Element>} */ ([]);\nconst notApplicableElements = /** @type {!Array<!Element>} */ ([]);\n- auditsUngrouped.failed.forEach((/** @type {!ReportRenderer.AuditJSON} */ audit) =>\n- failedElements.push(this.renderAudit(audit)));\n- auditsUngrouped.passed.forEach((/** @type {!ReportRenderer.AuditJSON} */ audit) =>\n- passedElements.push(this.renderAudit(audit)));\n- auditsUngrouped.notApplicable.forEach((/** @type {!ReportRenderer.AuditJSON} */ audit) =>\n- notApplicableElements.push(this.renderAudit(audit)));\n+ auditsUngrouped.failed.forEach((/** @type {!ReportRenderer.AuditJSON} */ audit, i) =>\n+ failedElements.push(this.renderAudit(audit, i)));\n+ auditsUngrouped.passed.forEach((/** @type {!ReportRenderer.AuditJSON} */ audit, i) =>\n+ passedElements.push(this.renderAudit(audit, i)));\n+ auditsUngrouped.notApplicable.forEach((/** @type {!ReportRenderer.AuditJSON} */ audit, i) =>\n+ notApplicableElements.push(this.renderAudit(audit, i)));\nlet hasFailedGroups = false;\n@@ -306,7 +308,7 @@ class CategoryRenderer {\nif (groups.failed.length) {\nconst auditGroupElem = this.renderAuditGroup(group, {expandable: false});\n- groups.failed.forEach(item => auditGroupElem.appendChild(this.renderAudit(item)));\n+ groups.failed.forEach((item, i) => auditGroupElem.appendChild(this.renderAudit(item, i)));\nauditGroupElem.open = true;\nfailedElements.push(auditGroupElem);\n@@ -315,13 +317,14 @@ class CategoryRenderer {\nif (groups.passed.length) {\nconst auditGroupElem = this.renderAuditGroup(group, {expandable: true});\n- groups.passed.forEach(item => auditGroupElem.appendChild(this.renderAudit(item)));\n+ groups.passed.forEach((item, i) => auditGroupElem.appendChild(this.renderAudit(item, i)));\npassedElements.push(auditGroupElem);\n}\nif (groups.notApplicable.length) {\nconst auditGroupElem = this.renderAuditGroup(group, {expandable: true});\n- groups.notApplicable.forEach(item => auditGroupElem.appendChild(this.renderAudit(item)));\n+ groups.notApplicable.forEach((item, i) =>\n+ auditGroupElem.appendChild(this.renderAudit(item, i)));\nnotApplicableElements.push(auditGroupElem);\n}\n});\n@@ -336,6 +339,11 @@ class CategoryRenderer {\n}\n}\n+ if (manualAudits.length) {\n+ const manualEl = this._renderManualAudits(manualAudits, category.manualDescription);\n+ element.appendChild(manualEl);\n+ }\n+\nif (passedElements.length) {\nconst passedElem = this.renderPassedAuditsSection(passedElements);\nelement.appendChild(passedElem);\n@@ -346,9 +354,6 @@ class CategoryRenderer {\nelement.appendChild(notApplicableElem);\n}\n- // Render manual audits after passing.\n- this._renderManualAudits(manualAudits, category.manualDescription, element);\n-\nreturn element;\n}\n",
"new_path": "lighthouse-core/report/html/renderer/category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -42,10 +42,11 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\n/**\n* @param {!ReportRenderer.AuditJSON} audit\n+ * @param {number} index\n* @param {number} scale\n* @return {!Element}\n*/\n- _renderOpportunity(audit, scale) {\n+ _renderOpportunity(audit, index, scale) {\nconst element = this.dom.createElement('details', [\n'lh-load-opportunity',\n`lh-load-opportunity--${Util.calculateRating(audit.result.score)}`,\n@@ -53,6 +54,7 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\n].join(' '));\nelement.id = audit.result.name;\n+ // TODO(paulirish): use a template instead.\nconst summary = this.dom.createChildOf(element, 'summary', 'lh-load-opportunity__summary ' +\n'lh-expandable-details__summary');\nconst titleEl = this.dom.createChildOf(summary, 'div', 'lh-load-opportunity__title');\n@@ -161,17 +163,24 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\nconst maxWaste = Math.max(...opportunityAudits.map(audit => audit.result.rawValue));\nconst scale = Math.ceil(maxWaste / 1000) * 1000;\nconst groupEl = this.renderAuditGroup(groups['load-opportunities'], {expandable: false});\n- opportunityAudits.forEach(item => groupEl.appendChild(this._renderOpportunity(item, scale)));\n+ opportunityAudits.forEach((item, i) =>\n+ groupEl.appendChild(this._renderOpportunity(item, i, scale)));\ngroupEl.open = true;\nelement.appendChild(groupEl);\n}\n// Diagnostics\nconst diagnosticAudits = category.audits\n- .filter(audit => audit.group === 'diagnostics' && audit.result.score < 1);\n+ .filter(audit => audit.group === 'diagnostics' && audit.result.score < 1)\n+ .sort((a, b) => {\n+ const scoreA = a.result.informative ? 100 : a.result.score;\n+ const scoreB = b.result.informative ? 100 : b.result.score;\n+ return scoreA - scoreB;\n+ });\n+\nif (diagnosticAudits.length) {\nconst groupEl = this.renderAuditGroup(groups['diagnostics'], {expandable: false});\n- diagnosticAudits.forEach(item => groupEl.appendChild(this.renderAudit(item)));\n+ diagnosticAudits.forEach((item, i) => groupEl.appendChild(this.renderAudit(item, i)));\ngroupEl.open = true;\nelement.appendChild(groupEl);\n}\n@@ -179,7 +188,7 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\nconst passedElements = category.audits\n.filter(audit => (audit.group === 'load-opportunities' || audit.group === 'diagnostics') &&\naudit.result.score === 1)\n- .map(audit => this.renderAudit(audit));\n+ .map((audit, i) => this.renderAudit(audit, i));\nif (!passedElements.length) return element;\n",
"new_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -106,7 +106,7 @@ class ReportRenderer {\nthis._dom.find('.leftnav-item__category', navItem).textContent = category.name;\nconst score = this._dom.find('.leftnav-item__score', navItem);\n- score.classList.add(`lh-score__value--${Util.calculateRating(category.score)}`);\n+ score.classList.add(`lh-audit--${Util.calculateRating(category.score)}`);\nscore.textContent = Math.round(100 * category.score);\nnav.appendChild(navItem);\n}\n",
"new_path": "lighthouse-core/report/html/renderer/report-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/report-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "--report-border-color: #ccc;\n--report-secondary-border-color: #ebebeb;\n--metric-timeline-rule-color: #b3b3b3;\n+ --display-value-gray: hsl(216, 5%, 39%);\n--report-width: calc(60 * var(--body-font-size));\n--report-menu-width: calc(20 * var(--body-font-size));\n--report-content-width: calc(var(--report-width) + var(--report-menu-width));\n--lh-sparkline-height: 5px;\n--lh-sparkline-thin-height: 3px;\n--lh-filmstrip-thumbnail-width: 60px;\n- --lh-audit-score-width: calc(5 * var(--body-font-size));\n+ --lh-score-icon-width: calc(1.5 * var(--body-font-size));\n--lh-category-score-width: calc(5 * var(--body-font-size));\n--lh-audit-vpadding: 8px;\n+ --lh-audit-index-width: 1.3em;\n--lh-audit-hgap: 12px;\n--lh-audit-group-vpadding: 12px;\n--lh-section-vpadding: 12px;\n- --pass-icon-url: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke=\"hsl(139, 70%, 30%)\" stroke-width=\"1.5\" d=\"M1 5.75l3.5 3.5 6.5-6.5\" fill=\"none\" fill-rule=\"evenodd\"/></svg>');\n- --fail-icon-url: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke=\"hsl(1, 73%, 45%)\" stroke-width=\"1.5\" fill=\"none\" fill-rule=\"evenodd\"><path d=\"M2 10l8-8M10 10L2 2\"/></g></svg>');\n- --collapsed-icon-url: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><g fill=\"none\" fill-rule=\"evenodd\"><path fill=\"none\" d=\"M0 0h12v12H0z\"/><path fill=\"hsl(0, 0%, 60%)\" d=\"M3 2l6 4-6 4z\"/></g></svg>');\n- --expanded-icon-url: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><g fill=\"none\" fill-rule=\"evenodd\"><path fill=\"none\" d=\"M0 0h12v12H0z\"/><path fill=\"hsl(0, 0%, 60%)\" d=\"M10 3L6 9 2 3z\"/></g></svg>');\n+ --pass-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>check</title><path fill=\"hsl(139, 70%, 30%)\" d=\"M24 4C12.95 4 4 12.95 4 24c0 11.04 8.95 20 20 20 11.04 0 20-8.96 20-20 0-11.05-8.96-20-20-20zm-4 30L10 24l2.83-2.83L20 28.34l15.17-15.17L38 16 20 34z\"/></svg>');\n+ --average-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>info</title><path fill=\"hsl(31, 100%, 45%)\" d=\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm2 30h-4V22h4v12zm0-16h-4v-4h4v4z\"/></svg>');\n+ --fail-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>warn</title><path fill=\"hsl(1, 73%, 45%)\" d=\"M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z\"/></svg>');\n+ --chevron-icon-url: url('data:image/svg+xml;utf8,<svg fill=\"hsl(0, 0%, 62%)\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z\"/><path d=\"M0-.25h24v24H0z\" fill=\"none\"/></svg>');\n}\n.lh-vars.lh-devtools {\ndisplay: none !important;\n}\n-a {\n+.lh-audit-group a,\n+.lh-category-header__description a {\ncolor: #0c50c7;\n}\n-summary {\n+.lh-root details summary {\ncursor: pointer;\n}\n@@ -182,94 +185,78 @@ summary {\n/* Score */\n-.lh-score__value {\n- float: right;\n+.lh-audit__score-icon {\nmargin-left: var(--lh-score-margin);\n- width: calc(var(--lh-audit-score-width) - var(--lh-score-margin));\n- position: relative;\n- font-weight: bold;\n- top: 1px;\n- text-align: right;\n-}\n-\n-.lh-score__value::after {\n- content: '';\n- position: absolute;\n- right: 0;\n- top: 0;\n- bottom: 0;\n- border-radius: inherit;\n- width: 16px;\n-}\n-\n-.lh-audit--informative .lh-score__value,\n-.lh-audit--manual .lh-score__value {\n- display: none;\n+ width: var(--lh-score-icon-width);\n+ background: none no-repeat center center / contain;\n}\n-/* No icon for audits with number scores. */\n-.lh-score__value:not(.lh-score__value--binary)::after {\n- content: none;\n-}\n-\n-.lh-score__value--pass {\n+.lh-audit--pass .lh-audit__display-text {\ncolor: var(--pass-color);\n}\n-\n-.lh-score__value--pass::after {\n- background: var(--pass-icon-url) no-repeat center center / 12px 12px;\n+.lh-audit--pass .lh-audit__score-icon {\n+ background-image: var(--pass-icon-url);\n}\n-.lh-score__value--average {\n+.lh-audit--average .lh-audit__display-text {\ncolor: var(--average-color);\n}\n-\n-.lh-score__value--average::after {\n- background: none;\n- content: '!';\n- color: var(--average-color);\n- display: flex;\n- justify-content: center;\n- align-items: center;\n- font-weight: 500;\n- font-size: 15px;\n+.lh-audit--average .lh-audit__score-icon {\n+ background-image: var(--average-icon-url);\n}\n-.lh-score__value--fail {\n+.lh-audit--fail .lh-audit__display-text {\ncolor: var(--fail-color);\n}\n+.lh-audit--fail .lh-audit__score-icon {\n+ background-image: var(--fail-icon-url);\n+}\n-.lh-score__value--fail::after {\n- background: var(--fail-icon-url) no-repeat center center / 12px 12px;\n+.lh-audit--informative .lh-audit__display-text {\n+ color: var(--display-value-gray);\n}\n-/* This must override the above styles */\n-.lh-audit .lh-score__value--binary {\n- color: transparent;\n+.lh-audit--informative .lh-audit__score-icon,\n+.lh-audit--manual .lh-audit__score-icon {\n+ visibility: hidden;\n}\n+.lh-audit--error .lh-audit__score-icon {\n+ display: none;\n+}\n+\n+\n.lh-audit__description, .lh-category-header__description {\n+ margin-top: 5px;\nfont-size: var(--body-font-size);\ncolor: var(--secondary-text-color);\nline-height: var(--body-line-height);\n}\n+.lh-audit__header > div,\n+.lh-audit__header > span {\n+ margin: 0 5px;\n+}\n+\n+.lh-audit__header .lh-audit__index {\n+ margin-left: var(--text-indent);\n+ width: var(--lh-audit-index-width);\n+}\n+\n.lh-audit__title {\nflex: 1;\n}\n.lh-toggle-arrow {\n- background: var(--collapsed-icon-url) no-repeat center center / 12px 12px;\n- background-color: transparent;\n+ background: var(--chevron-icon-url) no-repeat center center / 20px 20px;\nwidth: 12px;\n- height: 12px;\nflex: none;\ntransition: transform 150ms ease-in-out;\ncursor: pointer;\nborder: none;\n- order: -1;\n+ transform: rotateZ(90deg);\nmargin-right: calc(var(--expandable-indent) - 12px);\n- align-self: flex-start;\n+ margin-top: calc((var(--body-line-height) - 12px) / 2);\n}\n.lh-toggle-arrow-unexpandable {\n@@ -283,15 +270,17 @@ summary {\n}\n.lh-expandable-details__summary {\n- display: flex;\n- align-items: center;\ncursor: pointer;\nmargin-left: calc(0px - var(--expandable-indent));\n}\n+.lh-audit__header {\n+ display: flex;\n+}\n+\n.lh-audit-group[open] > .lh-audit-group__summary > .lh-toggle-arrow,\n.lh-expandable-details[open] > .lh-expandable-details__summary > .lh-toggle-arrow {\n- background-image: var(--expanded-icon-url);\n+ transform: rotateZ(-90deg);\n}\n.lh-audit-group__summary::-webkit-details-marker,\n@@ -299,10 +288,6 @@ summary {\ndisplay: none;\n}\n-.lh-audit__header .lh-toggle-arrow {\n- margin-top: calc((var(--body-line-height) - 12px) / 2);\n-}\n-\n/* Perf Timeline */\n.lh-timeline-container {\n@@ -386,7 +371,7 @@ summary {\n}\n.lh-metric--pass .lh-metric__value::after {\n- background: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>check</title><path fill=\"hsl(139, 70%, 30%)\" d=\"M24 4C12.95 4 4 12.95 4 24c0 11.04 8.95 20 20 20 11.04 0 20-8.96 20-20 0-11.05-8.96-20-20-20zm-4 30L10 24l2.83-2.83L20 28.34l15.17-15.17L38 16 20 34z\"/></svg>') no-repeat 50% 50%;\n+ background: var(--pass-icon-url) no-repeat 50% 50%;\n}\n@@ -394,7 +379,7 @@ summary {\ncolor: var(--average-color);\n}\n.lh-metric--average .lh-metric__value::after {\n- background: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>info</title><path fill=\"hsl(31, 100%, 45%)\" d=\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm2 30h-4V22h4v12zm0-16h-4v-4h4v4z\"/></svg>') no-repeat 50% 50%;\n+ background: var(--average-icon-url) no-repeat 50% 50%;\n}\n@@ -403,7 +388,7 @@ summary {\n}\n.lh-metric--fail .lh-metric__value::after {\n- background: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>warn</title><path fill=\"hsl(1, 73%, 45%)\" d=\"M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z\"/></svg>') no-repeat 50% 50%;\n+ background: var(--fail-icon-url) no-repeat 50% 50%;\n}\n.lh-metric--error .lh-metric__value,\n@@ -462,7 +447,7 @@ summary {\n.lh-load-opportunity__stats {\ntext-align: right;\n- flex: 0 0 var(--lh-audit-score-width);\n+ flex: 0 0 calc(5 * var(--body-font-size));\n}\n.lh-load-opportunity__primary-stat {\n@@ -589,13 +574,12 @@ summary {\n}\n.lh-audit .lh-debug {\n- margin-left: var(--expandable-indent);\n- margin-right: var(--lh-audit-score-width);\n+ margin-left: calc(var(--expandable-indent) + var(--lh-audit-index-width));\n+ margin-right: var(--lh-score-icon-width);\n}\n-.lh-audit--error .lh-score__value {\n+.lh-audit--error .lh-audit__display-text {\ncolor: var(--fail-color);\n- font-weight: normal;\n}\n/* Audit Group */\n@@ -609,15 +593,21 @@ summary {\n.lh-audit-group__header {\nfont-size: var(--subheader-font-size);\nline-height: var(--subheader-line-height);\n+ flex: 1;\n}\n.lh-audit-group__summary {\ndisplay: flex;\n- align-items: center;\n+ justify-content: space-between;\nmargin-bottom: var(--lh-audit-group-vpadding);\nmargin-left: calc(0px - var(--expandable-indent));\n}\n+.lh-audit-group__itemcount {\n+ color: var(--display-value-gray);\n+ margin: 0 10px;\n+}\n+\n.lh-audit-group__summary .lh-toggle-arrow {\nmargin-top: calc((var(--subheader-line-height) - 12px) / 2);\n}\n@@ -777,7 +767,6 @@ summary {\nmargin-bottom: var(--lh-section-vpadding);\n}\n-.lh-category-header .lh-score__value,\n.lh-category-header .lh-score__gauge .lh-gauge__label {\ndisplay: none;\n}\n",
"new_path": "lighthouse-core/report/html/report-styles.css",
"old_path": "lighthouse-core/report/html/report-styles.css"
},
{
"change_type": "MODIFY",
"diff": "<!-- Lighthouse category header -->\n<template id=\"tmpl-lh-category-header\">\n<div class=\"lh-category-header\">\n- <div class=\"lh-score__value\"></div>\n<div class=\"lh-score__gauge\"></div>\n<span class=\"lh-category-header__title\"></span>\n<div class=\"lh-category-header__description\"></div>\n<!-- Lighthouse audit -->\n<template id=\"tmpl-lh-audit\">\n<div class=\"lh-audit\">\n- <div class=\"lh-score__value\"></div>\n- <details class=\"lh-audit__header lh-expandable-details\">\n- <summary class=\"lh-expandable-details__summary\">\n+ <details class=\"lh-expandable-details\">\n+ <summary class=\"lh-audit__header lh-expandable-details__summary\">\n+ <span class=\"lh-audit__index\"></span>\n<span class=\"lh-audit__title\"></span>\n+ <span class=\"lh-audit__display-text\"></span>\n+ <div class=\"lh-audit__score-icon\"></div>\n<div class=\"lh-toggle-arrow\" title=\"See audits\"></div>\n</summary>\n<div class=\"lh-audit__description\"></div>\n.leftnav-item__score::after {\ncontent: '';\n}\n- .leftnav-item__score.lh-score__value--pass {\n+ .leftnav-item__score.lh-audit--pass {\ncolor: var(--pass-color);\n}\n- .leftnav-item__score.lh-score__value--average {\n+ .leftnav-item__score.lh-audit--average {\ncolor: var(--average-color);\n}\n- .leftnav-item__score.lh-score__value--fail {\n+ .leftnav-item__score.lh-audit--fail {\ncolor: var(--fail-color);\n}\n.leftnav__header {\n",
"new_path": "lighthouse-core/report/html/templates.html",
"old_path": "lighthouse-core/report/html/templates.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -56,13 +56,11 @@ describe('CategoryRenderer', () => {\nconst title = auditDOM.querySelector('.lh-audit__title');\nconst description = auditDOM.querySelector('.lh-audit__description');\n- const score = auditDOM.querySelector('.lh-score__value');\nassert.equal(title.textContent, audit.result.description);\nassert.ok(description.querySelector('a'), 'audit help text contains coverted markdown links');\n- assert.equal(score.textContent, '0');\n- assert.ok(score.classList.contains('lh-score__value--fail'));\n- assert.ok(score.classList.contains(`lh-score__value--${audit.result.scoreDisplayMode}`));\n+ assert.ok(auditDOM.classList.contains('lh-audit--fail'));\n+ assert.ok(auditDOM.classList.contains(`lh-audit--${audit.result.scoreDisplayMode}`));\n});\nit('renders an audit debug str when appropriate', () => {\n@@ -93,12 +91,10 @@ describe('CategoryRenderer', () => {\nconst categoryDOM = renderer.render(category, sampleResults.reportGroups);\nconst categoryEl = categoryDOM.querySelector('.lh-category-header');\n- const value = categoryDOM.querySelector('.lh-score__value');\n+ const value = categoryDOM.querySelector('.lh-gauge__percentage');\nconst title = categoryEl.querySelector('.lh-category-header__title');\nassert.deepEqual(categoryEl, categoryEl.firstElementChild, 'first child is a score');\n- assert.ok(value.classList.contains('lh-score__value--numeric'),\n- 'category score is numeric');\nconst scoreInDom = Number(value.textContent);\nassert.ok(Number.isInteger(scoreInDom) && scoreInDom > 10, 'category score is rounded');\nassert.equal(title.textContent, category.name, 'title is set');\n@@ -173,13 +169,11 @@ describe('CategoryRenderer', () => {\nassert.equal(gauge.textContent.trim(), '35', 'score is 0-100');\nconst score = categoryDOM.querySelector('.lh-category-header');\n- const value = categoryDOM.querySelector('.lh-score__value');\n+ const value = categoryDOM.querySelector('.lh-gauge__percentage');\nconst title = score.querySelector('.lh-category-header__title');\nconst description = score.querySelector('.lh-category-header__description');\nassert.deepEqual(score, score.firstElementChild, 'first child is a score');\n- assert.ok(value.classList.contains('lh-score__value--numeric'),\n- 'category score is numeric');\nconst scoreInDom = Number(value.textContent);\nassert.ok(Number.isInteger(scoreInDom) && scoreInDom > 10, 'score is rounded out of 100');\nassert.equal(title.textContent, category.name, 'title is set');\n",
"new_path": "lighthouse-core/test/report/html/renderer/category-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/category-renderer-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -55,12 +55,10 @@ describe('PerfCategoryRenderer', () => {\nit('renders the category header', () => {\nconst categoryDOM = renderer.render(category, sampleResults.reportGroups);\nconst score = categoryDOM.querySelector('.lh-category-header');\n- const value = categoryDOM.querySelector('.lh-category-header > .lh-score__value');\n+ const value = categoryDOM.querySelector('.lh-category-header .lh-gauge__percentage');\nconst title = score.querySelector('.lh-category-header__title');\nassert.deepEqual(score, score.firstElementChild, 'first child is a score');\n- assert.ok(value.classList.contains('lh-score__value--numeric'),\n- 'category score is numeric');\nconst scoreInDom = Number(value.textContent);\nassert.ok(Number.isInteger(scoreInDom) && scoreInDom > 10, 'category score is rounded');\nassert.equal(title.textContent, category.name, 'title is set');\n",
"new_path": "lighthouse-core/test/report/html/renderer/performance-category-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/performance-category-renderer-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report: new audit list display, indexes & new icons (#5109)
| 1
|
report
| null |
791,834
|
04.05.2018 12:21:48
| 25,200
|
91aa8d2f87088667b9a992f7bccebbec7135650c
|
core(tsc): fix ImageUsage artifact type and gather bug
|
[
{
"change_type": "MODIFY",
"diff": "@@ -110,12 +110,18 @@ module.exports = [\n},\n},\n'uses-responsive-images': {\n+ displayValue: [\n+ 'Potential savings of %d\\xa0KB',\n+ 75,\n+ ],\nextendedInfo: {\nvalue: {\nwastedKb: '>50',\n- results: {\n- length: 3,\n- },\n+ results: [\n+ {wastedPercent: '<60'},\n+ {wastedPercent: '<60'},\n+ {wastedPercent: '<60'},\n+ ],\n},\n},\n},\n",
"new_path": "lighthouse-cli/test/smokehouse/byte-efficiency/expectations.js",
"old_path": "lighthouse-cli/test/smokehouse/byte-efficiency/expectations.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -19,6 +19,8 @@ const ALLOWABLE_OFFSCREEN_Y = 200;\nconst IGNORE_THRESHOLD_IN_BYTES = 2048;\nconst IGNORE_THRESHOLD_IN_PERCENT = 75;\n+/** @typedef {{url: string, requestStartTime: number, totalBytes: number, wastedBytes: number, wastedPercent: number}} WasteResult */\n+\nclass OffscreenImages extends ByteEfficiencyAudit {\n/**\n* @return {LH.Audit.Meta}\n@@ -38,7 +40,7 @@ class OffscreenImages extends ByteEfficiencyAudit {\n}\n/**\n- * @param {ClientRect} imageRect\n+ * @param {{top: number, bottom: number, left: number, right: number}} imageRect\n* @param {{innerWidth: number, innerHeight: number}} viewportDimensions\n* @return {number}\n*/\n@@ -55,11 +57,15 @@ class OffscreenImages extends ByteEfficiencyAudit {\n}\n/**\n- * @param {!Object} image\n+ * @param {LH.Artifacts.SingleImageUsage} image\n* @param {{innerWidth: number, innerHeight: number}} viewportDimensions\n- * @return {?Object}\n+ * @return {null|Error|WasteResult}\n*/\nstatic computeWaste(image, viewportDimensions) {\n+ if (!image.networkRecord) {\n+ return null;\n+ }\n+\nconst url = URL.elideDataURI(image.src);\nconst totalPixels = image.clientWidth * image.clientHeight;\nconst visiblePixels = this.computeVisiblePixels(image.clientRect, viewportDimensions);\n@@ -111,11 +117,11 @@ class OffscreenImages extends ByteEfficiencyAudit {\n/** @type {string|undefined} */\nlet debugString;\nconst resultsMap = images.reduce((results, image) => {\n- if (!image.networkRecord) {\n+ const processed = OffscreenImages.computeWaste(image, viewportDimensions);\n+ if (processed === null) {\nreturn results;\n}\n- const processed = OffscreenImages.computeWaste(image, viewportDimensions);\nif (processed instanceof Error) {\ndebugString = processed.message;\n// @ts-ignore TODO(bckenny): Sentry type checking\n@@ -130,7 +136,7 @@ class OffscreenImages extends ByteEfficiencyAudit {\n}\nreturn results;\n- }, new Map());\n+ }, /** @type {Map<string, WasteResult>} */ (new Map()));\nconst settings = context.settings;\nreturn artifacts.requestFirstCPUIdle({trace, devtoolsLog, settings}).then(firstInteractive => {\n",
"new_path": "lighthouse-core/audits/byte-efficiency/offscreen-images.js",
"old_path": "lighthouse-core/audits/byte-efficiency/offscreen-images.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -43,6 +43,11 @@ class UsesResponsiveImages extends ByteEfficiencyAudit {\n* @return {null|Error|LH.Audit.ByteEfficiencyResult};\n*/\nstatic computeWaste(image, DPR) {\n+ // Nothing can be done without network info.\n+ if (!image.networkRecord) {\n+ return null;\n+ }\n+\nconst url = URL.elideDataURI(image.src);\nconst actualPixels = image.naturalWidth * image.naturalHeight;\nconst usedPixels = image.clientWidth * image.clientHeight * Math.pow(DPR, 2);\n",
"new_path": "lighthouse-core/audits/byte-efficiency/uses-responsive-images.js",
"old_path": "lighthouse-core/audits/byte-efficiency/uses-responsive-images.js"
},
{
"change_type": "MODIFY",
"diff": "* audit will list all images that don't match with their display size\n* aspect ratio.\n*/\n-// @ts-nocheck - TODO(bckenny): fix optional width/height in ImageUsage artifact\n'use strict';\nconst Audit = require('./audit');\n@@ -17,6 +16,8 @@ const Audit = require('./audit');\nconst URL = require('../lib/url-shim');\nconst THRESHOLD = 0.05;\n+/** @typedef {Required<LH.Artifacts.SingleImageUsage>} WellDefinedImage */\n+\nclass ImageAspectRatio extends Audit {\n/**\n* @return {LH.Audit.Meta}\n@@ -32,7 +33,7 @@ class ImageAspectRatio extends Audit {\n}\n/**\n- * @param {Required<LH.Artifacts.SingleImageUsage>} image\n+ * @param {WellDefinedImage} image\n* @return {Error|{url: string, displayedAspectRatio: string, actualAspectRatio: string, doRatiosMatch: boolean}}\n*/\nstatic computeAspectRatios(image) {\n@@ -76,7 +77,7 @@ class ImageAspectRatio extends Audit {\nimage.height &&\n!image.usesObjectFit;\n}).forEach(image => {\n- const wellDefinedImage = /** @type {Required<LH.Artifacts.SingleImageUsage>} */ (image);\n+ const wellDefinedImage = /** @type {WellDefinedImage} */ (image);\nconst processed = ImageAspectRatio.computeAspectRatios(wellDefinedImage);\nif (processed instanceof Error) {\ndebugString = processed.message;\n",
"new_path": "lighthouse-core/audits/image-aspect-ratio.js",
"old_path": "lighthouse-core/audits/image-aspect-ratio.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,9 +15,7 @@ const Driver = require('../driver.js'); // eslint-disable-line no-unused-vars\n/* global window, getElementsInDocument, Image */\n-/** @typedef {MakeOptional<LH.Artifacts.SingleImageUsage, 'networkRecord'>} ImageSizeInfo */\n-\n-/** @return {Array<ImageSizeInfo>} */\n+/** @return {Array<LH.Artifacts.SingleImageUsage>} */\n/* istanbul ignore next */\nfunction collectImageElementInfo() {\n/** @param {Element} element */\n@@ -39,7 +37,7 @@ function collectImageElementInfo() {\nreturn element.localName === 'img';\n}));\n- /** @type {Array<ImageSizeInfo>} */\n+ /** @type {Array<LH.Artifacts.SingleImageUsage>} */\nconst htmlImages = allImageElements.map(element => {\nconst computedStyle = window.getComputedStyle(element);\nreturn {\n@@ -97,7 +95,7 @@ function collectImageElementInfo() {\n});\nreturn images;\n- }, /** @type {Array<ImageSizeInfo>} */ ([]));\n+ }, /** @type {Array<LH.Artifacts.SingleImageUsage>} */ ([]));\nreturn htmlImages.concat(cssImages);\n}\n@@ -125,8 +123,8 @@ function determineNaturalSize(url) {\nclass ImageUsage extends Gatherer {\n/**\n* @param {Driver} driver\n- * @param {ImageSizeInfo} element\n- * @return {Promise<ImageSizeInfo>}\n+ * @param {LH.Artifacts.SingleImageUsage} element\n+ * @return {Promise<LH.Artifacts.SingleImageUsage>}\n*/\nasync fetchElementWithSizeInformation(driver, element) {\nconst url = JSON.stringify(element.src);\n@@ -145,7 +143,7 @@ class ImageUsage extends Gatherer {\n* @param {LH.Gatherer.LoadData} loadData\n* @return {Promise<LH.Artifacts['ImageUsage']>}\n*/\n- afterPass(passContext, loadData) {\n+ async afterPass(passContext, loadData) {\nconst driver = passContext.driver;\nconst indexedNetworkRecords = loadData.networkRecords.reduce((map, record) => {\nif (/^image/.test(record._mimeType) && record.finished) {\n@@ -167,27 +165,25 @@ class ImageUsage extends Gatherer {\nreturn (${collectImageElementInfo.toString()})();\n})()`;\n- /** @type {Promise<Array<ImageSizeInfo>>} */\n- const evaluatePromise = driver.evaluateAsync(expression);\n- return evaluatePromise.then(elements => {\n- return elements.reduce((promise, element) => {\n- return promise.then(collector => {\n- // Images within `picture` behave strangely and natural size information isn't accurate,\n- // CSS images have no natural size information at all.\n- // Try to get the actual size if we can.\n- const elementPromise = (element.isPicture || element.isCss) && element.networkRecord ?\n- this.fetchElementWithSizeInformation(driver, element) :\n- Promise.resolve(element);\n+ /** @type {Array<LH.Artifacts.SingleImageUsage>} */\n+ const elements = await driver.evaluateAsync(expression);\n- return elementPromise.then(element => {\n+ const imageUsage = [];\n+ for (let element of elements) {\n// link up the image with its network record\nelement.networkRecord = indexedNetworkRecords[element.src];\n- collector.push(/** @type {LH.Artifacts.SingleImageUsage} */ (element));\n- return collector;\n- });\n- });\n- }, Promise.resolve(/** @type {LH.Artifacts['ImageUsage']} */ ([])));\n- });\n+\n+ // Images within `picture` behave strangely and natural size information isn't accurate,\n+ // CSS images have no natural size information at all. Try to get the actual size if we can.\n+ // Additional fetch is expensive; don't bother if we don't have a networkRecord for the image.\n+ if ((element.isPicture || element.isCss) && element.networkRecord) {\n+ element = await this.fetchElementWithSizeInformation(driver, element);\n+ }\n+\n+ imageUsage.push(element);\n+ }\n+\n+ return imageUsage;\n}\n}\n",
"new_path": "lighthouse-core/gather/gatherers/image-usage.js",
"old_path": "lighthouse-core/gather/gatherers/image-usage.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -221,14 +221,16 @@ declare global {\nleft: number;\nright: number;\n};\n- networkRecord: {\n+ networkRecord?: {\nurl: string;\nresourceSize: number;\nstartTime: number;\nendTime: number;\nresponseReceivedTime: number;\nmimeType: string;\n- }\n+ };\n+ width?: number;\n+ height?: number;\n}\nexport interface OptimizedImage {\n",
"new_path": "typings/artifacts.d.ts",
"old_path": "typings/artifacts.d.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -22,6 +22,9 @@ declare global {\n[P in K]+?: T[P]\n}\n+ /** Remove properties K from T. */\n+ type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\n+\n/** Obtain the type of the first parameter of a function. */\ntype FirstParamType<T extends (arg1: any, ...args: any[]) => any> =\nT extends (arg1: infer P, ...args: any[]) => any ? P : any;\n",
"new_path": "typings/externs.d.ts",
"old_path": "typings/externs.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(tsc): fix ImageUsage artifact type and gather bug (#5113)
| 1
|
core
|
tsc
|
730,413
|
04.05.2018 12:51:18
| 14,400
|
cce1535b208c990c751c0f6d6867f626b7590d37
|
chore(tab): add jenkinsfile for tests against beta
|
[
{
"change_type": "ADD",
"diff": "+pipeline {\n+ agent{\n+ label 'BASIC_SLAVE&&!beefy_BASIC_SLAVE'\n+ }\n+\n+ options {\n+ timeout(time: 2, unit: 'HOURS')\n+ timestamps()\n+ ansiColor('xterm')\n+ }\n+\n+ stages {\n+ stage('Checkout') {\n+ steps{\n+ checkout poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'a8c27fc2-52cd-499c-b648-0355ed5ca72a', url: 'https://github.com/webex/react-ciscospark']]]\n+ }\n+ }\n+\n+ stage('Install') {\n+ steps {\n+ withCredentials([\n+ string(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')\n+ ]) {\n+ sh '''#!/bin/bash -ex\n+ set +x\n+ rm .nvmrc\n+ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash\n+ ~/.nvm/nvm.sh\n+ echo \\'//registry.npmjs.org/:_authToken=${NPM_TOKEN}\\' >> .npmrc\n+ source ~/.bashrc || true\n+ source ~/.profile || true'''\n+ sh '''#!/bin/bash -ex\n+ source ~/.nvm/nvm.sh\n+ nvm install 8.9.1\n+ nvm use 8.9.1\n+ npm install\n+ rm .npmrc\n+ '''\n+ }\n+ }\n+ }\n+\n+ stage('Test') {\n+ steps {\n+ withCredentials([\n+ string(credentialsId: 'ddfd04fb-e00a-4df0-9250-9a7cb37bce0e', variable: 'CISCOSPARK_CLIENT_SECRET'),\n+ usernamePassword(credentialsId: 'SAUCE_LABS_VALIDATED_MERGE_CREDENTIALS', passwordVariable: 'SAUCE_ACCESS_KEY', usernameVariable: 'SAUCE_USERNAME'),\n+ string(credentialsId: 'CISCOSPARK_APPID_SECRET', variable: 'CISCOSPARK_APPID_SECRET'),\n+ ]) {\n+ sh '''#!/bin/bash -ex\n+ source ~/.nvm/nvm.sh\n+ nvm use 8.9.1\n+ NODE_ENV=test npm run build:package widget-space && npm run build:package widget-recents\n+ set -m\n+ (\n+ (CISCOSPARK_CLIENT_ID=C873b64d70536ed26df6d5f81e01dafccbd0a0af2e25323f7f69c7fe46a7be340 SAUCE=true PORT=4569 SAUCE_CONNECT_PORT=5006 BROWSER=firefox VERSION=beta npm run test:integration || kill 0) &\n+ (sleep 60; CISCOSPARK_CLIENT_ID=C873b64d70536ed26df6d5f81e01dafccbd0a0af2e25323f7f69c7fe46a7be340 SAUCE=true PORT=4568 SAUCE_CONNECT_PORT=5005 BROWSER=chrome VERSION=beta npm run test:integration || kill 0) &\n+ (sleep 120; CISCOSPARK_CLIENT_ID=C873b64d70536ed26df6d5f81e01dafccbd0a0af2e25323f7f69c7fe46a7be340 SAUCE=true PORT=4567 SAUCE_CONNECT_PORT=5004 BROWSER=chrome PLATFORM=\"windows 10\" VERSION=beta npm run test:integration || kill 0) &\n+ wait\n+ )\n+ '''\n+ }\n+ }\n+ }\n+ }\n+\n+ post {\n+ always {\n+ junit '**/reports/junit/wdio/*.xml'\n+ }\n+ }\n+}\n",
"new_path": "Jenkinsfile.tab",
"old_path": null
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tab): add jenkinsfile for tests against beta
| 1
|
chore
|
tab
|
679,913
|
04.05.2018 13:15:18
| -3,600
|
334a4d24174acfacd5d26d7053bcf83ee84f41a1
|
refactor(hdom-components): make pager more customizable
|
[
{
"change_type": "MODIFY",
"diff": "@@ -7,7 +7,7 @@ import { map } from \"@thi.ng/iterators/map\";\nexport interface PagerOpts {\n/**\n* Function producing a single page nav or counter element. MUST be\n- * provided by user. All other opts are optional.\n+ * provided by user.\n*\n* The function is called with:\n*\n@@ -18,9 +18,10 @@ export interface PagerOpts {\n* - disabled flag as determined by the pager\n*\n* If `disabled` is true, the function should return a version of\n- * the button component reflecting this state to the user. I.e. the\n+ * the button component reflecting this state to the user. E.g. the\n* \"prev page\" buttons should be disabled if the first page is\n- * currently active.\n+ * currently active. Likewise, the currently selected page button\n+ * will be set to disabled as well.\n*\n* Page IDs are zero-based indices, whereas page number labels are\n* one-based. The currently active page ID is only provided for\n@@ -28,29 +29,30 @@ export interface PagerOpts {\n*/\nbutton: (page: number, curr: number, max: number, label: any, disabled: boolean) => any;\n/**\n- * Attribs for pager root element\n+ * Pager root component function. Receives all 3 button groups as\n+ * arguments. Optional. Default: `[\"div.pager\", ...body]`\n*/\n- attribs?: any;\n+ root: (ctx: any, ...body: any[]) => any;\n/**\n- * Attribs for prev page button group\n+ * Component function to provide wrapper for the first / prev nav\n+ * button group. The `first` / `prev` args are button components.\n+ * Optional. Default: `[\"div.pager-prev\", first, prev]`\n*/\n- prevAttribs?: any;\n+ groupPrev: (ctx: any, first: any, prev: any) => any;\n/**\n- * Attribs for next page button group\n+ * Component function to provide wrapper for the page buttons group.\n+ * The `buttons` argument is an array of button components.\n+ * Optional. Default: `[\"div.pager-pages\", ...buttons]`\n*/\n- nextAttribs?: any;\n+ groupPages: (ctx: any, buttons: any[]) => any;\n/**\n- * Number of numbered page buttons to show. If zero, only the\n- * prev/next and first/last buttons will be shown. Default: 5\n+ * Component function to provide wrapper for the next / last nav\n+ * button group. The `next` / `last` args are button components.\n+ * Optional. Default: `[\"div.pager-next\", next, last]`\n*/\n- maxButtons?: number;\n+ groupNext: (ctx: any, next: any, last: any) => any;\n/**\n- * Number of items per page. Used to compute max page count.\n- * Default: 10\n- */\n- pageLen?: number;\n- /**\n- * Page offset for prev / next pages. Default: 1\n+ * Page increment for prev / next page buttons. Default: 1\n*/\nnavStep?: number;\n/**\n@@ -72,57 +74,75 @@ export interface PagerOpts {\n}\n/**\n- * Higher order component for paged navigation buttons. The returned\n- * component function takes two arguments: current number of items and\n- * current page ID (zero-based) and yields a component of page buttons\n- * and prev / next and first / last navigation buttons. The actual\n- * button components are defined via the user supplied `button` option.\n- * The first / prev and next / last nav buttons are paired within inner\n- * `div` elements (one per pair) and can be styled (or hidden)\n- * separately.\n+ * Higher order container component for paged navigation buttons. The\n+ * returned component function takes these arguments:\n+ *\n+ * - `ctx` - hdom context object\n+ * - `id` - current page ID (zero-based)\n+ * - `numItems` - current number of items\n+ * - `pageLen` - number of items per page (only used for calculation)\n+ * - `maxButtons` - number of page buttons to show (default: 5). If\n+ * zero, only the prev / next and first / last buttons will be shown.\n+ *\n+ * If there are more pages than the specified number, only the\n+ * neighboring page IDs (relative to the current page) are shown. E.g.\n+ * If there are 10 pages, the current page ID is 5 and 3 visible page\n+ * buttons then the pager will look like this (the `|` character here\n+ * indicates button group boundaries):\n+ *\n+ * ```\n+ * << < | 4 5 6 | > >>\n+ * ```\n+ *\n+ * Providing `pageLen` and `maxButtons` as arguments allows to\n+ * dynamically control the number of page buttons at runtime, e.g. in\n+ * response to window resizing.\n+ *\n+ * Yields a component of page buttons and prev / next and first / last\n+ * navigation buttons. The actual button and button group components are\n+ * defined via the user supplied options. The first / prev and next /\n+ * last nav buttons are paired within inner `div` elements (one per\n+ * pair) and can be styled (or hidden) separately.\n*\n* ```\n* // initialization\n* const mypager = pager({\n- * button: (i, label, disabled) => [\"a\", {href: `/page/${i}`}, label],\n- * attribs: { class: \"pager w-100 tc mv3\" },\n- * prevAttribs: { class: \"pager-nav fl mr3\" },\n- * nextAttribs: { class: \"pager-nav fr ml3\" },\n+ * button: (i, curr, max, label, disabled) =>\n+ * [\"a\", {href: `/page/${i}`, disabled}, label]\n* });\n*\n* // usage\n- * [mypager, currNumItems, currPage]\n+ * [mypager, currPage, currNumItems, 10, 5]\n* ```\n*\n* @param opts\n*/\nexport const pager = (opts: PagerOpts) => {\n- opts = Object.assign({\n- maxButtons: 5,\n- pageLen: 10,\n+ opts = Object.assign(<PagerOpts>{\n+ root: (_, ...body: any[]) => [\"div.pager\", ...body],\n+ groupPrev: (_, ...bts: any[]) => [\"div.pager-prev\", ...bts],\n+ groupNext: (_, ...bts: any[]) => [\"div.pager-next\", ...bts],\n+ groupPages: (_, ...bts: any[]) => [\"div.pager-pages\", ...bts],\nnavStep: 1,\n- attribs: {},\n- prevAttribs: {},\n- nextAttribs: {},\nlabelFirst: \"<<\",\nlabelPrev: \"<\",\nlabelNext: \">\",\nlabelLast: \">>\",\n}, opts);\n- return (_, num: number, id: number) => {\n+ return (_, id: number, num: number, pageLen = 10, maxBts = 5) => {\nconst bt = opts.button;\nconst step = opts.navStep;\n- const maxID = Math.floor(Math.max(0, num - 1) / opts.pageLen);\n+ const maxID = Math.floor(Math.max(0, num - 1) / pageLen);\nid = Math.max(Math.min(id, maxID), 0);\n- return [\"div\", opts.attribs,\n- [\"div\", opts.prevAttribs,\n+ return [\n+ opts.root,\n+ [opts.groupPrev,\nbt(0, id, maxID, opts.labelFirst, !id),\nbt(Math.max(id - step, 0), id, maxID, opts.labelPrev, !id)],\n- map(\n- (i: number) => bt(i, id, maxID, i + 1, i === id),\n- pageRange(id, maxID, opts.maxButtons)\n- ),\n- [\"div\", opts.nextAttribs,\n+ [opts.groupPages,\n+ map((i: number) => bt(i, id, maxID, i + 1, i === id),\n+ pageRange(id, maxID, maxBts))],\n+ [opts.groupNext,\nbt(Math.min(id + step, maxID), id, maxID, opts.labelNext, id >= maxID),\nbt(maxID, id, maxID, opts.labelLast, id >= maxID)],\n];\n",
"new_path": "packages/hdom-components/src/pager.ts",
"old_path": "packages/hdom-components/src/pager.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(hdom-components): make pager more customizable
| 1
|
refactor
|
hdom-components
|
791,723
|
04.05.2018 13:53:34
| 25,200
|
db6b887e532cba8611654ecb187db2a493fda01c
|
report: implement new design for opportunities
|
[
{
"change_type": "MODIFY",
"diff": "@@ -47,64 +47,38 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\n* @return {!Element}\n*/\n_renderOpportunity(audit, index, scale) {\n- const element = this.dom.createElement('details', [\n- 'lh-load-opportunity',\n- `lh-load-opportunity--${Util.calculateRating(audit.result.score)}`,\n- 'lh-expandable-details',\n- ].join(' '));\n+ const tmpl = this.dom.cloneTemplate('#tmpl-lh-opportunity', this.templateContext);\n+ const element = this.dom.find('.lh-load-opportunity', tmpl);\n+ element.classList.add(`lh-load-opportunity--${Util.calculateRating(audit.result.score)}`);\nelement.id = audit.result.name;\n- // TODO(paulirish): use a template instead.\n- const summary = this.dom.createChildOf(element, 'summary', 'lh-load-opportunity__summary ' +\n- 'lh-expandable-details__summary');\n- const titleEl = this.dom.createChildOf(summary, 'div', 'lh-load-opportunity__title');\n+ const summary = this.dom.find('.lh-load-opportunity__summary', tmpl);\n+ const titleEl = this.dom.find('.lh-load-opportunity__title', tmpl);\ntitleEl.textContent = audit.result.description;\n+ this.dom.find('.lh-audit__index', element).textContent = `${index + 1}`;\n- this.dom.createChildOf(summary, 'div', 'lh-toggle-arrow', {title: 'See resources'});\n-\n- if (audit.result.error) {\n+ if (audit.result.debugString || audit.result.error) {\nconst debugStrEl = this.dom.createChildOf(summary, 'div', 'lh-debug');\ndebugStrEl.textContent = audit.result.debugString || 'Audit error';\n- return element;\n}\n+ if (audit.result.error) return element;\nconst details = audit.result.details;\nconst summaryInfo = /** @type {!DetailsRenderer.OpportunitySummary}\n*/ (details && details.summary);\n- // eslint-disable-next-line no-console\n- console.assert(summaryInfo, 'Missing `summary` for load-opportunities audit');\n- // eslint-disable-next-line no-console\n- console.assert(typeof summaryInfo.wastedMs === 'number',\n- 'Missing numeric `summary.wastedMs` for load-opportunities audit');\nif (!summaryInfo || !summaryInfo.wastedMs) {\nreturn element;\n}\n- const elemAttrs = {title: Util.formatDisplayValue(audit.result.displayValue)};\n- const sparklineContainerEl = this.dom.createChildOf(summary, 'div',\n- 'lh-load-opportunity__sparkline', elemAttrs);\n- const sparklineEl = this.dom.createChildOf(sparklineContainerEl, 'div', 'lh-sparkline');\n- const sparklineBarEl = this.dom.createChildOf(sparklineEl, 'div', 'lh-sparkline__bar');\n- sparklineBarEl.style.width = summaryInfo.wastedMs / scale * 100 + '%';\n-\n- const statsEl = this.dom.createChildOf(summary, 'div', 'lh-load-opportunity__stats', elemAttrs);\n- const statsMsEl = this.dom.createChildOf(statsEl, 'div', 'lh-load-opportunity__primary-stat');\n- statsMsEl.textContent = Util.formatMilliseconds(summaryInfo.wastedMs);\n-\n- if (summaryInfo.wastedBytes) {\n- const statsKbEl = this.dom.createChildOf(statsEl, 'div',\n- 'lh-load-opportunity__secondary-stat');\n- statsKbEl.textContent = Util.formatBytesToKB(summaryInfo.wastedBytes);\n- }\n-\n- const descriptionEl = this.dom.createChildOf(element, 'div',\n- 'lh-load-opportunity__description');\n- descriptionEl.appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.helpText));\n-\n- if (audit.result.debugString) {\n- const debugStrEl = this.dom.createChildOf(summary, 'div', 'lh-debug');\n- debugStrEl.textContent = audit.result.debugString;\n- }\n+ const displayValue = Util.formatDisplayValue(audit.result.displayValue);\n+ const sparklineWidthPct = `${summaryInfo.wastedMs / scale * 100}%`;\n+ const wastedMs = Util.formatSeconds(summaryInfo.wastedMs, 0.01);\n+ const auditDescription = this.dom.convertMarkdownLinkSnippets(audit.result.helpText);\n+ this.dom.find('.lh-load-opportunity__sparkline', tmpl).title = displayValue;\n+ this.dom.find('.lh-load-opportunity__wasted-stat', tmpl).title = displayValue;\n+ this.dom.find('.lh-sparkline__bar', tmpl).style.width = sparklineWidthPct;\n+ this.dom.find('.lh-load-opportunity__wasted-stat', tmpl).textContent = wastedMs;\n+ this.dom.find('.lh-load-opportunity__description', tmpl).appendChild(auditDescription);\n// If there's no `type`, then we only used details for `summary`\nif (details.type) {\n@@ -163,6 +137,9 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\nconst maxWaste = Math.max(...opportunityAudits.map(audit => audit.result.rawValue));\nconst scale = Math.ceil(maxWaste / 1000) * 1000;\nconst groupEl = this.renderAuditGroup(groups['load-opportunities'], {expandable: false});\n+ const tmpl = this.dom.cloneTemplate('#tmpl-lh-opportunity-header', this.templateContext);\n+ const headerEl = this.dom.find('.lh-load-opportunity__header', tmpl);\n+ groupEl.appendChild(headerEl);\nopportunityAudits.forEach((item, i) =>\ngroupEl.appendChild(this._renderOpportunity(item, i, scale)));\ngroupEl.open = true;\n",
"new_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -116,6 +116,16 @@ class Util {\nreturn `${coarseTime.toLocaleString()}${NBSP}ms`;\n}\n+ /**\n+ * @param {number} ms\n+ * @param {number=} granularity Controls how coarse the displayed value is, defaults to 0.1\n+ * @return {string}\n+ */\n+ static formatSeconds(ms, granularity = 0.1) {\n+ const coarseTime = Math.round(ms / 1000 / granularity) * granularity;\n+ return `${coarseTime.toLocaleString()}${NBSP}s`;\n+ }\n+\n/**\n* Format time.\n* @param {string} date\n",
"new_path": "lighthouse-core/report/html/renderer/util.js",
"old_path": "lighthouse-core/report/html/renderer/util.js"
},
{
"change_type": "MODIFY",
"diff": "--pass-color: hsl(139, 70%, 30%);\n--informative-color: #0c50c7;\n--medium-75-gray: #757575;\n+ --medium-50-gray: hsl(210, 17%, 98%);\n--warning-color: #ffab00; /* md amber a700 */\n--report-border-color: #ccc;\n--report-secondary-border-color: #ebebeb;\n}\n.lh-audit-group[open] > .lh-audit-group__summary > .lh-toggle-arrow,\n-.lh-expandable-details[open] > .lh-expandable-details__summary > .lh-toggle-arrow {\n+.lh-expandable-details[open] > .lh-expandable-details__summary > .lh-toggle-arrow,\n+.lh-expandable-details[open] > .lh-expandable-details__summary > div > .lh-toggle-arrow {\ntransform: rotateZ(-90deg);\n}\n.lh-load-opportunity {\npadding-top: var(--lh-audit-vpadding);\npadding-bottom: var(--lh-audit-vpadding);\n- border-top: 1px solid var(--report-secondary-border-color);\n+ border-bottom: 1px solid var(--report-secondary-border-color);\n}\n.lh-load-opportunity:last-of-type {\nborder-bottom: none;\n}\n-.lh-load-opportunity__summary {\n+.lh-load-opportunity__cols {\ndisplay: flex;\nalign-items: flex-start;\n- flex-wrap: wrap;\n- min-height: calc(var(--body-line-height) + var(--caption-line-height));\n}\n-.lh-load-opportunity__summary .lh-toggle-arrow {\n- margin-top: calc((var(--subheader-line-height) - 12px) / 2);\n+.lh-load-opportunity__header .lh-load-opportunity__col {\n+ background-color: var(--medium-50-gray);\n+ color: var(--medium-75-gray);\n+ text-align: center;\n+ display: unset;\n+ line-height: calc(3 * var(--body-font-size));\n+}\n+\n+.lh-load-opportunity__summary {\n+ padding-right: var(--text-indent);\n+}\n+\n+.lh-load-opportunity__col {\n+ display: flex;\n+ justify-content: space-between;\n+}\n+.lh-load-opportunity__col > * {\n+ margin: 0 5px;\n+}\n+.lh-load-opportunity__col--one {\n+ flex: 5;\n+ margin-right: 2px;\n+}\n+.lh-load-opportunity__col--two {\n+ flex: 4;\n}\n.lh-load-opportunity__summary .lh-debug {\nflex: 10;\n}\n-.lh-load-opportunity__sparkline {\n- flex: 0 0 50%;\n- margin-top: calc((var(--body-line-height) - var(--lh-sparkline-height)) / 2);\n-}\n-\n-.lh-load-opportunity__sparkline .lh-sparkline {\n- width: 100%;\n- float: right;\n- margin: 0;\n-}\n-.lh-load-opportunity__stats {\n+.lh-load-opportunity__wasted-stat {\ntext-align: right;\n- flex: 0 0 calc(5 * var(--body-font-size));\n-}\n-\n-.lh-load-opportunity__primary-stat {\n+ flex: 0 0 calc(3 * var(--body-font-size));\nfont-size: var(--body-font-size);\nline-height: var(--body-line-height);\n}\n-.lh-load-opportunity__secondary-stat {\n- font-size: var(--caption-font-size);\n- line-height: var(--caption-line-height);\n-}\n-\n.lh-load-opportunity__description {\ncolor: var(--secondary-text-color);\nmargin-top: calc(var(--default-padding) / 2);\n}\n-.lh-load-opportunity--pass .lh-load-opportunity__stats {\n+.lh-load-opportunity--pass .lh-load-opportunity__wasted-stat {\ncolor: var(--pass-color);\n}\nbackground: var(--average-color);\n}\n-.lh-load-opportunity--average .lh-load-opportunity__stats {\n+.lh-load-opportunity--average .lh-load-opportunity__wasted-stat {\ncolor: var(--average-color);\n}\nbackground: var(--fail-color);\n}\n-.lh-load-opportunity--fail .lh-load-opportunity__stats {\n+.lh-load-opportunity--fail .lh-load-opportunity__wasted-stat {\ncolor: var(--fail-color);\n}\n+\n+/* Sparkline */\n+\n+.lh-load-opportunity__sparkline {\n+ flex: 1;\n+ margin-top: calc((var(--body-line-height) - var(--lh-sparkline-height)) / 2);\n+}\n+\n+.lh-sparkline {\n+ height: var(--lh-sparkline-height);\n+ width: 100%;\n+}\n+\n+.lh-sparkline__bar {\n+ background: var(--informative-color);\n+ height: 100%;\n+ float: right;\n+}\n+\n+\n/* Filmstrip */\n.lh-filmstrip {\nmax-width: 60px;\n}\n-/* Sparkline */\n-\n-.lh-sparkline {\n- margin: 5px;\n- height: var(--lh-sparkline-height);\n- width: 100%;\n-}\n-\n-.lh-sparkline--thin {\n- height: calc(var(--lh-sparkline-height) / 2);\n-}\n-\n-.lh-sparkline__bar {\n- background: var(--warning-color);\n- height: 100%;\n- float: right;\n- position: relative;\n-}\n-\n-/* correlate metric end location with sparkline */\n-.lh-metric:hover .lh-sparkline__bar::after {\n- content: '';\n- height: 100vh;\n- width: 2px;\n- background: inherit;\n- position: absolute;\n- right: 0;\n- bottom: 0;\n- opacity: 0;\n- animation: fadeIn 150ms;\n- animation-fill-mode: forwards;\n-}\n-\n/* Audit */\n.lh-audit {\n",
"new_path": "lighthouse-core/report/html/report-styles.css",
"old_path": "lighthouse-core/report/html/report-styles.css"
},
{
"change_type": "MODIFY",
"diff": "<!-- Lighthouse perf metric -->\n<template id=\"tmpl-lh-metric\">\n-\n<div class=\"lh-metric\">\n<div class=\"lh-metric__innerwrap tooltip-boundary\">\n<span class=\"lh-metric__title\"></span>\n<div class=\"lh-metric__description tooltip\"></div>\n</div>\n</div>\n+</template>\n+<!-- Lighthouse perf opportunity -->\n+<template id=\"tmpl-lh-opportunity\">\n+ <details class=\"lh-load-opportunity lh-expandable-details\">\n+ <summary class=\"lh-load-opportunity__summary lh-expandable-details__summary\">\n+ <div class=\"lh-load-opportunity__cols\">\n+ <div class=\"lh-load-opportunity__col lh-load-opportunity__col--one\">\n+ <span class=\"lh-audit__index\"></span>\n+ <div class=\"lh-load-opportunity__title\"></div>\n+ </div>\n+ <div class=\"lh-load-opportunity__col lh-load-opportunity__col--two\">\n+ <div class=\"lh-load-opportunity__sparkline\">\n+ <div class=\"lh-sparkline\"><div class=\"lh-sparkline__bar\"></div></div>\n+ </div>\n+ <div class=\"lh-load-opportunity__wasted-stat\"></div>\n+ <div class=\"lh-toggle-arrow\" title=\"See resources\"></div>\n+ </div>\n+ </div>\n+ </summary>\n+ <div class=\"lh-load-opportunity__description\"></div>\n+ </details>\n+</template>\n+\n+\n+<!-- Lighthouse perf opportunity header -->\n+<template id=\"tmpl-lh-opportunity-header\">\n+ <div class=\"lh-load-opportunity__header lh-load-opportunity__cols\">\n+ <div class=\"lh-load-opportunity__col lh-load-opportunity__col--one\">\n+ Resource to optimize\n+ </div>\n+ <div class=\"lh-load-opportunity__col lh-load-opportunity__col--two\">\n+ Estimated Savings\n+ </div>\n+ </div>\n</template>\n<!-- Lighthouse left nav -->\n",
"new_path": "lighthouse-core/report/html/templates.html",
"old_path": "lighthouse-core/report/html/templates.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -89,11 +89,14 @@ describe('PerfCategoryRenderer', () => {\nassert.equal(oppElements.length, oppAudits.length);\nconst oppElement = oppElements[0];\n+ const oppSparklineBarElement = oppElement.querySelector('.lh-sparkline__bar');\nconst oppSparklineElement = oppElement.querySelector('.lh-load-opportunity__sparkline');\n- assert.ok(oppElement.querySelector('.lh-load-opportunity__title'), 'did not render title');\n- assert.ok(oppSparklineElement, 'did not render sparkline');\n- assert.ok(oppElement.querySelector('.lh-load-opportunity__stats'), 'did not render stats');\n- assert.ok(oppSparklineElement.title, 'did not render tooltip');\n+ const oppTitleElement = oppElement.querySelector('.lh-load-opportunity__title');\n+ const oppWastedElement = oppElement.querySelector('.lh-load-opportunity__wasted-stat');\n+ assert.ok(oppTitleElement.textContent, 'did not render title');\n+ assert.ok(oppSparklineBarElement.style.width, 'did not set sparkline width');\n+ assert.ok(oppWastedElement.textContent, 'did not render stats');\n+ assert.ok(oppSparklineElement.title, 'did not set tooltip on sparkline');\n});\nit('renders the performance opportunities with a debug string', () => {\n@@ -132,22 +135,6 @@ describe('PerfCategoryRenderer', () => {\nassert.ok(debugEl, 'did not render debug');\n});\n- it('throws if a performance opportunities is missing summary.wastedMs', () => {\n- const auditWithDebug = {\n- score: 0,\n- group: 'load-opportunities',\n- result: {\n- rawValue: 100, description: 'Bug',\n- helpText: '', score: 0.32,\n- },\n- };\n-\n- const fakeCategory = Object.assign({}, category, {audits: [auditWithDebug]});\n- assert.throws(_ => {\n- renderer.render(fakeCategory, sampleResults.reportGroups);\n- });\n- });\n-\nit('renders the failing diagnostics', () => {\nconst categoryDOM = renderer.render(category, sampleResults.reportGroups);\nconst diagnosticSection = categoryDOM.querySelectorAll('.lh-category > .lh-audit-group')[2];\n",
"new_path": "lighthouse-core/test/report/html/renderer/performance-category-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/performance-category-renderer-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report: implement new design for opportunities (#5115)
| 1
|
report
| null |
730,413
|
04.05.2018 14:22:01
| 14,400
|
1781e825586eb9ee76ea9dca3f4a207c155e8e8f
|
chore(tab): update node version
|
[
{
"change_type": "MODIFY",
"diff": "@@ -31,8 +31,8 @@ pipeline {\nsource ~/.profile || true'''\nsh '''#!/bin/bash -ex\nsource ~/.nvm/nvm.sh\n- nvm install 8.9.1\n- nvm use 8.9.1\n+ nvm install 8.11.1\n+ nvm use 8.11.1\nnpm install\nrm .npmrc\n'''\n@@ -49,7 +49,7 @@ pipeline {\n]) {\nsh '''#!/bin/bash -ex\nsource ~/.nvm/nvm.sh\n- nvm use 8.9.1\n+ nvm use 8.11.1\nNODE_ENV=test npm run build:package widget-space && npm run build:package widget-recents\nset -m\n(\n",
"new_path": "Jenkinsfile.tab",
"old_path": "Jenkinsfile.tab"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tab): update node version
| 1
|
chore
|
tab
|
791,690
|
04.05.2018 15:36:02
| 25,200
|
947548c2f493e93067abbb9e00ee744f200fa527
|
core(metrics): consumable metrics audit output
|
[
{
"change_type": "MODIFY",
"diff": "@@ -39,66 +39,102 @@ class Metrics extends Audit {\nconst interactive = await artifacts.requestInteractive(metricComputationData);\nconst speedIndex = await artifacts.requestSpeedIndex(metricComputationData);\nconst estimatedInputLatency = await artifacts.requestEstimatedInputLatency(metricComputationData); // eslint-disable-line max-len\n- const metrics = [];\n+ /** @type {UberMetricsItem} */\n+ const metrics = {\n// Include the simulated/observed performance metrics\n- const metricsMap = {\n- firstContentfulPaint,\n- firstMeaningfulPaint,\n- firstCPUIdle,\n- interactive,\n- speedIndex,\n- estimatedInputLatency,\n- };\n-\n- for (const [metricName, values] of Object.entries(metricsMap)) {\n- metrics.push({\n- metricName,\n- timing: Math.round(values.timing),\n- timestamp: values.timestamp,\n- });\n- }\n+ firstContentfulPaint: firstContentfulPaint.timing,\n+ firstContentfulPaintTs: firstContentfulPaint.timestamp,\n+ firstMeaningfulPaint: firstMeaningfulPaint.timing,\n+ firstMeaningfulPaintTs: firstMeaningfulPaint.timestamp,\n+ firstCPUIdle: firstCPUIdle.timing,\n+ firstCPUIdleTs: firstCPUIdle.timestamp,\n+ interactive: interactive.timing,\n+ interactiveTs: interactive.timestamp,\n+ speedIndex: speedIndex.timing,\n+ speedIndexTs: speedIndex.timestamp,\n+ estimatedInputLatency: estimatedInputLatency.timing,\n+ estimatedInputLatencyTs: estimatedInputLatency.timestamp,\n// Include all timestamps of interest from trace of tab\n- const timingsEntries = /** @type {Array<[keyof LH.Artifacts.TraceTimes, number]>} */\n- (Object.entries(traceOfTab.timings));\n- for (const [traceEventName, timing] of timingsEntries) {\n- const uppercased = traceEventName.slice(0, 1).toUpperCase() + traceEventName.slice(1);\n- const metricName = `observed${uppercased}`;\n- const timestamp = traceOfTab.timestamps[traceEventName];\n- metrics.push({metricName, timing, timestamp});\n- }\n+ observedNavigationStart: traceOfTab.timings.navigationStart,\n+ observedNavigationStartTs: traceOfTab.timestamps.navigationStart,\n+ observedFirstPaint: traceOfTab.timings.firstPaint,\n+ observedFirstPaintTs: traceOfTab.timestamps.firstPaint,\n+ observedFirstContentfulPaint: traceOfTab.timings.firstContentfulPaint,\n+ observedFirstContentfulPaintTs: traceOfTab.timestamps.firstContentfulPaint,\n+ observedFirstMeaningfulPaint: traceOfTab.timings.firstMeaningfulPaint,\n+ observedFirstMeaningfulPaintTs: traceOfTab.timestamps.firstMeaningfulPaint,\n+ observedTraceEnd: traceOfTab.timings.traceEnd,\n+ observedTraceEndTs: traceOfTab.timestamps.traceEnd,\n+ observedLoad: traceOfTab.timings.load,\n+ observedLoadTs: traceOfTab.timestamps.load,\n+ observedDomContentLoaded: traceOfTab.timings.domContentLoaded,\n+ observedDomContentLoadedTs: traceOfTab.timestamps.domContentLoaded,\n// Include some visual metrics from speedline\n- metrics.push({\n- metricName: 'observedFirstVisualChange',\n- timing: speedline.first,\n- timestamp: (speedline.first + speedline.beginning) * 1000,\n- });\n- metrics.push({\n- metricName: 'observedLastVisualChange',\n- timing: speedline.complete,\n- timestamp: (speedline.complete + speedline.beginning) * 1000,\n- });\n- metrics.push({\n- metricName: 'observedSpeedIndex',\n- timing: speedline.speedIndex,\n- timestamp: (speedline.speedIndex + speedline.beginning) * 1000,\n- });\n+ observedFirstVisualChange: speedline.first,\n+ observedFirstVisualChangeTs: (speedline.first + speedline.beginning) * 1000,\n+ observedLastVisualChange: speedline.complete,\n+ observedLastVisualChangeTs: (speedline.complete + speedline.beginning) * 1000,\n+ observedSpeedIndex: speedline.speedIndex,\n+ observedSpeedIndexTs: (speedline.speedIndex + speedline.beginning) * 1000,\n+ };\n- const headings = [\n- {key: 'metricName', itemType: 'text', text: 'Name'},\n- {key: 'timing', itemType: 'ms', granularity: 10, text: 'Value (ms)'},\n- ];\n+ for (const [name, value] of Object.entries(metrics)) {\n+ const key = /** @type {keyof UberMetricsItem} */ (name);\n+ if (typeof value !== 'undefined') {\n+ metrics[key] = Math.round(value);\n+ }\n+ }\n- const tableDetails = Audit.makeTableDetails(headings, metrics);\n+ /** @type {MetricsDetails} */\n+ const details = {items: [metrics]};\nreturn {\nscore: 1,\nrawValue: interactive.timing,\n- details: tableDetails,\n+ details,\n};\n}\n}\n+/**\n+ * @typedef UberMetricsItem\n+ * @property {number} firstContentfulPaint\n+ * @property {number=} firstContentfulPaintTs\n+ * @property {number} firstMeaningfulPaint\n+ * @property {number=} firstMeaningfulPaintTs\n+ * @property {number} firstCPUIdle\n+ * @property {number=} firstCPUIdleTs\n+ * @property {number} interactive\n+ * @property {number=} interactiveTs\n+ * @property {number} speedIndex\n+ * @property {number=} speedIndexTs\n+ * @property {number} estimatedInputLatency\n+ * @property {number=} estimatedInputLatencyTs\n+ * @property {number} observedNavigationStart\n+ * @property {number} observedNavigationStartTs\n+ * @property {number} observedFirstPaint\n+ * @property {number} observedFirstPaintTs\n+ * @property {number} observedFirstContentfulPaint\n+ * @property {number} observedFirstContentfulPaintTs\n+ * @property {number} observedFirstMeaningfulPaint\n+ * @property {number} observedFirstMeaningfulPaintTs\n+ * @property {number} observedTraceEnd\n+ * @property {number} observedTraceEndTs\n+ * @property {number} observedLoad\n+ * @property {number} observedLoadTs\n+ * @property {number} observedDomContentLoaded\n+ * @property {number} observedDomContentLoadedTs\n+ * @property {number} observedFirstVisualChange\n+ * @property {number} observedFirstVisualChangeTs\n+ * @property {number} observedLastVisualChange\n+ * @property {number} observedLastVisualChangeTs\n+ * @property {number} observedSpeedIndex\n+ * @property {number} observedSpeedIndexTs\n+ */\n+\n+/** @typedef {{items: [UberMetricsItem]}} MetricsDetails */\n+\nmodule.exports = Metrics;\n",
"new_path": "lighthouse-core/audits/metrics.js",
"old_path": "lighthouse-core/audits/metrics.js"
},
{
"change_type": "MODIFY",
"diff": "const log = require('lighthouse-logger');\n-function findValueInMetricsAuditFn(metricName, timingOrTimestamp) {\n+// TODO: rework this file to not need this function\n+// see https://github.com/GoogleChrome/lighthouse/pull/5101/files#r186168840\n+function findValueInMetricsAuditFn(metricName) {\nreturn auditResults => {\nconst metricsAudit = auditResults.metrics;\nif (!metricsAudit || !metricsAudit.details || !metricsAudit.details.items) return;\n- const values = metricsAudit.details.items.find(item => item.metricName === metricName);\n- return values && values[timingOrTimestamp];\n+ const values = metricsAudit.details.items[0];\n+ return values && values[metricName];\n};\n}\n@@ -33,68 +35,68 @@ class Metrics {\n{\nname: 'Navigation Start',\nid: 'navstart',\n- getTs: findValueInMetricsAuditFn('observedNavigationStart', 'timestamp'),\n- getTiming: findValueInMetricsAuditFn('observedNavigationStart', 'timing'),\n+ getTs: findValueInMetricsAuditFn('observedNavigationStartTs'),\n+ getTiming: findValueInMetricsAuditFn('observedNavigationStart'),\n},\n{\nname: 'First Contentful Paint',\nid: 'ttfcp',\n- getTs: findValueInMetricsAuditFn('observedFirstContentfulPaint', 'timestamp'),\n- getTiming: findValueInMetricsAuditFn('observedFirstContentfulPaint', 'timing'),\n+ getTs: findValueInMetricsAuditFn('observedFirstContentfulPaintTs'),\n+ getTiming: findValueInMetricsAuditFn('observedFirstContentfulPaint'),\n},\n{\nname: 'First Meaningful Paint',\nid: 'ttfmp',\n- getTs: findValueInMetricsAuditFn('observedFirstMeaningfulPaint', 'timestamp'),\n- getTiming: findValueInMetricsAuditFn('observedFirstMeaningfulPaint', 'timing'),\n+ getTs: findValueInMetricsAuditFn('observedFirstMeaningfulPaintTs'),\n+ getTiming: findValueInMetricsAuditFn('observedFirstMeaningfulPaint'),\n},\n{\nname: 'Speed Index',\nid: 'si',\n- getTs: findValueInMetricsAuditFn('observedSpeedIndex', 'timestamp'),\n- getTiming: findValueInMetricsAuditFn('observedSpeedIndex', 'timing'),\n+ getTs: findValueInMetricsAuditFn('observedSpeedIndexTs'),\n+ getTiming: findValueInMetricsAuditFn('observedSpeedIndex'),\n},\n{\nname: 'First Visual Change',\nid: 'fv',\n- getTs: findValueInMetricsAuditFn('observedFirstVisualChange', 'timestamp'),\n- getTiming: findValueInMetricsAuditFn('observedFirstVisualChange', 'timing'),\n+ getTs: findValueInMetricsAuditFn('observedFirstVisualChangeTs'),\n+ getTiming: findValueInMetricsAuditFn('observedFirstVisualChange'),\n},\n{\nname: 'Visually Complete 100%',\nid: 'vc100',\n- getTs: findValueInMetricsAuditFn('observedLastVisualChange', 'timestamp'),\n- getTiming: findValueInMetricsAuditFn('observedLastVisualChange', 'timing'),\n+ getTs: findValueInMetricsAuditFn('observedLastVisualChangeTs'),\n+ getTiming: findValueInMetricsAuditFn('observedLastVisualChange'),\n},\n{\nname: 'First CPU Idle',\nid: 'ttfi',\n- getTs: findValueInMetricsAuditFn('firstCPUIdle', 'timestamp'),\n- getTiming: findValueInMetricsAuditFn('firstCPUIdle', 'timing'),\n+ getTs: findValueInMetricsAuditFn('firstCPUIdleTs'),\n+ getTiming: findValueInMetricsAuditFn('firstCPUIdle'),\n},\n{\nname: 'Interactive',\nid: 'tti',\n- getTs: findValueInMetricsAuditFn('interactive', 'timestamp'),\n- getTiming: findValueInMetricsAuditFn('interactive', 'timing'),\n+ getTs: findValueInMetricsAuditFn('interactiveTs'),\n+ getTiming: findValueInMetricsAuditFn('interactive'),\n},\n{\nname: 'End of Trace',\nid: 'eot',\n- getTs: findValueInMetricsAuditFn('observedTraceEnd', 'timestamp'),\n- getTiming: findValueInMetricsAuditFn('observedTraceEnd', 'timing'),\n+ getTs: findValueInMetricsAuditFn('observedTraceEndTs'),\n+ getTiming: findValueInMetricsAuditFn('observedTraceEnd'),\n},\n{\nname: 'On Load',\nid: 'onload',\n- getTs: findValueInMetricsAuditFn('observedLoad', 'timestamp'),\n- getTiming: findValueInMetricsAuditFn('observedLoad', 'timing'),\n+ getTs: findValueInMetricsAuditFn('observedLoadTs'),\n+ getTiming: findValueInMetricsAuditFn('observedLoad'),\n},\n{\nname: 'DOM Content Loaded',\nid: 'dcl',\n- getTs: findValueInMetricsAuditFn('observedDomContentLoaded', 'timestamp'),\n- getTiming: findValueInMetricsAuditFn('observedDomContentLoaded', 'timing'),\n+ getTs: findValueInMetricsAuditFn('observedDomContentLoadedTs'),\n+ getTiming: findValueInMetricsAuditFn('observedDomContentLoaded'),\n},\n];\n}\n",
"new_path": "lighthouse-core/lib/traces/pwmetrics-events.js",
"old_path": "lighthouse-core/lib/traces/pwmetrics-events.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -29,32 +29,39 @@ describe('Performance: metrics', () => {\nconst result = await Audit.audit(artifacts, {settings});\nassert.deepStrictEqual(result.details.items[0], {\n- metricName: 'firstContentfulPaint',\n- timing: 2038,\n- timestamp: undefined,\n- });\n-\n- const metrics = {};\n- result.details.items.forEach(item => metrics[item.metricName] = Math.round(item.timing));\n-\n- assert.deepStrictEqual(metrics, {\nfirstContentfulPaint: 2038,\n+ firstContentfulPaintTs: undefined,\nfirstMeaningfulPaint: 2851,\n+ firstMeaningfulPaintTs: undefined,\nfirstCPUIdle: 5308,\n+ firstCPUIdleTs: undefined,\ninteractive: 5308,\n+ interactiveTs: undefined,\nspeedIndex: 2063,\n+ speedIndexTs: undefined,\nestimatedInputLatency: 104,\n+ estimatedInputLatencyTs: undefined,\nobservedNavigationStart: 0,\n+ observedNavigationStartTs: 225414172015,\nobservedFirstPaint: 499,\n+ observedFirstPaintTs: 225414670868,\nobservedFirstContentfulPaint: 499,\n+ observedFirstContentfulPaintTs: 225414670885,\nobservedFirstMeaningfulPaint: 783,\n+ observedFirstMeaningfulPaintTs: 225414955343,\nobservedTraceEnd: 12540,\n+ observedTraceEndTs: 225426711887,\nobservedLoad: 2199,\n+ observedLoadTs: 225416370913,\nobservedDomContentLoaded: 560,\n+ observedDomContentLoadedTs: 225414732309,\nobservedFirstVisualChange: 520,\n+ observedFirstVisualChangeTs: 225414692015,\nobservedLastVisualChange: 818,\n+ observedLastVisualChangeTs: 225414990015,\nobservedSpeedIndex: 605,\n+ observedSpeedIndexTs: 225414776724,\n});\n});\n});\n",
"new_path": "lighthouse-core/test/audits/metrics-test.js",
"old_path": "lighthouse-core/test/audits/metrics-test.js"
},
{
"change_type": "MODIFY",
"diff": "\"description\": \"Metrics\",\n\"helpText\": \"Collects all available metrics.\",\n\"details\": {\n- \"type\": \"table\",\n- \"headings\": [\n- {\n- \"key\": \"metricName\",\n- \"itemType\": \"text\",\n- \"text\": \"Name\"\n- },\n- {\n- \"key\": \"timing\",\n- \"itemType\": \"ms\",\n- \"granularity\": 10,\n- \"text\": \"Value (ms)\"\n- }\n- ],\n\"items\": [\n{\n- \"metricName\": \"firstContentfulPaint\",\n- \"timing\": 3969,\n- \"timestamp\": 185607289047\n- },\n- {\n- \"metricName\": \"firstMeaningfulPaint\",\n- \"timing\": 3969,\n- \"timestamp\": 185607289048\n- },\n- {\n- \"metricName\": \"firstCPUIdle\",\n- \"timing\": 4927,\n- \"timestamp\": 185608247190\n- },\n- {\n- \"metricName\": \"interactive\",\n- \"timing\": 4927,\n- \"timestamp\": 185608247190\n- },\n- {\n- \"metricName\": \"speedIndex\",\n- \"timing\": 4417,\n- \"timestamp\": 185607736912\n- },\n- {\n- \"metricName\": \"estimatedInputLatency\",\n- \"timing\": 16\n- },\n- {\n- \"metricName\": \"observedNavigationStart\",\n- \"timing\": 0,\n- \"timestamp\": 185603319912\n- },\n- {\n- \"metricName\": \"observedFirstPaint\",\n- \"timing\": 3969.131,\n- \"timestamp\": 185607289043\n- },\n- {\n- \"metricName\": \"observedFirstContentfulPaint\",\n- \"timing\": 3969.135,\n- \"timestamp\": 185607289047\n- },\n- {\n- \"metricName\": \"observedFirstMeaningfulPaint\",\n- \"timing\": 3969.136,\n- \"timestamp\": 185607289048\n- },\n- {\n- \"metricName\": \"observedTraceEnd\",\n- \"timing\": 10281.277,\n- \"timestamp\": 185613601189\n- },\n- {\n- \"metricName\": \"observedLoad\",\n- \"timing\": 4924.462,\n- \"timestamp\": 185608244374\n- },\n- {\n- \"metricName\": \"observedDomContentLoaded\",\n- \"timing\": 4900.822,\n- \"timestamp\": 185608220734\n- },\n- {\n- \"metricName\": \"observedFirstVisualChange\",\n- \"timing\": 3969,\n- \"timestamp\": 185607288912\n- },\n- {\n- \"metricName\": \"observedLastVisualChange\",\n- \"timing\": 4791,\n- \"timestamp\": 185608110912\n- },\n- {\n- \"metricName\": \"observedSpeedIndex\",\n- \"timing\": 4416.851239995658,\n- \"timestamp\": 185607736763.24002\n+ \"firstContentfulPaint\": 3969,\n+ \"firstContentfulPaintTs\": 185607289047,\n+ \"firstMeaningfulPaint\": 3969,\n+ \"firstMeaningfulPaintTs\": 185607289048,\n+ \"firstCPUIdle\": 4927,\n+ \"firstCPUIdleTs\": 185608247190,\n+ \"interactive\": 4927,\n+ \"interactiveTs\": 185608247190,\n+ \"speedIndex\": 4417,\n+ \"speedIndexTs\": 185607736912,\n+ \"estimatedInputLatency\": 16,\n+ \"observedNavigationStart\": 0,\n+ \"observedNavigationStartTs\": 185603319912,\n+ \"observedFirstPaint\": 3969,\n+ \"observedFirstPaintTs\": 185607289043,\n+ \"observedFirstContentfulPaint\": 3969,\n+ \"observedFirstContentfulPaintTs\": 185607289047,\n+ \"observedFirstMeaningfulPaint\": 3969,\n+ \"observedFirstMeaningfulPaintTs\": 185607289048,\n+ \"observedTraceEnd\": 10281,\n+ \"observedTraceEndTs\": 185613601189,\n+ \"observedLoad\": 4924,\n+ \"observedLoadTs\": 185608244374,\n+ \"observedDomContentLoaded\": 4901,\n+ \"observedDomContentLoadedTs\": 185608220734,\n+ \"observedFirstVisualChange\": 3969,\n+ \"observedFirstVisualChangeTs\": 185607288912,\n+ \"observedLastVisualChange\": 4791,\n+ \"observedLastVisualChangeTs\": 185608110912,\n+ \"observedSpeedIndex\": 4417,\n+ \"observedSpeedIndexTs\": 185607736763\n}\n]\n}\n",
"new_path": "lighthouse-core/test/results/sample_v2.json",
"old_path": "lighthouse-core/test/results/sample_v2.json"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(metrics): consumable metrics audit output (#5101)
| 1
|
core
|
metrics
|
730,413
|
04.05.2018 16:31:33
| 14,400
|
1fad2b4810f1c64dfd49e254640a6540c702fbcb
|
refactor(tab): consolidate pipeline steps
|
[
{
"change_type": "MODIFY",
"diff": "@@ -12,7 +12,8 @@ pipeline {\nstages {\nstage('Checkout') {\nsteps{\n- checkout poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'a8c27fc2-52cd-499c-b648-0355ed5ca72a', url: 'https://github.com/webex/react-ciscospark']]]\n+ checkout poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [],\n+ submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'a8c27fc2-52cd-499c-b648-0355ed5ca72a', url: 'https://github.com/webex/react-ciscospark']]]\n}\n}\n@@ -21,16 +22,14 @@ pipeline {\nwithCredentials([\nstring(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')\n]) {\n- sh '''#!/bin/bash -ex\n+ sh '''#!/bin/bash -e\nset +x\nrm .nvmrc\ncurl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash\n~/.nvm/nvm.sh\necho \\'//registry.npmjs.org/:_authToken=${NPM_TOKEN}\\' >> .npmrc\nsource ~/.bashrc || true\n- source ~/.profile || true'''\n- sh '''#!/bin/bash -ex\n- source ~/.nvm/nvm.sh\n+ source ~/.profile || true\nnvm install 8.11.1\nnvm use 8.11.1\nnpm install\n@@ -47,7 +46,7 @@ pipeline {\nusernamePassword(credentialsId: 'SAUCE_LABS_VALIDATED_MERGE_CREDENTIALS', passwordVariable: 'SAUCE_ACCESS_KEY', usernameVariable: 'SAUCE_USERNAME'),\nstring(credentialsId: 'CISCOSPARK_APPID_SECRET', variable: 'CISCOSPARK_APPID_SECRET'),\n]) {\n- sh '''#!/bin/bash -ex\n+ sh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\nnvm use 8.11.1\nNODE_ENV=test npm run build:package widget-space && npm run build:package widget-recents\n",
"new_path": "Jenkinsfile.tab",
"old_path": "Jenkinsfile.tab"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
refactor(tab): consolidate pipeline steps
| 1
|
refactor
|
tab
|
730,429
|
04.05.2018 16:40:09
| 14,400
|
3a21eb7f534221cf8f29d87af02422b51837decf
|
style(icon): use camel case for main
|
[
{
"change_type": "MODIFY",
"diff": "/* Imported from https://sqbu-github.cisco.com/WebExSquared/spark-icons */\n@font-face {\nfont-family: 'Neo-icons';\n- src: url('fonts/Neo-icons.woff?mujx6') format('woff');\n+ src:\n+ local('Neo-icons'),\n+ url('./fonts/Neo-icons.woff') format('woff');\nfont-weight: normal;\nfont-style: normal;\n}\n-.ciscospark-icon {\n+.ciscosparkIcon {\n/* use !important to prevent issues with browser extensions that change fonts */\nfont-family: 'Neo-icons' !important;\n- speak: none;\nfont-style: normal;\nfont-weight: normal;\nfont-variant: normal;\n",
"new_path": "packages/node_modules/@ciscospark/react-component-icon/src/styles.css",
"old_path": "packages/node_modules/@ciscospark/react-component-icon/src/styles.css"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
style(icon): use camel case for main
| 1
|
style
|
icon
|
724,000
|
04.05.2018 19:50:43
| -3,600
|
d31c24c41d7292f114b516ca22bd516322fedc19
|
test: remove chrome from karma
|
[
{
"change_type": "MODIFY",
"diff": "\"jsdom\": \"^11.5.1\",\n\"jsdom-global\": \"^3.0.2\",\n\"karma\": \"^1.7.0\",\n- \"karma-chrome-launcher\": \"^2.2.0\",\n\"karma-mocha\": \"^1.3.0\",\n\"karma-phantomjs-launcher\": \"^1.0.4\",\n\"karma-sinon-chai\": \"^1.3.1\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -2,7 +2,7 @@ const webpackConfig = require('./webpack.test.config.js')\nmodule.exports = function (config) {\nconfig.set({\n- browsers: ['PhantomJS', 'ChromeHeadless'],\n+ browsers: ['PhantomJS'],\nframeworks: ['mocha', 'sinon-chai'],\nreporters: ['spec'],\nfiles: [\n",
"new_path": "test/setup/karma.conf.js",
"old_path": "test/setup/karma.conf.js"
}
] |
JavaScript
|
MIT License
|
vuejs/vue-test-utils
|
test: remove chrome from karma
| 1
|
test
| null |
135,547
|
05.05.2018 02:02:02
| 21,600
|
663be67979e06a7b6d9497f31e27876d077a6ba9
|
docs(cli): added --config flag
|
[
{
"change_type": "MODIFY",
"diff": "@@ -10,6 +10,7 @@ commitlint@4.2.0 - Lint your commit messages\n--cwd, -d directory to execute in, defaults to: /Users/marneb/Documents/oss/commitlint\n--edit, -e read last commit message from the specified file or fallbacks to ./.git/COMMIT_EDITMSG\n--extends, -x array of shareable configurations to extend\n+ --config, -g path to a custom configuration\n--from, -f lower end of the commit range to lint; applies if edit=false\n--to, -t upper end of the commit range to lint; applies if edit=false\n--quiet, -q toggle console output\n",
"new_path": "docs/reference-cli.md",
"old_path": "docs/reference-cli.md"
}
] |
TypeScript
|
MIT License
|
conventional-changelog/commitlint
|
docs(cli): added --config flag (#328)
| 1
|
docs
|
cli
|
791,690
|
05.05.2018 09:17:43
| 25,200
|
335ceda3ecc4028bd7430c0082142d67f534c637
|
core(lantern): never exclude main document from graphs
|
[
{
"change_type": "MODIFY",
"diff": "@@ -40,7 +40,7 @@ class FirstContentfulPaint extends MetricArtifact {\n});\nreturn dependencyGraph.cloneWithRelationships(node => {\n- if (node.endTime > fcp) return false;\n+ if (node.endTime > fcp && !node.isMainDocument()) return false;\n// Include EvaluateScript tasks for blocking scripts\nif (node.type === Node.TYPES.CPU) {\nreturn /** @type {CPUNode} */ (node).isEvaluateScriptFor(blockingScriptUrls);\n@@ -64,7 +64,7 @@ class FirstContentfulPaint extends MetricArtifact {\n});\nreturn dependencyGraph.cloneWithRelationships(node => {\n- if (node.endTime > fcp) return false;\n+ if (node.endTime > fcp && !node.isMainDocument()) return false;\n// Include EvaluateScript tasks for blocking scripts\nif (node.type === Node.TYPES.CPU) {\nreturn /** @type {CPUNode} */ (node).isEvaluateScriptFor(blockingScriptUrls);\n",
"new_path": "lighthouse-core/gather/computed/metrics/lantern-first-contentful-paint.js",
"old_path": "lighthouse-core/gather/computed/metrics/lantern-first-contentful-paint.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -40,7 +40,7 @@ class FirstMeaningfulPaint extends MetricArtifact {\n});\nreturn dependencyGraph.cloneWithRelationships(node => {\n- if (node.endTime > fmp) return false;\n+ if (node.endTime > fmp && !node.isMainDocument()) return false;\n// Include EvaluateScript tasks for blocking scripts\nif (node.type === Node.TYPES.CPU) {\nreturn /** @type {CPUNode} */ (node).isEvaluateScriptFor(blockingScriptUrls);\n@@ -64,7 +64,7 @@ class FirstMeaningfulPaint extends MetricArtifact {\n});\nreturn dependencyGraph.cloneWithRelationships(node => {\n- if (node.endTime > fmp) return false;\n+ if (node.endTime > fmp && !node.isMainDocument()) return false;\n// Include CPU tasks that performed a layout or were evaluations of required scripts\nif (node.type === Node.TYPES.CPU) {\n",
"new_path": "lighthouse-core/gather/computed/metrics/lantern-first-meaningful-paint.js",
"old_path": "lighthouse-core/gather/computed/metrics/lantern-first-meaningful-paint.js"
},
{
"change_type": "MODIFY",
"diff": "const ComputedArtifact = require('./computed-artifact');\nconst NetworkNode = require('../../lib/dependency-graph/network-node');\nconst CPUNode = require('../../lib/dependency-graph/cpu-node');\n+const NetworkAnalyzer = require('../../lib/dependency-graph/simulator/network-analyzer');\nconst TracingProcessor = require('../../lib/traces/tracing-processor');\nconst WebInspector = require('../../lib/web-inspector');\n@@ -268,14 +269,17 @@ class PageDependencyGraphArtifact extends ComputedArtifact {\nconst rootRequest = networkRecords.reduce((min, r) => (min.startTime < r.startTime ? min : r));\nconst rootNode = networkNodeOutput.idToNodeMap.get(rootRequest.requestId);\n+ const mainDocumentRequest = NetworkAnalyzer.findMainDocument(networkRecords);\n+ const mainDocumentNode = networkNodeOutput.idToNodeMap.get(mainDocumentRequest.requestId);\n- if (!rootNode) {\n+ if (!rootNode || !mainDocumentNode) {\n// Should always be found.\n- throw new Error('rootNode not found.');\n+ throw new Error(`${rootNode ? 'mainDocument' : 'root'}Node not found.`);\n}\nPageDependencyGraphArtifact.linkNetworkNodes(rootNode, networkNodeOutput);\nPageDependencyGraphArtifact.linkCPUNodes(rootNode, networkNodeOutput, cpuNodes);\n+ mainDocumentNode.setIsMainDocument(true);\nif (NetworkNode.hasCycle(rootNode)) {\nthrow new Error('Invalid dependency graph created, cycle detected');\n",
"new_path": "lighthouse-core/gather/computed/page-dependency-graph.js",
"old_path": "lighthouse-core/gather/computed/page-dependency-graph.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -23,6 +23,7 @@ class Node {\n*/\nconstructor(id) {\nthis._id = id;\n+ this._isMainDocument = false;\n/** @type {Node[]} */\nthis._dependents = [];\n/** @type {Node[]} */\n@@ -57,6 +58,20 @@ class Node {\nthrow new Error('Unimplemented');\n}\n+ /**\n+ * @param {boolean} value\n+ */\n+ setIsMainDocument(value) {\n+ this._isMainDocument = value;\n+ }\n+\n+ /**\n+ * @return {boolean}\n+ */\n+ isMainDocument() {\n+ return this._isMainDocument;\n+ }\n+\n/**\n* @return {Node[]}\n*/\n",
"new_path": "lighthouse-core/lib/dependency-graph/node.js",
"old_path": "lighthouse-core/lib/dependency-graph/node.js"
},
{
"change_type": "MODIFY",
"diff": "'use strict';\nconst INITIAL_CWD = 14 * 1024;\n+const WebInspector = require('../../web-inspector');\nclass NetworkAnalyzer {\n/**\n@@ -319,6 +320,17 @@ class NetworkAnalyzer {\nconst estimatesByOrigin = NetworkAnalyzer._estimateResponseTimeByOrigin(records, rttByOrigin);\nreturn NetworkAnalyzer.summarize(estimatesByOrigin);\n}\n+\n+ /**\n+ * @param {Array<LH.WebInspector.NetworkRequest>} records\n+ * @return {LH.WebInspector.NetworkRequest}\n+ */\n+ static findMainDocument(records) {\n+ // TODO(phulce): handle more edge cases like client redirects, or plumb through finalUrl\n+ const documentRequests = records.filter(record => record._resourceType ===\n+ WebInspector.resourceTypes.Document);\n+ return documentRequests.sort((a, b) => a.startTime - b.startTime)[0];\n+ }\n}\nmodule.exports = NetworkAnalyzer;\n",
"new_path": "lighthouse-core/lib/dependency-graph/simulator/network-analyzer.js",
"old_path": "lighthouse-core/lib/dependency-graph/simulator/network-analyzer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,7 +15,13 @@ const sampleDevtoolsLog = require('../../fixtures/traces/progressive-app-m60.dev\nconst assert = require('assert');\n-function createRequest(requestId, url, startTime = 0, _initiator = null, _resourceType = null) {\n+function createRequest(\n+ requestId,\n+ url,\n+ startTime = 0,\n+ _initiator = null,\n+ _resourceType = WebInspector.resourceTypes.Document\n+) {\nstartTime = startTime / 1000;\nconst endTime = startTime + 0.05;\nreturn {requestId, url, startTime, endTime, _initiator, _resourceType};\n@@ -249,5 +255,19 @@ describe('PageDependencyGraph computed artifact:', () => {\nassert.deepEqual(getDependencyIds(nodes[5]), [1]);\nassert.deepEqual(getDependencyIds(nodes[6]), [4]);\n});\n+\n+ it('should set isMainDocument on first document request', () => {\n+ const request1 = createRequest(1, '1', 0, null, WebInspector.resourceTypes.Image);\n+ const request2 = createRequest(2, '2', 5);\n+ const networkRecords = [request1, request2];\n+\n+ const graph = PageDependencyGraph.createGraph(traceOfTab, networkRecords);\n+ const nodes = [];\n+ graph.traverse(node => nodes.push(node));\n+\n+ assert.equal(nodes.length, 2);\n+ assert.equal(nodes[0].isMainDocument(), false);\n+ assert.equal(nodes[1].isMainDocument(), true);\n+ });\n});\n});\n",
"new_path": "lighthouse-core/test/gather/computed/page-dependency-graph-test.js",
"old_path": "lighthouse-core/test/gather/computed/page-dependency-graph-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -262,4 +262,12 @@ describe('DependencyGraph/Simulator/NetworkAnalyzer', () => {\n});\n});\n});\n+\n+ describe('#findMainDocument', () => {\n+ it('should find the main document', async () => {\n+ const records = await computedArtifacts.requestNetworkRecords(devtoolsLog);\n+ const mainDocument = NetworkAnalyzer.findMainDocument(records);\n+ assert.equal(mainDocument.url, 'https://pwa.rocks/');\n+ });\n+ });\n});\n",
"new_path": "lighthouse-core/test/lib/dependency-graph/simulator/network-analyzer-test.js",
"old_path": "lighthouse-core/test/lib/dependency-graph/simulator/network-analyzer-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(lantern): never exclude main document from graphs (#5124)
| 1
|
core
|
lantern
|
815,745
|
05.05.2018 10:38:10
| -10,800
|
fe3853dadec974dba3c0606257e0698320ff7372
|
fix: keep input focues while clicking dropdown items
fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -16,7 +16,8 @@ import {\nChangeDetectionStrategy,\nAfterContentInit,\nOnInit,\n- OnChanges\n+ OnChanges,\n+ HostListener\n} from '@angular/core';\nimport { NgOption } from './ng-select.types';\n@@ -93,6 +94,16 @@ export class NgDropdownPanelComponent implements OnInit, OnChanges, OnDestroy, A\nthis._itemsList = _ngSelect.itemsList;\n}\n+ @HostListener('mousedown', ['$event'])\n+ handleMousedown($event: MouseEvent) {\n+ const target = $event.target as HTMLElement;\n+ if (target.tagName === 'INPUT') {\n+ return;\n+ }\n+ $event.preventDefault();\n+ $event.stopPropagation();\n+ }\n+\nngOnInit() {\nthis._handleScroll();\nfromEventPattern((handler: any) => document.addEventListener('mousedown', handler, true))\n",
"new_path": "src/ng-select/ng-dropdown-panel.component.ts",
"old_path": "src/ng-select/ng-dropdown-panel.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -2318,6 +2318,33 @@ describe('NgSelectComponent', function () {\nlet select: NgSelectComponent;\nlet triggerMousedown = null;\n+ describe('dropdown click', () => {\n+ beforeEach(fakeAsync(() => {\n+ fixture = createTestingModule(\n+ NgSelectTestCmp,\n+ `<ng-select [items]=\"cities\"\n+ bindLabel=\"name\"\n+ [multiple]=\"true\"\n+ [(ngModel)]=\"selectedCities\">\n+ </ng-select>`);\n+ select = fixture.componentInstance.select;\n+\n+ tickAndDetectChanges(fixture);\n+ tickAndDetectChanges(fixture);\n+ triggerMousedown = () => {\n+ const control = fixture.debugElement.query(By.css('.ng-select-container'))\n+ control.triggerEventHandler('mousedown', createEvent({ target: { className: 'ng-control' } }));\n+ };\n+ }));\n+\n+ it('should focus dropdown', fakeAsync(() => {\n+ const focus = spyOn(select, 'focus');\n+ triggerMousedown();\n+ tickAndDetectChanges(fixture);\n+ expect(focus).toHaveBeenCalled();\n+ }));\n+ });\n+\ndescribe('clear icon click', () => {\nbeforeEach(fakeAsync(() => {\nfixture = createTestingModule(\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -152,6 +152,7 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C\nprivate _defaultLabel = 'label';\nprivate _primitive: boolean;\n+ private _focused: boolean;\nprivate _pressedKeys: string[] = [];\nprivate _compareWith: CompareWithFn;\n@@ -257,8 +258,12 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C\nthis.handleArrowClick();\nreturn;\n}\n- if (target.className.includes('ng-value-icon')) {\n+\n+ if (!this._focused) {\nthis.focus();\n+ }\n+\n+ if (target.className.includes('ng-value-icon')) {\nreturn;\n}\n@@ -450,6 +455,7 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C\nonInputFocus() {\n(<HTMLElement>this.elementRef.nativeElement).classList.add('ng-select-focused');\nthis.focusEvent.emit(null);\n+ this._focused = true;\n}\nonInputBlur() {\n@@ -458,6 +464,7 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C\nif (!this.isOpen && !this.isDisabled) {\nthis._onTouched();\n}\n+ this._focused = false;\n}\nonItemHover(item: NgOption) {\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: keep input focues while clicking dropdown items
fixes #514
| 1
|
fix
| null |
217,922
|
05.05.2018 12:04:51
| -7,200
|
70382d1e6f7f820b53f3406bdfed297e5ceafb5b
|
fix(simulator): Ingenuity II not imported properly from a crafting optimizer export
closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -96,7 +96,7 @@ export class CraftingActionsRegistry {\n{short: 'innovation', full: 'Innovation'},\n{short: 'greatStrides', full: 'GreatStrides'},\n{short: 'ingenuity', full: 'Ingenuity'},\n- {short: 'ingenuity2', full: 'Ingenuity2'},\n+ {short: 'ingenuity2', full: 'IngenuityII'},\n{short: 'byregotsBrow', full: 'ByregotsBrow'},\n{short: 'preciseTouch', full: 'PreciseTouch'},\n{short: 'makersMark', full: 'MakersMark'},\n",
"new_path": "src/app/pages/simulator/model/crafting-actions-registry.ts",
"old_path": "src/app/pages/simulator/model/crafting-actions-registry.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix(simulator): Ingenuity II not imported properly from a crafting optimizer export
closes #333
| 1
|
fix
|
simulator
|
815,745
|
05.05.2018 12:26:58
| -10,800
|
5f05b30eaf4dbc07004af376a0a487c1469e2a47
|
fix: reset marked item when items updated
fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -113,6 +113,7 @@ export class NgDropdownPanelComponent implements OnInit, OnChanges, OnDestroy, A\nngOnChanges(changes: SimpleChanges) {\nif (changes.items) {\n+ this._isScrolledToMarked = false;\nthis._handleItemsChange(changes.items);\n}\n}\n",
"new_path": "src/ng-select/ng-dropdown-panel.component.ts",
"old_path": "src/ng-select/ng-dropdown-panel.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -63,6 +63,8 @@ describe('NgSelectComponent', function () {\n});\ndescribe('Model bindings', () => {\n+ let select: NgSelectComponent;\n+\nit('should update ngModel on value change', fakeAsync(() => {\nconst fixture = createTestingModule(\nNgSelectTestCmp,\n@@ -150,7 +152,7 @@ describe('NgSelectComponent', function () {\nfixture.componentInstance.cities = [{ id: 7, name: 'Pailgis' }];\ntickAndDetectChanges(fixture);\n- const select = fixture.componentInstance.select;\n+ select = fixture.componentInstance.select;\nexpect(select.selectedItems[0]).toBe(select.itemsList.items[0]);\nexpect(select.selectedItems).toEqual([jasmine.objectContaining({\nvalue: { id: 7, name: 'Pailgis' }\n@@ -173,7 +175,7 @@ describe('NgSelectComponent', function () {\nfixture.componentInstance.cities = [{ id: 7, name: 'Pailgis' }];\ntickAndDetectChanges(fixture);\n- const select = fixture.componentInstance.select;\n+ select = fixture.componentInstance.select;\nexpect(select.selectedItems[0]).toBe(select.itemsList.items[0]);\nexpect(select.selectedItems).toEqual([jasmine.objectContaining({\nvalue: { id: 7, name: 'Pailgis' }\n@@ -190,7 +192,7 @@ describe('NgSelectComponent', function () {\n[(ngModel)]=\"selectedCity\">\n</ng-select>`);\n- const select = fixture.componentInstance.select;\n+ select = fixture.componentInstance.select;\nfixture.componentInstance.selectedCity = { id: 1, name: 'Vilnius' };\ntickAndDetectChanges(fixture);\nexpect(select.selectedItems).toEqual([\n@@ -219,7 +221,7 @@ describe('NgSelectComponent', function () {\n[(ngModel)]=\"selectedCities\">\n</ng-select>`);\n- const select = fixture.componentInstance.select;\n+ select = fixture.componentInstance.select;\nfixture.componentInstance.selectedCities = [{ id: 1, name: 'Vilnius' }, { id: 2, name: 'Kaunas' }];\ntickAndDetectChanges(fixture);\nexpect(select.selectedItems).toEqual([\n@@ -361,7 +363,7 @@ describe('NgSelectComponent', function () {\nfixture.componentInstance.selectedCities = [fixture.componentInstance.cities[0]];\ntickAndDetectChanges(fixture);\n- const select = fixture.componentInstance.select;\n+ select = fixture.componentInstance.select;\nexpect(select.selectedItems.length).toBe(1);\nfixture.componentInstance.selectedCities = [fixture.componentInstance.cities[1]];\n@@ -394,6 +396,28 @@ describe('NgSelectComponent', function () {\nexpect(internalItems[0].value).toEqual(jasmine.objectContaining({ id: 1, name: 'New city' }));\n}));\n+ it('should reset marked item when [items] are changed and dropdown is opened', fakeAsync(() => {\n+ const fixture = createTestingModule(\n+ NgSelectTestCmp,\n+ `<ng-select [items]=\"cities\"\n+ bindLabel=\"name\"\n+ [clearable]=\"true\"\n+ [(ngModel)]=\"selectedCity\">\n+ </ng-select>`);\n+ select = fixture.componentInstance.select;\n+\n+ fixture.componentInstance.selectedCity = fixture.componentInstance.cities[2];\n+ tickAndDetectChanges(fixture);\n+ triggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Space);\n+ expect(fixture.componentInstance.select.itemsList.markedItem.value).toEqual({ name: 'Pabrade', id: 3 });\n+\n+ fixture.componentInstance.selectedCity = { name: 'New city', id: 5 };\n+ tickAndDetectChanges(fixture);\n+ fixture.componentInstance.cities = [...fixture.componentInstance.cities]\n+ tickAndDetectChanges(fixture);\n+ expect(fixture.componentInstance.select.itemsList.markedItem.value).toEqual({ name: 'Vilnius', id: 1 });\n+ }));\n+\nit('bind to custom object properties', fakeAsync(() => {\nconst fixture = createTestingModule(\nNgSelectTestCmp,\n@@ -583,7 +607,7 @@ describe('NgSelectComponent', function () {\nvalue: { id: 2, name: 'Kaunas' },\nselected: true\n})];\n- const select = fixture.componentInstance.select;\n+ select = fixture.componentInstance.select;\nexpect(select.selectedItems).toEqual(result);\n}));\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -495,7 +495,7 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C\nthis.itemsList.mapSelectedItems();\n}\n- if (this._isTypeahead) {\n+ if (this._isTypeahead || this.isOpen) {\nthis.itemsList.markSelectedOrDefault(this.markFirst);\n}\n}\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: reset marked item when items updated
fixes #510
| 1
|
fix
| null |
217,922
|
05.05.2018 12:58:13
| -7,200
|
c2e883f3ed3ec5563c05896ae04f673eb1554cc8
|
chore(simulator): removed old sim links and replaced with menu for simulator
|
[
{
"change_type": "MODIFY",
"diff": "@@ -8,7 +8,7 @@ import {\nMatDialogModule,\nMatIconModule,\nMatInputModule,\n- MatListModule,\n+ MatListModule, MatMenuModule,\nMatProgressSpinnerModule,\nMatTabsModule,\nMatTooltipModule\n@@ -50,6 +50,7 @@ import {VentureDetailsPopupComponent} from './venture-details-popup/venture-deta\nMatProgressSpinnerModule,\nMatInputModule,\nMatCardModule,\n+ MatMenuModule,\nClipboardModule,\n",
"new_path": "src/app/modules/item/item.module.ts",
"old_path": "src/app/modules/item/item.module.ts"
},
{
"change_type": "MODIFY",
"diff": "+<mat-menu #simulatorMenu=\"matMenu\">\n+ <button mat-menu-item routerLink=\"/simulator/{{item.id}}\">{{'SIMULATOR.New_rotation' | translate}}</button>\n+ <button mat-menu-item\n+ *ngFor=\"let rotation of rotations$ | async\"\n+ routerLink=\"/simulator/{{item.id}}/{{rotation.$key}}\">{{rotation.getName()}}</button>\n+</mat-menu>\n+\n<!--Layout for desktop browsers-->\n<mat-list-item *ngIf=\"!(isMobile | async); else mobileLayout\"\n[ngClass]=\"{'even': even, 'auto-height':true, 'compact':settings.compactLists}\">\n<div class=\"classes\">\n<div *ngIf=\"recipe\">\n- <a *ngIf=\"getCraft(item.recipeId) as craft\" href=\"{{craft | simulatorLink | i18n}}\" target=\"_blank\">\n+ <button mat-icon-button [matMenuTriggerFor]=\"simulatorMenu\" *ngIf=\"getCraft(item.recipeId) as craft\">\n<img [ngClass]=\"{'crafted-by':true, 'compact': settings.compactLists}\"\nmatTooltip=\"{{craft.level}} {{craft.stars_tooltip}}\"\nmatTooltipPosition=\"above\" src=\"{{craft.icon}}\">\n- </a>\n+ </button>\n</div>\n<div *ngIf=\"!recipe\">\n<div *ngFor=\"let craft of item.craftedBy\">\n- <a href=\"{{craft | simulatorLink: item.id | i18n}}\" target=\"_blank\">\n+ <button mat-icon-button [matMenuTriggerFor]=\"simulatorMenu\">\n<img [ngClass]=\"{'crafted-by':true, 'compact': settings.compactLists}\"\n*ngIf=\"craft.icon !== ''\"\nmatTooltip=\"{{craft.level}} {{craft.stars_tooltip}}\"\nmatTooltipPosition=\"above\" src=\"{{craft.icon}}\">\n- </a>\n+ </button>\n</div>\n</div>\n<div>\n</button>\n<div class=\"classes\">\n<div *ngIf=\"item.craftedBy !== undefined && item.craftedBy.length > 0\">\n- <div *ngFor=\"let craft of item.craftedBy\">\n+ <button *ngFor=\"let craft of item.craftedBy\" [matMenuTriggerFor]=\"simulatorMenu\">\n<img class=\"crafted-by\"\n*ngIf=\"craft.icon !== ''\"\nmatTooltip=\"{{craft.level}} {{craft.stars_tooltip}}\"\nmatTooltipPosition=\"above\" src=\"{{craft.icon}}\">\n- </div>\n+ </button>\n</div>\n<button mat-icon-button *ngIf=\"item.gatheredBy !== undefined\"\n(click)=\"openGatheredByDetails(item)\">\n",
"new_path": "src/app/modules/item/item/item.component.html",
"old_path": "src/app/modules/item/item/item.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -46,6 +46,8 @@ import {folklores} from '../../../core/data/sources/folklores';\nimport {VentureDetailsPopupComponent} from '../venture-details-popup/venture-details-popup.component';\nimport {CraftedBy} from '../../../model/list/crafted-by';\nimport {Permissions} from '../../../core/database/permissions/permissions';\n+import {CraftingRotationService} from '../../../core/database/crafting-rotation.service';\n+import {CraftingRotation} from '../../../model/other/crafting-rotation';\n@Component({\nselector: 'app-item',\n@@ -277,6 +279,8 @@ export class ItemComponent extends ComponentWithSubscriptions implements OnInit,\npublic tradeIcon: number;\n+ rotations$: Observable<CraftingRotation[]>;\n+\nconstructor(private i18n: I18nToolsService,\nprivate dialog: MatDialog,\nprivate media: ObservableMedia,\n@@ -289,8 +293,12 @@ export class ItemComponent extends ComponentWithSubscriptions implements OnInit,\nprivate etime: EorzeanTimeService,\nprivate dataService: DataService,\nprivate userService: UserService,\n- public cd: ChangeDetectorRef) {\n+ public cd: ChangeDetectorRef,\n+ private rotationsService: CraftingRotationService) {\nsuper();\n+ this.rotations$ = this.userService.getUserData().mergeMap(user => {\n+ return this.rotationsService.getUserRotations(user.$key);\n+ }).publishReplay(1).refCount().do(console.log);\n}\nisDraft(): boolean {\n",
"new_path": "src/app/modules/item/item/item.component.ts",
"old_path": "src/app/modules/item/item/item.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -127,7 +127,7 @@ export class RecipesComponent extends PageComponent implements OnInit {\nthis.rotations$ = this.userService.getUserData().mergeMap(user => {\nreturn this.rotationsService.getUserRotations(user.$key);\n- });\n+ }).publishReplay(1).refCount();\nthis.sharedLists = this.userService.getUserData().mergeMap(user => {\nreturn Observable.combineLatest((user.sharedLists || []).map(listId => this.listService.get(listId)))\n",
"new_path": "src/app/pages/recipes/recipes/recipes.component.ts",
"old_path": "src/app/pages/recipes/recipes/recipes.component.ts"
},
{
"change_type": "DELETE",
"diff": "-import {Pipe, PipeTransform} from '@angular/core';\n-import {I18nName} from '../../../model/list/i18n-name';\n-import {SettingsService} from '../settings.service';\n-import {LocalizedDataService} from '../../../core/data/localized-data.service';\n-import {Recipe} from '../../../model/list/recipe';\n-\n-@Pipe({\n- name: 'simulatorLink',\n- pure: true\n-})\n-export class SimulatorLinkPipe implements PipeTransform {\n-\n- constructor(private settings: SettingsService, private localizedData: LocalizedDataService) {\n- }\n-\n- transform(craft: Recipe): I18nName {\n- return {\n- en: `${this.settings.baseSimulatorLink}#/recipe?lang=en&class=${this.getJobName(craft)}&name=${this.localizedData.getItem(craft.itemId).en}`,\n- fr: `${this.settings.baseSimulatorLink}#/recipe?lang=fr&class=${this.getJobName(craft)}&name=${this.localizedData.getItem(craft.itemId).fr}`,\n- de: `${this.settings.baseSimulatorLink}#/recipe?lang=de&class=${this.getJobName(craft)}&name=${this.localizedData.getItem(craft.itemId).de}`,\n- ja: `${this.settings.baseSimulatorLink}#/recipe?lang=ja&class=${this.getJobName(craft)}&name=${this.localizedData.getItem(craft.itemId).ja}`\n- };\n- }\n-\n- getJobName(craft: Recipe): string {\n- const splitIcon = craft.icon.split('/');\n- const lowerCaseJobName = splitIcon[splitIcon.length - 1].replace('.png', '');\n- return lowerCaseJobName.charAt(0).toUpperCase() + lowerCaseJobName.slice(1);\n- }\n-\n-}\n",
"new_path": null,
"old_path": "src/app/pages/settings/pipe/simulator-link.pipe.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -8,7 +8,6 @@ import {FormsModule} from '@angular/forms';\nimport {SettingsService} from './settings.service';\nimport {ItemLinkPipe} from './pipe/item-link.pipe';\nimport {FlexLayoutModule} from '@angular/flex-layout';\n-import {SimulatorLinkPipe} from './pipe/simulator-link.pipe';\nconst routing: Routes = [\n{\n@@ -36,14 +35,12 @@ const routing: Routes = [\ndeclarations: [\nSettingsComponent,\nItemLinkPipe,\n- SimulatorLinkPipe,\n],\nproviders: [\nSettingsService,\n],\nexports: [\nItemLinkPipe,\n- SimulatorLinkPipe,\n]\n})\nexport class SettingsModule {\n",
"new_path": "src/app/pages/settings/settings.module.ts",
"old_path": "src/app/pages/settings/settings.module.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -20,14 +20,6 @@ export class SettingsService {\nthis.setSetting('base-link', base);\n}\n- public get baseSimulatorLink(): string {\n- return this.getSetting('base-simulator-link', 'http://ffxiv-beta.lokyst.net');\n- }\n-\n- public set baseSimulatorLink(base: string) {\n- this.setSetting('base-simulator-link', base);\n- }\n-\npublic get crystalsTracking(): boolean {\nreturn this.getSetting('crystals-tracking', 'false') === 'true';\n}\n",
"new_path": "src/app/pages/settings/settings.service.ts",
"old_path": "src/app/pages/settings/settings.service.ts"
},
{
"change_type": "MODIFY",
"diff": "</mat-form-field>\n</div>\n-<div class=\"settings-row\">\n- <mat-form-field>\n- <mat-select [(ngModel)]=\"settings.baseSimulatorLink\" class=\"select-box\"\n- placeholder=\"{{'SETTINGS.Simulator_link_base' | translate}}\">\n- <mat-option *ngFor=\"let row of simulatorLinkBases\" [value]=\"row.value\">{{row.name}}</mat-option>\n- </mat-select>\n- </mat-form-field>\n-</div>\n-\n<div class=\"settings-row\" fxHide fxShow.gt-sm>\n<mat-checkbox [(ngModel)]=\"settings.compactLists\">{{'SETTINGS.compact_lists' | translate}}</mat-checkbox>\n</div>\n",
"new_path": "src/app/pages/settings/settings/settings.component.html",
"old_path": "src/app/pages/settings/settings/settings.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -17,12 +17,6 @@ export class SettingsComponent {\n// {name: 'Lodestone', value: 'LODESTONE'}, TODO\n];\n- simulatorLinkBases = [\n- {name: 'lokyst', value: 'http://ffxiv-beta.lokyst.net'},\n- {name: 'ermad', value: 'https://ermad.github.io/ffxiv-craft-opt-web/app'},\n- {name: 'ryan20340', value: 'https://ryan20340.github.io/app'},\n- ];\n-\nthemes = ['dark-orange', 'light-orange', 'light-teal', 'dark-teal', 'light-brown',\n'light-amber', 'dark-amber', 'light-green', 'dark-lime', 'light-lime',\n'dark-cyan', 'light-cyan', 'dark-indigo', 'light-indigo', 'dark-blue', 'light-blue',\n",
"new_path": "src/app/pages/settings/settings/settings.component.ts",
"old_path": "src/app/pages/settings/settings/settings.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): removed old sim links and replaced with menu for simulator
| 1
|
chore
|
simulator
|
217,922
|
05.05.2018 13:00:36
| -7,200
|
20331d93c889f7733f1bf702530cd59a66737402
|
chore(simulator): added target durability in rotation name
|
[
{
"change_type": "MODIFY",
"diff": "@@ -21,6 +21,6 @@ export class CraftingRotation extends DataModel {\npublic consumables: SavedConsumables = new SavedConsumables();\npublic getName(): string {\n- return `rlvl${this.recipe.rlvl} - ${this.rotation.length} steps`;\n+ return `rlvl${this.recipe.rlvl} - ${this.rotation.length} steps, ${this.recipe.durability} dur`;\n}\n}\n",
"new_path": "src/app/model/other/crafting-rotation.ts",
"old_path": "src/app/model/other/crafting-rotation.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): added target durability in rotation name
| 1
|
chore
|
simulator
|
217,922
|
05.05.2018 15:08:35
| -7,200
|
95e4b7929900bf1c37987e64417f8b368a9d86c0
|
fix(wiki): page considered not found while it was when in english
|
[
{
"change_type": "MODIFY",
"diff": "@@ -84,6 +84,7 @@ export class WikiComponent implements OnInit {\n// This has to be done because of firebase not handling redirection properly for not found pages.\nreturn this.getEnglishFallback(markdownUrl);\n}\n+ return Observable.of(res);\n})\n.catch(() => {\nreturn this.getEnglishFallback(markdownUrl);\n",
"new_path": "src/app/pages/wiki/wiki/wiki.component.ts",
"old_path": "src/app/pages/wiki/wiki/wiki.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix(wiki): page considered not found while it was when in english
| 1
|
fix
|
wiki
|
217,922
|
05.05.2018 15:22:11
| -7,200
|
81bfef178b48d9fa7cfaf4286ee1f5dae8fb85bf
|
fix(wiki): wiki external links now open in new tab
|
[
{
"change_type": "MODIFY",
"diff": "@@ -48,11 +48,15 @@ export class WikiComponent implements OnInit {\n}\ninterceptLinks(event: MouseEvent): void {\n- if (event.srcElement.tagName === 'A' && ((<any>event.srcElement).href.indexOf('ffxivteamcraft.com') > -1 ||\n+ if (event.srcElement.tagName === 'A') {\n+ event.preventDefault();\n+ if (((<any>event.srcElement).href.indexOf('ffxivteamcraft.com') > -1 ||\n(<any>event.srcElement).href.indexOf('localhost') > -1)) {\n// If that's an anchor, intercept the click and handle it properly with router\n- event.preventDefault();\nthis.router.navigateByUrl((<HTMLAnchorElement>event.srcElement).pathname);\n+ } else {\n+ window.open((<any>event.srcElement).href, '_blank');\n+ }\n}\n}\n",
"new_path": "src/app/pages/wiki/wiki/wiki.component.ts",
"old_path": "src/app/pages/wiki/wiki/wiki.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix(wiki): wiki external links now open in new tab
| 1
|
fix
|
wiki
|
679,913
|
05.05.2018 15:52:33
| -3,600
|
cef3c6a8be5f44904554a0c36ec203e053eff672
|
feat(hdom-components): add button component
|
[
{
"change_type": "ADD",
"diff": "+export interface ButtonOpts {\n+ /**\n+ * Element name to use for enabled buttons.\n+ * Default: \"a\"\n+ */\n+ tag: string;\n+ /**\n+ * Element name to use for disabled buttons.\n+ * Default: \"span\"\n+ */\n+ tagDisabled: string;\n+ /**\n+ * Attribute object to use for enabled buttons.\n+ * Default: none\n+ */\n+ attribs: any;\n+ /**\n+ * Attribute object to use for disabled buttons.\n+ * Default: none\n+ */\n+ attribsDisabled: any;\n+ /**\n+ * Flag to indicate if user supplied `onclick` handler\n+ * should be wrapped in a function which automatically\n+ * calls `preventDefault()`.\n+ * Default: true\n+ */\n+ preventDefault: boolean;\n+}\n+\n+/**\n+ * Higher order function to create a new stateless button component,\n+ * pre-configured via user supplied options. The returned component\n+ * function accepts the following arguments:\n+ *\n+ * - hdom context object (unused)\n+ * - extra attribute object\n+ * - onclick event listener\n+ * - body content\n+ * - disabled flag (default: false)\n+ *\n+ * The `attribs` provided as arg are merged with the default options\n+ * provided to HOF. The `disabled` arg decides which button version\n+ * to create.\n+ */\n+export const button = (opts: Partial<ButtonOpts>) => {\n+ // init with defaults\n+ opts = {\n+ tag: \"a\",\n+ tagDisabled: \"span\",\n+ preventDefault: true,\n+ ...opts\n+ };\n+ // return component function as closure\n+ return (_: any, attribs: any, onclick: EventListener, body: any, disabled?: boolean) =>\n+ disabled ?\n+ [opts.tagDisabled, {\n+ ...opts.attribsDisabled,\n+ ...attribs,\n+ disabled: true,\n+ }, body] :\n+ [opts.tag, {\n+ ...opts.attribs,\n+ ...attribs,\n+ onclick: opts.preventDefault ?\n+ (e) => (e.preventDefault(), onclick(e)) :\n+ onclick\n+ }, body];\n+};\n",
"new_path": "packages/hdom-components/src/button.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "+export * from \"./button\";\nexport * from \"./canvas\";\nexport * from \"./dropdown\";\nexport * from \"./link\";\n",
"new_path": "packages/hdom-components/src/index.ts",
"old_path": "packages/hdom-components/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(hdom-components): add button component
| 1
|
feat
|
hdom-components
|
679,913
|
05.05.2018 16:01:41
| -3,600
|
5e815256636353793233e5e547d6d9323092bdd3
|
doc(hdom-components): add ADRs
|
[
{
"change_type": "ADD",
"diff": "+adr\n",
"new_path": "packages/hdom-components/.adr-dir",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+# 1. Record architecture decisions\n+\n+Date: 2018-05-04\n+\n+## Status\n+\n+Accepted\n+\n+## Context\n+\n+We need to record the architectural decisions made on this project.\n+\n+## Decision\n+\n+We will use Architecture Decision Records, as described by Michael Nygard in this article: http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions\n+\n+## Consequences\n+\n+See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's _adr-tools_ at https://github.com/npryce/adr-tools.\n",
"new_path": "packages/hdom-components/adr/0001-record-architecture-decisions.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+# 2. Component configuration\n+\n+Date: 2018-05-04\n+\n+## Status\n+\n+WIP\n+\n+## Context\n+\n+The components provided by this package SHOULD primarily be designed\n+with the following aims:\n+\n+### Stateless\n+\n+@thi.ng/hdom provides no guidance or opinion about how component state\n+should be handled. However, stateless components are generally more\n+reusable (same component function can be used multiple times) and easier\n+to test and reason about.\n+\n+### Composable\n+\n+The components provided by this package are often meant to be used as\n+building blocks for larger, more complex components. This often requires\n+extensive configuration points.\n+\n+### Configurable\n+\n+Components should be designed such that both their behavior and styling\n+can be configured as much as possible/feasible. At the same time, this\n+flexibility SHOULD NOT have too great an impact on user code.\n+Furthermore, the configuration process SHOULD be as uniform as possible\n+for all provided components.\n+\n+### Unstyled, but skinnable & themable\n+\n+The last point deals with the multi-step process and separation of:\n+\n+1) configuring a raw component using a specific set of behavioral &\n+ aesthetic rules (usually via some form of CSS framework) and\n+2) application or instance specific theming as an additional\n+ customization step\n+\n+Neither of these steps SHOULD be in direct scope of the\n+@thi.ng/hdom-components package, but the raw components themselves MUST\n+support these use cases for practical, real world usage.\n+\n+It also worth pointing out that skinning and theming MIGHT not always be\n+separate steps and will be specific to the CSS framework used at\n+runtime.\n+\n+## Decision\n+\n+Define all suitable components in a way which enables this uniform\n+workflow:\n+\n+### Raw component with configuration options\n+\n+Where required, components SHOULD be pre-configured via an higher order\n+function accepting a configuration object with component-specific\n+options.\n+\n+Whenever possible, the component SHOULD only require partial options and\n+merge them with its own defaults. Each option MUST be documented using\n+JSDoc comments. Likewise the HOF component function MUST be documented,\n+specifically to explain which runtime arguments are expected/accepted by\n+the returned function.\n+\n+```ts\n+// button.ts\n+export interface ButtonOpts {\n+ /**\n+ * Element name to use for enabled buttons.\n+ * Default: \"a\"\n+ */\n+ tag: string;\n+ /**\n+ * Element name to use for disabled buttons.\n+ * Default: \"span\"\n+ */\n+ tagDisabled: string;\n+ /**\n+ * Attribute object to use for enabled buttons.\n+ * Default: none\n+ */\n+ attribs: any;\n+ /**\n+ * Attribute object to use for disabled buttons.\n+ * Default: none\n+ */\n+ attribsDisabled: any;\n+ /**\n+ * Flag to indicate if user supplied `onclick` handler\n+ * should be wrapped in a function which automatically\n+ * calls `preventDefault()`.\n+ * Default: true\n+ */\n+ preventDefault: boolean;\n+}\n+\n+/**\n+ * Higher order function to create a new stateless button component,\n+ * pre-configured via user supplied options. The returned component\n+ * function accepts the following arguments:\n+ *\n+ * - hdom context object (unused)\n+ * - extra attribute object\n+ * - onclick event listener\n+ * - body content\n+ * - disabled flag (default: false)\n+ *\n+ * The `attribs` provided as arg are merged with the default options\n+ * provided to HOF. The `disabled` arg decides which button version\n+ * to create.\n+ */\n+export const button = (opts: Partial<ButtonOpts>) => {\n+ // init with defaults\n+ opts = {\n+ tag: \"a\",\n+ tagDisabled: \"span\",\n+ preventDefault: true,\n+ ...opts\n+ };\n+ // return component function as closure\n+ return (_, attribs, onclick, body, disabled) =>\n+ disabled ?\n+ [opts.tagDisabled, {\n+ ...opts.attribsDisabled,\n+ ...attribs,\n+ disabled: true,\n+ }, body] :\n+ [opts.tag, {\n+ ...opts.attribs,\n+ ...attribs,\n+ onclick: opts.preventDefault ?\n+ (e) => (e.preventDefault(), onclick(e)) :\n+ onclick\n+ }, body];\n+};\n+```\n+\n+### Create pre-configured components\n+\n+To use the raw component, instantiate it via supplied options. Since the\n+component is stateless, the same instance can be used multiple times\n+from user code. Furthermore, this approach enables the publication of\n+dedicated packages providing pre-defined, themed components, which are\n+ready to use without further pre-configuration.\n+\n+In this example, we use [Tachyons](https://tachyons.io) CSS classes to\n+provide themed versions of the above raw button component. However, a\n+more \"traditional\" approach could inject CSS rules via the `style`\n+attribute. Also see\n+[@thi.ng/hiccup-css](https://github.com/thi-ng/umbrella/tree/master/packages/hiccup-css)\n+for this purpose.\n+\n+```ts\n+// themed-button.ts\n+import { button as rawButton } from \"./button\";\n+\n+// predefine skinned buttons\n+// here using Tachyons CSS classes as example\n+export const primaryButton = rawButton({\n+ attribs: {\n+ class: \"dib pa2 mb2 mr2 br2 link bg-blue hover-bg-black bg-animate white\",\n+ role: \"button\",\n+ href: \"#\"\n+ },\n+ attribsDisabled: {\n+ class: \"dib pa2 mb2 mr2 br2 bg-gray pa2 white\"\n+ }\n+});\n+\n+export const button = rawButton({\n+ attribs: {\n+ class: \"dib pa2 mb2 mr2 link dim br2 ba blue\",\n+ role: \"button\",\n+ href: \"#\",\n+ },\n+ attribsDisabled: {\n+ class: \"dib pa2 mb2 mr2 br2 ba gray\"\n+ }\n+});\n+```\n+\n+```ts\n+// user.ts\n+import { start } from \"@thi.ng/hdom\";\n+import { button, primaryButton } from \"./themed-button\";\n+\n+start(\"app\",\n+ [\"div\",\n+ [primaryButton, {}, ()=> alert(\"bt1\"), \"bt1\"],\n+ [primaryButton, {}, ()=> alert(\"bt3\"), \"bt2\", true],\n+ [button, {}, ()=> alert(\"bt3\"), \"bt3\"],\n+ [button, {}, ()=> alert(\"bt4\"), \"bt4\", true]\n+ ]\n+);\n+```\n+\n+## Consequences\n+\n+Following the approach described above provides users with a predictable\n+workflow to integrate components into their projects and should also\n+provide sufficient flexibility in terms of customizing both behaviors\n+and the look and feel of the provided raw components.\n+\n+## Discussion\n+\n+Please use [#18](https://github.com/thi-ng/umbrella/issues/18) to\n+discuss any aspect of this ADR.\n",
"new_path": "packages/hdom-components/adr/0002-component-configuration.md",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
doc(hdom-components): add ADRs
| 1
|
doc
|
hdom-components
|
217,922
|
05.05.2018 16:41:04
| -7,200
|
c1411e0f0aa17d765dda943acc91f626e55e8e86
|
feat(wiki): new wiki page for crafting simulator
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,6 +15,7 @@ Below you'll find a summary of all pages you can find on this wiki.\n* [Favourites](/wiki/favourites), describing how favourite list/workshop system works\n* [Books](/wiki/books), how to link your ingame mastercraft books (and folklore books) to your profile.\n* [List details](/wiki/list-details), how to get all the details you need on a list view.\n+ * [Crafting Simulator](/wiki/simulator), how to use the simulator, share rotations, etc.\n## Advanced features\n",
"new_path": "src/assets/wiki/en/home.md",
"old_path": "src/assets/wiki/en/home.md"
},
{
"change_type": "ADD",
"diff": "+# Simulator\n+\n+This page is here to help you get the most out of the simulator feature,\n+ how to use it to create rotations on existing items, non-existing ones (for pre-patch recipe speculations).\n+\n+## Presentation\n+\n+The [simulator] page, inspired by [Crafting Optimizer service](http://ffxiv.lokyst.net/), aims to create a more flexible approach for\n+crafting simulation, the code base, open source, is available on the main repository, in [simulator page folder](https://github.com/Supamiu/ffxiv-teamcraft/tree/master/src/app/pages/simulator). It's done in a more\n+Object Oriented approach to have easier implementation for things like Whistle while you work, buffs and more strange things (looking at you, Name Of Element skills).\n+\n+It's fully responsive, available on both mobile and desktop version of the app, so everything can use it easily.\n+\n+Rotations created using the tool can be persisted and shared so the other person will see the rotation running with **his own stats**,\n+meaning that no more worries about \"do I have enough CP/Control/Craftsmanship to run your rotation?\"\n+\n+## Access\n+\n+The simulator can be accessed via multiple ways:\n+\n+### Simulator with a given item\n+\n+ * From a recipe result in [recipes] page.\n+\n+ \n+\n+ * From a list details page.\n+\n+ \n+\n+### Simulator with custom\n+\n+ * From the [rotations] page, to create a new rotation with custom recipe attributes.\n+\n+ \n+\n+## Foods and medicines\n+\n+Every foods and medicines are available in the simulator and persisted with your rotation,\n+meaning that when you share the rotation, the user opening it wont have to set foods and medicines like you did, they'll automatically be applied.\n+\n+## HQ ingredients\n+\n+Instead of being able to set starting quality, you can directly set ingredients as HQ, like ingame.\n+These will add base quality to the craft so you know which item you can add as HQ to have more HQ chances.\n+\n+## Sharing a rotation\n+\n+### Saving the rotation\n+\n+Once you created the rotation, you can save it to the database using the save icon\n+(which will appear in the top-left corner if you have at least one skill in your rotation).\n+This will redirect you to the newly persisted rotation and the save button will now be displayed if you have modified the rotation.\n+\n+### Getting the share link\n+\n+The share link can either be copied from your URL address bar in your browser when you're in a rotation details or you can copy it from the share icon\n+located inside each rotation panel in [rotations] page.\n+\n+## Import from crafting optimizer\n+\n+You can import rotations from Crafting Optimizer using a very simple process:\n+\n+ 1. Copy the export code from your Crafting Optimizer fork (example: `[\"muscleMemory\",\"innerQuiet\",\"steadyHand2\",\"prudentTouch\",\"prudentTouch\",\"prudentTouch\"]`).\n+ 2. Click the Import icon ().\n+ 3. Paste the import code inside the text box displayed.\n+ 4. Click Ok.\n+ 5. Profit, your rotation is now imported.\n+\n+## Ingame macro creation\n+\n+You can generate ingame macros for an easy simulator => game transition of your rotations.\n+\n+This macro is generated in your current language and includes proper timeouts depending on the type of skill.\n+\n+Simply click the macro generation icon () to see the dialog box displaying the ingame macro,\n+ in blocks of 15 lines so you can easily paste ingame.\n+\n+\n+\n+[simulator]:/simulator/custom\n+[recipes]:/recipes\n+[rotations]:/rotations\n",
"new_path": "src/assets/wiki/en/simulator.md",
"old_path": null
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
feat(wiki): new wiki page for crafting simulator
| 1
|
feat
|
wiki
|
217,922
|
05.05.2018 18:27:11
| -7,200
|
0f534e8e5cf09773750e28547c61a87260e1c64a
|
chore(simulator): added loader for simulator component
|
[
{
"change_type": "MODIFY",
"diff": "</div>\n</div>\n</mat-expansion-panel>\n-<div *ngIf=\"simulation$ | async as simulation\">\n+<div *ngIf=\"simulation$ | async as simulation; else loading\">\n<div *ngIf=\"result$ | async as resultData\">\n<mat-card *ngIf=\"!isMobile()\">\n<mat-card-header>\n</mat-card>\n</div>\n</div>\n+<ng-template #loading>\n+ <div class=\"loading-container\">\n+ <mat-spinner></mat-spinner>\n+ </div>\n+</ng-template>\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.html",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.html"
},
{
"change_type": "MODIFY",
"diff": "}\n}\n+.loading-container {\n+ margin-top: 10%;\n+ margin-left: 45%;\n+ margin-right: 55%;\n+ align-content: center;\n+ min-height: 300px;\n+ overflow: visible;\n+}\n+\n.configuration {\ndisplay: flex;\nflex-wrap: wrap;\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.scss",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.scss"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): added loader for simulator component
| 1
|
chore
|
simulator
|
217,922
|
05.05.2018 18:46:44
| -7,200
|
6559c3cdb93256acd22499b95a9e477509892ff3
|
chore(simulator): saving on a rotation with different used ID results in a fork
|
[
{
"change_type": "MODIFY",
"diff": "@@ -89,9 +89,10 @@ export class SimulatorPageComponent {\nresult.description = '';\nresult.name = '';\nresult.consumables = rotation.consumables;\n- return result;\n- }).mergeMap(preparedRotation => {\n- if (preparedRotation.$key === undefined) {\n+ return {rotation: result, userId: userId};\n+ }).mergeMap(data => {\n+ const preparedRotation = data.rotation;\n+ if (preparedRotation.$key === undefined || data.userId !== data.rotation.authorId) {\n// If the rotation has no key, it means that it's a new one, so let's create a rotation entry in the database.\nreturn this.rotationsService.add(preparedRotation);\n} else {\n",
"new_path": "src/app/pages/simulator/components/simulator-page/simulator-page.component.ts",
"old_path": "src/app/pages/simulator/components/simulator-page/simulator-page.component.ts"
},
{
"change_type": "MODIFY",
"diff": "<button mat-mini-fab\nmatTooltip=\"{{'SIMULATOR.Persist' | translate}}\"\nmatTooltipPosition=\"{{isMobile()?'below':'right'}}\"\n- *ngIf=\"(actions$ | async).length > 0 && ((dirty && canSave) || rotationId === undefined)\" (click)=\"save()\">\n+ *ngIf=\"(actions$ | async).length > 0 && (dirty || rotationId === undefined)\" (click)=\"save()\">\n<mat-icon>save</mat-icon>\n</button>\n<button mat-mini-fab\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.html",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -57,6 +57,11 @@ This will redirect you to the newly persisted rotation and the save button will\nThe share link can either be copied from your URL address bar in your browser when you're in a rotation details or you can copy it from the share icon\nlocated inside each rotation panel in [rotations] page.\n+### Permissions\n+\n+Rotations can only be saved by their creator, meaning that someone can use your rotation and modify it,\n+but they won't be able to save it to your rotation, saving it will result in a new rotation being created with you as the author.\n+\n## Import from crafting optimizer\nYou can import rotations from Crafting Optimizer using a very simple process:\n",
"new_path": "src/assets/wiki/en/simulator.md",
"old_path": "src/assets/wiki/en/simulator.md"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): saving on a rotation with different used ID results in a fork
| 1
|
chore
|
simulator
|
791,690
|
06.05.2018 14:02:42
| 25,200
|
46d11afd446f4f8e6b0ca7d4a22b2ca9cc7b378b
|
core(lhr): move runtime config to report => lhr.configSettings
|
[
{
"change_type": "MODIFY",
"diff": "@@ -22,6 +22,7 @@ gulp.task('compile-report', () => {\n// externs\n'closure/third_party/commonjs.js',\n'closure/typedefs/viewer-externs.js',\n+ 'closure/typedefs/devtools-externs.js',\n'lib/file-namer.js',\n'report/html/renderer/*.js',\n",
"new_path": "lighthouse-core/closure/closure-type-checking.js",
"old_path": "lighthouse-core/closure/closure-type-checking.js"
},
{
"change_type": "ADD",
"diff": "+/**\n+ * @license Copyright 2018 Google Inc. All Rights Reserved.\n+ * 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\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+'use strict';\n+\n+/**\n+ * Typing externs file needed for DevTools compilation.\n+ * @externs\n+ */\n+\n+/**\n+ * @struct\n+ * @record\n+ */\n+function ThrottlingSettings() {}\n+\n+/** @type {number} */\n+ThrottlingSettings.prototype.rttMs;\n+\n+/** @type {number} */\n+ThrottlingSettings.prototype.throughputKbps;\n+\n+/** @type {number} */\n+ThrottlingSettings.prototype.requestLatencyMs;\n+\n+/** @type {number} */\n+ThrottlingSettings.prototype.downloadThroughputKbps;\n+\n+/** @type {number} */\n+ThrottlingSettings.prototype.uploadThroughputKbps;\n+\n+/** @type {number} */\n+ThrottlingSettings.prototype.cpuSlowdownMultiplier;\n+\n+var LH = {};\n+LH.Config = {};\n+\n+/**\n+ * @struct\n+ * @record\n+ */\n+LH.Config.Settings = function() {};\n+\n+/** @type {boolean} */\n+LH.Config.Settings.prototype.disableDeviceEmulation;\n+\n+/** @type {string} */\n+LH.Config.Settings.prototype.throttlingMethod;\n+\n+/** @type {ThrottlingSettings} */\n+LH.Config.Settings.prototype.throttling;\n",
"new_path": "lighthouse-core/closure/typedefs/devtools-externs.js",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "const Driver = require('../gather/driver'); // eslint-disable-line no-unused-vars\nconst mobile3G = require('../config/constants').throttling.mobile3G;\n-const NBSP = '\\xa0';\n-\n/**\n* Nexus 5X metrics adapted from emulated_devices/module.json\n* @type {LH.Crdp.Emulation.SetDeviceMetricsOverrideRequest}\n@@ -130,49 +128,6 @@ function disableCPUThrottling(driver) {\nreturn driver.sendCommand('Emulation.setCPUThrottlingRate', NO_CPU_THROTTLE_METRICS);\n}\n-/**\n- * @param {LH.Config.Settings} settings\n- * @return {{deviceEmulation: string, cpuThrottling: string, networkThrottling: string}}\n- */\n-function getEmulationDesc(settings) {\n- let cpuThrottling;\n- let networkThrottling;\n-\n- /** @type {LH.ThrottlingSettings} */\n- const throttling = settings.throttling || {};\n-\n- switch (settings.throttlingMethod) {\n- case 'provided':\n- cpuThrottling = 'Provided by environment';\n- networkThrottling = 'Provided by environment';\n- break;\n- case 'devtools': {\n- const {cpuSlowdownMultiplier, requestLatencyMs} = throttling;\n- cpuThrottling = `${cpuSlowdownMultiplier}x slowdown (DevTools)`;\n- networkThrottling = `${requestLatencyMs}${NBSP}ms HTTP RTT, ` +\n- `${throttling.downloadThroughputKbps}${NBSP}Kbps down, ` +\n- `${throttling.uploadThroughputKbps}${NBSP}Kbps up (DevTools)`;\n- break;\n- }\n- case 'simulate': {\n- const {cpuSlowdownMultiplier, rttMs, throughputKbps} = throttling;\n- cpuThrottling = `${cpuSlowdownMultiplier}x slowdown (Simulated)`;\n- networkThrottling = `${rttMs}${NBSP}ms TCP RTT, ` +\n- `${throughputKbps}${NBSP}Kbps throughput (Simulated)`;\n- break;\n- }\n- default:\n- cpuThrottling = 'Unknown';\n- networkThrottling = 'Unknown';\n- }\n-\n- return {\n- deviceEmulation: settings.disableDeviceEmulation ? 'Disabled' : 'Nexus 5X',\n- cpuThrottling,\n- networkThrottling,\n- };\n-}\n-\nmodule.exports = {\nenableNexus5X,\nenableNetworkThrottling,\n@@ -180,5 +135,4 @@ module.exports = {\nenableCPUThrottling,\ndisableCPUThrottling,\ngoOffline,\n- getEmulationDesc,\n};\n",
"new_path": "lighthouse-core/lib/emulation.js",
"old_path": "lighthouse-core/lib/emulation.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -65,7 +65,8 @@ class ReportRenderer {\nthis._dom.find('.lh-env__item__ua', header).textContent = report.userAgent;\nconst env = this._dom.find('.lh-env__items', header);\n- report.runtimeConfig.environment.forEach(runtime => {\n+ const environment = Util.getEnvironmentDisplayValues(report.configSettings || {});\n+ environment.forEach(runtime => {\nconst item = this._dom.cloneTemplate('#tmpl-lh-env__items', env);\nthis._dom.find('.lh-env__name', item).textContent = runtime.name;\nthis._dom.find('.lh-env__description', item).textContent = runtime.description;\n@@ -263,11 +264,7 @@ ReportRenderer.GroupJSON; // eslint-disable-line no-unused-expressions\n* audits: !Object<string, !ReportRenderer.AuditResultJSON>,\n* reportCategories: !Array<!ReportRenderer.CategoryJSON>,\n* reportGroups: !Object<string, !ReportRenderer.GroupJSON>,\n- * runtimeConfig: {\n- * blockedUrlPatterns: !Array<string>,\n- * extraHeaders: !Object<string, string>,\n- * environment: !Array<{description: string, enabled: boolean, name: string}>\n- * }\n+ * configSettings: !LH.Config.Settings,\n* }}\n*/\nReportRenderer.ReportJSON; // eslint-disable-line no-unused-expressions\n",
"new_path": "lighthouse-core/report/html/renderer/report-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/report-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -271,6 +271,71 @@ class Util {\nstatic chainDuration(startTime, endTime) {\nreturn Util.formatNumber((endTime - startTime) * 1000);\n}\n+\n+ /**\n+ * @param {LH.Config.Settings} settings\n+ * @return {Array<{name: string, description: string}>}\n+ */\n+ static getEnvironmentDisplayValues(settings) {\n+ const emulationDesc = Util.getEmulationDescriptions(settings);\n+\n+ return [\n+ {\n+ name: 'Device Emulation',\n+ description: emulationDesc.deviceEmulation,\n+ },\n+ {\n+ name: 'Network Throttling',\n+ description: emulationDesc.networkThrottling,\n+ },\n+ {\n+ name: 'CPU Throttling',\n+ description: emulationDesc.cpuThrottling,\n+ },\n+ ];\n+ }\n+\n+ /**\n+ * @param {LH.Config.Settings} settings\n+ * @return {{deviceEmulation: string, networkThrottling: string, cpuThrottling: string}}\n+ */\n+ static getEmulationDescriptions(settings) {\n+ let cpuThrottling;\n+ let networkThrottling;\n+\n+ const throttling = settings.throttling;\n+\n+ switch (settings.throttlingMethod) {\n+ case 'provided':\n+ cpuThrottling = 'Provided by environment';\n+ networkThrottling = 'Provided by environment';\n+ break;\n+ case 'devtools': {\n+ const {cpuSlowdownMultiplier, requestLatencyMs} = throttling;\n+ cpuThrottling = `${Util.formatNumber(cpuSlowdownMultiplier)}x slowdown (DevTools)`;\n+ networkThrottling = `${Util.formatNumber(requestLatencyMs)}${NBSP}ms HTTP RTT, ` +\n+ `${Util.formatNumber(throttling.downloadThroughputKbps)}${NBSP}Kbps down, ` +\n+ `${Util.formatNumber(throttling.uploadThroughputKbps)}${NBSP}Kbps up (DevTools)`;\n+ break;\n+ }\n+ case 'simulate': {\n+ const {cpuSlowdownMultiplier, rttMs, throughputKbps} = throttling;\n+ cpuThrottling = `${Util.formatNumber(cpuSlowdownMultiplier)}x slowdown (Simulated)`;\n+ networkThrottling = `${Util.formatNumber(rttMs)}${NBSP}ms TCP RTT, ` +\n+ `${Util.formatNumber(throughputKbps)}${NBSP}Kbps throughput (Simulated)`;\n+ break;\n+ }\n+ default:\n+ cpuThrottling = 'Unknown';\n+ networkThrottling = 'Unknown';\n+ }\n+\n+ return {\n+ deviceEmulation: settings.disableDeviceEmulation ? 'Disabled' : 'Nexus 5X',\n+ cpuThrottling,\n+ networkThrottling,\n+ };\n+ }\n}\nif (typeof module !== 'undefined' && module.exports) {\n",
"new_path": "lighthouse-core/report/html/renderer/util.js",
"old_path": "lighthouse-core/report/html/renderer/util.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -10,7 +10,6 @@ const Driver = require('./gather/driver.js');\nconst GatherRunner = require('./gather/gather-runner');\nconst ReportScoring = require('./scoring');\nconst Audit = require('./audits/audit');\n-const emulation = require('./lib/emulation');\nconst log = require('lighthouse-logger');\nconst assetSaver = require('./lib/asset-saver');\nconst fs = require('fs');\n@@ -127,7 +126,7 @@ class Runner {\nurl: opts.url,\nrunWarnings: lighthouseRunWarnings,\naudits: resultsById,\n- runtimeConfig: Runner.getRuntimeConfig(settings),\n+ configSettings: settings,\nreportCategories,\nreportGroups: opts.config.groups,\ntiming: {total: Date.now() - startTime},\n@@ -406,34 +405,6 @@ class Runner {\nthrow new Error(errorString + ` and '${relativePath}')`);\n}\n- /**\n- * Get runtime configuration specified by the flags\n- * @param {LH.Config.Settings} settings\n- * @return {LH.Result.RuntimeConfig}\n- */\n- static getRuntimeConfig(settings) {\n- const emulationDesc = emulation.getEmulationDesc(settings);\n-\n- return {\n- environment: [\n- {\n- name: 'Device Emulation',\n- description: emulationDesc['deviceEmulation'],\n- },\n- {\n- name: 'Network Throttling',\n- description: emulationDesc['networkThrottling'],\n- },\n- {\n- name: 'CPU Throttling',\n- description: emulationDesc['cpuThrottling'],\n- },\n- ],\n- blockedUrlPatterns: settings.blockedUrlPatterns || [],\n- extraHeaders: settings.extraHeaders || {},\n- };\n- }\n-\n/**\n* Get path to use for -G and -A modes. Defaults to $CWD/latest-run\n* @param {LH.Config.Settings} settings\n",
"new_path": "lighthouse-core/runner.js",
"old_path": "lighthouse-core/runner.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -24,6 +24,7 @@ writeFileSync(filename, cleanAndFormatLHR(data), 'utf8');\n*/\nfunction cleanAndFormatLHR(lhrString) {\nconst lhr = JSON.parse(lhrString);\n+ delete lhr.configSettings.auditMode;\ndelete lhr.timing;\nif (extraFlag !== '--only-remove-timing') {\nfor (const auditResult of Object.values(lhr.audits)) {\n",
"new_path": "lighthouse-core/scripts/cleanup-LHR-for-diff.js",
"old_path": "lighthouse-core/scripts/cleanup-LHR-for-diff.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -107,11 +107,13 @@ describe('ReportRenderer', () => {\n// Check runtime settings were populated.\nconst names = Array.from(header.querySelectorAll('.lh-env__name')).slice(1);\n- const descriptions = header.querySelectorAll('.lh-env__description');\n- sampleResults.runtimeConfig.environment.forEach((env, i) => {\n- assert.equal(names[i].textContent, env.name);\n- assert.equal(descriptions[i].textContent, env.description);\n- });\n+ const descriptions = Array.from(header.querySelectorAll('.lh-env__description'));\n+ assert.equal(names.length, 3);\n+ assert.equal(descriptions.length, 3);\n+ const descriptionsTxt = descriptions.map(el => el.textContent).join('\\n');\n+ assert.ok(/Nexus/.test(descriptionsTxt), 'should have added device emulation');\n+ assert.ok(/RTT/.test(descriptionsTxt), 'should have added network');\n+ assert.ok(/\\dx/.test(descriptionsTxt), 'should have added CPU');\n});\nit('should not mutate a report object', () => {\n",
"new_path": "lighthouse-core/test/report/html/renderer/report-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/report-renderer-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -68,6 +68,49 @@ describe('util helpers', () => {\nassert.equal(Util.calculateRating(1.00), 'pass');\n});\n+ it('builds device emulation string', () => {\n+ const get = opts => Util.getEmulationDescriptions(opts).deviceEmulation;\n+ assert.equal(get({disableDeviceEmulation: true}), 'Disabled');\n+ assert.equal(get({disableDeviceEmulation: false}), 'Nexus 5X');\n+ });\n+\n+ it('builds throttling strings when provided', () => {\n+ const descriptions = Util.getEmulationDescriptions({throttlingMethod: 'provided'});\n+ assert.equal(descriptions.cpuThrottling, 'Provided by environment');\n+ assert.equal(descriptions.networkThrottling, 'Provided by environment');\n+ });\n+\n+ it('builds throttling strings when devtools', () => {\n+ const descriptions = Util.getEmulationDescriptions({\n+ throttlingMethod: 'devtools',\n+ throttling: {\n+ cpuSlowdownMultiplier: 4.5,\n+ requestLatencyMs: 565,\n+ downloadThroughputKbps: 1400.00000000001,\n+ uploadThroughputKbps: 600,\n+ },\n+ });\n+\n+ // eslint-disable-next-line max-len\n+ assert.equal(descriptions.networkThrottling, '565\\xa0ms HTTP RTT, 1,400\\xa0Kbps down, 600\\xa0Kbps up (DevTools)');\n+ assert.equal(descriptions.cpuThrottling, '4.5x slowdown (DevTools)');\n+ });\n+\n+ it('builds throttling strings when simulate', () => {\n+ const descriptions = Util.getEmulationDescriptions({\n+ throttlingMethod: 'simulate',\n+ throttling: {\n+ cpuSlowdownMultiplier: 2,\n+ rttMs: 150,\n+ throughputKbps: 1600,\n+ },\n+ });\n+\n+ // eslint-disable-next-line max-len\n+ assert.equal(descriptions.networkThrottling, '150\\xa0ms TCP RTT, 1,600\\xa0Kbps throughput (Simulated)');\n+ assert.equal(descriptions.cpuThrottling, '2x slowdown (Simulated)');\n+ });\n+\nit('formats display values', () => {\nconst format = arg => Util.formatDisplayValue(arg);\nassert.equal(format(undefined), '');\n",
"new_path": "lighthouse-core/test/report/html/renderer/util-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/util-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -27,8 +27,8 @@ declare global {\n// Additional non-LHR-lite information.\n- /** Description of the runtime configuration used for gathering these results. */\n- runtimeConfig: Result.RuntimeConfig;\n+ /** The config settings used for these results. */\n+ configSettings: Config.Settings;\n/** List of top-level warnings for this Lighthouse run. */\nrunWarnings: string[];\n/** The User-Agent string of the browser used run Lighthouse for these results. */\n",
"new_path": "typings/lhr.d.ts",
"old_path": "typings/lhr.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(lhr): move runtime config to report => lhr.configSettings (#5122)
| 1
|
core
|
lhr
|
791,690
|
06.05.2018 14:10:14
| 25,200
|
4872e0ba454edf565d285c91cc1b2dd37e7ed16e
|
tests(smokehouse): retry failed tests
|
[
{
"change_type": "MODIFY",
"diff": "@@ -41,7 +41,7 @@ test_script:\n# FIXME: Exclude Appveyor from running `perf` smoketest until we fix the flake.\n# https://github.com/GoogleChrome/lighthouse/issues/5053\n# - yarn smoke\n- - yarn smoke ally pwa pwa2 pwa3 dbw redirects seo offline byte ttci\n+ - yarn smoke ally pwa pwa2 pwa3 dbw redirects seo offline byte tti\ncache:\n#- chrome-win32 -> appveyor.yml,package.json\n",
"new_path": ".appveyor.yml",
"old_path": ".appveyor.yml"
},
{
"change_type": "MODIFY",
"diff": "<html>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1\">\n<body>\n- Just try and figure out my TTCI (hint: it should be ~10s)\n+ Just try and figure out my TTI (hint: it should be ~10s)\n<script>\n/**\n",
"new_path": "lighthouse-cli/test/fixtures/tricky-tti.html",
"old_path": "lighthouse-cli/test/fixtures/tricky-tti.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -104,6 +104,7 @@ function displaySmokehouseOutput(result) {\n* Run smokehouse in child processes for selected smoketests\n* Display output from each as soon as they finish, but resolve function when ALL are complete\n* @param {Array<SmoketestDfn>} smokes\n+ * @return {Promise<Array<{id: string, error?: Error}>>}\n*/\nasync function runSmokehouse(smokes) {\nconst cmdPromises = [];\n@@ -176,18 +177,35 @@ async function cli() {\nconst argv = process.argv.slice(2);\nconst batches = getSmoketestBatches(argv);\n+ const smokeDefns = new Map();\nconst smokeResults = [];\nfor (const [batchName, batch] of batches) {\nconsole.log(`Smoketest batch: ${batchName || 'default'}`);\n+ for (const defn of batch) {\n+ smokeDefns.set(defn.id, defn);\n+ }\n+\nconst results = await runSmokehouse(batch);\nsmokeResults.push(...results);\n}\n+ let failingTests = smokeResults.filter(result => !!result.error);\n+\n+ // Automatically retry failed tests in CI to prevent flakes\n+ if (failingTests.length && (process.env.RETRY_SMOKES || process.env.CI)) {\n+ console.log('Retrying failed tests...');\n+ for (const failedResult of failingTests) {\n+ const resultIndex = smokeResults.indexOf(failedResult);\n+ const smokeDefn = smokeDefns.get(failedResult.id);\n+ smokeResults[resultIndex] = (await runSmokehouse([smokeDefn]))[0];\n+ }\n+ }\n+\n+ failingTests = smokeResults.filter(result => !!result.error);\n+\nawait new Promise(resolve => server.close(resolve));\nawait new Promise(resolve => serverForOffline.close(resolve));\n- const failingTests = smokeResults.filter(result => !!result.error);\n-\nif (failingTests.length) {\nconst testNames = failingTests.map(t => t.id).join(', ');\nconsole.error(log.redify(`We have ${failingTests.length} failing smoketests: ${testNames}`));\n",
"new_path": "lighthouse-cli/test/smokehouse/run-smoke.js",
"old_path": "lighthouse-cli/test/smokehouse/run-smoke.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
tests(smokehouse): retry failed tests (#5143)
| 1
|
tests
|
smokehouse
|
791,723
|
06.05.2018 14:11:07
| 25,200
|
3b56abf708a7cc53f48ef0e785b54cdc423e544d
|
report: improved text-wrapping
|
[
{
"change_type": "MODIFY",
"diff": "@@ -85,8 +85,14 @@ class DOMSize extends Audit {\n},\n{\ntotalNodes: '',\n- depth: stats.depth.snippet,\n- width: stats.width.snippet,\n+ depth: {\n+ type: 'code',\n+ value: stats.depth.snippet,\n+ },\n+ width: {\n+ type: 'code',\n+ value: stats.width.snippet,\n+ },\n},\n];\n",
"new_path": "lighthouse-core/audits/dobetterweb/dom-size.js",
"old_path": "lighthouse-core/audits/dobetterweb/dom-size.js"
},
{
"change_type": "MODIFY",
"diff": "font-size: large;\n}\n-.lh-text {\n- white-space: nowrap;\n-}\n-\n.lh-code {\nwhite-space: normal;\nmargin-top: 0;\nfont-size: 85%;\n+ word-break: break-word;\n}\n.lh-run-warnings {\n@@ -895,7 +892,7 @@ summary.lh-passed-audits-summary {\n}\n.lh-text__url > .lh-text, .lh-text__url-host {\n- display: inline;\n+ display: inline-block;\n}\n.lh-text__url-host {\n",
"new_path": "lighthouse-core/report/html/report-styles.css",
"old_path": "lighthouse-core/report/html/report-styles.css"
},
{
"change_type": "MODIFY",
"diff": "\"width\": \"22\"\n},\n{\n- \"totalNodes\": \"\"\n+ \"totalNodes\": \"\",\n+ \"depth\": {\n+ \"type\": \"code\"\n+ },\n+ \"width\": {\n+ \"type\": \"code\"\n+ }\n}\n]\n},\n\"width\": \"22\"\n},\n{\n- \"totalNodes\": \"\"\n+ \"totalNodes\": \"\",\n+ \"depth\": {\n+ \"type\": \"code\"\n+ },\n+ \"width\": {\n+ \"type\": \"code\"\n+ }\n}\n]\n}\n",
"new_path": "lighthouse-core/test/results/sample_v2.json",
"old_path": "lighthouse-core/test/results/sample_v2.json"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report: improved text-wrapping (#5138)
| 1
|
report
| null |
217,922
|
06.05.2018 14:46:36
| -7,200
|
1c36ac46ec8d779e139be53335716c70f751edcc
|
feat(patrons): custom links available for crafting rotations
|
[
{
"change_type": "MODIFY",
"diff": "<mat-select required placeholder=\"{{'CUSTOM_LINKS.Link_type' | translate}}\" [(ngModel)]=\"selectedType\">\n<mat-option value=\"workshop\">{{\"WORKSHOP.Workshops\" | translate}}</mat-option>\n<mat-option value=\"list\">{{\"Lists\" | translate}}</mat-option>\n+ <mat-option value=\"simulator\">{{\"SIMULATOR.Rotations\" | translate}}</mat-option>\n</mat-select>\n</mat-form-field>\n<mat-form-field *ngIf=\"selectedType !== undefined\">\n<mat-select required placeholder=\"{{'CUSTOM_LINKS.target' | translate}}\" [(ngModel)]=\"selectedUid\">\n<mat-option *ngFor=\"let row of types[selectedType] | async\" value=\"{{row.$key}}\">\n- {{row.name}}\n+ {{row.name || row.getName()}}\n</mat-option>\n</mat-select>\n</mat-form-field>\n",
"new_path": "src/app/pages/custom-links/custom-link-popup/custom-link-popup.component.html",
"old_path": "src/app/pages/custom-links/custom-link-popup/custom-link-popup.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -10,6 +10,8 @@ import {List} from '../../../model/list/list';\nimport {UserService} from '../../../core/database/user.service';\nimport {TranslateService} from '@ngx-translate/core';\nimport {NicknamePopupComponent} from '../../profile/nickname-popup/nickname-popup.component';\n+import {CraftingRotation} from '../../../model/other/crafting-rotation';\n+import {CraftingRotationService} from '../../../core/database/crafting-rotation.service';\n@Component({\nselector: 'app-custom-link-popup',\n@@ -21,6 +23,7 @@ export class CustomLinkPopupComponent implements OnInit {\ntypes: {\nworkshop: Observable<Workshop[]>,\nlist: Observable<List[]>,\n+ simulator: Observable<CraftingRotation[]>,\n};\nselectedType: string;\n@@ -31,16 +34,23 @@ export class CustomLinkPopupComponent implements OnInit {\nuserNickname: string;\n+ selectedRotation: CraftingRotation;\n+\nuri: string;\nconstructor(private customLinksService: CustomLinksService, @Inject(MAT_DIALOG_DATA) private data: CustomLink,\nworkshopService: WorkshopService, listService: ListService, private userService: UserService,\nprivate dialogRef: MatDialogRef<CustomLinkPopupComponent>, private snack: MatSnackBar,\n- private translator: TranslateService, private dialog: MatDialog) {\n+ private translator: TranslateService, private dialog: MatDialog, rotationService: CraftingRotationService) {\nif (this.data !== null) {\nconst parsedLink = this.data.redirectTo.split('/');\nthis.selectedType = parsedLink[0];\n+ // Special case for crafting rotations\n+ if (this.selectedType === 'simulator') {\n+ this.selectedUid = parsedLink[2];\n+ } else {\nthis.selectedUid = parsedLink[1];\n+ }\nthis.uri = this.data.uri;\n}\nuserService.getUserData().subscribe(u => {\n@@ -49,7 +59,8 @@ export class CustomLinkPopupComponent implements OnInit {\n});\nthis.types = {\nworkshop: userService.getUserData().mergeMap(user => workshopService.getUserWorkshops(user.$key)),\n- list: userService.getUserData().mergeMap(user => listService.getUserLists(user.$key))\n+ list: userService.getUserData().mergeMap(user => listService.getUserLists(user.$key)),\n+ simulator: userService.getUserData().mergeMap(user => rotationService.getUserRotations(user.$key))\n};\n}\n@@ -82,7 +93,7 @@ export class CustomLinkPopupComponent implements OnInit {\nlink.author = this.userUid;\nlink.authorNickname = this.userNickname;\nlink.uri = this.uri;\n- link.redirectTo = `${this.selectedType}/${this.selectedUid}`;\n+ link.redirectTo = this.getRedirectTo();\nthis.customLinksService.add(link).subscribe(() => {\nthis.openSnack();\nthis.dialogRef.close();\n@@ -92,7 +103,7 @@ export class CustomLinkPopupComponent implements OnInit {\nlink.author = this.userUid;\nlink.authorNickname = this.userNickname;\nlink.uri = this.uri;\n- link.redirectTo = `${this.selectedType}/${this.selectedUid}`;\n+ link.redirectTo = this.getRedirectTo();\nthis.customLinksService.set(link.$key, link).subscribe(() => {\nthis.openSnack();\nthis.dialogRef.close();\n@@ -100,6 +111,16 @@ export class CustomLinkPopupComponent implements OnInit {\n}\n}\n+ getRedirectTo(): string {\n+ if (this.data !== undefined) {\n+ return this.data.redirectTo;\n+ } else if (this.selectedType === 'simulator') {\n+ return `${this.selectedType}/custom/${this.selectedUid}`;\n+ } else {\n+ return `${this.selectedType}/${this.selectedUid}`\n+ }\n+ }\n+\nopenSnack(): void {\nthis.snack.open(\nthis.translator.instant('Share_link_copied'),\n",
"new_path": "src/app/pages/custom-links/custom-link-popup/custom-link-popup.component.ts",
"old_path": "src/app/pages/custom-links/custom-link-popup/custom-link-popup.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -13,6 +13,7 @@ import {NicknamePopupComponent} from '../../profile/nickname-popup/nickname-popu\nimport {ListTemplateService} from '../../../core/database/list-template/list-template.service';\nimport {ListTemplate} from '../../../core/database/list-template/list-template';\nimport {TemplatePopupComponent} from '../../template/template-popup/template-popup.component';\n+import {CraftingRotationService} from '../../../core/database/crafting-rotation.service';\n@Component({\nselector: 'app-custom-links',\n@@ -26,7 +27,8 @@ export class CustomLinksComponent implements OnInit {\nconstructor(public customLinkService: CustomLinksService, private userService: UserService, private dialog: MatDialog,\nprivate listService: ListService, private workshopService: WorkshopService, private snack: MatSnackBar,\n- private translator: TranslateService, private templateService: ListTemplateService) {\n+ private translator: TranslateService, private templateService: ListTemplateService,\n+ private rotationsService: CraftingRotationService) {\nthis.links = this.userService.getUserData().mergeMap(user => {\nreturn this.customLinkService.getAllByAuthor(user.$key).mergeMap(links => {\nreturn this.templateService.getAllByAuthor(user.$key).map(templates => links.concat(templates));\n@@ -86,6 +88,8 @@ export class CustomLinksComponent implements OnInit {\nreturn this.listService.get(link.redirectTo.replace('list/', ''));\n} else if (link.redirectTo.startsWith('workshop/')) {\nreturn this.workshopService.get(link.redirectTo.replace('workshop/', ''));\n+ } else if (link.redirectTo.startsWith('simulator/')) {\n+ return this.rotationsService.get(link.redirectTo.split('/')[2]);\n}\nreturn Observable.of(null)\n})\n@@ -97,7 +101,7 @@ export class CustomLinksComponent implements OnInit {\n}\n})\n.filter(val => val !== null)\n- .map(element => element.name);\n+ .map(element => element.name || element.getName());\n}\nngOnInit(): void {\n",
"new_path": "src/app/pages/custom-links/custom-links/custom-links.component.ts",
"old_path": "src/app/pages/custom-links/custom-links/custom-links.component.ts"
},
{
"change_type": "MODIFY",
"diff": "<mat-panel-title>\n{{rotation.getName()}}\n</mat-panel-title>\n+ <button mat-icon-button *ngIf=\"linkButton\"\n+ matTooltip=\"{{'CUSTOM_LINKS.Add_link' | translate}}\" matTooltipPosition=\"above\"\n+ (click)=\"$event.stopPropagation(); openLinkPopup(rotation)\">\n+ <mat-icon>link</mat-icon>\n+ </button>\n<button mat-icon-button ngxClipboard [cbContent]=\"getLink(rotation)\"\n(click)=\"$event.stopPropagation()\"\nmatTooltip=\"{{'Share' | translate}}\" matTooltipPosition=\"above\"\n",
"new_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.html",
"old_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -8,6 +8,8 @@ import {CraftingActionsRegistry} from '../../model/crafting-actions-registry';\nimport {MatDialog, MatSnackBar} from '@angular/material';\nimport {TranslateService} from '@ngx-translate/core';\nimport {ConfirmationPopupComponent} from '../../../../modules/common-components/confirmation-popup/confirmation-popup.component';\n+import {CustomLink} from '../../../../core/database/custom-links/costum-link';\n+import {CustomLinkPopupComponent} from '../../../custom-links/custom-link-popup/custom-link-popup.component';\n@Component({\nselector: 'app-rotations-page',\n@@ -19,10 +21,14 @@ export class RotationsPageComponent {\nrotations$: Observable<CraftingRotation[]>;\n+ linkButton = false;\n+\nconstructor(private rotationsService: CraftingRotationService, private userService: UserService,\nprivate craftingActionsRegistry: CraftingActionsRegistry, private snack: MatSnackBar,\nprivate translator: TranslateService, private dialog: MatDialog) {\n- this.rotations$ = this.userService.getUserData().mergeMap(user => {\n+ this.rotations$ = this.userService.getUserData()\n+ .do(user => this.linkButton = user.admin || user.patron)\n+ .mergeMap(user => {\nreturn this.rotationsService.getUserRotations(user.$key);\n});\n}\n@@ -43,8 +49,16 @@ export class RotationsPageComponent {\n.subscribe();\n}\n+ public openLinkPopup(rotation: CraftingRotation): void {\n+ const link = new CustomLink();\n+ link.redirectTo = `${rotation.defaultItemId ? 'simulator/' +\n+ rotation.defaultItemId + '/' + rotation.$key : 'simulator/custom/' + rotation.$key}`;\n+ this.dialog.open(CustomLinkPopupComponent, {data: link});\n+ }\n+\npublic getLink(rotation: CraftingRotation): string {\n- return `${window.location.protocol}//${window.location.host}${rotation.defaultItemId ? '/simulator/' + rotation.defaultItemId + '/' + rotation.$key : '/simulator/custom/' + rotation.$key}`;\n+ return `${window.location.protocol}//${window.location.host}${rotation.defaultItemId ? '/simulator/' +\n+ rotation.defaultItemId + '/' + rotation.$key : '/simulator/custom/' + rotation.$key}`;\n}\npublic showCopiedNotification(): void {\n",
"new_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.ts",
"old_path": "src/app/pages/simulator/components/rotations-page/rotations-page.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -32,27 +32,35 @@ import {\n} from '@angular/material';\nimport { MacroPopupComponent } from './components/macro-popup/macro-popup.component';\nimport {ClipboardModule} from 'ngx-clipboard';\n+import {CustomLinksModule} from '../custom-links/custom-links.module';\n+import {PatreonGuard} from '../../core/guard/patreon.guard';\n+import {MaintenanceGuard} from '../maintenance/maintenance.guard';\nconst routes: Routes = [\n{\npath: 'simulator/custom/:rotationId',\n- component: CustomSimulatorPageComponent\n+ component: CustomSimulatorPageComponent,\n+ canActivate: [MaintenanceGuard]\n},\n{\npath: 'simulator/custom',\n- component: CustomSimulatorPageComponent\n+ component: CustomSimulatorPageComponent,\n+ canActivate: [MaintenanceGuard]\n},\n{\npath: 'simulator/:itemId/:rotationId',\n- component: SimulatorPageComponent\n+ component: SimulatorPageComponent,\n+ canActivate: [MaintenanceGuard]\n},\n{\npath: 'simulator/:itemId',\n- component: SimulatorPageComponent\n+ component: SimulatorPageComponent,\n+ canActivate: [MaintenanceGuard]\n},\n{\npath: 'rotations',\n- component: RotationsPageComponent\n+ component: RotationsPageComponent,\n+ canActivate: [MaintenanceGuard]\n}\n];\n@@ -83,6 +91,7 @@ const routes: Routes = [\nClipboardModule,\nCommonComponentsModule,\n+ CustomLinksModule,\nTooltipModule,\nPipesModule,\nCoreModule,\n",
"new_path": "src/app/pages/simulator/simulator.module.ts",
"old_path": "src/app/pages/simulator/simulator.module.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
feat(patrons): custom links available for crafting rotations
| 1
|
feat
|
patrons
|
217,922
|
06.05.2018 15:26:29
| -7,200
|
bb202b638970ee82bf59cdea22f77fe88038a92d
|
feat: pop-up for reset or delete list once it's completed
closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -16,7 +16,10 @@ export class LayoutOrderService {\n'LEVEL': (a, b) => {\nconst aLevel = this.getLevel(a);\nconst bLevel = this.getLevel(b);\n- return aLevel - bLevel;\n+ const aName: string = this.localizedData.getItem(a.id)[this.translate.currentLang];\n+ const bName: string = this.localizedData.getItem(b.id)[this.translate.currentLang];\n+ // If same level, order by name for these two\n+ return aLevel === bLevel ? aName > bName ? 1 : -1 : aLevel - bLevel;\n}\n};\n",
"new_path": "src/app/core/layout/layout-order.service.ts",
"old_path": "src/app/core/layout/layout-order.service.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -39,6 +39,7 @@ import {ListLayoutPopupComponent} from '../list-layout-popup/list-layout-popup.c\nimport {ComponentWithSubscriptions} from '../../../core/component/component-with-subscriptions';\nimport {ReplaySubject} from 'rxjs/ReplaySubject';\nimport {PermissionsPopupComponent} from '../../../modules/common-components/permissions-popup/permissions-popup.component';\n+import {ListFinishedPopupComponent} from '../list-finished-popup/list-finished-popup.component';\ndeclare const ga: Function;\n@@ -93,6 +94,8 @@ export class ListDetailsComponent extends ComponentWithSubscriptions implements\n@Output()\nreload: EventEmitter<void> = new EventEmitter<void>();\n+ private completionDialogOpen = false;\n+\nprivate upgradingList = false;\npublic get selectedIndex(): number {\n@@ -319,11 +322,34 @@ export class ListDetailsComponent extends ComponentWithSubscriptions implements\nthis.listService.remove(list.$key).first().subscribe(() => {\nthis.router.navigate(['recipes']);\n});\n+ } else if (l.isComplete()) {\n+ this.onCompletion(list);\n}\n}).subscribe(() => {\n});\n}\n+ private onCompletion(list: List): void {\n+ if (!this.completionDialogOpen) {\n+ this.completionDialogOpen = true;\n+ this.dialog.open(ListFinishedPopupComponent)\n+ .afterClosed()\n+ .do(() => this.completionDialogOpen = false)\n+ .filter(res => res !== undefined)\n+ .mergeMap(res => {\n+ switch (res) {\n+ case 'reset':\n+ this.resetProgression();\n+ return Observable.of(null);\n+ case'delete':\n+ return this.listService.remove(list.$key).first().do(() => {\n+ this.router.navigate(['recipes']);\n+ });\n+ }\n+ }).subscribe();\n+ }\n+ }\n+\npublic forkList(list: List): void {\nconst fork: List = list.clone();\nthis.cd.detach();\n",
"new_path": "src/app/pages/list/list-details/list-details.component.ts",
"old_path": "src/app/pages/list/list-details/list-details.component.ts"
},
{
"change_type": "ADD",
"diff": "+<h3 mat-dialog-title>{{'LIST_DETAILS.List_finished' | translate}}</h3>\n+<div mat-dialog-content></div>\n+<div mat-dialog-actions>\n+ <button mat-raised-button mat-dialog-close=\"delete\" color=\"accent\">\n+ <mat-icon>delete</mat-icon>\n+ {{'Delete' | translate}}\n+ </button>\n+ <button mat-raised-button mat-dialog-close=\"reset\" color=\"primary\">\n+ <mat-icon>replay</mat-icon>\n+ {{'Reset_progression' | translate}}\n+ </button>\n+ <button mat-button mat-dialog-close color=\"warn\">{{'Close' | translate}}</button>\n+</div>\n",
"new_path": "src/app/pages/list/list-finished-popup/list-finished-popup.component.html",
"old_path": null
},
{
"change_type": "ADD",
"diff": "",
"new_path": "src/app/pages/list/list-finished-popup/list-finished-popup.component.scss",
"old_path": "src/app/pages/list/list-finished-popup/list-finished-popup.component.scss"
},
{
"change_type": "ADD",
"diff": "+import {Component} from '@angular/core';\n+\n+@Component({\n+ selector: 'app-list-finished-popup',\n+ templateUrl: './list-finished-popup.component.html',\n+ styleUrls: ['./list-finished-popup.component.scss']\n+})\n+export class ListFinishedPopupComponent {\n+\n+ constructor() {\n+ }\n+\n+}\n",
"new_path": "src/app/pages/list/list-finished-popup/list-finished-popup.component.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -40,6 +40,7 @@ import {ClipboardModule} from 'ngx-clipboard';\nimport { ListComponent } from './list/list.component';\nimport { NavigationMapPopupComponent } from './navigation-map-popup/navigation-map-popup.component';\nimport {MapModule} from '../../modules/map/map.module';\n+import { ListFinishedPopupComponent } from './list-finished-popup/list-finished-popup.component';\nconst routes: Routes = [\n{\n@@ -105,6 +106,7 @@ const routes: Routes = [\nImportInputBoxComponent,\nListComponent,\nNavigationMapPopupComponent,\n+ ListFinishedPopupComponent,\n],\nentryComponents: [\nRegenerationPopupComponent,\n@@ -114,6 +116,7 @@ const routes: Routes = [\nListLayoutPopupComponent,\nImportInputBoxComponent,\nNavigationMapPopupComponent,\n+ ListFinishedPopupComponent,\n]\n})\nexport class ListModule {\n",
"new_path": "src/app/pages/list/list.module.ts",
"old_path": "src/app/pages/list/list.module.ts"
},
{
"change_type": "MODIFY",
"diff": "{\n+ \"Delete\": \"Delete\",\n\"Timers\": \"Timers\",\n\"Copy_isearch\": \"Copy isearch macro\",\n\"Isearch_copied\": \"/isearch {{itemname}} copied to clipboard\",\n\"Enable_crystals_tracking\": \"Enable crystals tracking\"\n},\n\"LIST_DETAILS\": {\n+ \"List_finished\": \"List completed\",\n\"Missing_tags_before_button\": \"This list is shown as community list but has no tags, please add some tags using \",\n\"Missing_tags_after_button\": \" button\",\n\"Add_remove_amount\": \"Add/remove a given amount\",\n",
"new_path": "src/assets/i18n/en.json",
"old_path": "src/assets/i18n/en.json"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
feat: pop-up for reset or delete list once it's completed
closes #321
| 1
|
feat
| null |
217,922
|
06.05.2018 15:35:44
| -7,200
|
8a8907135a889eafaece36972dcfcade00d79920
|
chore: translation organization
|
[
{
"change_type": "MODIFY",
"diff": "\"Title\": \"Wiki\",\n\"Not_found_in_current_lang\": \"Diese Seite wurde nicht in deiner Sprache gefunden, deshalb wird die englische Version angezeigt.\",\n\"Not_found\": \"Seite nicht gefunden\"\n+ },\n+ \"HOME_PAGE\": {\n+ \"title\": \"Create lists, share, contribute, craft\",\n+ \"count\": \"lists currently stored\",\n+ \"lists_created_count\": \"lists created using FFXIV Teamcraft\",\n+ \"support_patreon\": \"Support us on patreon\",\n+ \"features\": \"Features\",\n+ \"support_title\": \"Support\",\n+ \"support_content_discord\": \"If you have any troubles using the tool, don't be shy, pay us a visit on discord !\",\n+ \"support_comtent_facebook\": \"You can also find us on facebook\",\n+ \"contribute_title\": \"Contribute\",\n+ \"contribute_content\": \"If you want to contribute to the tool, feel free to check the code on github and create some Pull Requests !\",\n+ \"changelog\": \"To get every news about the website, each changes, please refer to the changelog.\",\n+ \"FEATURES\": {\n+ \"alarms_title\": \"Alarms\"\n+ },\n+ \"GET_STARTED\": {\n+ \"Title\": \"Get started\",\n+ \"First_list_title\": \"Create your first list\",\n+ \"First_list_content\": \"Navigate to the recipes page by clicking the link below and create your first list !\",\n+ \"First_list_link\": \"Go to recipes page\",\n+ \"Create_alarm_title\": \"Create node alarms\",\n+ \"Create_alarm_content\": \"Navigate to the alarms page by clicking the link below and create your first node notification to never miss a spawn !\",\n+ \"Create_alarm_link\": \"Go to alarms page\",\n+ \"Create_rotations_title\": \"Create crafting rotations\",\n+ \"Create_rotations_content\": \"Navigate to the rotations page by clicking the link below and create rotations for ingame crafting, to test with your own stats, foods, and HQ ingredients !\",\n+ \"Create_rotations_link\": \"Go to rotations page\",\n+ \"Access_wiki_title\": \"Learn more\",\n+ \"Access_wiki_content\": \"Navigate to the wiki page by clicking the link below. This page has some documentation for the general website usage, to guide you to make the most out of it and help you as much as possible\",\n+ \"Access_wiki_link\": \"Go to wiki page\"\n+ }\n}\n}\n",
"new_path": "src/assets/i18n/de.json",
"old_path": "src/assets/i18n/de.json"
},
{
"change_type": "MODIFY",
"diff": "\"contribute_content\": \"If you want to contribute to the tool, feel free to check the code on github and create some Pull Requests !\",\n\"changelog\": \"To get every news about the website, each changes, please refer to the changelog.\",\n\"FEATURES\": {\n- \"list_creation_title\": \"List creation\",\n- \"realtime_translations_title\": \"Realtime translation\",\n- \"item_details_title\": \"Item details\",\n- \"node_timers_title\": \"Timer node alerts\",\n- \"area_breakdown_title\": \"Area breakdown\",\n- \"search_filters_title\": \"Search filters\",\n- \"bulk_import_title\": \"Bulk import\",\n- \"map_markers_title\": \"Map markers\",\n- \"comments_title\": \"Comments\",\n- \"pricing_title\": \"Pricing\",\n- \"inventory_title\": \"Inventory breakdown\",\n\"alarms_title\": \"Alarms\"\n},\n\"GET_STARTED\": {\n",
"new_path": "src/assets/i18n/en.json",
"old_path": "src/assets/i18n/en.json"
},
{
"change_type": "MODIFY",
"diff": "\"Control\": \"Control\"\n}\n}\n+ },\n+ \"HOME_PAGE\": {\n+ \"title\": \"Create lists, share, contribute, craft\",\n+ \"count\": \"lists currently stored\",\n+ \"lists_created_count\": \"lists created using FFXIV Teamcraft\",\n+ \"support_patreon\": \"Support us on patreon\",\n+ \"features\": \"Features\",\n+ \"support_title\": \"Support\",\n+ \"support_content_discord\": \"If you have any troubles using the tool, don't be shy, pay us a visit on discord !\",\n+ \"support_comtent_facebook\": \"You can also find us on facebook\",\n+ \"contribute_title\": \"Contribute\",\n+ \"contribute_content\": \"If you want to contribute to the tool, feel free to check the code on github and create some Pull Requests !\",\n+ \"changelog\": \"To get every news about the website, each changes, please refer to the changelog.\",\n+ \"FEATURES\": {\n+ \"alarms_title\": \"Alarms\"\n+ },\n+ \"GET_STARTED\": {\n+ \"Title\": \"Get started\",\n+ \"First_list_title\": \"Create your first list\",\n+ \"First_list_content\": \"Navigate to the recipes page by clicking the link below and create your first list !\",\n+ \"First_list_link\": \"Go to recipes page\",\n+ \"Create_alarm_title\": \"Create node alarms\",\n+ \"Create_alarm_content\": \"Navigate to the alarms page by clicking the link below and create your first node notification to never miss a spawn !\",\n+ \"Create_alarm_link\": \"Go to alarms page\",\n+ \"Create_rotations_title\": \"Create crafting rotations\",\n+ \"Create_rotations_content\": \"Navigate to the rotations page by clicking the link below and create rotations for ingame crafting, to test with your own stats, foods, and HQ ingredients !\",\n+ \"Create_rotations_link\": \"Go to rotations page\",\n+ \"Access_wiki_title\": \"Learn more\",\n+ \"Access_wiki_content\": \"Navigate to the wiki page by clicking the link below. This page has some documentation for the general website usage, to guide you to make the most out of it and help you as much as possible\",\n+ \"Access_wiki_link\": \"Go to wiki page\"\n+ }\n}\n}\n",
"new_path": "src/assets/i18n/es.json",
"old_path": "src/assets/i18n/es.json"
},
{
"change_type": "MODIFY",
"diff": "\"Title\": \"Wiki\",\n\"Not_found_in_current_lang\": \"This page isn't found in your current language, english version will be shown\",\n\"Not_found\": \"Page not found\"\n+ },\n+ \"HOME_PAGE\": {\n+ \"title\": \"Create lists, share, contribute, craft\",\n+ \"count\": \"lists currently stored\",\n+ \"lists_created_count\": \"lists created using FFXIV Teamcraft\",\n+ \"support_patreon\": \"Support us on patreon\",\n+ \"features\": \"Features\",\n+ \"support_title\": \"Support\",\n+ \"support_content_discord\": \"If you have any troubles using the tool, don't be shy, pay us a visit on discord !\",\n+ \"support_comtent_facebook\": \"You can also find us on facebook\",\n+ \"contribute_title\": \"Contribute\",\n+ \"contribute_content\": \"If you want to contribute to the tool, feel free to check the code on github and create some Pull Requests !\",\n+ \"changelog\": \"To get every news about the website, each changes, please refer to the changelog.\",\n+ \"FEATURES\": {\n+ \"alarms_title\": \"Alarms\"\n+ },\n+ \"GET_STARTED\": {\n+ \"Title\": \"Get started\",\n+ \"First_list_title\": \"Create your first list\",\n+ \"First_list_content\": \"Navigate to the recipes page by clicking the link below and create your first list !\",\n+ \"First_list_link\": \"Go to recipes page\",\n+ \"Create_alarm_title\": \"Create node alarms\",\n+ \"Create_alarm_content\": \"Navigate to the alarms page by clicking the link below and create your first node notification to never miss a spawn !\",\n+ \"Create_alarm_link\": \"Go to alarms page\",\n+ \"Create_rotations_title\": \"Create crafting rotations\",\n+ \"Create_rotations_content\": \"Navigate to the rotations page by clicking the link below and create rotations for ingame crafting, to test with your own stats, foods, and HQ ingredients !\",\n+ \"Create_rotations_link\": \"Go to rotations page\",\n+ \"Access_wiki_title\": \"Learn more\",\n+ \"Access_wiki_content\": \"Navigate to the wiki page by clicking the link below. This page has some documentation for the general website usage, to guide you to make the most out of it and help you as much as possible\",\n+ \"Access_wiki_link\": \"Go to wiki page\"\n+ }\n}\n}\n",
"new_path": "src/assets/i18n/ja.json",
"old_path": "src/assets/i18n/ja.json"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore: translation organization
| 1
|
chore
| null |
791,690
|
06.05.2018 15:46:24
| 25,200
|
41f6a28333413dea6a44223bd8facd2c3f86c995
|
core(mainthreadwork): multiply by cpuSlowdownMultiplier
|
[
{
"change_type": "MODIFY",
"diff": "@@ -9,7 +9,6 @@ const Audit = require('./audit');\nconst WebInspector = require('../lib/web-inspector');\nconst Util = require('../report/html/renderer/util');\nconst {groupIdToName, taskToGroup} = require('../lib/task-groups');\n-const THRESHOLD_IN_MS = 10;\nclass BootupTime extends Audit {\n/**\n@@ -29,7 +28,7 @@ class BootupTime extends Audit {\n}\n/**\n- * @return {LH.Audit.ScoreOptions}\n+ * @return {LH.Audit.ScoreOptions & {thresholdInMs: number}}\n*/\nstatic get defaultOptions() {\nreturn {\n@@ -37,6 +36,7 @@ class BootupTime extends Audit {\n// <500ms ~= 100, >2s is yellow, >3.5s is red\nscorePODR: 600,\nscoreMedian: 3500,\n+ thresholdInMs: 50,\n};\n}\n@@ -78,6 +78,7 @@ class BootupTime extends Audit {\n* @return {Promise<LH.Audit.Product>}\n*/\nstatic async audit(artifacts, context) {\n+ const settings = context.settings || {};\nconst trace = artifacts.traces[BootupTime.DEFAULT_PASS];\nconst devtoolsTimelineModel = await artifacts.requestDevtoolsTimelineModel(trace);\nconst executionTimings = BootupTime.getExecutionTimingsByURL(devtoolsTimelineModel);\n@@ -87,15 +88,22 @@ class BootupTime extends Audit {\nconst headings = [\n{key: 'url', itemType: 'url', text: 'URL'},\n- {key: 'scripting', itemType: 'text', text: groupIdToName.scripting},\n- {key: 'scriptParseCompile', itemType: 'text', text: groupIdToName.scriptParseCompile},\n+ {key: 'scripting', granularity: 1, itemType: 'ms', text: groupIdToName.scripting},\n+ {key: 'scriptParseCompile', granularity: 1, itemType: 'ms',\n+ text: groupIdToName.scriptParseCompile},\n];\n+ const multiplier = settings.throttlingMethod === 'simulate' ?\n+ settings.throttling.cpuSlowdownMultiplier : 1;\n// map data in correct format to create a table\nconst results = Array.from(executionTimings)\n.map(([url, groups]) => {\n// Add up the totalBootupTime for all the taskGroups\n- totalBootupTime += Object.keys(groups).reduce((sum, name) => sum += groups[name], 0);\n+ for (const [name, value] of Object.entries(groups)) {\n+ groups[name] = value * multiplier;\n+ totalBootupTime += value * multiplier;\n+ }\n+\nextendedInfo[url] = groups;\nconst scriptingTotal = groups[groupIdToName.scripting] || 0;\n@@ -105,11 +113,11 @@ class BootupTime extends Audit {\nsum: scriptingTotal + parseCompileTotal,\n// Only reveal the javascript task costs\n// Later we can account for forced layout costs, etc.\n- scripting: Util.formatMilliseconds(scriptingTotal, 1),\n- scriptParseCompile: Util.formatMilliseconds(parseCompileTotal, 1),\n+ scripting: scriptingTotal,\n+ scriptParseCompile: parseCompileTotal,\n};\n})\n- .filter(result => result.sum >= THRESHOLD_IN_MS)\n+ .filter(result => result.sum >= context.options.thresholdInMs)\n.sort((a, b) => b.sum - a.sum);\nconst summary = {wastedMs: totalBootupTime};\n",
"new_path": "lighthouse-core/audits/bootup-time.js",
"old_path": "lighthouse-core/audits/bootup-time.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -62,6 +62,7 @@ class MainThreadWorkBreakdown extends Audit {\n* @return {Promise<LH.Audit.Product>}\n*/\nstatic async audit(artifacts, context) {\n+ const settings = context.settings || {};\nconst trace = artifacts.traces[MainThreadWorkBreakdown.DEFAULT_PASS];\nconst devtoolsTimelineModel = await artifacts.requestDevtoolsTimelineModel(trace);\n@@ -70,9 +71,13 @@ class MainThreadWorkBreakdown extends Audit {\n);\nlet totalExecutionTime = 0;\n+ const multiplier = settings.throttlingMethod === 'simulate' ?\n+ settings.throttling.cpuSlowdownMultiplier : 1;\n+\nconst extendedInfo = {};\nconst categoryTotals = {};\nconst results = Array.from(executionTimings).map(([eventName, duration]) => {\n+ duration *= multiplier;\ntotalExecutionTime += duration;\nextendedInfo[eventName] = duration;\nconst groupName = taskToGroup[eventName];\n@@ -83,14 +88,14 @@ class MainThreadWorkBreakdown extends Audit {\nreturn {\ncategory: eventName,\ngroup: groupName,\n- duration: Util.formatMilliseconds(duration, 1),\n+ duration: duration,\n};\n});\nconst headings = [\n{key: 'group', itemType: 'text', text: 'Category'},\n{key: 'category', itemType: 'text', text: 'Work'},\n- {key: 'duration', itemType: 'text', text: 'Time spent'},\n+ {key: 'duration', itemType: 'ms', granularity: 1, text: 'Time spent'},\n];\n// @ts-ignore - stableSort added to Array by WebInspector\nresults.stableSort((a, b) => categoryTotals[b.group] - categoryTotals[a.group]);\n@@ -105,7 +110,7 @@ class MainThreadWorkBreakdown extends Audit {\nreturn {\nscore,\nrawValue: totalExecutionTime,\n- displayValue: ['%d\\xa0ms', totalExecutionTime],\n+ displayValue: [Util.MS_DISPLAY_VALUE, totalExecutionTime],\ndetails: tableDetails,\nextendedInfo: {\nvalue: extendedInfo,\n",
"new_path": "lighthouse-core/audits/mainthread-work-breakdown.js",
"old_path": "lighthouse-core/audits/mainthread-work-breakdown.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,6 +15,14 @@ const acceptableTrace = require('../fixtures/traces/progressive-app-m60.json');\nconst errorTrace = require('../fixtures/traces/airhorner_no_fcp.json');\ndescribe('Performance: bootup-time audit', () => {\n+ const auditOptions = Object.assign({}, BootupTime.defaultOptions, {thresholdInMs: 10});\n+ const roundedValueOf = (output, name) => {\n+ const value = output.extendedInfo.value[name];\n+ const roundedValue = {};\n+ Object.keys(value).forEach(key => roundedValue[key] = Math.round(value[key] * 10) / 10);\n+ return roundedValue;\n+ };\n+\nit('should compute the correct BootupTime values', () => {\nconst artifacts = Object.assign({\ntraces: {\n@@ -22,28 +30,37 @@ describe('Performance: bootup-time audit', () => {\n},\n}, Runner.instantiateComputedArtifacts());\n- return BootupTime.audit(artifacts, {options: BootupTime.defaultOptions}).then(output => {\n+ return BootupTime.audit(artifacts, {options: auditOptions}).then(output => {\nassert.equal(output.details.items.length, 4);\nassert.equal(output.score, 1);\nassert.equal(Math.round(output.rawValue), 176);\n- const roundedValueOf = name => {\n- const value = output.extendedInfo.value[name];\n- const roundedValue = {};\n- Object.keys(value).forEach(key => roundedValue[key] = Math.round(value[key] * 10) / 10);\n- return roundedValue;\n- };\n-\n- assert.deepEqual(roundedValueOf('https://pwa.rocks/script.js'), {[groupIdToName.scripting]: 31.8, [groupIdToName.styleLayout]: 5.5, [groupIdToName.scriptParseCompile]: 1.3});\n- assert.deepEqual(roundedValueOf('https://www.googletagmanager.com/gtm.js?id=GTM-Q5SW'), {[groupIdToName.scripting]: 25, [groupIdToName.scriptParseCompile]: 5.5, [groupIdToName.styleLayout]: 1.2});\n- assert.deepEqual(roundedValueOf('https://www.google-analytics.com/plugins/ua/linkid.js'), {[groupIdToName.scripting]: 25.2, [groupIdToName.scriptParseCompile]: 1.2});\n- assert.deepEqual(roundedValueOf('https://www.google-analytics.com/analytics.js'), {[groupIdToName.scripting]: 40.1, [groupIdToName.scriptParseCompile]: 9.6, [groupIdToName.styleLayout]: 0.2});\n+ assert.deepEqual(roundedValueOf(output, 'https://pwa.rocks/script.js'), {[groupIdToName.scripting]: 31.8, [groupIdToName.styleLayout]: 5.5, [groupIdToName.scriptParseCompile]: 1.3});\n+ assert.deepEqual(roundedValueOf(output, 'https://www.googletagmanager.com/gtm.js?id=GTM-Q5SW'), {[groupIdToName.scripting]: 25, [groupIdToName.scriptParseCompile]: 5.5, [groupIdToName.styleLayout]: 1.2});\n+ assert.deepEqual(roundedValueOf(output, 'https://www.google-analytics.com/plugins/ua/linkid.js'), {[groupIdToName.scripting]: 25.2, [groupIdToName.scriptParseCompile]: 1.2});\n+ assert.deepEqual(roundedValueOf(output, 'https://www.google-analytics.com/analytics.js'), {[groupIdToName.scripting]: 40.1, [groupIdToName.scriptParseCompile]: 9.6, [groupIdToName.styleLayout]: 0.2});\nassert.ok(output.details.items.length < Object.keys(output.extendedInfo.value).length,\n- 'Items below 10ms threshold were not filtered out');\n+ 'Items below threshold were not filtered out');\n});\n}).timeout(10000);\n+ it('should compute the correct values when simulated', async () => {\n+ const artifacts = Object.assign({\n+ traces: {defaultPass: acceptableTrace},\n+ }, Runner.instantiateComputedArtifacts());\n+\n+ const options = auditOptions;\n+ const settings = {throttlingMethod: 'simulate', throttling: {cpuSlowdownMultiplier: 3}};\n+ const output = await BootupTime.audit(artifacts, {options, settings});\n+\n+ assert.equal(output.details.items.length, 7);\n+ assert.equal(output.score, 0.99);\n+ assert.equal(Math.round(output.rawValue), 528);\n+\n+ assert.deepEqual(roundedValueOf(output, 'https://pwa.rocks/script.js'), {[groupIdToName.scripting]: 95.3, [groupIdToName.styleLayout]: 16.4, [groupIdToName.scriptParseCompile]: 3.9});\n+ });\n+\nit('should get no data when no events are present', () => {\nconst artifacts = Object.assign({\ntraces: {\n@@ -51,7 +68,7 @@ describe('Performance: bootup-time audit', () => {\n},\n}, Runner.instantiateComputedArtifacts());\n- return BootupTime.audit(artifacts, {options: BootupTime.defaultOptions})\n+ return BootupTime.audit(artifacts, {options: auditOptions})\n.then(output => {\nassert.equal(output.details.items.length, 0);\nassert.equal(output.score, 1);\n",
"new_path": "lighthouse-core/test/audits/bootup-time-test.js",
"old_path": "lighthouse-core/test/audits/bootup-time-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -83,6 +83,29 @@ describe('Performance: page execution timings audit', () => {\n});\n});\n+ it('should compute the correct values when simulated', async () => {\n+ const artifacts = Object.assign({\n+ traces: {defaultPass: acceptableTrace},\n+ }, Runner.instantiateComputedArtifacts());\n+\n+ const settings = {throttlingMethod: 'simulate', throttling: {cpuSlowdownMultiplier: 3}};\n+ const output = await PageExecutionTimings.audit(artifacts, {options, settings});\n+ const valueOf = name => Math.round(output.extendedInfo.value[name]);\n+\n+ assert.equal(output.details.items.length, 12);\n+ assert.equal(output.score, 0.93);\n+ assert.equal(Math.round(output.rawValue), 1832);\n+\n+ for (const category in output.extendedInfo.value) {\n+ if (output.extendedInfo.value[category]) {\n+ assert.ok(\n+ Math.abs(valueOf(category) - 3 * acceptableTraceExpectations[category]) < 2,\n+ 'should have multiplied value by slowdown multiplier'\n+ );\n+ }\n+ }\n+ });\n+\nit('should compute the correct pageExecutionTiming values for the redirect trace', () => {\nconst artifacts = Object.assign({\ntraces: {\n",
"new_path": "lighthouse-core/test/audits/mainthread-work-breakdown-test.js",
"old_path": "lighthouse-core/test/audits/mainthread-work-breakdown-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(mainthreadwork): multiply by cpuSlowdownMultiplier (#5126)
| 1
|
core
|
mainthreadwork
|
217,922
|
06.05.2018 16:05:19
| -7,200
|
5eee2d806054b59f7a528425806a35048076c4c4
|
feat: new compact mode for alarms page
|
[
{
"change_type": "MODIFY",
"diff": "</button>\n</div>\n<div *ngIf=\"(getAlarms() | async)?.length === 0\"><h4 class=\"no-alarm\">{{'ALARMS.No_alarm' | translate}}</h4></div>\n-<mat-grid-list cols=\"{{getCols()}}\" rowHeight=\"{{compact?'7:3':'3:4'}}\" class=\"grid\">\n+<mat-grid-list cols=\"{{getCols()}}\" rowHeight=\"3:4\" class=\"grid\" *ngIf=\"!compact\">\n<mat-grid-tile *ngFor=\"let alarm of getAlarms() | async\">\n<app-alarm-card [alarm]=\"alarm\"\n[compact]=\"compact\"\n(delete)=\"deleteAlarm(alarm)\"></app-alarm-card>\n</mat-grid-tile>\n</mat-grid-list>\n+<mat-list *ngIf=\"compact\" dense>\n+ <mat-list-item *ngFor=\"let alarm of getAlarms() | async\"\n+ class=\"compact-alarm\"\n+ [ngClass]=\"{\n+ 'mat-elevation-z2': alarmService.isAlerted(alarm.itemId) | async,\n+ 'mat-elevation-z8': alarmService.isAlarmSpawned(alarm, time),\n+ 'primary-background': alarmService.isAlarmSpawned(alarm, time),\n+ 'accent-background': alarmService.isAlerted(alarm.itemId) | async\n+ }\">\n+ <img mat-list-avatar [appXivdbTooltip]=\"alarm.itemId\" [src]=\"alarm.icon | icon\" alt=\"\">\n+ <span matLine>{{alarm.itemId | itemName | i18n}}</span>\n+ <i matLine>{{alarm.zoneId | placeName | i18n}} - {{alarm.areaId | placeName | i18n}} -\n+ <span class=\"coords\" *ngIf=\"compact\">X: {{alarm.coords[0]}} - Y: {{alarm.coords[1]}}</span>\n+ <span *ngIf=\"alarm.slot\">({{alarm.slot}})</span></i>\n+ <app-map-position [zoneId]=\"alarm.zoneId\"\n+ class=\"map-marker\"\n+ [marker]=\"{x:alarm.coords[0], y:alarm.coords[1]}\"></app-map-position>\n+ <span>{{alarmService.getAlarmTimerString(alarm, time)}}</span>\n+ <button mat-button (click)=\"deleteAlarm(alarm)\" color=\"warn\">\n+ <mat-icon>delete</mat-icon>\n+ {{'Delete' | translate}}\n+ </button>\n+ </mat-list-item>\n+</mat-list>\n",
"new_path": "src/app/pages/alarms/alarms/alarms.component.html",
"old_path": "src/app/pages/alarms/alarms/alarms.component.html"
},
{
"change_type": "MODIFY",
"diff": "}\n}\n+.compact-alarm {\n+ margin: 5px 0;\n+}\n+\n+.map-marker {\n+ align-self: center;\n+ width: 150px;\n+}\n+\n.grid {\nmargin-top: 15px;\n}\n",
"new_path": "src/app/pages/alarms/alarms/alarms.component.scss",
"old_path": "src/app/pages/alarms/alarms/alarms.component.scss"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
feat: new compact mode for alarms page
| 1
|
feat
| null |
217,922
|
06.05.2018 16:56:10
| -7,200
|
f45667887d41f8f4f2791a065db0b88d2bd01ab0
|
chore: update authorId upon rotation fork
|
[
{
"change_type": "MODIFY",
"diff": "@@ -93,6 +93,8 @@ export class SimulatorPageComponent {\n}).mergeMap(data => {\nconst preparedRotation = data.rotation;\nif (preparedRotation.$key === undefined || data.userId !== data.rotation.authorId) {\n+ // Set new authorId for the newly created rotation\n+ data.rotation.authorId = data.userId;\n// If the rotation has no key, it means that it's a new one, so let's create a rotation entry in the database.\nreturn this.rotationsService.add(preparedRotation);\n} else {\n",
"new_path": "src/app/pages/simulator/components/simulator-page/simulator-page.component.ts",
"old_path": "src/app/pages/simulator/components/simulator-page/simulator-page.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore: update authorId upon rotation fork
| 1
|
chore
| null |
821,196
|
06.05.2018 17:07:35
| 25,200
|
8f582e83adad096b329677f9f51f120fcdca6001
|
fix: use caret versions
|
[
{
"change_type": "MODIFY",
"diff": "\"bin\": \"./bin/run\",\n\"bugs\": \"https://github.com/oclif/oclif/issues\",\n\"dependencies\": {\n- \"@oclif/command\": \"^1.4.20\",\n+ \"@oclif/command\": \"^1.4.21\",\n\"@oclif/config\": \"^1.6.17\",\n- \"@oclif/errors\": \"^1.0.8\",\n+ \"@oclif/errors\": \"^1.0.9\",\n\"@oclif/plugin-help\": \"^1.2.10\",\n\"@oclif/plugin-not-found\": \"^1.0.9\",\n\"@oclif/plugin-warn-if-update-available\": \"^1.3.8\",\n\"yosay\": \"^2.0.2\"\n},\n\"devDependencies\": {\n- \"@oclif/dev-cli\": \"^1.13.15\",\n- \"@oclif/tslint\": \"^1.1.0\",\n+ \"@oclif/dev-cli\": \"^1.13.18\",\n+ \"@oclif/tslint\": \"^1.1.1\",\n\"@types/lodash\": \"^4.14.108\",\n\"@types/read-pkg\": \"^3.0.0\",\n\"@types/shelljs\": \"^0.7.9\",\n\"nps\": \"^5.9.0\",\n\"shelljs\": \"^0.8.1\",\n\"tmp\": \"^0.0.33\",\n- \"ts-node\": \"^6.0.2\",\n+ \"ts-node\": \"^6.0.3\",\n\"tslint\": \"^5.10.0\",\n\"typescript\": \"^2.8.3\"\n},\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -384,62 +384,62 @@ class App extends Generator {\ncase 'base': break\ncase 'single':\ndependencies.push(\n- '@oclif/config@1',\n- '@oclif/command@1',\n- '@oclif/plugin-help@1',\n+ '@oclif/config@^1',\n+ '@oclif/command@^1',\n+ '@oclif/plugin-help@^1',\n)\nbreak\ncase 'plugin':\ndependencies.push(\n- '@oclif/command@1',\n- '@oclif/config@1',\n+ '@oclif/command@^1',\n+ '@oclif/config@^1',\n)\ndevDependencies.push(\n- '@oclif/dev-cli@1',\n- '@oclif/plugin-help@1',\n- 'globby@8',\n+ '@oclif/dev-cli@^1',\n+ '@oclif/plugin-help@^1',\n+ 'globby@^8',\n)\nbreak\ncase 'multi':\ndependencies.push(\n- '@oclif/config@1',\n- '@oclif/command@1',\n- '@oclif/plugin-help@1',\n+ '@oclif/config@^1',\n+ '@oclif/command@^1',\n+ '@oclif/plugin-help@^1',\n)\ndevDependencies.push(\n- '@oclif/dev-cli@1',\n- 'globby@8',\n+ '@oclif/dev-cli@^1',\n+ 'globby@^8',\n)\n}\nif (this.mocha) {\ndevDependencies.push(\n- 'mocha@5',\n- 'nyc@11',\n- 'chai@4',\n+ 'mocha@^5',\n+ 'nyc@^11',\n+ 'chai@^4',\n)\nif (this.type !== 'base') devDependencies.push(\n- '@oclif/test@1',\n+ '@oclif/test@^1',\n)\n}\nif (this.ts) {\ndevDependencies.push(\n- '@types/chai@4',\n- '@types/mocha@5',\n- '@types/node@9',\n- 'typescript@2.8',\n- 'ts-node@5',\n- 'tslib@1',\n+ '@types/chai@^4',\n+ '@types/mocha@^5',\n+ '@types/node@^9',\n+ 'typescript@^2.8',\n+ 'ts-node@^5',\n+ 'tslib@^1',\n)\nif (this.tslint) {\ndevDependencies.push(\n- '@oclif/tslint@1',\n- 'tslint@5',\n+ '@oclif/tslint@^1',\n+ 'tslint@^5',\n)\n}\n} else {\ndevDependencies.push(\n- 'eslint@4',\n- 'eslint-config-oclif@1',\n+ 'eslint@^4',\n+ 'eslint-config-oclif@^1',\n)\n}\nlet yarnOpts = {} as any\n",
"new_path": "src/generators/app.ts",
"old_path": "src/generators/app.ts"
},
{
"change_type": "MODIFY",
"diff": "debug \"^3.1.0\"\nsemver \"^5.5.0\"\n+\"@oclif/command@^1.4.21\":\n+ version \"1.4.21\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/command/-/command-1.4.21.tgz#e45f252f8c375ad6e24a0a5f908e6aa692c5c56a\"\n+ dependencies:\n+ \"@oclif/errors\" \"^1.0.9\"\n+ \"@oclif/parser\" \"^3.3.3\"\n+ debug \"^3.1.0\"\n+ semver \"^5.5.0\"\n+\n\"@oclif/config@^1.6.17\":\nversion \"1.6.17\"\nresolved \"https://registry.yarnpkg.com/@oclif/config/-/config-1.6.17.tgz#e9608f56e5acd49fcaf3bbfcc3e8818d81b1ba12\"\ndependencies:\ndebug \"^3.1.0\"\n-\"@oclif/dev-cli@^1.13.15\":\n- version \"1.13.15\"\n- resolved \"https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.13.15.tgz#cc02e5b8c1fdb9b04973926e5b9f034c3f7ed64c\"\n+\"@oclif/dev-cli@^1.13.18\":\n+ version \"1.13.18\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.13.18.tgz#d39c69245c6df1debe3a37c34fa715a5cfc6a48c\"\ndependencies:\n\"@oclif/command\" \"^1.4.20\"\n\"@oclif/config\" \"^1.6.17\"\nstrip-ansi \"^4.0.0\"\nwrap-ansi \"^3.0.1\"\n+\"@oclif/errors@^1.0.9\":\n+ version \"1.0.9\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.9.tgz#6fe3afd8e7683c436df63674550899adec10c81c\"\n+ dependencies:\n+ clean-stack \"^1.3.0\"\n+ fs-extra \"^6.0.0\"\n+ indent-string \"^3.2.0\"\n+ strip-ansi \"^4.0.0\"\n+ wrap-ansi \"^3.0.1\"\n+\n\"@oclif/linewrap@^1.0.0\":\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/@oclif/linewrap/-/linewrap-1.0.0.tgz#aedcb64b479d4db7be24196384897b5000901d91\"\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/@oclif/screen/-/screen-1.0.2.tgz#c9d7c84b0ea60ecec8dd7a9b22c012ba9967aed8\"\n-\"@oclif/tslint@^1.1.0\":\n- version \"1.1.0\"\n- resolved \"https://registry.yarnpkg.com/@oclif/tslint/-/tslint-1.1.0.tgz#a2d494a61afa882a685fe5f4d866dafd18990728\"\n+\"@oclif/tslint@^1.1.1\":\n+ version \"1.1.1\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/tslint/-/tslint-1.1.1.tgz#4d89d0fadbd233b8cd797d43557b5e987b0880a1\"\ndependencies:\n- tslint-xo \"^0.7.0\"\n+ tslint-xo \"^0.7.2\"\n\"@types/events@*\":\nversion \"1.2.0\"\n@@ -3326,9 +3345,9 @@ trim-newlines@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613\"\n-ts-node@^6.0.2:\n- version \"6.0.2\"\n- resolved \"https://registry.yarnpkg.com/ts-node/-/ts-node-6.0.2.tgz#e132d530e53173bc6a8c21ea65f64d8b47bc573e\"\n+ts-node@^6.0.3:\n+ version \"6.0.3\"\n+ resolved \"https://registry.yarnpkg.com/ts-node/-/ts-node-6.0.3.tgz#28bf74bcad134fad17f7469dad04638ece03f0f4\"\ndependencies:\narrify \"^1.0.0\"\nchalk \"^2.3.0\"\n@@ -3365,9 +3384,9 @@ tslint-microsoft-contrib@^5.0.2:\ndependencies:\ntsutils \"^2.12.1\"\n-tslint-xo@^0.7.0:\n- version \"0.7.0\"\n- resolved \"https://registry.yarnpkg.com/tslint-xo/-/tslint-xo-0.7.0.tgz#be5a1d67f8ade5d92aa8c0a21d9cfdcbaf06f3e0\"\n+tslint-xo@^0.7.2:\n+ version \"0.7.2\"\n+ resolved \"https://registry.yarnpkg.com/tslint-xo/-/tslint-xo-0.7.2.tgz#7523e9f2819e23c5ce66b501e4b76067c1e6f637\"\ndependencies:\ntslint-consistent-codestyle \"^1.11.0\"\ntslint-eslint-rules \"^5.1.0\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
TypeScript
|
MIT License
|
oclif/oclif
|
fix: use caret versions
| 1
|
fix
| null |
217,922
|
06.05.2018 19:48:00
| -7,200
|
eefe2e3fb9366c645a685f1fc38f8892283d8c94
|
chore(simulator): minimum stats popup in the leftside toolbar
|
[
{
"change_type": "ADD",
"diff": "+<h2 mat-dialog-title>{{'SIMULATOR.Min_stats' | translate}}</h2>\n+<div mat-dialog-content *ngIf=\"simulation.getMinStats() as stats\">\n+ <div>{{'SIMULATOR.CONFIGURATION.Craftsmanship' | translate}}: {{stats.craftsmanship}}</div>\n+ <div>{{'SIMULATOR.CONFIGURATION.Control' | translate}}: {{stats.control}}</div>\n+ <div>{{'SIMULATOR.Cp_amount' | translate}}: {{stats.cp}}</div>\n+</div>\n+<div mat-dialog-actions>\n+ <button mat-raised-button mat-dialog-close color=\"accent\">{{'Ok' | translate}}</button>\n+</div>\n",
"new_path": "src/app/pages/simulator/components/simulation-min-stats-popup/simulation-min-stats-popup.component.html",
"old_path": null
},
{
"change_type": "ADD",
"diff": "",
"new_path": "src/app/pages/simulator/components/simulation-min-stats-popup/simulation-min-stats-popup.component.scss",
"old_path": "src/app/pages/simulator/components/simulation-min-stats-popup/simulation-min-stats-popup.component.scss"
},
{
"change_type": "ADD",
"diff": "+import {Component, Inject} from '@angular/core';\n+import {MAT_DIALOG_DATA} from '@angular/material';\n+import {Simulation} from 'app/pages/simulator/simulation/simulation';\n+\n+@Component({\n+ selector: 'app-simulation-min-stats-popup',\n+ templateUrl: './simulation-min-stats-popup.component.html',\n+ styleUrls: ['./simulation-min-stats-popup.component.scss']\n+})\n+export class SimulationMinStatsPopupComponent {\n+\n+ constructor(@Inject(MAT_DIALOG_DATA) public simulation: Simulation) {\n+ }\n+\n+}\n",
"new_path": "src/app/pages/simulator/components/simulation-min-stats-popup/simulation-min-stats-popup.component.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "(click)=\"generateMacro()\">\n<span class=\"fab-xiv-label\">XIV</span>\n</button>\n+ <button mat-mini-fab\n+ *ngIf=\"simulation$ | async as simulation\"\n+ matTooltip=\"{{'SIMULATOR.Min_stats' | translate}}\"\n+ matTooltipPosition=\"{{isMobile()?'below':'right'}}\"\n+ (click)=\"showMinStats(simulation)\">\n+ <mat-icon>offline_pin</mat-icon>\n+ </button>\n</div>\n<mat-expansion-panel [expanded]=\"customMode\" #configPanel>\n<mat-expansion-panel-header>\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.html",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -27,6 +27,7 @@ import {MatDialog} from '@angular/material';\nimport {ImportRotationPopupComponent} from '../import-rotation-popup/import-rotation-popup.component';\nimport {MacroPopupComponent} from '../macro-popup/macro-popup.component';\nimport {PendingChangesService} from 'app/core/database/pending-changes/pending-changes.service';\n+import {SimulationMinStatsPopupComponent} from '../simulation-min-stats-popup/simulation-min-stats-popup.component';\n@Component({\nselector: 'app-simulator',\n@@ -175,6 +176,10 @@ export class SimulatorComponent implements OnInit, OnDestroy {\n.map(simulation => simulation.getReliabilityReport());\n}\n+ public showMinStats(simulation: Simulation): void {\n+ this.dialog.open(SimulationMinStatsPopupComponent, {data: simulation});\n+ }\n+\nngOnInit(): void {\nif (!this.customMode) {\nObservable.combineLatest(this.recipe$, this.gearsets$, (recipe, gearsets) => {\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.ts",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,9 +5,9 @@ export class CrafterStats {\nconstructor(\npublic readonly jobId: number,\n- public readonly craftsmanship: number,\n- private _control: number,\n- public readonly cp: number,\n+ public craftsmanship: number,\n+ public _control: number,\n+ public cp: number,\npublic readonly specialist: boolean,\npublic readonly level: number,\n) {\n",
"new_path": "src/app/pages/simulator/model/crafter-stats.ts",
"old_path": "src/app/pages/simulator/model/crafter-stats.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -66,6 +66,27 @@ export class Simulation {\n}\n}\n+ public getMinStats(): { control: number, craftsmanship: number, cp: number } {\n+ // Three loops, one per stat\n+ while (this.run(true).success) {\n+ this.crafterStats.craftsmanship--;\n+ this.reset();\n+ }\n+ while (this.run(true).success) {\n+ this.crafterStats._control--;\n+ this.reset();\n+ }\n+ while (this.run(true).success) {\n+ this.crafterStats.cp--;\n+ this.reset();\n+ }\n+ return {\n+ control: this.crafterStats.getControl(this),\n+ craftsmanship: this.crafterStats.craftsmanship,\n+ cp: this.crafterStats.cp\n+ };\n+ }\n+\npublic reset(): void {\ndelete this.success;\nthis.progression = 0;\n",
"new_path": "src/app/pages/simulator/simulation/simulation.ts",
"old_path": "src/app/pages/simulator/simulation/simulation.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -35,6 +35,7 @@ import {ClipboardModule} from 'ngx-clipboard';\nimport {CustomLinksModule} from '../custom-links/custom-links.module';\nimport {PatreonGuard} from '../../core/guard/patreon.guard';\nimport {MaintenanceGuard} from '../maintenance/maintenance.guard';\n+import { SimulationMinStatsPopupComponent } from './components/simulation-min-stats-popup/simulation-min-stats-popup.component';\nconst routes: Routes = [\n{\n@@ -104,11 +105,13 @@ const routes: Routes = [\nActionComponent,\nRotationsPageComponent,\nImportRotationPopupComponent,\n- MacroPopupComponent\n+ MacroPopupComponent,\n+ SimulationMinStatsPopupComponent\n],\nentryComponents: [\nImportRotationPopupComponent,\n- MacroPopupComponent\n+ MacroPopupComponent,\n+ SimulationMinStatsPopupComponent\n],\nproviders: [\nCraftingActionsRegistry,\n",
"new_path": "src/app/pages/simulator/simulator.module.ts",
"old_path": "src/app/pages/simulator/simulator.module.ts"
},
{
"change_type": "MODIFY",
"diff": "\"Not_found\": \"Page not found\"\n},\n\"SIMULATOR\": {\n+ \"Min_stats\": \"Minimum stats\",\n\"Progress\": \"Progress\",\n\"Quality\": \"Quality\",\n\"Step_counter\": \"Step\",\n",
"new_path": "src/assets/i18n/en.json",
"old_path": "src/assets/i18n/en.json"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): minimum stats popup in the leftside toolbar
| 1
|
chore
|
simulator
|
217,922
|
06.05.2018 20:25:34
| -7,200
|
58ad98b3ba1e665efcd97bb44d59892d0c620d5d
|
chore(simulator): import from ffxiv macro feature
|
[
{
"change_type": "MODIFY",
"diff": "@@ -63,7 +63,18 @@ export class LocalizedDataService {\nreturn this.getIndexByName(places, name, 'en');\n}\n- public getCraftingActionByName(name: string, language: 'en' | 'fr' | 'de' | 'ja'): I18nName {\n+ public getCraftingActionIdByName(name: string, language: Language): number {\n+ let res = this.getIndexByName(craftingActions, name, language);\n+ if (res === -1) {\n+ res = this.getIndexByName(actions, name, language);\n+ }\n+ if (res === -1) {\n+ throw new Error('Data row not found.');\n+ }\n+ return res;\n+ }\n+\n+ public getCraftingActionByName(name: string, language: Language): I18nName {\nconst result = this.getRowByName(craftingActions, name, language) || this.getRowByName(actions, name, language);\nif (result === undefined) {\nthrow new Error('Data row not found.');\n",
"new_path": "src/app/core/data/localized-data.service.ts",
"old_path": "src/app/core/data/localized-data.service.ts"
},
{
"change_type": "ADD",
"diff": "+<h3 mat-dialog-title>{{'SIMULATOR.Import_macro' | translate}}</h3>\n+<div mat-dialog-content>\n+ <mat-input-container>\n+ <textarea matInput placeholder=\"{{'SIMULATOR.Ingame_macro' | translate}}\" [(ngModel)]=\"importString\"\n+ rows=\"8\" cols=\"50\">\n+ </textarea>\n+ </mat-input-container>\n+</div>\n+<div mat-dialog-actions>\n+ <button mat-raised-button color=\"accent\" mat-dialog-close=\"{{importString}}\">{{'Ok' | translate}}</button>\n+ <button mat-button color=\"warn\" mat-dialog-close>{{'Cancel' | translate}}</button>\n+</div>\n",
"new_path": "src/app/pages/simulator/components/import-macro-popup/import-macro-popup.component.html",
"old_path": null
},
{
"change_type": "ADD",
"diff": "",
"new_path": "src/app/pages/simulator/components/import-macro-popup/import-macro-popup.component.scss",
"old_path": "src/app/pages/simulator/components/import-macro-popup/import-macro-popup.component.scss"
},
{
"change_type": "ADD",
"diff": "+import {Component} from '@angular/core';\n+\n+@Component({\n+ selector: 'app-import-macro-popup',\n+ templateUrl: './import-macro-popup.component.html',\n+ styleUrls: ['./import-macro-popup.component.scss']\n+})\n+export class ImportMacroPopupComponent {\n+\n+ importString: string;\n+\n+ constructor() {\n+ }\n+\n+}\n",
"new_path": "src/app/pages/simulator/components/import-macro-popup/import-macro-popup.component.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "(click)=\"importRotation()\">\n<mat-icon>file_download</mat-icon>\n</button>\n+ <button mat-mini-fab\n+ matTooltip=\"{{'SIMULATOR.Import_macro' | translate}}\"\n+ matTooltipPosition=\"{{isMobile()?'below':'right'}}\"\n+ (click)=\"importMacro()\">\n+ <mat-icon>input</mat-icon>\n+ </button>\n<button mat-mini-fab\nmatTooltip=\"{{'SIMULATOR.Generate_ingame_macro' | translate}}\"\nmatTooltipPosition=\"{{isMobile()?'below':'right'}}\"\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.html",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,6 +28,10 @@ import {ImportRotationPopupComponent} from '../import-rotation-popup/import-rota\nimport {MacroPopupComponent} from '../macro-popup/macro-popup.component';\nimport {PendingChangesService} from 'app/core/database/pending-changes/pending-changes.service';\nimport {SimulationMinStatsPopupComponent} from '../simulation-min-stats-popup/simulation-min-stats-popup.component';\n+import {ImportMacroPopupComponent} from '../import-macro-popup/import-macro-popup.component';\n+import {LocalizedDataService} from '../../../../core/data/localized-data.service';\n+import {TranslateService} from '@ngx-translate/core';\n+import {Language} from 'app/core/data/language';\n@Component({\nselector: 'app-simulator',\n@@ -125,9 +129,16 @@ export class SimulatorComponent implements OnInit, OnDestroy {\npublic dirty = false;\n+ private findActionsRegex: RegExp =\n+ new RegExp(/\\/(ac|action)[\\s]+(([\\w]+)|\"([^\"]+)\")?.*/, 'i');\n+\n+ private findActionsAutoTranslatedRegex: RegExp =\n+ new RegExp(/\\/(ac|action)[\\s]+([^<]+)?.*/, 'i');\n+\nconstructor(private registry: CraftingActionsRegistry, private media: ObservableMedia, private userService: UserService,\nprivate dataService: DataService, private htmlTools: HtmlToolsService, private dialog: MatDialog,\n- private pendingChanges: PendingChangesService) {\n+ private pendingChanges: PendingChangesService, private localizedDataService: LocalizedDataService,\n+ private translate: TranslateService) {\nthis.foods = Consumable.fromData(foods);\nthis.medicines = Consumable.fromData(medicines);\n@@ -217,6 +228,45 @@ export class SimulatorComponent implements OnInit, OnDestroy {\n});\n}\n+ importMacro(): void {\n+ this.dialog.open(ImportMacroPopupComponent)\n+ .afterClosed()\n+ .filter(res => res !== undefined && res.length > 0 && res.indexOf('/ac') > -1)\n+ .map(macro => {\n+ const actionIds: number[] = [];\n+ for (const line of macro.split('\\n')) {\n+ let match = this.findActionsRegex.exec(line);\n+ if (match !== null && match !== undefined) {\n+ const skillName = match[2].replace(/\"/g, '');\n+ // Get translated skill\n+ try {\n+ actionIds\n+ .push(this.localizedDataService.getCraftingActionIdByName(skillName, <Language>this.translate.currentLang));\n+ } catch (ignored) {\n+ // Ugly implementation but it's a specific case we don't want to refactor for.\n+ try {\n+ // If there's no skill match with the first regex, try the second one (for auto translated skills)\n+ match = this.findActionsAutoTranslatedRegex.exec(line);\n+ if (match !== null) {\n+ actionIds\n+ .push(this.localizedDataService.getCraftingActionIdByName(match[2],\n+ <Language>this.translate.currentLang));\n+ }\n+ } catch (ignoredAgain) {\n+ break;\n+ }\n+ }\n+ }\n+ }\n+ return actionIds;\n+ })\n+ .map(actionIds => this.registry.createFromIds(actionIds))\n+ .subscribe(rotation => {\n+ this.actions = rotation;\n+ this.markAsDirty();\n+ });\n+ }\n+\ngenerateMacro(): void {\nthis.dialog.open(MacroPopupComponent, {data: this.actions$.getValue()});\n}\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.ts",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -25,7 +25,7 @@ export class Observe extends CraftingAction {\n}\ngetIds(): number[] {\n- return [100113];\n+ return [100010, 100023, 100040, 100053, 100070, 100082, 100099, 100113];\n}\ngetSuccessRate(simulationState: Simulation): number {\n",
"new_path": "src/app/pages/simulator/model/actions/other/observe.ts",
"old_path": "src/app/pages/simulator/model/actions/other/observe.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -235,6 +235,17 @@ export class CraftingActionsRegistry {\n.map(row => row.action);\n}\n+ public createFromIds(ids: number[]): CraftingAction[] {\n+ return ids.map(id => {\n+ const found = CraftingActionsRegistry.ALL_ACTIONS.find(row => row.action.getIds().indexOf(id) > -1);\n+ if (found !== undefined) {\n+ return found.action;\n+ }\n+ return undefined;\n+ })\n+ .filter(action => action !== undefined)\n+ }\n+\npublic serializeRotation(rotation: CraftingAction[]): string[] {\nreturn rotation.map(action => {\nconst actionRow = CraftingActionsRegistry.ALL_ACTIONS.find(row => row.action === action);\n",
"new_path": "src/app/pages/simulator/model/crafting-actions-registry.ts",
"old_path": "src/app/pages/simulator/model/crafting-actions-registry.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -36,6 +36,7 @@ import {CustomLinksModule} from '../custom-links/custom-links.module';\nimport {PatreonGuard} from '../../core/guard/patreon.guard';\nimport {MaintenanceGuard} from '../maintenance/maintenance.guard';\nimport { SimulationMinStatsPopupComponent } from './components/simulation-min-stats-popup/simulation-min-stats-popup.component';\n+import {ImportMacroPopupComponent} from './components/import-macro-popup/import-macro-popup.component';\nconst routes: Routes = [\n{\n@@ -105,11 +106,13 @@ const routes: Routes = [\nActionComponent,\nRotationsPageComponent,\nImportRotationPopupComponent,\n+ ImportMacroPopupComponent,\nMacroPopupComponent,\nSimulationMinStatsPopupComponent\n],\nentryComponents: [\nImportRotationPopupComponent,\n+ ImportMacroPopupComponent,\nMacroPopupComponent,\nSimulationMinStatsPopupComponent\n],\n",
"new_path": "src/app/pages/simulator/simulator.module.ts",
"old_path": "src/app/pages/simulator/simulator.module.ts"
},
{
"change_type": "MODIFY",
"diff": "\"Not_found\": \"Page not found\"\n},\n\"SIMULATOR\": {\n+ \"Import_macro\": \"Import from ingame macro\",\n+ \"Ingame_macro\": \"Ingame macro\",\n\"Min_stats\": \"Minimum stats\",\n\"Progress\": \"Progress\",\n\"Quality\": \"Quality\",\n",
"new_path": "src/assets/i18n/en.json",
"old_path": "src/assets/i18n/en.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -72,6 +72,18 @@ You can import rotations from Crafting Optimizer using a very simple process:\n4. Click Ok.\n5. Profit, your rotation is now imported.\n+## Import from ingame macro\n+\n+You can import crafting rotations from ingame macros, simply follow the gif below:\n+\n+\n+\n+## Find minimum stats\n+\n+You can find minimum stats required for your rotation (only if it completes, else you'll see actual stats) using the minimum stats popup, here is a demo:\n+\n+\n+\n## Ingame macro creation\nYou can generate ingame macros for an easy simulator => game transition of your rotations.\n",
"new_path": "src/assets/wiki/en/simulator.md",
"old_path": "src/assets/wiki/en/simulator.md"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): import from ffxiv macro feature
| 1
|
chore
|
simulator
|
217,922
|
07.05.2018 01:18:58
| -7,200
|
0be41d1ca217e7791a5b9872fb5dfa9be653e9a0
|
chore: fixed dumb error with simulator foods template binding
|
[
{
"change_type": "MODIFY",
"diff": "<button mat-mini-fab class=\"alarms-sidebar-trigger\"\nmatTooltip=\"{{'Timers' | translate}}\"\nmatTooltipPosition=\"left\"\n- *ngIf=\"!mobile\" (click)=\"timersSidebar.toggle()\"\n- [ngClass]=\"{'opened': timersSidebar?.opened}\">\n- <mat-icon *ngIf=\"!timersSidebar?.opened\">alarm</mat-icon>\n- <mat-icon *ngIf=\"timersSidebar?.opened\">keyboard_arrow_right</mat-icon>\n+ *ngIf=\"!mobile\" (click)=\"timers.toggle()\"\n+ [ngClass]=\"{'opened': timers?.opened}\">\n+ <mat-icon *ngIf=\"!timers?.opened\">alarm</mat-icon>\n+ <mat-icon *ngIf=\"timers?.opened\">keyboard_arrow_right</mat-icon>\n</button>\n<div class=\"content-middle\">\n<router-outlet></router-outlet>\n</div>\n</div>\n- <mat-sidenav mode=\"side\" position=\"end\" *ngIf=\"!mobile\" #timers>\n+ <mat-sidenav mode=\"side\" position=\"end\" #timers>\n<app-alarms-sidebar></app-alarms-sidebar>\n</mat-sidenav>\n</mat-sidenav-container>\n",
"new_path": "src/app/app.component.html",
"old_path": "src/app/app.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -39,9 +39,6 @@ export class AppComponent implements OnInit {\npublic static LOCALES: string[] = ['en', 'de', 'fr', 'ja', 'pt', 'es'];\n- @ViewChild('timers')\n- timersSidebar: MatSidenav;\n-\nlocale: string;\nannouncement: string;\n@@ -86,8 +83,7 @@ export class AppComponent implements OnInit {\nprivate push: PushNotificationsService,\noverlayContainer: OverlayContainer,\npublic cd: ChangeDetectorRef,\n- private pendingChangesService: PendingChangesService,\n- private scrollSpy: ScrollSpyService) {\n+ private pendingChangesService: PendingChangesService) {\nsettings.themeChange$.subscribe(change => {\noverlayContainer.getContainerElement().classList.remove(`${change.previous}-theme`);\n",
"new_path": "src/app/app.component.ts",
"old_path": "src/app/app.component.ts"
},
{
"change_type": "MODIFY",
"diff": "<div class=\"foods\">\n<mat-select [(ngModel)]=\"selectedFood\" placeholder=\"{{'SIMULATOR.CONFIGURATION.Food' | translate}}\">\n<mat-option [value]=\"undefined\"></mat-option>\n- <mat-option *ngFor=\"let food of foods.reverse()\" [value]=\"food\">\n+ <mat-option *ngFor=\"let food of foods\" [value]=\"food\">\n{{food.itemId | itemName | i18n}}\n<img src=\"/assets/icons/HQ.png\" alt=\"(HQ)\" *ngIf=\"food.hq\">\n</mat-option>\n<mat-select [(ngModel)]=\"selectedMedicine\"\nplaceholder=\"{{'SIMULATOR.CONFIGURATION.Medicine' | translate}}\">\n<mat-option [value]=\"undefined\"></mat-option>\n- <mat-option *ngFor=\"let medicine of medicines.reverse()\" [value]=\"medicine\">\n+ <mat-option *ngFor=\"let medicine of medicines\" [value]=\"medicine\">\n{{medicine.itemId | itemName | i18n}}\n<img src=\"/assets/icons/HQ.png\" alt=\"(HQ)\" *ngIf=\"medicine.hq\">\n</mat-option>\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.html",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.html"
},
{
"change_type": "MODIFY",
"diff": "-import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';\n+import {Component, EventEmitter, Input, OnDestroy, OnInit, Output, ChangeDetectionStrategy, OnChanges, SimpleChanges} from '@angular/core';\nimport {Craft} from '../../../../model/garland-tools/craft';\nimport {Simulation} from '../../simulation/simulation';\nimport {Observable} from 'rxjs/Observable';\n@@ -32,13 +32,15 @@ import {ImportMacroPopupComponent} from '../import-macro-popup/import-macro-popu\nimport {LocalizedDataService} from '../../../../core/data/localized-data.service';\nimport {TranslateService} from '@ngx-translate/core';\nimport {Language} from 'app/core/data/language';\n+import {ConsumablesService} from 'app/pages/simulator/model/consumables.service';\n@Component({\nselector: 'app-simulator',\ntemplateUrl: './simulator.component.html',\n- styleUrls: ['./simulator.component.scss']\n+ styleUrls: ['./simulator.component.scss'],\n+ changeDetection: ChangeDetectionStrategy.OnPush,\n})\n-export class SimulatorComponent implements OnInit, OnDestroy {\n+export class SimulatorComponent implements OnInit, OnDestroy, OnChanges {\n@Input()\nitemId: number;\n@@ -138,10 +140,10 @@ export class SimulatorComponent implements OnInit, OnDestroy {\nconstructor(private registry: CraftingActionsRegistry, private media: ObservableMedia, private userService: UserService,\nprivate dataService: DataService, private htmlTools: HtmlToolsService, private dialog: MatDialog,\nprivate pendingChanges: PendingChangesService, private localizedDataService: LocalizedDataService,\n- private translate: TranslateService) {\n+ private translate: TranslateService, consumablesService: ConsumablesService) {\n- this.foods = Consumable.fromData(foods);\n- this.medicines = Consumable.fromData(medicines);\n+ this.foods = consumablesService.fromData(foods).reverse();\n+ this.medicines = consumablesService.fromData(medicines).reverse();\nthis.actions$.subscribe(actions => {\nthis.dirty = false;\n@@ -399,4 +401,8 @@ export class SimulatorComponent implements OnInit, OnDestroy {\nngOnDestroy(): void {\nthis.pendingChanges.removePendingChange('rotation');\n}\n+\n+ ngOnChanges(changes: SimpleChanges): void {\n+ console.log('changes !', changes);\n+ }\n}\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.ts",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.ts"
},
{
"change_type": "MODIFY",
"diff": "-import {ConsumableDataRow} from './consumable-data-row';\nimport {BonusType, ConsumableBonus} from './consumable-bonus';\nexport class Consumable {\nbonuses: ConsumableBonus[] = [];\n- static fromData(data: ConsumableDataRow[]): Consumable[] {\n- return [].concat.call([], ...data.map(row => {\n- const consumables: Consumable[] = [new Consumable(row.itemId), new Consumable(row.itemId, true)];\n- for (const bonus of ['CP', 'Craftsmanship', 'Control']) {\n- if (row[bonus] !== undefined) {\n- consumables[0].bonuses.push({\n- type: <BonusType>bonus,\n- value: row[bonus][0].amount,\n- max: row[bonus][0].max\n- });\n- consumables[1].bonuses.push({\n- type: <BonusType>bonus,\n- value: row[bonus][1].amount,\n- max: row[bonus][1].max\n- });\n- }\n- }\n- return consumables;\n- }));\n- }\n-\npublic constructor(public itemId: number, public hq = false) {\n}\n",
"new_path": "src/app/pages/simulator/model/consumable.ts",
"old_path": "src/app/pages/simulator/model/consumable.ts"
},
{
"change_type": "ADD",
"diff": "+import {ConsumableDataRow} from './consumable-data-row';\n+import {BonusType, ConsumableBonus} from './consumable-bonus';\n+import {Injectable} from '@angular/core';\n+import {Consumable} from './consumable';\n+\n+@Injectable()\n+export class ConsumablesService {\n+\n+ fromData(data: ConsumableDataRow[]): Consumable[] {\n+ return [].concat.call([], ...data.map(row => {\n+ const consumables: Consumable[] = [new Consumable(row.itemId), new Consumable(row.itemId, true)];\n+ for (const bonus of ['CP', 'Craftsmanship', 'Control']) {\n+ if (row[bonus] !== undefined) {\n+ consumables[0].bonuses.push({\n+ type: <BonusType>bonus,\n+ value: row[bonus][0].amount,\n+ max: row[bonus][0].max\n+ });\n+ consumables[1].bonuses.push({\n+ type: <BonusType>bonus,\n+ value: row[bonus][1].amount,\n+ max: row[bonus][1].max\n+ });\n+ }\n+ }\n+ return consumables;\n+ }));\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/consumables.service.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -37,6 +37,7 @@ import {PatreonGuard} from '../../core/guard/patreon.guard';\nimport {MaintenanceGuard} from '../maintenance/maintenance.guard';\nimport { SimulationMinStatsPopupComponent } from './components/simulation-min-stats-popup/simulation-min-stats-popup.component';\nimport {ImportMacroPopupComponent} from './components/import-macro-popup/import-macro-popup.component';\n+import {ConsumablesService} from './model/consumables.service';\nconst routes: Routes = [\n{\n@@ -118,6 +119,7 @@ const routes: Routes = [\n],\nproviders: [\nCraftingActionsRegistry,\n+ ConsumablesService\n]\n})\nexport class SimulatorModule {\n",
"new_path": "src/app/pages/simulator/simulator.module.ts",
"old_path": "src/app/pages/simulator/simulator.module.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore: fixed dumb error with simulator foods template binding
| 1
|
chore
| null |
821,196
|
07.05.2018 11:30:33
| 25,200
|
98580b1729606fed0796ccdcaaad767a404925ad
|
fix: ts-node 6
|
[
{
"change_type": "MODIFY",
"diff": "@@ -427,7 +427,7 @@ class App extends Generator {\n'@types/mocha@^5',\n'@types/node@^9',\n'typescript@^2.8',\n- 'ts-node@^5',\n+ 'ts-node@^6',\n'tslib@^1',\n)\nif (this.tslint) {\n",
"new_path": "src/generators/app.ts",
"old_path": "src/generators/app.ts"
}
] |
TypeScript
|
MIT License
|
oclif/oclif
|
fix: ts-node 6
| 1
|
fix
| null |
730,413
|
07.05.2018 11:38:32
| 14,400
|
3e4ea6f7f9f28afe6b360e6c2d2ae44a823b3dd0
|
feat(react-container-notifications): add support for muteNotifications parameter
|
[
{
"change_type": "MODIFY",
"diff": "@@ -22,13 +22,19 @@ const TIMEOUT_LENGTH = 10000;\nconst propTypes = {\nnotifications: PropTypes.object,\nisSupported: PropTypes.bool,\n- permission: PropTypes.string\n+ isMuted: PropTypes.bool,\n+ permission: PropTypes.string,\n+ onEvent: PropTypes.func,\n+ notificationSent: PropTypes.func\n};\nconst defaultProps = {\nnotifications: [],\nisSupported: false,\n- permission: ''\n+ isMuted: false,\n+ permission: '',\n+ onEvent: null,\n+ notificationSent: null\n};\nexport class Notifications extends Component {\n@@ -95,26 +101,28 @@ export class Notifications extends Component {\n*\n*/\ndisplayNotifications() {\n- const {props} = this;\n- const hasPermission = props.permission === browserUtilities.PERMISSION_GRANTED;\n- if (props.notifications && props.notifications.count() > 0) {\n- props.notifications.forEach((notification) => {\n+ const {\n+ notifications, onEvent, permission, isMuted\n+ } = this.props;\n+ const hasPermission = permission === browserUtilities.PERMISSION_GRANTED;\n+ if (notifications && notifications.count() > 0) {\n+ notifications.forEach((notification) => {\nconst {\nusername, message, avatar, notificationId\n} = notification;\n- if (hasPermission && browserUtilities.isBrowserHidden()) {\n+ if (!isMuted && hasPermission && browserUtilities.isBrowserHidden()) {\n// Actually display notification\nconst n = browserUtilities.spawnNotification(message, avatar, username, TIMEOUT_LENGTH);\n// If there is an onEvent method\nconst details = constructNotificationEventData(n, notification);\n- if (props.onEvent && typeof props.onEvent === 'function') {\n- props.onEvent(eventNames.NOTIFICATIONS_CREATED, details);\n+ if (onEvent && typeof onEvent === 'function') {\n+ onEvent(eventNames.NOTIFICATIONS_CREATED, details);\nn.addEventListener('click', () => {\n- props.onEvent(eventNames.NOTIFICATIONS_CLICKED, details);\n+ onEvent(eventNames.NOTIFICATIONS_CLICKED, details);\n});\n}\n}\n- props.notificationSent(notificationId);\n+ this.props.notificationSent(notificationId);\n});\n}\n}\n",
"new_path": "packages/node_modules/@ciscospark/react-container-notifications/src/container.js",
"old_path": "packages/node_modules/@ciscospark/react-container-notifications/src/container.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -41,6 +41,7 @@ describe('Notifications component', () => {\nnotifications: new Map(),\nonEvent,\npermission: null,\n+ isMuted: false,\nnotificationSent,\nsetNotificationPermission,\nsetNotificationSupported\n@@ -90,6 +91,12 @@ describe('Notifications component', () => {\nexpect(browserUtilities.spawnNotification).toBeCalled();\n});\n+ it('should not display the notification if isMuted is true', () => {\n+ component.props.isMuted = true;\n+ displayNotification(component, notification);\n+ expect(browserUtilities.spawnNotification).not.toBeCalled();\n+ });\n+\nit('should trigger onEvent when notification is created', () => {\ndisplayNotification(component, notification);\nexpect(onEvent).toBeCalled();\n",
"new_path": "packages/node_modules/@ciscospark/react-container-notifications/src/container.test.js",
"old_path": "packages/node_modules/@ciscospark/react-container-notifications/src/container.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -97,7 +97,7 @@ export class MeetWidget extends Component {\nonDeclineClick={handleDecline}\n/>\n<Ringtone play type={RINGTONE_TYPE_INCOMING} />\n- <Notifications onEvent={this.props.handleEvent} />\n+ <Notifications onEvent={this.props.handleEvent} isMuted={this.props.muteNotifications} />\n</div>\n);\n}\n@@ -111,7 +111,7 @@ export class MeetWidget extends Component {\ndisplayName={displayName}\nonCallClick={this.props.handleCall}\n/>\n- <Notifications onEvent={this.props.handleEvent} />\n+ <Notifications onEvent={this.props.handleEvent} isMuted={this.props.muteNotifications} />\n</div>\n);\n}\n",
"new_path": "packages/node_modules/@ciscospark/widget-meet/src/container.js",
"old_path": "packages/node_modules/@ciscospark/widget-meet/src/container.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -630,6 +630,7 @@ export class MessageWidget extends Component {\nfeatures,\nsparkInstance,\ncurrentUser,\n+ muteNotifications,\nwidgetMessage\n} = props;\nconst {formatMessage} = this.props.intl;\n@@ -697,7 +698,7 @@ export class MessageWidget extends Component {\ntitle={formatMessage(messages.deleteAlertTitle)}\n/>\n}\n- <Notifications onEvent={this.handleEvent} />\n+ <Notifications onEvent={this.handleEvent} isMuted={muteNotifications} />\n<Cover message={formatMessage(messages.dropzoneCoverMessage)} />\n</Dropzone>\n);\n",
"new_path": "packages/node_modules/@ciscospark/widget-message/src/container.js",
"old_path": "packages/node_modules/@ciscospark/widget-message/src/container.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
feat(react-container-notifications): add support for muteNotifications parameter
| 1
|
feat
|
react-container-notifications
|
791,834
|
07.05.2018 14:42:17
| 25,200
|
d03a05e405e06c25c7696801bd55b9b89c433969
|
core(tsc): fix OptimizedImages type; type check dep audits
|
[
{
"change_type": "MODIFY",
"diff": "* @fileoverview This audit determines if the images used are sufficiently larger\n* than JPEG compressed images without metadata at quality 85.\n*/\n-// @ts-nocheck - TODO(bckenny)\n'use strict';\nconst ByteEfficiencyAudit = require('./byte-efficiency-audit');\n@@ -47,15 +46,16 @@ class UsesOptimizedImages extends ByteEfficiencyAudit {\nstatic audit_(artifacts) {\nconst images = artifacts.OptimizedImages;\n- const failedImages = [];\n+ /** @type {Array<{url: string, fromProtocol: boolean, isCrossOrigin: boolean, totalBytes: number, wastedBytes: number}>} */\nconst results = [];\n- images.forEach(image => {\n+ const failedImages = [];\n+ for (const image of images) {\nif (image.failed) {\nfailedImages.push(image);\n- return;\n+ continue;\n} else if (/(jpeg|bmp)/.test(image.mimeType) === false ||\nimage.originalSize < image.jpegSize + IGNORE_THRESHOLD_IN_BYTES) {\n- return;\n+ continue;\n}\nconst url = URL.elideDataURI(image.url);\n@@ -68,7 +68,7 @@ class UsesOptimizedImages extends ByteEfficiencyAudit {\ntotalBytes: image.originalSize,\nwastedBytes: jpegSavings.bytes,\n});\n- });\n+ }\nlet debugString;\nif (failedImages.length) {\n",
"new_path": "lighthouse-core/audits/byte-efficiency/uses-optimized-images.js",
"old_path": "lighthouse-core/audits/byte-efficiency/uses-optimized-images.js"
},
{
"change_type": "MODIFY",
"diff": "/*\n* @fileoverview This audit determines if the images could be smaller when compressed with WebP.\n*/\n-// @ts-nocheck - TODO(bckenny)\n'use strict';\nconst ByteEfficiencyAudit = require('./byte-efficiency-audit');\n@@ -47,14 +46,15 @@ class UsesWebPImages extends ByteEfficiencyAudit {\nstatic audit_(artifacts) {\nconst images = artifacts.OptimizedImages;\n- const failedImages = [];\n+ /** @type {Array<{url: string, fromProtocol: boolean, isCrossOrigin: boolean, totalBytes: number, wastedBytes: number}>} */\nconst results = [];\n- images.forEach(image => {\n+ const failedImages = [];\n+ for (const image of images) {\nif (image.failed) {\nfailedImages.push(image);\n- return;\n+ continue;\n} else if (image.originalSize < image.webpSize + IGNORE_THRESHOLD_IN_BYTES) {\n- return;\n+ continue;\n}\nconst url = URL.elideDataURI(image.url);\n@@ -67,7 +67,7 @@ class UsesWebPImages extends ByteEfficiencyAudit {\ntotalBytes: image.originalSize,\nwastedBytes: webpSavings.bytes,\n});\n- });\n+ }\nlet debugString;\nif (failedImages.length) {\n",
"new_path": "lighthouse-core/audits/byte-efficiency/uses-webp-images.js",
"old_path": "lighthouse-core/audits/byte-efficiency/uses-webp-images.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -20,12 +20,14 @@ const WEBP_QUALITY = 0.85;\nconst MINIMUM_IMAGE_SIZE = 4096; // savings of <4 KB will be ignored in the audit anyway\n+/** @typedef {{isSameOrigin: boolean, isBase64DataUri: boolean, requestId: string, url: string, mimeType: string, resourceSize: number}} SimplifiedNetworkRecord */\n+\n/* global document, Image, atob */\n/**\n* Runs in the context of the browser\n* @param {string} url\n- * @return {Promise<{jpeg: Object, webp: Object}>}\n+ * @return {Promise<{jpeg: {base64: number, binary: number}, webp: {base64: number, binary: number}}>}\n*/\n/* istanbul ignore next */\nfunction getOptimizedNumBytes(url) {\n@@ -40,6 +42,7 @@ function getOptimizedNumBytes(url) {\n/**\n* @param {'image/jpeg'|'image/webp'} type\n* @param {number} quality\n+ * @return {{base64: number, binary: number}}\n*/\nfunction getTypeStats(type, quality) {\nconst dataURI = canvas.toDataURL(type, quality);\n@@ -74,6 +77,7 @@ class OptimizedImages extends Gatherer {\n* @return {Array<SimplifiedNetworkRecord>}\n*/\nstatic filterImageRequests(pageUrl, networkRecords) {\n+ /** @type {Set<string>} */\nconst seenUrls = new Set();\nreturn networkRecords.reduce((prev, record) => {\nif (seenUrls.has(record._url) || !record.finished) {\n@@ -169,14 +173,22 @@ class OptimizedImages extends Gatherer {\n* @param {Array<SimplifiedNetworkRecord>} imageRecords\n* @return {Promise<LH.Artifacts['OptimizedImages']>}\n*/\n- computeOptimizedImages(driver, imageRecords) {\n+ async computeOptimizedImages(driver, imageRecords) {\n/** @type {LH.Artifacts['OptimizedImages']} */\n- const result = [];\n+ const results = [];\n- return imageRecords.reduce((promise, record) => {\n- return promise.then(results => {\n- return this.calculateImageStats(driver, record)\n- .catch(err => {\n+ for (const record of imageRecords) {\n+ try {\n+ const stats = await this.calculateImageStats(driver, record);\n+ if (stats === null) {\n+ continue;\n+ }\n+\n+ /** @type {LH.Artifacts.OptimizedImage} */\n+ // @ts-ignore TODO(bckenny): fix browserify/Object.spread. See https://github.com/GoogleChrome/lighthouse/issues/5152\n+ const image = Object.assign({failed: false}, stats, record);\n+ results.push(image);\n+ } catch (err) {\n// Track this with Sentry since these errors aren't surfaced anywhere else, but we don't\n// want to tank the entire run due to a single image.\n// @ts-ignore TODO(bckenny): Sentry type checking\n@@ -185,20 +197,16 @@ class OptimizedImages extends Gatherer {\nextra: {imageUrl: URL.elideDataURI(record.url)},\nlevel: 'warning',\n});\n- return {failed: true, err};\n- })\n- .then(stats => {\n- if (!stats) {\n- return results;\n- }\n- return results.concat(Object.assign(stats, record));\n- });\n- });\n- }, Promise.resolve(result));\n+ /** @type {LH.Artifacts.OptimizedImageError} */\n+ // @ts-ignore TODO(bckenny): see above browserify/Object.spread TODO.\n+ const imageError = Object.assign({failed: true, errMsg: err.message}, record);\n+ results.push(imageError);\n+ }\n}\n- /** @typedef {{isSameOrigin: boolean, isBase64DataUri: boolean, requestId: string, url: string, mimeType: string, resourceSize: number}} SimplifiedNetworkRecord */\n+ return results;\n+ }\n/**\n* @param {LH.Gatherer.PassContext} passContext\n",
"new_path": "lighthouse-core/gather/gatherers/dobetterweb/optimized-images.js",
"old_path": "lighthouse-core/gather/gatherers/dobetterweb/optimized-images.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -157,7 +157,7 @@ describe('Optimized images', () => {\nassert.equal(artifact.length, 4);\nassert.ok(failed, 'passed along failure');\n- assert.ok(/whoops/.test(failed.err.message), 'passed along error message');\n+ assert.ok(/whoops/.test(failed.errMsg), 'passed along error message');\n});\n});\n",
"new_path": "lighthouse-core/test/gather/gatherers/dobetterweb/optimized-images-test.js",
"old_path": "lighthouse-core/test/gather/gatherers/dobetterweb/optimized-images-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -71,7 +71,7 @@ declare global {\n/** The status code of the attempted load of the page while network access is disabled. */\nOffline: number;\n/** Size and compression opportunity information for all the images in the page. */\n- OptimizedImages: Artifacts.OptimizedImage[];\n+ OptimizedImages: Array<Artifacts.OptimizedImage | Artifacts.OptimizedImageError>;\n/** HTML snippets from any password inputs that prevent pasting. */\nPasswordInputsWithPreventedPaste: {snippet: string}[];\n/** Size info of all network records sent without compression and their size after gzipping. */\n@@ -234,18 +234,30 @@ declare global {\n}\nexport interface OptimizedImage {\n+ failed: false;\n+ fromProtocol: boolean;\n+ originalSize: number;\n+ jpegSize: number;\n+ webpSize: number;\n+\n+ isSameOrigin: boolean;\n+ isBase64DataUri: boolean;\n+ requestId: string;\n+ url: string;\n+ mimeType: string;\n+ resourceSize: number;\n+ }\n+\n+ export interface OptimizedImageError {\n+ failed: true;\n+ errMsg: string;\n+\nisSameOrigin: boolean;\nisBase64DataUri: boolean;\nrequestId: string;\nurl: string;\nmimeType: string;\nresourceSize: number;\n- fromProtocol?: boolean;\n- originalSize?: number;\n- jpegSize?: number;\n- webpSize?: number;\n- failed?: boolean;\n- err?: Error;\n}\nexport interface TagBlockingFirstPaint {\n",
"new_path": "typings/artifacts.d.ts",
"old_path": "typings/artifacts.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(tsc): fix OptimizedImages type; type check dep audits (#5129)
| 1
|
core
|
tsc
|
791,723
|
07.05.2018 14:48:05
| 25,200
|
17507990e87d29756c06c0db7877aaeb2de5c63f
|
report: final metrics display, icons, whitespace polish
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,8 +15,8 @@ class FirstMeaningfulPaint extends Audit {\nstatic get meta() {\nreturn {\nname: 'first-meaningful-paint',\n- description: 'First meaningful paint',\n- helpText: 'First meaningful paint measures when the primary content of a page is visible. ' +\n+ description: 'First Meaningful Paint',\n+ helpText: 'First Meaningful Paint measures when the primary content of a page is visible. ' +\n'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint).',\nscoreDisplayMode: Audit.SCORING_MODES.NUMERIC,\nrequiredArtifacts: ['traces'],\n",
"new_path": "lighthouse-core/audits/first-meaningful-paint.js",
"old_path": "lighthouse-core/audits/first-meaningful-paint.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -189,7 +189,6 @@ module.exports = {\ngroups: {\n'metrics': {\ntitle: 'Metrics',\n- description: 'These metrics encapsulate your web app\\'s performance across a number of dimensions.',\n},\n'load-opportunities': {\ntitle: 'Opportunities',\n@@ -248,7 +247,6 @@ module.exports = {\ncategories: {\n'performance': {\nname: 'Performance',\n- description: 'These encapsulate your web app\\'s current performance and opportunities to improve it.',\naudits: [\n{id: 'first-contentful-paint', weight: 3, group: 'metrics'},\n{id: 'first-meaningful-paint', weight: 1, group: 'metrics'},\n@@ -363,7 +361,6 @@ module.exports = {\n},\n'best-practices': {\nname: 'Best Practices',\n- description: 'We\\'ve compiled some recommendations for modernizing your web app and avoiding performance pitfalls.',\naudits: [\n{id: 'appcache-manifest', weight: 1},\n{id: 'no-websql', weight: 1},\n",
"new_path": "lighthouse-core/config/default-config.js",
"old_path": "lighthouse-core/config/default-config.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -39,8 +39,8 @@ class CategoryRenderer {\nthis.dom.find('.lh-audit__display-text', auditEl).textContent = displayValue;\n}\n- this.dom.find('.lh-audit__title', auditEl).appendChild(\n- this.dom.convertMarkdownCodeSnippets(audit.result.description));\n+ const titleEl = this.dom.find('.lh-audit__title', auditEl);\n+ titleEl.appendChild(this.dom.convertMarkdownCodeSnippets(audit.result.description));\nthis.dom.find('.lh-audit__description', auditEl)\n.appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.helpText));\n@@ -64,7 +64,7 @@ class CategoryRenderer {\nconst tooltip = this.dom.createChildOf(textEl, 'div', 'lh-error-tooltip-content tooltip');\ntooltip.textContent = audit.result.debugString || 'Report error: no audit information';\n} else if (audit.result.debugString) {\n- const debugStrEl = auditEl.appendChild(this.dom.createElement('div', 'lh-debug'));\n+ const debugStrEl = this.dom.createChildOf(titleEl, 'div', 'lh-debug');\ndebugStrEl.textContent = audit.result.debugString;\n}\nreturn auditEl;\n@@ -86,7 +86,7 @@ class CategoryRenderer {\n* @param {!ReportRenderer.CategoryJSON} category\n* @return {!Element}\n*/\n- renderCategoryScore(category) {\n+ renderCategoryHeader(category) {\nconst tmpl = this.dom.cloneTemplate('#tmpl-lh-category-header', this.templateContext);\nconst gaugeContainerEl = this.dom.find('.lh-score__gauge', tmpl);\n@@ -95,8 +95,11 @@ class CategoryRenderer {\nthis.dom.find('.lh-category-header__title', tmpl).appendChild(\nthis.dom.convertMarkdownCodeSnippets(category.name));\n- this.dom.find('.lh-category-header__description', tmpl)\n- .appendChild(this.dom.convertMarkdownLinkSnippets(category.description));\n+ if (category.description) {\n+ const descEl = this.dom.convertMarkdownLinkSnippets(category.description);\n+ this.dom.find('.lh-category-header__description', tmpl).appendChild(descEl);\n+ }\n+\nreturn /** @type {!Element} */ (tmpl.firstElementChild);\n}\n@@ -157,9 +160,7 @@ class CategoryRenderer {\n* @return {!Element}\n*/\n_renderFailedAuditsSection(elements) {\n- const failedElem = this.renderAuditGroup({\n- title: `Failed audits`,\n- }, {expandable: false, itemCount: this._getTotalAuditsLength(elements)});\n+ const failedElem = this.dom.createElement('div');\nfailedElem.classList.add('lh-failed-audits');\nelements.forEach(elem => failedElem.appendChild(elem));\nreturn failedElem;\n@@ -253,7 +254,7 @@ class CategoryRenderer {\nrender(category, groupDefinitions) {\nconst element = this.dom.createElement('div', 'lh-category');\nthis.createPermalinkSpan(element, category.id);\n- element.appendChild(this.renderCategoryScore(category));\n+ element.appendChild(this.renderCategoryHeader(category));\nconst manualAudits = category.audits.filter(item => item.result.scoreDisplayMode === 'manual');\nconst nonManualAudits = category.audits.filter(audit => !manualAudits.includes(audit));\n@@ -300,8 +301,6 @@ class CategoryRenderer {\nauditsUngrouped.notApplicable.forEach((/** @type {!ReportRenderer.AuditJSON} */ audit, i) =>\nnotApplicableElements.push(this.renderAudit(audit, i)));\n- let hasFailedGroups = false;\n-\nObject.keys(auditsGroupedByGroup).forEach(groupId => {\nconst group = groupDefinitions[groupId];\nconst groups = auditsGroupedByGroup[groupId];\n@@ -309,15 +308,15 @@ class CategoryRenderer {\nif (groups.failed.length) {\nconst auditGroupElem = this.renderAuditGroup(group, {expandable: false});\ngroups.failed.forEach((item, i) => auditGroupElem.appendChild(this.renderAudit(item, i)));\n+ auditGroupElem.classList.add('lh-audit-group--unadorned');\nauditGroupElem.open = true;\nfailedElements.push(auditGroupElem);\n-\n- hasFailedGroups = true;\n}\nif (groups.passed.length) {\nconst auditGroupElem = this.renderAuditGroup(group, {expandable: true});\ngroups.passed.forEach((item, i) => auditGroupElem.appendChild(this.renderAudit(item, i)));\n+ auditGroupElem.classList.add('lh-audit-group--unadorned');\npassedElements.push(auditGroupElem);\n}\n@@ -325,19 +324,15 @@ class CategoryRenderer {\nconst auditGroupElem = this.renderAuditGroup(group, {expandable: true});\ngroups.notApplicable.forEach((item, i) =>\nauditGroupElem.appendChild(this.renderAudit(item, i)));\n+ auditGroupElem.classList.add('lh-audit-group--unadorned');\nnotApplicableElements.push(auditGroupElem);\n}\n});\nif (failedElements.length) {\n- // if failed audits are grouped skip the 'X Failed Audits' header\n- if (hasFailedGroups) {\n- failedElements.forEach(elem => element.appendChild(elem));\n- } else {\nconst failedElem = this._renderFailedAuditsSection(failedElements);\nelement.appendChild(failedElem);\n}\n- }\nif (manualAudits.length) {\nconst manualEl = this._renderManualAudits(manualAudits, category.manualDescription);\n",
"new_path": "lighthouse-core/report/html/renderer/category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -253,22 +253,11 @@ class DetailsRenderer {\nfor (const thumbnail of details.items) {\nconst frameEl = this._dom.createChildOf(filmstripEl, 'div', 'lh-filmstrip__frame');\n-\n- let timing = Util.formatMilliseconds(thumbnail.timing, 1);\n- if (thumbnail.timing > 1000) {\n- timing = Util.formatNumber(thumbnail.timing / 1000) + ' s';\n- }\n-\n- const timingEl = this._dom.createChildOf(frameEl, 'div', 'lh-filmstrip__timestamp');\n- timingEl.textContent = timing;\n-\n- const base64data = thumbnail.data;\nthis._dom.createChildOf(frameEl, 'img', 'lh-filmstrip__thumbnail', {\n- src: `data:image/jpeg;base64,${base64data}`,\n- alt: `Screenshot at ${timing}`,\n+ src: `data:image/jpeg;base64,${thumbnail.data}`,\n+ alt: `Screenshot`,\n});\n}\n-\nreturn filmstripEl;\n}\n",
"new_path": "lighthouse-core/report/html/renderer/details-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/details-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -50,13 +50,12 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\nelement.classList.add(`lh-load-opportunity--${Util.calculateRating(audit.result.score)}`);\nelement.id = audit.result.name;\n- const summary = this.dom.find('.lh-load-opportunity__summary', tmpl);\nconst titleEl = this.dom.find('.lh-load-opportunity__title', tmpl);\ntitleEl.textContent = audit.result.description;\nthis.dom.find('.lh-audit__index', element).textContent = `${index + 1}`;\nif (audit.result.debugString || audit.result.error) {\n- const debugStrEl = this.dom.createChildOf(summary, 'div', 'lh-debug');\n+ const debugStrEl = this.dom.createChildOf(titleEl, 'div', 'lh-debug');\ndebugStrEl.textContent = audit.result.debugString || 'Audit error';\n}\nif (audit.result.error) return element;\n@@ -86,18 +85,37 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\nreturn element;\n}\n+ /**\n+ * Get an audit's wastedMs to sort the opportunity by, and scale the sparkline width\n+ * Opportunties with an error won't have a summary object, so MIN_VALUE is returned to keep any\n+ * erroring opportunities last in sort order.\n+ * @param {!ReportRenderer.AuditJSON} audit\n+ * @return {number}\n+ */\n+ _getWastedMs(audit) {\n+ if (\n+ audit.result.details &&\n+ audit.result.details.summary &&\n+ typeof audit.result.details.summary.wastedMs === 'number'\n+ ) {\n+ return audit.result.details.summary.wastedMs;\n+ } else {\n+ return Number.MIN_VALUE;\n+ }\n+ }\n+\n/**\n* @override\n*/\nrender(category, groups) {\nconst element = this.dom.createElement('div', 'lh-category');\nthis.createPermalinkSpan(element, category.id);\n- element.appendChild(this.renderCategoryScore(category));\n+ element.appendChild(this.renderCategoryHeader(category));\n+ // Metrics\nconst metricAudits = category.audits.filter(audit => audit.group === 'metrics');\nconst metricAuditsEl = this.renderAuditGroup(groups['metrics'], {expandable: false});\n- // Metrics\nconst keyMetrics = metricAudits.filter(a => a.weight >= 3);\nconst otherMetrics = metricAudits.filter(a => a.weight < 3);\n@@ -111,9 +129,16 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\notherMetrics.forEach(item => {\nmetricsColumn2El.appendChild(this._renderMetric(item));\n});\n+ const estValuesEl = this.dom.createChildOf(metricsColumn2El, 'div',\n+ 'lh-metrics__disclaimer lh-metrics__disclaimer');\n+ estValuesEl.textContent = 'Values are estimated and may vary.';\n+\n+ metricAuditsEl.open = true;\n+ metricAuditsEl.classList.add('lh-audit-group--metrics');\n+ element.appendChild(metricAuditsEl);\n// Filmstrip\n- const timelineEl = this.dom.createChildOf(metricAuditsEl, 'div', 'lh-timeline');\n+ const timelineEl = this.dom.createChildOf(element, 'div', 'lh-filmstrip-container');\nconst thumbnailAudit = category.audits.find(audit => audit.id === 'screenshot-thumbnails');\nconst thumbnailResult = thumbnailAudit && thumbnailAudit.result;\nif (thumbnailResult && thumbnailResult.details) {\n@@ -124,15 +149,14 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\ntimelineEl.appendChild(filmstripEl);\n}\n- metricAuditsEl.open = true;\n- element.appendChild(metricAuditsEl);\n-\n// Opportunities\nconst opportunityAudits = category.audits\n.filter(audit => audit.group === 'load-opportunities' && !Util.showAsPassed(audit.result))\n- .sort((auditA, auditB) => auditB.result.rawValue - auditA.result.rawValue);\n+ .sort((auditA, auditB) => this._getWastedMs(auditB) - this._getWastedMs(auditA));\n+\nif (opportunityAudits.length) {\n- const maxWaste = Math.max(...opportunityAudits.map(audit => audit.result.rawValue));\n+ const wastedMsValues = opportunityAudits.map(audit => this._getWastedMs(audit));\n+ const maxWaste = Math.max(...wastedMsValues);\nconst scale = Math.ceil(maxWaste / 1000) * 1000;\nconst groupEl = this.renderAuditGroup(groups['load-opportunities'], {expandable: false});\nconst tmpl = this.dom.cloneTemplate('#tmpl-lh-opportunity-header', this.templateContext);\n@@ -141,6 +165,7 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\nopportunityAudits.forEach((item, i) =>\ngroupEl.appendChild(this._renderOpportunity(item, i, scale)));\ngroupEl.open = true;\n+ groupEl.classList.add('lh-audit-group--opportunities');\nelement.appendChild(groupEl);\n}\n@@ -157,9 +182,11 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\nconst groupEl = this.renderAuditGroup(groups['diagnostics'], {expandable: false});\ndiagnosticAudits.forEach((item, i) => groupEl.appendChild(this.renderAudit(item, i)));\ngroupEl.open = true;\n+ groupEl.classList.add('lh-audit-group--diagnostics');\nelement.appendChild(groupEl);\n}\n+ // Passed audits\nconst passedElements = category.audits\n.filter(audit => (audit.group === 'load-opportunities' || audit.group === 'diagnostics') &&\nUtil.showAsPassed(audit.result))\n",
"new_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -236,7 +236,7 @@ ReportRenderer.AuditJSON; // eslint-disable-line no-unused-expressions\n* name: string,\n* id: string,\n* score: (number|null),\n- * description: string,\n+ * description: (string|undefined),\n* manualDescription: string,\n* audits: !Array<!ReportRenderer.AuditJSON>\n* }}\n",
"new_path": "lighthouse-core/report/html/renderer/report-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/report-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "--monospace-font-family: 'Menlo', 'dejavu sans mono', 'Consolas', 'Lucida Console', monospace;\n--body-font-size: 14px;\n--body-line-height: 18px;\n- --subheader-font-size: 16px;\n+ --subheader-font-size: 14px;\n--subheader-line-height: 20px;\n- --header-font-size: 20px;\n+ --subheader-color: hsl(206, 6%, 25%);\n+ --header-font-size: 16px;\n--header-line-height: 24px;\n--title-font-size: 24px;\n--title-line-height: 28px;\n--caption-font-size: 12px;\n--caption-line-height: 16px;\n--default-padding: 12px;\n- --section-padding: 20px;\n+ --section-padding: 16px;\n--section-indent: 16px;\n--audit-group-indent: 16px;\n+ --audit-item-gap: 5px;\n--audit-indent: 16px;\n--text-indent: 8px;\n--expandable-indent: 20px;\n--informative-color: #0c50c7;\n--medium-75-gray: #757575;\n--medium-50-gray: hsl(210, 17%, 98%);\n+ --medium-100-gray: hsl(200, 12%, 95%);\n--warning-color: #ffab00; /* md amber a700 */\n--report-border-color: #ccc;\n--report-secondary-border-color: #ebebeb;\n--lh-score-highlight-bg: hsla(0, 0%, 90%, 0.2);\n--lh-score-icon-background-size: 24px;\n--lh-score-margin: 12px;\n- --lh-table-header-bg: hsla(0, 0%, 50%, 0.4);\n+ --lh-table-header-bg: #f8f9fa;\n--lh-table-higlight-bg: hsla(0, 0%, 75%, 0.1);\n--lh-sparkline-height: 5px;\n--lh-sparkline-thin-height: 3px;\n--lh-filmstrip-thumbnail-width: 60px;\n- --lh-score-icon-width: calc(1.5 * var(--body-font-size));\n+ --lh-score-icon-width: calc(var(--body-font-size) / 14 * 16);\n--lh-category-score-width: calc(5 * var(--body-font-size));\n--lh-audit-vpadding: 8px;\n- --lh-audit-index-width: 1.3em;\n+ --lh-audit-index-width: 18px;\n--lh-audit-hgap: 12px;\n- --lh-audit-group-vpadding: 12px;\n+ --lh-audit-group-vpadding: 8px;\n--lh-section-vpadding: 12px;\n--pass-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>check</title><path fill=\"hsl(139, 70%, 30%)\" d=\"M24 4C12.95 4 4 12.95 4 24c0 11.04 8.95 20 20 20 11.04 0 20-8.96 20-20 0-11.05-8.96-20-20-20zm-4 30L10 24l2.83-2.83L20 28.34l15.17-15.17L38 16 20 34z\"/></svg>');\n--average-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>info</title><path fill=\"hsl(31, 100%, 45%)\" d=\"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm2 30h-4V22h4v12zm0-16h-4v-4h4v4z\"/></svg>');\n--fail-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><title>warn</title><path fill=\"hsl(1, 73%, 45%)\" d=\"M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z\"/></svg>');\n- --chevron-icon-url: url('data:image/svg+xml;utf8,<svg fill=\"hsl(0, 0%, 62%)\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z\"/><path d=\"M0-.25h24v24H0z\" fill=\"none\"/></svg>');\n+ --chevron-icon-url: url('data:image/svg+xml;utf8,<svg fill=\"hsl(216, 5%, 39%)\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z\"/><path d=\"M0-.25h24v24H0z\" fill=\"none\"/></svg>');\n+\n+ --av-timer-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\"><path d=\"M0 0h48v48H0z\" fill=\"none\"/><path d=\"M22 34c0 1.1.9 2 2 2s2-.9 2-2-.9-2-2-2-2 .9-2 2zm0-28v8h4v-3.84c6.78.97 12 6.79 12 13.84 0 7.73-6.27 14-14 14s-14-6.27-14-14c0-3.36 1.18-6.43 3.15-8.85L24 26l2.83-2.83-13.6-13.6-.02.04C8.84 12.89 6 18.11 6 24c0 9.94 8.04 18 17.99 18S42 33.94 42 24 33.94 6 23.99 6H22zm14 18c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-24 0c0 1.1.9 2 2 2s2-.9 2-2-.9-2-2-2-2 .9-2 2z\" fill=\"hsl(216, 5%, 39%)\"/></svg>');\n+ --photo-filter-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\"><path fill=\"none\" d=\"M0 0h48v48H0V0z\"/><path d=\"M38.04 20v18H10V10h18V6H10.04c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h28c2.2 0 4-1.8 4-4V20h-4zM34 20l1.88-4.12L40 14l-4.12-1.88L34 8l-1.88 4.12L28 14l4.12 1.88zm-7.5 1.5L24 16l-2.5 5.5L16 24l5.5 2.5L24 32l2.5-5.5L32 24z\" fill=\"hsl(216, 5%, 39%)\"/></svg>');\n+ --visibility-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\"><path d=\"M0 0h48v48H0z\" fill=\"none\"/><path d=\"M24 9C14 9 5.46 15.22 2 24c3.46 8.78 12 15 22 15 10.01 0 18.54-6.22 22-15-3.46-8.78-11.99-15-22-15zm0 25c-5.52 0-10-4.48-10-10s4.48-10 10-10 10 4.48 10 10-4.48 10-10 10zm0-16c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6z\" fill=\"hsl(216, 5%, 39%)\"/></svg>');\n+ --check-circle-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\"><path d=\"M0 0h48v48H0z\" fill=\"none\"/><path d=\"M24 4C12.95 4 4 12.95 4 24c0 11.04 8.95 20 20 20 11.04 0 20-8.96 20-20 0-11.05-8.96-20-20-20zm-4 30L10 24l2.83-2.83L20 28.34l15.17-15.17L38 16 20 34z\" fill=\"hsl(216, 5%, 39%)\"/></svg>');\n+ --check-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\"><path d=\"M0 0h48v48H0z\" fill=\"none\"/><path d=\"M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z\"/></svg>');\n+ --search-icon-url: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\"><path d=\"M31 28h-1.59l-.55-.55C30.82 25.18 32 22.23 32 19c0-7.18-5.82-13-13-13S6 11.82 6 19s5.82 13 13 13c3.23 0 6.18-1.18 8.45-3.13l.55.55V31l10 9.98L40.98 38 31 28zm-12 0a9 9 0 1 1 .001-18.001A9 9 0 0 1 19 28z\" fill=\"hsl(216, 5%, 39%)\"/><path d=\"M0 0h48v48H0z\" fill=\"none\" /></svg>');\n+ --remove-circle-icon-url: url('data:image/svg+xml;utf8,<svg height=\"24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z\" fill=\"hsl(216, 5%, 39%)\"/></svg>');\n}\n.lh-vars.lh-devtools {\n--lh-audit-vpadding: 4px;\n--lh-audit-hgap: 12px;\n- --lh-audit-group-vpadding: 8px;\n+ --lh-audit-group-vpadding: 12px;\n--lh-section-vpadding: 8px;\n}\nscroll-behavior: smooth;\n}\n-.lh-root :focus {\n+.lh-root :focus,\n+.lh-root .lh-details > summary:focus {\noutline: -webkit-focus-ring-color auto 3px;\n}\n+.lh-root summary:focus {\n+ outline: 1px solid hsl(217, 89%, 61%);\n+}\n+\n.lh-root [hidden] {\ndisplay: none !important;\ncursor: pointer;\n}\n+.lh-audit__description,\n+.lh-load-opportunity__description,\n+.lh-details {\n+ margin-left: calc(var(--text-indent) + var(--lh-audit-index-width) + 2 * var(--audit-item-gap));\n+ margin-right: calc(var(--text-indent) + 2px);\n+}\n+\n.lh-details {\nfont-size: var(--body-font-size);\nmargin-top: var(--default-padding);\n.lh-audit__score-icon {\nmargin-left: var(--lh-score-margin);\nwidth: var(--lh-score-icon-width);\n+ height: var(--lh-score-icon-width);\nbackground: none no-repeat center center / contain;\n}\ndisplay: none;\n}\n+.lh-category-header__description,\n+.lh-audit__description {\n+ color: var(--secondary-text-color);\n+}\n-\n-.lh-audit__description, .lh-category-header__description {\n- margin-top: 5px;\n+.lh-category-header__description {\nfont-size: var(--body-font-size);\n- color: var(--secondary-text-color);\n- line-height: var(--body-line-height);\n+ margin: calc(var(--default-padding) / 2) 0 var(--default-padding);\n}\n.lh-audit__header > div,\n.lh-audit__header > span {\n- margin: 0 5px;\n+ margin: 0 var(--audit-item-gap);\n+}\n+.lh-audit__header > div:first-child, .lh-audit__header > span:first-child {\n+ margin-left: 0;\n+}\n+.lh-audit__header > div:last-child, .lh-audit__header > span:last-child {\n+ margin-right: 0;\n}\n+\n.lh-audit__header .lh-audit__index {\n- margin-left: var(--text-indent);\nwidth: var(--lh-audit-index-width);\n}\n.lh-toggle-arrow {\nbackground: var(--chevron-icon-url) no-repeat center center / 20px 20px;\nwidth: 12px;\n+ height: 18px;\nflex: none;\ntransition: transform 150ms ease-in-out;\ncursor: pointer;\nborder: none;\ntransform: rotateZ(90deg);\n- margin-right: calc(var(--expandable-indent) - 12px);\nmargin-top: calc((var(--body-line-height) - 12px) / 2);\n}\n/* Expandable Details (Audit Groups, Audits) */\n.lh-expandable-details {\n- padding-left: var(--expandable-indent);\n+\n}\n.lh-expandable-details__summary {\ncursor: pointer;\n- margin-left: calc(0px - var(--expandable-indent));\n}\n.lh-audit__header {\ndisplay: flex;\n+ padding: var(--lh-audit-vpadding) var(--text-indent);\n+}\n+.lh-audit__header:hover {\n+ background-color: #F8F9FA;\n}\n+\n.lh-audit-group[open] > .lh-audit-group__summary > .lh-toggle-arrow,\n.lh-expandable-details[open] > .lh-expandable-details__summary > .lh-toggle-arrow,\n.lh-expandable-details[open] > .lh-expandable-details__summary > div > .lh-toggle-arrow {\ndisplay: none;\n}\n-/* Perf Timeline */\n-.lh-timeline-container {\n- overflow: hidden;\n- border-top: 1px solid var(--metric-timeline-rule-color);\n-}\n-\n-.lh-timeline {\n- padding: 0;\n- padding-bottom: 0;\n- width: calc(var(--lh-filmstrip-thumbnail-width) * 10 + var(--default-padding) * 2);\n-}\n-\n-.lh-narrow .lh-timeline-container {\n- width: calc(100vw - var(--section-padding) * 2);\n- overflow-x: scroll;\n-}\n-\n-.lh-devtools .lh-timeline-container {\n- width: 100%;\n- overflow-x: scroll;\n-}\n-\n-/* Perf Timeline Metric */\n+/* Perf Metric */\n.lh-metric-container {\ndisplay: flex;\n.lh-metric-column {\nflex: 1;\n+}\n+.lh-metric-column:first-of-type {\nmargin-right: 20px;\n}\n.lh-metric {\n- border-top: 1px solid var(--report-secondary-border-color);\n+ border-bottom: 1px solid var(--report-secondary-border-color);\n}\n.lh-metric__innerwrap {\ndisplay: flex;\njustify-content: space-between;\n- margin: var(--lh-audit-vpadding) 0;\n- padding: var(--lh-audit-vpadding) var(--text-indent);\n+ padding: 11px var(--text-indent);\n}\n.lh-metric__header {\nflex: 1;\n}\n+.lh-metrics__disclaimer {\n+ color: var(--medium-75-gray);\n+ text-align: right;\n+ margin: var(--lh-section-vpadding) 0;\n+ padding: 0 var(--text-indent);\n+}\n+\n.lh-metric__description {\ncolor: var(--secondary-text-color);\n}\n-\n-.lh-metric--pass .lh-metric__value {\n- color: var(--pass-color);\n+.lh-metric__value {\n+ white-space: nowrap; /* No wrapping between metric value and the icon */\n}\n+\n.lh-metric .lh-metric__value::after {\ncontent: '';\n- width: var(--body-font-size);\n- height: var(--body-font-size);\n+ width: var(--lh-score-icon-width);\n+ height: var(--lh-score-icon-width);\nbackground-size: contain;\ndisplay: inline-block;\nvertical-align: text-bottom;\nmargin-left: calc(var(--body-font-size) / 2);\n}\n+.lh-metric--pass .lh-metric__value {\n+ color: var(--pass-color);\n+}\n.lh-metric--pass .lh-metric__value::after {\nbackground: var(--pass-icon-url) no-repeat 50% 50%;\n}\n.lh-metric--fail .lh-metric__value {\ncolor: var(--fail-color);\n}\n-\n.lh-metric--fail .lh-metric__value::after {\nbackground: var(--fail-icon-url) no-repeat 50% 50%;\n}\n/* Perf load opportunity */\n.lh-load-opportunity {\n- padding-top: var(--lh-audit-vpadding);\n- padding-bottom: var(--lh-audit-vpadding);\nborder-bottom: 1px solid var(--report-secondary-border-color);\n}\ncolor: var(--medium-75-gray);\ntext-align: center;\ndisplay: unset;\n- line-height: calc(3 * var(--body-font-size));\n+ line-height: calc(2.3 * var(--body-font-size));\n}\n.lh-load-opportunity__summary {\n- padding-right: var(--text-indent);\n+ padding: var(--lh-audit-vpadding) var(--text-indent);\n+}\n+.lh-load-opportunity__summary:hover {\n+ background-color: #F8F9FA;\n}\n.lh-load-opportunity__col {\nflex: 4;\n}\n-.lh-load-opportunity__summary .lh-debug {\n- width: calc(100% - var(--expandable-indent));\n- margin: 0 var(--expandable-indent);\n-}\n-\n.lh-load-opportunity__title {\nfont-size: var(--body-font-size);\nflex: 10;\n}\n.lh-sparkline__bar {\n- background: var(--informative-color);\nheight: 100%;\nfloat: right;\n}\n/* Filmstrip */\n+.lh-filmstrip-container {\n+ padding: 0 var(--expandable-indent);\n+ margin: 0 auto;\n+}\n+\n+\n.lh-filmstrip {\ndisplay: flex;\nflex-direction: row;\nposition: relative;\n}\n-.lh-filmstrip__timestamp {\n- margin-bottom: calc(0.5 * var(--caption-line-height));\n- font-size: var(--caption-font-size);\n- line-height: var(--caption-line-height);\n- padding-top: 1px;\n- padding-right: 6px;\n-}\n-\n-.lh-filmstrip__timestamp::before {\n- content: '';\n- height: 7px;\n- width: 2px;\n- background: var(--metric-timeline-rule-color);\n- position: absolute;\n- right: 0;\n- top: -2px;\n-}\n-\n.lh-filmstrip__thumbnail {\nborder: 1px solid var(--report-secondary-border-color);\nmax-height: 100px;\n/* Audit */\n.lh-audit {\n- margin-bottom: var(--lh-audit-vpadding);\n- padding-top: var(--lh-audit-vpadding);\n- border-top: 1px solid var(--report-secondary-border-color);\n+ border-bottom: 1px solid var(--report-secondary-border-color);\nfont-size: var(--body-font-size);\n}\n-.lh-audit:last-of-type {\n+.lh-audit:last-child {\nborder-bottom: none;\n}\n-.lh-audit .lh-debug {\n- margin-left: calc(var(--expandable-indent) + var(--lh-audit-index-width));\n- margin-right: var(--lh-score-icon-width);\n-}\n-\n.lh-audit--error .lh-audit__display-text {\ncolor: var(--fail-color);\n}\n/* Audit Group */\n.lh-audit-group {\n- padding-top: var(--lh-audit-group-vpadding);\n- border-top: 1px solid var(--report-secondary-border-color);\n- padding-left: var(--expandable-indent);\n+ padding: var(--lh-audit-group-vpadding) 0;\n+ border-bottom: 1px solid var(--report-secondary-border-color);\n+}\n+\n+.lh-audit-group:last-child {\n+ border-bottom: none;\n}\n.lh-audit-group__header {\nfont-size: var(--subheader-font-size);\nline-height: var(--subheader-line-height);\n+ color: var(--subheader-color);\nflex: 1;\n+ font-weight: bold;\n+}\n+\n+.lh-audit-group__header::before {\n+ content: '';\n+ width: calc(var(--subheader-font-size) / 14 * 24);\n+ height: calc(var(--subheader-font-size) / 14 * 24);\n+ margin-right: calc(var(--subheader-font-size) / 2);\n+ background: var(--medium-100-gray) none no-repeat center / 16px;\n+ display: inline-block;\n+ border-radius: 50%;\n+ vertical-align: middle;\n+}\n+\n+/* A11y/Seo groups within Passed don't get an icon */\n+.lh-audit-group--unadorned .lh-audit-group__header::before {\n+ content: none;\n+}\n+\n+\n+.lh-audit-group--manual .lh-audit-group__header::before {\n+ background-image: var(--search-icon-url);\n+}\n+.lh-passed-audits .lh-audit-group__header::before {\n+ background-image: var(--check-icon-url);\n+}\n+.lh-audit-group--diagnostics .lh-audit-group__header::before {\n+ background-image: var(--search-icon-url);\n+}\n+.lh-audit-group--opportunities .lh-audit-group__header::before {\n+ background-image: var(--photo-filter-icon-url);\n+}\n+.lh-audit-group--metrics .lh-audit-group__header::before {\n+ background-image: var(--av-timer-icon-url);\n+}\n+.lh-audit-group--notapplicable .lh-audit-group__header::before {\n+ background-image: var(--remove-circle-icon-url);\n+}\n+\n+/* Removing too much whitespace */\n+.lh-audit-group--metrics {\n+ margin-top: -28px;\n+ border-bottom: none;\n}\n.lh-audit-group__summary {\ndisplay: flex;\njustify-content: space-between;\n- margin-bottom: var(--lh-audit-group-vpadding);\n- margin-left: calc(0px - var(--expandable-indent));\n+ padding-right: var(--text-indent);\n}\n.lh-audit-group__itemcount {\n}\n.lh-audit-group__summary .lh-toggle-arrow {\n- margin-top: calc((var(--subheader-line-height) - 12px) / 2);\n+\n}\n.lh-audit-group__description {\nfont-size: var(--body-font-size);\n- color: var(--secondary-text-color);\n- margin-top: calc(0px - var(--lh-audit-group-vpadding));\n- margin-bottom: var(--lh-audit-group-vpadding);\n- line-height: var(--body-line-height);\n+ color: var(--medium-75-gray);\n+ margin: var(--lh-audit-group-vpadding) 0;\n+}\n+\n+.lh-audit-group--unadorned .lh-audit-group__description {\n+ margin-top: 0;\n}\nmargin-top: 3px;\n}\n-.lh-debug::before {\n- display: none;\n- content: '';\n- background: url('data:image/svg+xml;utf8,<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><title>warn</title><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\" fill=\"hsl(40, 100%, 50%)\"/></svg>') no-repeat 50% 50%;\n- background-size: contain;\n- width: 20px;\n- height: 20px;\n- position: relative;\n- margin-right: calc(var(--default-padding) / 2);\n- top: 5px;\n-}\n-\n/* Report */\nborder-top: 1px solid var(--report-border-color);\n}\n+.lh-category:first-of-type {\n+ padding-top: calc(2 * var(--section-padding));\n+}\n+\n/* section hash link jump should preserve fixed header\nhttps://css-tricks.com/hash-tag-links-padding/\n*/\nmargin-bottom: var(--lh-section-vpadding);\n}\n+.lh-category-header__title {\n+ line-height: 24px;\n+}\n+\n.lh-category-header .lh-score__gauge .lh-gauge__label {\ndisplay: none;\n}\n@@ -840,9 +883,9 @@ summary.lh-passed-audits-summary {\n.lh-table {\n--image-preview-size: 24px;\n- border: 1px solid var(--report-secondary-border-color);\nborder-collapse: collapse;\nwidth: 100%;\n+ margin-bottom: var(--lh-audit-vpadding);\n--url-col-max-width: 450px;\n}\n@@ -850,6 +893,12 @@ summary.lh-passed-audits-summary {\n.lh-table thead {\nbackground: var(--lh-table-header-bg);\n}\n+.lh-table thead th,\n+.lh-details summary {\n+ color: var(--medium-75-gray);\n+ font-weight: normal;\n+ text-align: left;\n+}\n.lh-table tbody tr:nth-child(even) {\nbackground-color: var(--lh-table-higlight-bg);\n@@ -925,9 +974,9 @@ summary.lh-passed-audits-summary {\n.tooltip-boundary:hover .tooltip {\ndisplay: block;\n- animation: fadeInTooltip 150ms;\n+ animation: fadeInTooltip 250ms;\nanimation-fill-mode: forwards;\n- animation-delay: 900ms;\n+ animation-delay: 850ms;\nmin-width: 23em;\nbackground: #ffffff;\npadding: 15px;\n@@ -955,5 +1004,3 @@ summary.lh-passed-audits-summary {\n75% { opacity: 1; }\n100% { opacity: 1; filter: drop-shadow(1px 0px 1px #aaa) drop-shadow(0px 2px 4px hsla(206, 6%, 25%, 0.15)); }\n}\n-\n-/*# sourceURL=report.styles.css */\n",
"new_path": "lighthouse-core/report/html/report-styles.css",
"old_path": "lighthouse-core/report/html/report-styles.css"
},
{
"change_type": "MODIFY",
"diff": "<template id=\"tmpl-lh-gauge\">\n<style>\n.lh-gauge__wrapper {\n- --circle-size: calc(2.5 * var(--header-font-size));\n+ --circle-size: calc(3 * var(--header-font-size));\n--circle-size-half: calc(var(--circle-size) / 2);\n--circle-background: hsl(216, 12%, 92%);\n--circle-border-width: 9;\n",
"new_path": "lighthouse-core/report/html/templates.html",
"old_path": "lighthouse-core/report/html/templates.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -113,22 +113,6 @@ describe('CategoryRenderer', () => {\ncategory.description = prevDesc;\n});\n- it('renders audits with debugString as failed', () => {\n- const auditResult = {\n- description: 'Audit',\n- helpText: 'Learn more',\n- debugString: 'It may not have worked!',\n- score: 1,\n- };\n- const audit = {result: auditResult, score: 1};\n- const category = {name: 'Fake', description: '', score: 1, audits: [audit]};\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n- assert.ok(categoryDOM.querySelector(\n- '.lh-category > .lh-audit-group:not(.lh-passed-audits) > .lh-audit'),\n- 'did not render as failed');\n- assert.ok(categoryDOM.querySelector('.lh-debug'), 'did not render debug message');\n- });\n-\nit('renders manual audits if the category contains them', () => {\nconst pwaCategory = sampleResults.reportCategories.find(cat => cat.id === 'pwa');\nconst categoryDOM = renderer.render(pwaCategory, sampleResults.reportGroups);\n@@ -214,8 +198,8 @@ describe('CategoryRenderer', () => {\nit('separates audits in the DOM', () => {\nconst category = sampleResults.reportCategories.find(c => c.id === 'pwa');\nconst elem = renderer.render(category, sampleResults.reportGroups);\n- const passedAudits = elem.querySelectorAll('.lh-passed-audits > .lh-audit');\n- const failedAudits = elem.querySelectorAll('.lh-failed-audits > .lh-audit');\n+ const passedAudits = elem.querySelectorAll('.lh-passed-audits .lh-audit');\n+ const failedAudits = elem.querySelectorAll('.lh-failed-audits .lh-audit');\nconst manualAudits = elem.querySelectorAll('.lh-audit-group--manual .lh-audit');\nassert.equal(passedAudits.length, 4);\n",
"new_path": "lighthouse-core/test/report/html/renderer/category-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/category-renderer-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -81,8 +81,6 @@ describe('DetailsRenderer', () => {\nconst frames = [...el.querySelectorAll('.lh-filmstrip__frame')];\nassert.equal(frames.length, 2);\n- assert.equal(frames[0].textContent, '1 s');\n- assert.equal(frames[1].textContent, '3 s');\nconst thumbnails = [...el.querySelectorAll('.lh-filmstrip__thumbnail')];\nassert.equal(thumbnails.length, 2);\n",
"new_path": "lighthouse-core/test/report/html/renderer/details-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/details-renderer-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -154,4 +154,19 @@ describe('PerfCategoryRenderer', () => {\nconst passedElements = passedSection.querySelectorAll('.lh-audit');\nassert.equal(passedElements.length, passedAudits.length);\n});\n+\n+ describe('getWastedMs', () => {\n+ it('handles erroring opportunities', () => {\n+ const auditWithDebug = {\n+ score: 0,\n+ group: 'load-opportunities',\n+ result: {\n+ error: true, score: 0,\n+ rawValue: 100, debugString: 'Yikes!!', description: 'Bug #2',\n+ },\n+ };\n+ const wastedMs = renderer._getWastedMs(auditWithDebug);\n+ assert.ok(Number.isFinite(wastedMs), 'Finite number not returned by wastedMs');\n+ });\n+ });\n});\n",
"new_path": "lighthouse-core/test/report/html/renderer/performance-category-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/performance-category-renderer-test.js"
},
{
"change_type": "MODIFY",
"diff": "\"rawValue\": 3969.136,\n\"scoreDisplayMode\": \"numeric\",\n\"name\": \"first-meaningful-paint\",\n- \"description\": \"First meaningful paint\",\n- \"helpText\": \"First meaningful paint measures when the primary content of a page is visible. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint).\"\n+ \"description\": \"First Meaningful Paint\",\n+ \"helpText\": \"First Meaningful Paint measures when the primary content of a page is visible. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint).\"\n},\n\"load-fast-enough-for-pwa\": {\n\"score\": 1,\n\"reportCategories\": [\n{\n\"name\": \"Performance\",\n- \"description\": \"These encapsulate your web app's current performance and opportunities to improve it.\",\n\"audits\": [\n{\n\"id\": \"first-contentful-paint\",\n},\n{\n\"name\": \"Best Practices\",\n- \"description\": \"We've compiled some recommendations for modernizing your web app and avoiding performance pitfalls.\",\n\"audits\": [\n{\n\"id\": \"appcache-manifest\",\n],\n\"reportGroups\": {\n\"metrics\": {\n- \"title\": \"Metrics\",\n- \"description\": \"These metrics encapsulate your web app's performance across a number of dimensions.\"\n+ \"title\": \"Metrics\"\n},\n\"load-opportunities\": {\n\"title\": \"Opportunities\",\n",
"new_path": "lighthouse-core/test/results/sample_v2.json",
"old_path": "lighthouse-core/test/results/sample_v2.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -43,7 +43,7 @@ declare global {\n/** The human-friendly name of the category */\nname: string;\n/** A more detailed description of the category and its importance. */\n- description: string;\n+ description?: string;\n/** A description for the manual audits in the category. */\nmanualDescription?: string;\n/** The overall score of the category, the weighted average of all its audits. */\n",
"new_path": "typings/lhr.d.ts",
"old_path": "typings/lhr.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report: final metrics display, icons, whitespace polish (#5130)
| 1
|
report
| null |
730,412
|
07.05.2018 15:07:22
| 0
|
fad328c649d8da8b140c08e0db309730becfc20a
|
chore(release): 0.1.293
|
[
{
"change_type": "MODIFY",
"diff": "All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n+<a name=\"0.1.293\"></a>\n+## [0.1.293](https://github.com/webex/react-ciscospark/compare/v0.1.292...v0.1.293) (2018-05-07)\n+\n+\n+\n<a name=\"0.1.292\"></a>\n## [0.1.292](https://github.com/webex/react-ciscospark/compare/v0.1.291...v0.1.292) (2018-05-03)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.292\",\n+ \"version\": \"0.1.293\",\n\"description\": \"The Cisco Spark for React library allows developers to easily incorporate Spark functionality into an application.\",\n\"scripts\": {\n\"build\": \"./scripts/build/index.js\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(release): 0.1.293
| 1
|
chore
|
release
|
791,723
|
07.05.2018 15:17:32
| 25,200
|
0286fa7c03b2813a11666e095f7c9e93470c7006
|
report: audit details not longer collapsible. fixup width and margin
|
[
{
"change_type": "MODIFY",
"diff": "@@ -47,7 +47,9 @@ class CategoryRenderer {\n// Append audit details to header section so the entire audit is within a <details>.\nconst header = /** @type {!HTMLDetailsElement} */ (this.dom.find('details', auditEl));\nif (audit.result.details && audit.result.details.type) {\n- header.appendChild(this.detailsRenderer.render(audit.result.details));\n+ const elem = this.detailsRenderer.render(audit.result.details);\n+ elem.classList.add('lh-details');\n+ header.appendChild(elem);\n}\nauditEl.classList.add(`lh-audit--${audit.result.scoreDisplayMode}`);\n",
"new_path": "lighthouse-core/report/html/renderer/category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -131,16 +131,16 @@ class CriticalRequestChainRenderer {\n* @param {!DOM} dom\n* @param {!DocumentFragment} tmpl\n* @param {!CriticalRequestChainRenderer.CRCSegment} segment\n- * @param {!Element} detailsEl Parent details element.\n+ * @param {!Element} elem Parent element.\n* @param {!CriticalRequestChainRenderer.CRCDetailsJSON} details\n*/\n- static buildTree(dom, tmpl, segment, detailsEl, details) {\n- detailsEl.appendChild(CriticalRequestChainRenderer.createChainNode(dom, tmpl, segment));\n+ static buildTree(dom, tmpl, segment, elem, details) {\n+ elem.appendChild(CriticalRequestChainRenderer.createChainNode(dom, tmpl, segment));\nfor (const key of Object.keys(segment.node.children)) {\nconst childSegment = CriticalRequestChainRenderer.createSegment(segment.node.children, key,\nsegment.startTime, segment.transferSize, segment.treeMarkers, segment.isLastChild);\n- CriticalRequestChainRenderer.buildTree(dom, tmpl, childSegment, detailsEl, details);\n+ CriticalRequestChainRenderer.buildTree(dom, tmpl, childSegment, elem, details);\n}\n}\n@@ -148,10 +148,11 @@ class CriticalRequestChainRenderer {\n* @param {!DOM} dom\n* @param {!Node} templateContext\n* @param {!CriticalRequestChainRenderer.CRCDetailsJSON} details\n- * @return {!Node}\n+ * @return {!Element}\n*/\nstatic render(dom, templateContext, details) {\nconst tmpl = dom.cloneTemplate('#tmpl-lh-crc', templateContext);\n+ const containerEl = dom.find('.lh-crc', tmpl);\n// Fill in top summary.\ndom.find('.lh-crc__longest_duration', tmpl).textContent =\n@@ -160,20 +161,15 @@ class CriticalRequestChainRenderer {\ndom.find('.lh-crc__longest_transfersize', tmpl).textContent =\nUtil.formatBytesToKB(details.longestChain.transferSize);\n- const detailsEl = dom.find('.lh-details', tmpl);\n- detailsEl.open = true;\n-\n- dom.find('.lh-details > summary', tmpl).textContent = details.header.text;\n-\n// Construct visual tree.\nconst root = CriticalRequestChainRenderer.initTree(details.chains);\nfor (const key of Object.keys(root.tree)) {\nconst segment = CriticalRequestChainRenderer.createSegment(root.tree, key,\nroot.startTime, root.transferSize);\n- CriticalRequestChainRenderer.buildTree(dom, tmpl, segment, detailsEl, details);\n+ CriticalRequestChainRenderer.buildTree(dom, tmpl, segment, containerEl, details);\n}\n- return tmpl;\n+ return dom.find('.lh-crc-container', tmpl);\n}\n}\n",
"new_path": "lighthouse-core/report/html/renderer/crc-details-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/crc-details-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -27,7 +27,7 @@ class DetailsRenderer {\n/**\n* @param {!DetailsRenderer.DetailsJSON} details\n- * @return {!Node}\n+ * @return {!Element}\n*/\nrender(details) {\nswitch (details.type) {\n@@ -180,11 +180,7 @@ class DetailsRenderer {\n_renderTable(details) {\nif (!details.items.length) return this._dom.createElement('span');\n- const element = this._dom.createElement('details', 'lh-details');\n- element.open = true;\n- element.appendChild(this._dom.createElement('summary')).textContent = 'View Details';\n-\n- const tableElem = this._dom.createChildOf(element, 'table', 'lh-table');\n+ const tableElem = this._dom.createElement('table', 'lh-table');\nconst theadElem = this._dom.createChildOf(tableElem, 'thead');\nconst theadTrElem = this._dom.createChildOf(theadElem, 'tr');\n@@ -226,7 +222,7 @@ class DetailsRenderer {\nthis._dom.createChildOf(rowElem, 'td', classes).appendChild(this.render(item));\n}\n}\n- return element;\n+ return tableElem;\n}\n/**\n",
"new_path": "lighthouse-core/report/html/renderer/details-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/details-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -79,7 +79,9 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\n// If there's no `type`, then we only used details for `summary`\nif (details.type) {\n- element.appendChild(this.detailsRenderer.render(details));\n+ const detailsElem = this.detailsRenderer.render(details);\n+ detailsElem.classList.add('lh-details');\n+ element.appendChild(detailsElem);\n}\nreturn element;\n",
"new_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "scroll-behavior: smooth;\n}\n-.lh-root :focus,\n-.lh-root .lh-details > summary:focus {\n+.lh-root :focus {\noutline: -webkit-focus-ring-color auto 3px;\n}\n.lh-root summary:focus {\n.lh-audit__description,\n.lh-load-opportunity__description,\n.lh-details {\n- margin-left: calc(var(--text-indent) + var(--lh-audit-index-width) + 2 * var(--audit-item-gap));\n- margin-right: calc(var(--text-indent) + 2px);\n+ --inner-audit-left-padding: calc(var(--text-indent) + var(--lh-audit-index-width) + 2 * var(--audit-item-gap));\n+ --inner-audit-right-padding: calc(var(--text-indent) + 2px);\n+ margin-left: var(--inner-audit-left-padding);\n+ margin-right: var(--inner-audit-right-padding);\n}\n.lh-details {\nfont-size: var(--body-font-size);\nmargin-top: var(--default-padding);\n-}\n-\n-.lh-details[open] summary {\nmargin-bottom: var(--default-padding);\n-}\n-\n-.lh-details summary::-webkit-details-marker {\n- color: #9e9e9e;\n+ /* whatever the .lh-details side margins are */\n+ width: calc(100% - var(--inner-audit-left-padding) - var(--inner-audit-right-padding));\n}\n.lh-details.flex .lh-code {\n@@ -884,8 +880,6 @@ summary.lh-passed-audits-summary {\n.lh-table {\n--image-preview-size: 24px;\nborder-collapse: collapse;\n- width: 100%;\n- margin-bottom: var(--lh-audit-vpadding);\n--url-col-max-width: 450px;\n}\n@@ -893,11 +887,9 @@ summary.lh-passed-audits-summary {\n.lh-table thead {\nbackground: var(--lh-table-header-bg);\n}\n-.lh-table thead th,\n-.lh-details summary {\n+.lh-table thead th {\ncolor: var(--medium-75-gray);\nfont-weight: normal;\n- text-align: left;\n}\n.lh-table tbody tr:nth-child(even) {\n",
"new_path": "lighthouse-core/report/html/report-styles.css",
"old_path": "lighthouse-core/report/html/report-styles.css"
},
{
"change_type": "MODIFY",
"diff": "<!-- Lighthouse crtiical request chains component -->\n<template id=\"tmpl-lh-crc\">\n+ <div class=\"lh-crc-container\">\n<style>\n.lh-crc .tree-marker {\nwidth: 12px;\n<b class=\"lh-crc__longest_transfersize\"><!-- fill me: longestChain.length --></b>\n</div>\n<div class=\"lh-crc\">\n- <details class=\"lh-details\">\n- <summary></summary>\n<div class=\"crc-initial-nav\">Initial Navigation</div>\n<!-- stamp for each chain -->\n<template id=\"tmpl-lh-crc__chains\">\n</span>\n</div>\n</template>\n- </details>\n+ </div>\n</div>\n</template>\n",
"new_path": "lighthouse-core/report/html/templates.html",
"old_path": "lighthouse-core/report/html/templates.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -91,8 +91,7 @@ describe('DetailsRenderer', () => {\nit('renders tree structure', () => {\nconst el = CriticalRequestChainRenderer.render(dom, dom.document(), DETAILS);\n- const details = el.querySelector('.lh-details');\n- const chains = details.querySelectorAll('.crc-node');\n+ const chains = el.querySelectorAll('.crc-node');\n// Main request\nassert.equal(chains.length, 4, 'generates correct number of chain nodes');\n",
"new_path": "lighthouse-core/test/report/html/renderer/crc-details-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/crc-details-renderer-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -110,8 +110,7 @@ describe('DetailsRenderer', () => {\n],\n});\n- assert.equal(el.localName, 'details');\n- assert.ok(el.querySelector('table'), 'did not render table');\n+ assert.equal(el.localName, 'table', 'did not render table');\nassert.ok(el.querySelector('img'), 'did not render recursive items');\nassert.equal(el.querySelectorAll('th').length, 3, 'did not render header items');\nassert.equal(el.querySelectorAll('td').length, 6, 'did not render table cells');\n",
"new_path": "lighthouse-core/test/report/html/renderer/details-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/details-renderer-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report: audit details not longer collapsible. fixup width and margin (#5151)
| 1
|
report
| null |
730,421
|
07.05.2018 15:18:00
| 21,600
|
c64761ab2947b066fcd061e015897c25b64e0428
|
feat(space-item): add active prop
refactor activeSpaceId to active bool
update active styles for space-item
change click to mousedown for space-item
update snapshot for mousedown change
|
[
{
"change_type": "MODIFY",
"diff": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n+exports[`SpaceItem component correctly renders an active space 1`] = `\n+<div\n+ className=\"space-item item active\"\n+ onKeyDown={[Function]}\n+ onMouseDown={[Function]}\n+ role=\"button\"\n+ tabIndex=\"0\"\n+>\n+ <div\n+ className=\"space-avatar-wrapper avatarWrapper\"\n+ >\n+ <div\n+ className=\"space-avatar-border\"\n+ >\n+ <Avatar\n+ baseColor=\"blue\"\n+ image=\"\"\n+ isSelfAvatar={false}\n+ name=\"Webex User\"\n+ />\n+ </div>\n+ </div>\n+ <div\n+ className=\"space-item-meta meta\"\n+ >\n+ <div\n+ className=\"space-team-name teamName\"\n+ style={\n+ Object {\n+ \"color\": \"#f5f5f5\",\n+ }\n+ }\n+ >\n+ Best Team\n+ </div>\n+ <div\n+ className=\"space-title title\"\n+ >\n+ Webex User\n+ </div>\n+ <div\n+ className=\"space-last-activity lastActivity\"\n+ >\n+ I'm active!\n+ </div>\n+ </div>\n+ <div\n+ className=\"space-last-activity-time timestamp\"\n+ >\n+ 3:05 PM\n+ </div>\n+</div>\n+`;\n+\nexports[`SpaceItem component renders a decrypting space 1`] = `\n<div\nclassName=\"space-item item isDecrypting\"\n- onClick={[Function]}\nonKeyDown={[Function]}\n+ onMouseDown={[Function]}\nrole=\"button\"\ntabIndex=\"0\"\n>\n@@ -48,8 +102,8 @@ exports[`SpaceItem component renders a decrypting space 1`] = `\nexports[`SpaceItem component renders a space 1`] = `\n<div\nclassName=\"space-item item hasCallSupport\"\n- onClick={[Function]}\nonKeyDown={[Function]}\n+ onMouseDown={[Function]}\nrole=\"button\"\ntabIndex=\"0\"\n>\n@@ -118,8 +172,8 @@ exports[`SpaceItem component renders a space 1`] = `\nexports[`SpaceItem component renders a space with a call in progress 1`] = `\n<div\nclassName=\"space-item item hasCallSupport\"\n- onClick={[Function]}\nonKeyDown={[Function]}\n+ onMouseDown={[Function]}\nrole=\"button\"\ntabIndex=\"0\"\n>\n@@ -178,8 +232,8 @@ exports[`SpaceItem component renders a space with a call in progress 1`] = `\nexports[`SpaceItem component renders a space with a call in progress without call support 1`] = `\n<div\nclassName=\"space-item item\"\n- onClick={[Function]}\nonKeyDown={[Function]}\n+ onMouseDown={[Function]}\nrole=\"button\"\ntabIndex=\"0\"\n>\n",
"new_path": "packages/node_modules/@ciscospark/react-component-space-item/src/__snapshots__/index.test.js.snap",
"old_path": "packages/node_modules/@ciscospark/react-component-space-item/src/__snapshots__/index.test.js.snap"
},
{
"change_type": "MODIFY",
"diff": "@@ -11,6 +11,7 @@ import styles from './styles.css';\nconst propTypes = {\n+ active: PropTypes.bool,\navatarUrl: PropTypes.string,\nactivityText: PropTypes.oneOfType([\nPropTypes.string,\n@@ -31,6 +32,7 @@ const propTypes = {\n};\nconst defaultProps = {\n+ active: false,\nactivityText: '',\navatarUrl: '',\ncallStartTime: undefined,\n@@ -48,6 +50,7 @@ const defaultProps = {\n};\nfunction SpaceItem({\n+ active,\nactivityText,\navatarUrl,\ncallStartTime,\n@@ -91,10 +94,11 @@ function SpaceItem({\n<div\nclassName={classNames('space-item', styles.item, {\n[styles.hasCallSupport]: !!hasCallSupport,\n- [styles.isDecrypting]: !!isDecrypting\n+ [styles.isDecrypting]: !!isDecrypting,\n+ [styles.active]: !!active\n})}\n- onClick={handleClick}\nonKeyDown={handleKeyDown}\n+ onMouseDown={handleClick}\nrole=\"button\"\ntabIndex=\"0\"\n>\n@@ -112,7 +116,7 @@ function SpaceItem({\nteamName &&\n<div\nclassName={classNames('space-team-name', styles.teamName)}\n- style={teamColor && {color: teamColor}}\n+ style={active ? {color: '#f5f5f5'} : teamColor && {color: teamColor}}\n>\n{teamName}\n</div>\n",
"new_path": "packages/node_modules/@ciscospark/react-component-space-item/src/index.js",
"old_path": "packages/node_modules/@ciscospark/react-component-space-item/src/index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -44,6 +44,28 @@ describe('SpaceItem component', () => {\nexpect(component).toMatchSnapshot();\n});\n+ it('correctly renders an active space', () => {\n+ renderer.render(\n+ <SpaceItem\n+ activityText=\"I'm active!\"\n+ id=\"active-space-id\"\n+ lastActivityTime=\"3:05 PM\"\n+ latestActivity={{\n+ actorName: 'Andrew',\n+ type: 'post'\n+ }}\n+ active\n+ onCallClick={onClick}\n+ onClick={onClick}\n+ name=\"Webex User\"\n+ teamColor=\"blue\"\n+ teamName=\"Best Team\"\n+ />\n+ );\n+ const component = renderer.getRenderOutput();\n+ expect(component).toMatchSnapshot();\n+ });\n+\nit('renders a space with a call in progress', () => {\nrenderer.render(\n<SpaceItem\n",
"new_path": "packages/node_modules/@ciscospark/react-component-space-item/src/index.test.js",
"old_path": "packages/node_modules/@ciscospark/react-component-space-item/src/index.test.js"
},
{
"change_type": "MODIFY",
"diff": "outline: none;\n}\n+.item.active {\n+ background-color: #07c1e4;\n+ color: #f5f5f5;\n+}\n+\n.item:hover {\nbackground: #efefef;\n}\n+.item.active:hover {\n+ background-color: #07c1e4;\n+}\n+\n.actions {\nposition: absolute;\ntop: 10px;\nwhite-space: nowrap;\n}\n+.active .title {\n+ color: #f5f5f5;\n+}\n+\n.title.isUnread {\nfont-weight: 300;\n}\nwhite-space: nowrap;\n}\n+.active .lastActivity {\n+ color: #f5f5f5;\n+}\n+\n.timestamp {\nfont-size: 10px;\ncolor: #999;\nwhite-space: nowrap;\n}\n+.active .timestamp {\n+ color: #f5f5f5;\n+}\n+\n.hasCallSupport:hover .timestamp {\ndisplay: none;\n}\n",
"new_path": "packages/node_modules/@ciscospark/react-component-space-item/src/styles.css",
"old_path": "packages/node_modules/@ciscospark/react-component-space-item/src/styles.css"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,6 +5,7 @@ import classNames from 'classnames';\nimport SpaceItem from '@ciscospark/react-component-space-item';\nconst propTypes = {\n+ activeSpaceId: PropTypes.string,\ncurrentUser: PropTypes.shape({\nid: PropTypes.string.isRequired\n}).isRequired,\n@@ -36,6 +37,7 @@ const propTypes = {\n};\nconst defaultProps = {\n+ activeSpaceId: '',\nhasCalling: false,\nonCallClick: () => {},\nonClick: () => {},\n@@ -43,6 +45,7 @@ const defaultProps = {\n};\nexport default function SpacesList({\n+ activeSpaceId,\ncurrentUser,\nhasCalling,\nonCallClick,\n@@ -51,6 +54,7 @@ export default function SpacesList({\n}) {\nconst recents = [];\nspaces.forEach((space) => recents.push(<SpaceItem\n+ active={space.id === activeSpaceId}\ncurrentUser={currentUser}\nhasCalling={hasCalling}\nkey={space.id}\n",
"new_path": "packages/node_modules/@ciscospark/react-component-spaces-list/src/index.js",
"old_path": "packages/node_modules/@ciscospark/react-component-spaces-list/src/index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -99,6 +99,23 @@ function RecentsComponents() {\nteamColor=\"blue\"\nteamName=\"Best Team\"\n/>\n+ <SpaceItem\n+ activityText=\"I'm an active space!\"\n+ currentUser={currentUser}\n+ formatMessage={(a) => a}\n+ id=\"active-space-id\"\n+ lastActivityTime=\"8:02 AM\"\n+ latestActivity={{\n+ actorName: 'Andrew',\n+ type: 'post'\n+ }}\n+ active\n+ onCallClick={onCallClick}\n+ onClick={onClick}\n+ name=\"Webex Teams\"\n+ teamColor=\"green\"\n+ teamName=\"Web Team\"\n+ />\n<h3>SpaceList</h3>\n<SpacesList\ncurrentUser={currentUser}\n",
"new_path": "samples/recents-components/index.js",
"old_path": "samples/recents-components/index.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
feat(space-item): add active prop
- refactor activeSpaceId to active bool
- update active styles for space-item
- change click to mousedown for space-item
- update snapshot for mousedown change
| 1
|
feat
|
space-item
|
807,849
|
07.05.2018 16:03:31
| 25,200
|
64b315ebcdf37a0b803b6b6ffd91cd50bc031eb9
|
chore(helpers): Remove private dependency on Project
|
[
{
"change_type": "MODIFY",
"diff": "\"use strict\";\n+// eslint-disable-next-line import/no-extraneous-dependencies, node/no-extraneous-require\nconst Project = require(\"@lerna/project\");\nmodule.exports = updateLernaConfig;\n",
"new_path": "helpers/update-lerna-config/index.js",
"old_path": "helpers/update-lerna-config/index.js"
},
{
"change_type": "MODIFY",
"diff": "\"private\": true,\n\"license\": \"MIT\",\n\"dependencies\": {\n- \"@lerna/project\": \"file:../../core/project\",\n\"fs-extra\": \"^5.0.0\"\n}\n}\n",
"new_path": "helpers/update-lerna-config/package.json",
"old_path": "helpers/update-lerna-config/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"version\": \"file:helpers/update-lerna-config\",\n\"dev\": true,\n\"requires\": {\n- \"@lerna/project\": \"file:core/project\",\n\"fs-extra\": \"5.0.0\"\n}\n},\n",
"new_path": "package-lock.json",
"old_path": "package-lock.json"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
chore(helpers): Remove private dependency on Project
| 1
|
chore
|
helpers
|
807,849
|
07.05.2018 16:18:02
| 25,200
|
9acde7d016e0bc4b341bf947fefd9d5c8f32f51c
|
feat(project): Upgrade cosmiconfig
|
[
{
"change_type": "MODIFY",
"diff": "@@ -16,10 +16,7 @@ const deprecateConfig = require(\"./lib/deprecate-config\");\nclass Project {\nconstructor(cwd) {\nconst explorer = cosmiconfig(\"lerna\", {\n- js: false, // not unless we store version somewhere else...\n- rc: \"lerna.json\",\n- rcStrictJson: true,\n- sync: true,\n+ searchPlaces: [\"lerna.json\", \"package.json\"],\ntransform(obj) {\n// cosmiconfig returns null when nothing is found\nif (!obj) {\n@@ -44,7 +41,7 @@ class Project {\nlet loaded;\ntry {\n- loaded = explorer.load(cwd);\n+ loaded = explorer.searchSync(cwd);\n} catch (err) {\n// redecorate JSON syntax errors, avoid debug dump\nif (err.name === \"JSONError\") {\n",
"new_path": "core/project/index.js",
"old_path": "core/project/index.js"
},
{
"change_type": "MODIFY",
"diff": "\"dependencies\": {\n\"@lerna/package\": \"file:../package\",\n\"@lerna/validation-error\": \"file:../validation-error\",\n- \"cosmiconfig\": \"^4.0.0\",\n+ \"cosmiconfig\": \"^5.0.2\",\n\"dedent\": \"^0.7.0\",\n\"dot-prop\": \"^4.2.0\",\n\"glob-parent\": \"^3.1.0\",\n\"load-json-file\": \"^4.0.0\",\n\"npmlog\": \"^4.1.2\",\n- \"require-from-string\": \"2.0.1\",\n\"resolve-from\": \"^4.0.0\",\n\"write-json-file\": \"^2.3.0\"\n}\n",
"new_path": "core/project/package.json",
"old_path": "core/project/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"requires\": {\n\"@lerna/package\": \"file:core/package\",\n\"@lerna/validation-error\": \"file:core/validation-error\",\n- \"cosmiconfig\": \"4.0.0\",\n+ \"cosmiconfig\": \"5.0.2\",\n\"dedent\": \"0.7.0\",\n\"dot-prop\": \"4.2.0\",\n\"glob-parent\": \"3.1.0\",\n\"load-json-file\": \"4.0.0\",\n\"npmlog\": \"4.1.2\",\n- \"require-from-string\": \"2.0.1\",\n\"resolve-from\": \"4.0.0\",\n\"write-json-file\": \"2.3.0\"\n}\n\"integrity\": \"sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=\"\n},\n\"cosmiconfig\": {\n- \"version\": \"4.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz\",\n- \"integrity\": \"sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ==\",\n+ \"version\": \"5.0.2\",\n+ \"resolved\": \"https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.0.2.tgz\",\n+ \"integrity\": \"sha512-zJV4MeVVN4DN/RdvqJURLFBnIfdwJDSHJ9IoxxqwnW48ZNKG9rbOEZb5tuWpnjLkqKCYvDKqGFt7egAUFHdakQ==\",\n\"requires\": {\n\"is-directory\": \"0.3.1\",\n\"js-yaml\": \"3.10.0\",\n- \"parse-json\": \"4.0.0\",\n- \"require-from-string\": \"2.0.1\"\n+ \"parse-json\": \"4.0.0\"\n},\n\"dependencies\": {\n\"parse-json\": {\n\"resolved\": \"https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz\",\n\"integrity\": \"sha1-jGStX9MNqxyXbiNE/+f3kqam30I=\"\n},\n- \"require-from-string\": {\n- \"version\": \"2.0.1\",\n- \"resolved\": \"https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.1.tgz\",\n- \"integrity\": \"sha1-xUUjPp19pmFunVmt+zn8n1iGdv8=\"\n- },\n\"require-main-filename\": {\n\"version\": \"1.0.1\",\n\"resolved\": \"https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz\",\n",
"new_path": "package-lock.json",
"old_path": "package-lock.json"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
feat(project): Upgrade cosmiconfig
| 1
|
feat
|
project
|
807,849
|
07.05.2018 16:26:11
| 25,200
|
393b501d6518b866cca2ec952dc14a1d9c05b654
|
feat: Upgrade execa
|
[
{
"change_type": "MODIFY",
"diff": "},\n\"dependencies\": {\n\"chalk\": \"^2.3.1\",\n- \"execa\": \"^0.9.0\",\n+ \"execa\": \"^0.10.0\",\n\"strong-log-transformer\": \"^1.0.6\"\n}\n}\n",
"new_path": "core/child-process/package.json",
"old_path": "core/child-process/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"@lerna/validation-error\": \"file:../validation-error\",\n\"@lerna/write-log-file\": \"file:../../utils/write-log-file\",\n\"dedent\": \"^0.7.0\",\n- \"execa\": \"^0.9.0\",\n+ \"execa\": \"^0.10.0\",\n\"lodash\": \"^4.17.5\",\n\"npmlog\": \"^4.1.2\"\n}\n",
"new_path": "core/command/package.json",
"old_path": "core/command/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"private\": true,\n\"license\": \"MIT\",\n\"dependencies\": {\n- \"execa\": \"^0.9.0\"\n+ \"execa\": \"^0.10.0\"\n}\n}\n",
"new_path": "helpers/cli-runner/package.json",
"old_path": "helpers/cli-runner/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"dependencies\": {\n\"@lerna-test/git-init\": \"file:../git-init\",\n\"@lerna-test/init-fixture\": \"file:../init-fixture\",\n- \"execa\": \"^0.9.0\",\n+ \"execa\": \"^0.10.0\",\n\"file-url\": \"^2.0.2\",\n\"tempy\": \"^0.2.1\"\n}\n",
"new_path": "helpers/clone-fixture/package.json",
"old_path": "helpers/clone-fixture/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"private\": true,\n\"license\": \"MIT\",\n\"dependencies\": {\n- \"execa\": \"^0.9.0\"\n+ \"execa\": \"^0.10.0\"\n}\n}\n",
"new_path": "helpers/git-add/package.json",
"old_path": "helpers/git-add/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"private\": true,\n\"license\": \"MIT\",\n\"dependencies\": {\n- \"execa\": \"^0.9.0\",\n+ \"execa\": \"^0.10.0\",\n\"temp-write\": \"^3.4.0\"\n}\n}\n",
"new_path": "helpers/git-commit/package.json",
"old_path": "helpers/git-commit/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"private\": true,\n\"license\": \"MIT\",\n\"dependencies\": {\n- \"execa\": \"^0.9.0\"\n+ \"execa\": \"^0.10.0\"\n}\n}\n",
"new_path": "helpers/git-init/package.json",
"old_path": "helpers/git-init/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"private\": true,\n\"license\": \"MIT\",\n\"dependencies\": {\n- \"execa\": \"^0.9.0\"\n+ \"execa\": \"^0.10.0\"\n}\n}\n",
"new_path": "helpers/git-tag/package.json",
"old_path": "helpers/git-tag/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"license\": \"MIT\",\n\"dependencies\": {\n\"@lerna-test/serialize-git-sha\": \"file:../serialize-git-sha\",\n- \"execa\": \"^0.9.0\"\n+ \"execa\": \"^0.10.0\"\n}\n}\n",
"new_path": "helpers/show-commit/package.json",
"old_path": "helpers/show-commit/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"version\": \"file:helpers/cli-runner\",\n\"dev\": true,\n\"requires\": {\n- \"execa\": \"0.9.0\"\n+ \"execa\": \"0.10.0\"\n}\n},\n\"@lerna-test/clone-fixture\": {\n\"requires\": {\n\"@lerna-test/git-init\": \"file:helpers/git-init\",\n\"@lerna-test/init-fixture\": \"file:helpers/init-fixture\",\n- \"execa\": \"0.9.0\",\n+ \"execa\": \"0.10.0\",\n\"file-url\": \"2.0.2\",\n\"tempy\": \"0.2.1\"\n}\n\"version\": \"file:helpers/git-add\",\n\"dev\": true,\n\"requires\": {\n- \"execa\": \"0.9.0\"\n+ \"execa\": \"0.10.0\"\n}\n},\n\"@lerna-test/git-commit\": {\n\"version\": \"file:helpers/git-commit\",\n\"dev\": true,\n\"requires\": {\n- \"execa\": \"0.9.0\",\n+ \"execa\": \"0.10.0\",\n\"temp-write\": \"3.4.0\"\n}\n},\n\"version\": \"file:helpers/git-init\",\n\"dev\": true,\n\"requires\": {\n- \"execa\": \"0.9.0\"\n+ \"execa\": \"0.10.0\"\n}\n},\n\"@lerna-test/git-tag\": {\n\"version\": \"file:helpers/git-tag\",\n\"dev\": true,\n\"requires\": {\n- \"execa\": \"0.9.0\"\n+ \"execa\": \"0.10.0\"\n}\n},\n\"@lerna-test/init-fixture\": {\n\"dev\": true,\n\"requires\": {\n\"@lerna-test/serialize-git-sha\": \"file:helpers/serialize-git-sha\",\n- \"execa\": \"0.9.0\"\n+ \"execa\": \"0.10.0\"\n}\n},\n\"@lerna-test/silence-logging\": {\n\"version\": \"file:core/child-process\",\n\"requires\": {\n\"chalk\": \"2.3.2\",\n- \"execa\": \"0.9.0\",\n+ \"execa\": \"0.10.0\",\n\"strong-log-transformer\": \"1.0.6\"\n}\n},\n\"@lerna/validation-error\": \"file:core/validation-error\",\n\"@lerna/write-log-file\": \"file:utils/write-log-file\",\n\"dedent\": \"0.7.0\",\n- \"execa\": \"0.9.0\",\n+ \"execa\": \"0.10.0\",\n\"lodash\": \"4.17.5\",\n\"npmlog\": \"4.1.2\"\n}\n}\n},\n\"execa\": {\n- \"version\": \"0.9.0\",\n- \"resolved\": \"https://registry.npmjs.org/execa/-/execa-0.9.0.tgz\",\n- \"integrity\": \"sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA==\",\n+ \"version\": \"0.10.0\",\n+ \"resolved\": \"https://registry.npmjs.org/execa/-/execa-0.10.0.tgz\",\n+ \"integrity\": \"sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==\",\n\"requires\": {\n- \"cross-spawn\": \"5.1.0\",\n+ \"cross-spawn\": \"6.0.5\",\n\"get-stream\": \"3.0.0\",\n\"is-stream\": \"1.1.0\",\n\"npm-run-path\": \"2.0.2\",\n\"p-finally\": \"1.0.0\",\n\"signal-exit\": \"3.0.2\",\n\"strip-eof\": \"1.0.0\"\n+ },\n+ \"dependencies\": {\n+ \"cross-spawn\": {\n+ \"version\": \"6.0.5\",\n+ \"resolved\": \"https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz\",\n+ \"integrity\": \"sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==\",\n+ \"requires\": {\n+ \"nice-try\": \"1.0.4\",\n+ \"path-key\": \"2.0.1\",\n+ \"semver\": \"5.5.0\",\n+ \"shebang-command\": \"1.2.0\",\n+ \"which\": \"1.3.0\"\n+ }\n+ }\n}\n},\n\"exit\": {\n\"integrity\": \"sha1-4rbN65zhn5kxelNyLz2/XfXqqrI=\"\n},\n\"moment\": {\n- \"version\": \"2.20.1\",\n- \"resolved\": \"https://registry.npmjs.org/moment/-/moment-2.20.1.tgz\",\n- \"integrity\": \"sha512-Yh9y73JRljxW5QxN08Fner68eFLxM5ynNOAw2LbIB1YAGeQzZT8QFSUvkAz609Zf+IHhhaUxqZK8dG3W/+HEvg==\"\n+ \"version\": \"2.22.1\",\n+ \"resolved\": \"https://registry.npmjs.org/moment/-/moment-2.22.1.tgz\",\n+ \"integrity\": \"sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ==\"\n},\n\"ms\": {\n\"version\": \"2.0.0\",\n\"integrity\": \"sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=\",\n\"dev\": true\n},\n+ \"nice-try\": {\n+ \"version\": \"1.0.4\",\n+ \"resolved\": \"https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz\",\n+ \"integrity\": \"sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==\"\n+ },\n\"node-gyp\": {\n\"version\": \"3.6.2\",\n\"resolved\": \"https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz\",\n\"byline\": \"5.0.0\",\n\"duplexer\": \"0.1.1\",\n\"minimist\": \"0.1.0\",\n- \"moment\": \"2.20.1\",\n+ \"moment\": \"2.22.1\",\n\"through\": \"2.3.8\"\n},\n\"dependencies\": {\n",
"new_path": "package-lock.json",
"old_path": "package-lock.json"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
feat: Upgrade execa
| 1
|
feat
| null |
807,849
|
07.05.2018 16:32:15
| 25,200
|
d65cc4484e627c883781c51c124152e5b2e10547
|
chore(dev-deps): bump fast-async
|
[
{
"change_type": "MODIFY",
"diff": "\"integrity\": \"sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=\"\n},\n\"fast-async\": {\n- \"version\": \"6.3.6\",\n- \"resolved\": \"https://registry.npmjs.org/fast-async/-/fast-async-6.3.6.tgz\",\n- \"integrity\": \"sha512-rysl/XmBgy5BKVHDwDLdJ7HH0ZJs9WCGbQJObaN0WU9U60yD6fheyc5XH3wCQipKLTM76Het/7uk6EhFlGbCyg==\",\n+ \"version\": \"6.3.7\",\n+ \"resolved\": \"https://registry.npmjs.org/fast-async/-/fast-async-6.3.7.tgz\",\n+ \"integrity\": \"sha512-sF8kZ9Qv1dkg2zcYaYhMY0tS/Qbr1mqciIr2QEaiWI1RrF2udOZ7baXl/FOLoiMx5U3iFLuwNpW0QNQvox3Rmw==\",\n\"dev\": true,\n\"requires\": {\n- \"nodent-compiler\": \"3.2.2\",\n+ \"nodent-compiler\": \"3.2.6\",\n\"nodent-runtime\": \"3.2.1\"\n}\n},\n}\n},\n\"nodent-compiler\": {\n- \"version\": \"3.2.2\",\n- \"resolved\": \"https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.2.2.tgz\",\n- \"integrity\": \"sha512-a/W40eGAEuMjiHTN7lDKeRTgRbCxsDG69L9vu9fbt6I8t+Wvn957yOBsLcspBY6QhXXyMm9U8ZwJIui8cI5K7Q==\",\n+ \"version\": \"3.2.6\",\n+ \"resolved\": \"https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.2.6.tgz\",\n+ \"integrity\": \"sha512-6Zu15pXyMZgWUCp1xZMb+iUexFAUnixeAn3x4U+mqLAnOskWq8/fiBG03vn/pbHl9ZS61LTWSbYtHRzNkZS8ow==\",\n\"dev\": true,\n\"requires\": {\n\"acorn\": \"5.5.0\",\n\"acorn-es7-plugin\": \"1.1.7\",\n- \"nodent-transform\": \"3.2.3\",\n+ \"nodent-transform\": \"3.2.6\",\n\"source-map\": \"0.5.7\"\n},\n\"dependencies\": {\n\"dev\": true\n},\n\"nodent-transform\": {\n- \"version\": \"3.2.3\",\n- \"resolved\": \"https://registry.npmjs.org/nodent-transform/-/nodent-transform-3.2.3.tgz\",\n- \"integrity\": \"sha1-CUoKZANojVsvi18cr32uJv6FZdg=\",\n+ \"version\": \"3.2.6\",\n+ \"resolved\": \"https://registry.npmjs.org/nodent-transform/-/nodent-transform-3.2.6.tgz\",\n+ \"integrity\": \"sha512-CMa5JFCWhfv6SbG7GPNwxww9dyZuxHdC1vzGELodIPIklecH5FJzvB/gS5jb62jAnNqeQWPEoPY7AJcxvzmz2A==\",\n\"dev\": true\n},\n\"nopt\": {\n",
"new_path": "package-lock.json",
"old_path": "package-lock.json"
},
{
"change_type": "MODIFY",
"diff": "\"eslint-plugin-jest\": \"^21.15.1\",\n\"eslint-plugin-node\": \"^6.0.1\",\n\"eslint-plugin-prettier\": \"^2.6.0\",\n- \"fast-async\": \"^6.3.6\",\n+ \"fast-async\": \"^6.3.7\",\n\"jest\": \"^22.4.3\",\n\"normalize-newline\": \"^3.0.0\",\n\"normalize-path\": \"^2.1.1\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
chore(dev-deps): bump fast-async
| 1
|
chore
|
dev-deps
|
217,922
|
07.05.2018 19:01:39
| -7,200
|
d6835b9a97c385f0614b4a5bd9974eb1324ae713
|
fix(simulator): fixed buffs duration not handled properly in snapshot mode
|
[
{
"change_type": "MODIFY",
"diff": "@@ -137,7 +137,7 @@ export class Simulation {\nstate: this.state,\n});\n}\n- if (this.steps.length < maxTurns) {\n+ if (this.steps.length <= maxTurns) {\n// Tick buffs after checking synth result, so if we reach 0 durability, synth fails.\nthis.tickBuffs(linear);\n}\n",
"new_path": "src/app/pages/simulator/simulation/simulation.ts",
"old_path": "src/app/pages/simulator/simulation/simulation.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix(simulator): fixed buffs duration not handled properly in snapshot mode
| 1
|
fix
|
simulator
|
730,429
|
07.05.2018 19:24:32
| 14,400
|
8878c5940f7819bfbaa4e5964e66a1745b12e947
|
chore(redux-spark-fixtures): initial package
|
[
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"@ciscospark/react-redux-spark-fixtures\",\n+ \"description\": \"Cisco Spark React Redux Test Fixtures\",\n+ \"main\": \"./cjs/index.js\",\n+ \"src\": \"./src/index.js\",\n+ \"module\": \"./es/index.js\",\n+ \"keywords\": [],\n+ \"contributors\": [\n+ \"Adam Weeks <adweeks@cisco.com>\",\n+ \"Bernie Zang <nzang@cisco.com>\"\n+ ],\n+ \"license\": \"MIT\",\n+ \"repository\": \"https://github.com/webex/react-ciscospark\",\n+ \"files\": [\n+ \"src\",\n+ \"dist\",\n+ \"cjs\",\n+ \"es\"\n+ ]\n+}\n",
"new_path": "packages/node_modules/@ciscospark/react-redux-spark-fixtures/package.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+const mocks = [];\n+\n+function genMockFunction() {\n+ const mock = jest.fn(() => Promise.resolve());\n+ mocks.push(mock);\n+ return mock;\n+}\n+\n+export default function createSpark() {\n+ const spark = {\n+ isAuthenticated: false,\n+ isAuthenticating: false,\n+ ready: false,\n+ util: {\n+ html: {\n+ filterSync: genMockFunction(),\n+ escapeSync: jest.fn((param) => param.toString())\n+ }\n+ },\n+ authenticate: genMockFunction(),\n+ listenToAndRun: genMockFunction(),\n+ config: {trackingIdPrefix: 'testTrackingIdPrefix'},\n+ client: {trackingIdBase: 'testTrackingIdBase'},\n+ credentials: {\n+ authorization: {\n+ }\n+ },\n+ internal: {\n+ device: {\n+ url: 'https://example.com/devices/1',\n+ services: {\n+ roomServiceUrl: 'https://example.com/devices/services/room/1'\n+ },\n+ remove: genMockFunction(),\n+ getServiceUrl: jest.fn(() => ''),\n+ register: genMockFunction()\n+ },\n+\n+ encryption: {\n+ decryptScr: genMockFunction(),\n+ decryptText: genMockFunction(),\n+ encryptText: genMockFunction(),\n+ getUnusedKey: genMockFunction(),\n+ download: genMockFunction(),\n+ keystore: {\n+ clear: genMockFunction()\n+ },\n+ kms: {\n+ prepareRequest: genMockFunction(),\n+ request: genMockFunction()\n+ }\n+ },\n+\n+ user: {\n+ activate: genMockFunction(),\n+ register: genMockFunction()\n+ },\n+ mercury: {\n+ connect: genMockFunction(),\n+ on: genMockFunction(),\n+ once: genMockFunction(),\n+ listen: genMockFunction(),\n+ listenToAndRun: genMockFunction(),\n+ stopListening: genMockFunction()\n+ },\n+\n+ conversation: {\n+ assign: genMockFunction(),\n+ download: genMockFunction(),\n+ get: genMockFunction(),\n+ unassign: genMockFunction(),\n+ update: genMockFunction()\n+ },\n+\n+ metrics: {\n+ sendUnstructured: genMockFunction(),\n+ sendSemiStructured: genMockFunction(),\n+ submitClientMetrics: genMockFunction()\n+ }\n+ },\n+\n+\n+ feature: {\n+ getFeature: genMockFunction()\n+ },\n+\n+ support: {\n+ submitCallLogs: genMockFunction()\n+ },\n+\n+ flagging: {\n+ flag: genMockFunction(),\n+ mapToActivities: genMockFunction()\n+ },\n+\n+ board: {\n+ decryptContents: genMockFunction(),\n+ decryptSingleContent: genMockFunction(),\n+ encryptContents: genMockFunction(),\n+ encryptSingleContent: genMockFunction(),\n+ persistence: {\n+ ping: genMockFunction(),\n+ register: genMockFunction(),\n+ createChannel: genMockFunction(),\n+ getChannel: genMockFunction(),\n+ getChannels: genMockFunction(),\n+ addContent: genMockFunction(),\n+ addImage: genMockFunction(),\n+ getAllContent: genMockFunction(),\n+ deleteContent: genMockFunction(),\n+ deleteAllContent: genMockFunction()\n+ },\n+ realtime: {\n+ on: genMockFunction(),\n+ publish: genMockFunction(),\n+ once: genMockFunction(),\n+ set: genMockFunction()\n+ }\n+ },\n+\n+ on: genMockFunction(),\n+\n+ request: genMockFunction(),\n+\n+ search: {\n+ search: genMockFunction(),\n+ people: genMockFunction()\n+ }\n+ };\n+ return spark;\n+}\n",
"new_path": "packages/node_modules/@ciscospark/react-redux-spark-fixtures/src/__fixtures__/spark.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+// Store for testing\n+import {\n+ applyMiddleware,\n+ combineReducers,\n+ compose,\n+ createStore\n+} from 'redux';\n+import configureMockStore from 'redux-mock-store';\n+import thunk from 'redux-thunk';\n+\n+import {initialState as mercury} from '@ciscospark/redux-module-mercury';\n+import reducers, {initialState} from '@ciscospark/react-redux-spark';\n+\n+import createSpark from '../__fixtures__/spark';\n+\n+\n+export function createMockStore() {\n+ const mockStore = configureMockStore([thunk]);\n+ const store = mockStore({\n+ mercury,\n+ spark: initialState.set('spark', createSpark())\n+ });\n+ return store;\n+}\n+\n+export default function createSparkStore() {\n+ return createStore(\n+ combineReducers({\n+ spark: reducers\n+ }),\n+ compose([\n+ applyMiddleware(thunk)\n+ ])\n+ );\n+}\n",
"new_path": "packages/node_modules/@ciscospark/react-redux-spark-fixtures/src/__mocks__/spark-store.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export {default as store, createMockStore} from './__mocks__/spark-store';\n+export {default as createMockSpark} from './__fixtures__/spark';\n",
"new_path": "packages/node_modules/@ciscospark/react-redux-spark-fixtures/src/index.js",
"old_path": null
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(redux-spark-fixtures): initial package
| 1
|
chore
|
redux-spark-fixtures
|
730,429
|
07.05.2018 19:25:52
| 14,400
|
66b70bb82b99ad8061a78a3bce7cc46db51086cd
|
chore(redux-spark): use fixture library
|
[
{
"change_type": "DELETE",
"diff": "-const mocks = [];\n-\n-function genMockFunction() {\n- const mock = jest.fn(() => Promise.resolve());\n- mocks.push(mock);\n- return mock;\n-}\n-\n-export default function createSpark() {\n- const spark = {\n- isAuthenticated: false,\n- isAuthenticating: false,\n- ready: false,\n- util: {\n- html: {\n- filterSync: genMockFunction(),\n- escapeSync: jest.fn((param) => param.toString())\n- }\n- },\n- authenticate: genMockFunction(),\n- listenToAndRun: genMockFunction(),\n- config: {trackingIdPrefix: 'testTrackingIdPrefix'},\n- client: {trackingIdBase: 'testTrackingIdBase'},\n- credentials: {\n- authorization: {\n- }\n- },\n- internal: {\n- device: {\n- url: 'https://example.com/devices/1',\n- services: {\n- roomServiceUrl: 'https://example.com/devices/services/room/1'\n- },\n- remove: genMockFunction(),\n- getServiceUrl: jest.fn(() => ''),\n- register: genMockFunction()\n- },\n-\n- encryption: {\n- decryptScr: genMockFunction(),\n- decryptText: genMockFunction(),\n- encryptText: genMockFunction(),\n- getUnusedKey: genMockFunction(),\n- download: genMockFunction(),\n- keystore: {\n- clear: genMockFunction()\n- },\n- kms: {\n- prepareRequest: genMockFunction(),\n- request: genMockFunction()\n- }\n- },\n-\n- user: {\n- activate: genMockFunction(),\n- register: genMockFunction()\n- },\n- mercury: {\n- connect: genMockFunction(),\n- on: genMockFunction(),\n- once: genMockFunction(),\n- listen: genMockFunction(),\n- listenToAndRun: genMockFunction(),\n- stopListening: genMockFunction()\n- },\n-\n- conversation: {\n- assign: genMockFunction(),\n- download: genMockFunction(),\n- get: genMockFunction(),\n- unassign: genMockFunction(),\n- update: genMockFunction()\n- },\n-\n- metrics: {\n- sendUnstructured: genMockFunction(),\n- sendSemiStructured: genMockFunction(),\n- submitClientMetrics: genMockFunction()\n- }\n- },\n-\n-\n- feature: {\n- getFeature: genMockFunction()\n- },\n-\n- support: {\n- submitCallLogs: genMockFunction()\n- },\n-\n- flagging: {\n- flag: genMockFunction(),\n- mapToActivities: genMockFunction()\n- },\n-\n- board: {\n- decryptContents: genMockFunction(),\n- decryptSingleContent: genMockFunction(),\n- encryptContents: genMockFunction(),\n- encryptSingleContent: genMockFunction(),\n- persistence: {\n- ping: genMockFunction(),\n- register: genMockFunction(),\n- createChannel: genMockFunction(),\n- getChannel: genMockFunction(),\n- getChannels: genMockFunction(),\n- addContent: genMockFunction(),\n- addImage: genMockFunction(),\n- getAllContent: genMockFunction(),\n- deleteContent: genMockFunction(),\n- deleteAllContent: genMockFunction()\n- },\n- realtime: {\n- on: genMockFunction(),\n- publish: genMockFunction(),\n- once: genMockFunction(),\n- set: genMockFunction()\n- }\n- },\n-\n- on: genMockFunction(),\n-\n- request: genMockFunction(),\n-\n- search: {\n- search: genMockFunction(),\n- people: genMockFunction()\n- }\n- };\n- return spark;\n-}\n",
"new_path": null,
"old_path": "packages/node_modules/@ciscospark/react-redux-spark/src/__fixtures__/spark.js"
},
{
"change_type": "DELETE",
"diff": "-// Store for testing\n-import {\n- applyMiddleware,\n- combineReducers,\n- compose,\n- createStore\n-} from 'redux';\n-import configureMockStore from 'redux-mock-store';\n-import thunk from 'redux-thunk';\n-\n-import {initialState as mercury} from '@ciscospark/redux-module-mercury';\n-\n-import reducers, {initialState} from '../reducer';\n-import createSpark from '../__fixtures__/spark';\n-\n-\n-export function createMockStore() {\n- const mockStore = configureMockStore([thunk]);\n- const store = mockStore({\n- mercury,\n- spark: initialState.set('spark', createSpark())\n- });\n- return store;\n-}\n-\n-export default function createSparkStore() {\n- return createStore(\n- combineReducers({\n- spark: reducers\n- }),\n- compose([\n- applyMiddleware(thunk)\n- ])\n- );\n-}\n",
"new_path": null,
"old_path": "packages/node_modules/@ciscospark/react-redux-spark/src/__mocks__/spark-store.js"
},
{
"change_type": "MODIFY",
"diff": "-import createSpark from './__fixtures__/spark';\n-import {createMockStore} from './__mocks__/spark-store';\n+import {createMockStore, createMockSpark} from '@ciscospark/react-redux-spark-fixtures';\n+\nimport * as actions from './actions';\ndescribe('actions', () => {\n@@ -29,7 +29,7 @@ describe('sdk actions', () => {\n});\nit('should register this device with spark', () => {\n- const spark = createSpark();\n+ const spark = createMockSpark();\nreturn mockStore.dispatch(actions.registerDevice(spark))\n.then(() => {\n@@ -38,7 +38,7 @@ describe('sdk actions', () => {\n});\nit('should handle registration errors', () => {\n- const spark = createSpark();\n+ const spark = createMockSpark();\nspark.internal.device.register = jest.fn(() => Promise.reject(new Error('invalid token')));\nreturn mockStore.dispatch(actions.registerDevice(spark))\n",
"new_path": "packages/node_modules/@ciscospark/react-redux-spark/src/actions.test.js",
"old_path": "packages/node_modules/@ciscospark/react-redux-spark/src/actions.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -2,7 +2,8 @@ import React from 'react';\nimport renderer from 'react-test-renderer';\nimport {Provider} from 'react-redux';\n-import {createMockStore} from './__mocks__/spark-store';\n+import {createMockStore} from '@ciscospark/react-redux-spark-fixtures';\n+\nimport SparkComponent from './component';\ndescribe('spark component', () => {\n",
"new_path": "packages/node_modules/@ciscospark/react-redux-spark/src/component.test.js",
"old_path": "packages/node_modules/@ciscospark/react-redux-spark/src/component.test.js"
},
{
"change_type": "MODIFY",
"diff": "-import reducer from './reducer';\n+export {default, initialState} from './reducer';\nexport {default as injectSpark, withSpark} from './inject-spark';\n-export default reducer;\n-\n-export {default as store} from './__mocks__/spark-store';\n-export {default as createMockSpark} from './__fixtures__/spark';\n",
"new_path": "packages/node_modules/@ciscospark/react-redux-spark/src/index.js",
"old_path": "packages/node_modules/@ciscospark/react-redux-spark/src/index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -2,7 +2,8 @@ import React from 'react';\nimport {Provider, connect} from 'react-redux';\nimport renderer from 'react-test-renderer';\n-import {createMockStore} from './__mocks__/spark-store';\n+import {createMockStore} from '@ciscospark/react-redux-spark-fixtures';\n+\nimport injectSpark from './inject-spark';\nfunction MockComponent() {\n",
"new_path": "packages/node_modules/@ciscospark/react-redux-spark/src/inject-spark.test.js",
"old_path": "packages/node_modules/@ciscospark/react-redux-spark/src/inject-spark.test.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(redux-spark): use fixture library
| 1
|
chore
|
redux-spark
|
730,429
|
07.05.2018 19:26:14
| 14,400
|
bbab006228049600b053f398292b7ffdbff3e72f
|
chore(spark-oauth): use fixture library
|
[
{
"change_type": "MODIFY",
"diff": "import React from 'react';\nimport renderer from 'react-test-renderer';\n-import {createMockSpark} from '@ciscospark/react-redux-spark';\n+import {createMockSpark} from '@ciscospark/react-redux-spark-fixtures';\nimport SparkOAuth from '.';\n",
"new_path": "packages/node_modules/@ciscospark/react-component-spark-oauth/src/index.test.js",
"old_path": "packages/node_modules/@ciscospark/react-component-spark-oauth/src/index.test.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(spark-oauth): use fixture library
| 1
|
chore
|
spark-oauth
|
730,429
|
07.05.2018 19:26:36
| 14,400
|
19a29a054d578e30e4d41d79acd47d931941a53a
|
chore(module-conversation): use fixture library
|
[
{
"change_type": "MODIFY",
"diff": "export * from './actions';\nexport {default, initialState} from './reducer';\n-\n-// Exports for tests and mock stores\n-export {default as store} from './__mocks__/conversation-store';\n-export {activities as fixtures} from './__fixtures__/activities';\n",
"new_path": "packages/node_modules/@ciscospark/redux-module-conversation/src/index.js",
"old_path": "packages/node_modules/@ciscospark/redux-module-conversation/src/index.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(module-conversation): use fixture library
| 1
|
chore
|
module-conversation
|
730,429
|
07.05.2018 19:26:53
| 14,400
|
3876af3de7b2ac7c0354cb59f6e69baec752eb50
|
chore(module-share): use fixture library
|
[
{
"change_type": "MODIFY",
"diff": "@@ -4,8 +4,6 @@ import {bufferToBlob} from '@ciscospark/react-component-utils';\nexport const FETCH_SHARE = 'share/FETCH_SHARE';\nexport const RECEIVE_SHARE = 'share/RECEIVE_SHARE';\n-export {default as store} from './__mocks__/share-store';\n-\nexport const initialState = new Map({\nfiles: new OrderedMap({})\n});\n",
"new_path": "packages/node_modules/@ciscospark/redux-module-share/src/index.js",
"old_path": "packages/node_modules/@ciscospark/redux-module-share/src/index.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(module-share): use fixture library
| 1
|
chore
|
module-share
|
679,913
|
07.05.2018 20:16:08
| -3,600
|
ec41eb9c9a9209e13f6be02791d8cf2b7b3cdcb7
|
refactor(hdom-components): update button args
|
[
{
"change_type": "MODIFY",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+\nexport interface ButtonOpts {\n/**\n* Element name to use for enabled buttons.\n@@ -28,42 +30,48 @@ export interface ButtonOpts {\npreventDefault: boolean;\n}\n+export interface ButtonArgs {\n+ attribs: IObjectOf<any>;\n+ onclick: EventListener;\n+ disabled: boolean;\n+}\n+\n/**\n* Higher order function to create a new stateless button component,\n* pre-configured via user supplied options. The returned component\n* function accepts the following arguments:\n*\n* - hdom context object (unused)\n- * - extra attribute object\n- * - onclick event listener\n- * - body content\n- * - disabled flag (default: false)\n+ * - partial `ButtonArgs` object (extra attribs, onclick, disabled)\n+ * - body content (varargs)\n*\n- * The `attribs` provided as arg are merged with the default options\n- * provided to HOF. The `disabled` arg decides which button version\n- * to create.\n+ * Any `attribs` provided as arg via `ButtonArgs` are merged with the\n+ * default options provided to the HOF. The `disabled` arg decides which\n+ * button version to create. The button can have any number of body\n+ * elements (e.g. icon and label), given as varargs.\n*/\n-export const button = (opts: Partial<ButtonOpts>) => {\n+export const button = (opts?: Partial<ButtonOpts>) => {\n// init with defaults\nopts = {\ntag: \"a\",\ntagDisabled: \"span\",\npreventDefault: true,\n+ attribs: {},\n...opts\n};\n- // return component function as closure\n- return (_: any, attribs: any, onclick: EventListener, body: any, disabled?: boolean) =>\n- disabled ?\n+ !opts.attribs.role && (opts.attribs.role = \"button\");\n+ return (_: any, args: Partial<ButtonArgs>, ...body: any[]) =>\n+ args.disabled ?\n[opts.tagDisabled, {\n...opts.attribsDisabled,\n- ...attribs,\n+ ...args.attribs,\ndisabled: true,\n- }, body] :\n+ }, ...body] :\n[opts.tag, {\n...opts.attribs,\n- ...attribs,\n+ ...args.attribs,\nonclick: opts.preventDefault ?\n- (e) => (e.preventDefault(), onclick(e)) :\n- onclick\n- }, body];\n+ (e) => (e.preventDefault(), args.onclick(e)) :\n+ args.onclick\n+ }, ...body];\n};\n",
"new_path": "packages/hdom-components/src/button.ts",
"old_path": "packages/hdom-components/src/button.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(hdom-components): update button args
| 1
|
refactor
|
hdom-components
|
679,913
|
07.05.2018 20:17:09
| -3,600
|
a11803c4a48618244779d7bad4ba7e5e036b8c79
|
feat(hdom-components): add notification component
|
[
{
"change_type": "ADD",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+import { button } from \"./button\";\n+\n+export interface NotificationOpts {\n+ /**\n+ * Attribute object to use for notification.\n+ * Default: none\n+ */\n+ attribs: IObjectOf<any>;\n+ /**\n+ * Attribute object for link wrapper of `close` element.\n+ * Default: none\n+ */\n+ attribsClose: IObjectOf<any>;\n+ /**\n+ * Icon element to use for notification.\n+ * Default: none\n+ */\n+ icon: any[];\n+ /**\n+ * Icon element to use for close button.\n+ * Default: none\n+ */\n+ close: any[];\n+}\n+\n+/**\n+ * Runtime supplied user args for individual notification instances.\n+ */\n+export interface NotificationArgs {\n+ /**\n+ * Extra attribs to merge with (or override) configured default attribs.\n+ */\n+ attribs: IObjectOf<any>;\n+ /**\n+ * Event handler called when user closes notification. Only used if\n+ * `NotificationOpts` has `close` option configured.\n+ */\n+ onclose: EventListener;\n+}\n+\n+/**\n+ * Higher order function to create a new stateless notification\n+ * component, pre-configured via user supplied options. The returned\n+ * component function accepts the following arguments:\n+ *\n+ * - hdom context object (unused)\n+ * - partial `NotificationArgs` object (extra attribs, onclose handler)\n+ * - body content\n+ *\n+ * Any `attribs` provided as arg via `NotificationArgs` are merged with\n+ * the default options provided to the HOF. If the notification body\n+ * consists of multiple elements then they will need to be wrapped in a\n+ * container element.\n+ *\n+ * @param opts\n+ */\n+export const notification = (opts?: Partial<NotificationOpts>) => {\n+ const closeBt = opts.close && button({\n+ attribs: opts.attribsClose\n+ });\n+ return (_, args: Partial<NotificationArgs>, body: any) =>\n+ [\"div\",\n+ { ...opts.attribs, ...args.attribs },\n+ opts.icon,\n+ body,\n+ args.onclose && closeBt ?\n+ [closeBt, { onclick: args.onclose }, opts.close] :\n+ undefined];\n+};\n",
"new_path": "packages/hdom-components/src/notification.ts",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(hdom-components): add notification component
| 1
|
feat
|
hdom-components
|
679,913
|
07.05.2018 20:29:17
| -3,600
|
4f8e7babe107897b476060dee003afac9bd776ea
|
refactor(hdom-components): update notification & appLink comps
|
[
{
"change_type": "MODIFY",
"diff": "@@ -3,11 +3,11 @@ import { isString } from \"@thi.ng/checks/is-string\";\nexport const link = (attribs: any, body: any) =>\n[\"a\", isString(attribs) ? { href: attribs } : attribs, body];\n-export const appLink = (attribs: any, body: any, onclick: (e: Event) => void) =>\n- link(\n+export const appLink = (_, attribs: any, onclick: EventListener, body: any) =>\n+ [\"a\",\n{\n- ...attribs,\nhref: \"#\",\n- onclick: (e) => { e.preventDefault(); onclick(e); }\n+ onclick: (e) => { e.preventDefault(); onclick(e); },\n+ ...attribs,\n},\n- body);\n+ body];\n",
"new_path": "packages/hdom-components/src/link.ts",
"old_path": "packages/hdom-components/src/link.ts"
},
{
"change_type": "MODIFY",
"diff": "import { IObjectOf } from \"@thi.ng/api/api\";\n-import { button } from \"./button\";\n+import { appLink } from \"./link\";\nexport interface NotificationOpts {\n/**\n@@ -56,15 +56,12 @@ export interface NotificationArgs {\n* @param opts\n*/\nexport const notification = (opts?: Partial<NotificationOpts>) => {\n- const closeBt = opts.close && button({\n- attribs: opts.attribsClose\n- });\nreturn (_, args: Partial<NotificationArgs>, body: any) =>\n[\"div\",\n{ ...opts.attribs, ...args.attribs },\nopts.icon,\nbody,\n- args.onclose && closeBt ?\n- [closeBt, { onclick: args.onclose }, opts.close] :\n+ opts.close && args.onclose ?\n+ [appLink, opts.attribsClose, args.onclose, opts.close] :\nundefined];\n};\n",
"new_path": "packages/hdom-components/src/notification.ts",
"old_path": "packages/hdom-components/src/notification.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(hdom-components): update notification & appLink comps
| 1
|
refactor
|
hdom-components
|
217,922
|
07.05.2018 20:31:34
| -7,200
|
0122d91c0a9e801e1b45e599fc333fa2a40eb927
|
chore(simulator): better approach for foods apply
|
[
{
"change_type": "MODIFY",
"diff": "-import {Component, EventEmitter, Input, OnDestroy, OnInit, Output, ChangeDetectionStrategy, OnChanges, SimpleChanges} from '@angular/core';\n+import {ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';\nimport {Craft} from '../../../../model/garland-tools/craft';\nimport {Simulation} from '../../simulation/simulation';\nimport {Observable} from 'rxjs/Observable';\n@@ -40,7 +40,7 @@ import {ConsumablesService} from 'app/pages/simulator/model/consumables.service'\nstyleUrls: ['./simulator.component.scss'],\nchangeDetection: ChangeDetectionStrategy.OnPush,\n})\n-export class SimulatorComponent implements OnInit, OnDestroy, OnChanges {\n+export class SimulatorComponent implements OnInit, OnDestroy {\n@Input()\nitemId: number;\n@@ -210,10 +210,11 @@ export class SimulatorComponent implements OnInit, OnDestroy, OnChanges {\n}\nreturn userSet;\n}).subscribe(set => {\n- setTimeout(() => {\nthis.selectedSet = set;\nthis.applyStats(set, false);\n- }, 500);\n+ });\n+ this.crafterStats$.take(2).subscribe(() => {\n+ this.applyStats(this.selectedSet, false);\n});\n}\n}\n@@ -401,8 +402,4 @@ export class SimulatorComponent implements OnInit, OnDestroy, OnChanges {\nngOnDestroy(): void {\nthis.pendingChanges.removePendingChange('rotation');\n}\n-\n- ngOnChanges(changes: SimpleChanges): void {\n- console.log('changes !', changes);\n- }\n}\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.ts",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): better approach for foods apply
| 1
|
chore
|
simulator
|
217,922
|
07.05.2018 20:36:11
| -7,200
|
aa81872120c74343c2cb429152af75ee239017e2
|
fix(simulator): you don't need an account anymore for custom mode
|
[
{
"change_type": "MODIFY",
"diff": "@@ -194,16 +194,15 @@ export class SimulatorComponent implements OnInit, OnDestroy {\n}\nngOnInit(): void {\n- if (!this.customMode) {\nObservable.combineLatest(this.recipe$, this.gearsets$, (recipe, gearsets) => {\nlet userSet = gearsets.find(set => set.jobId === recipe.job);\nif (userSet === undefined && this.selectedSet === undefined) {\nuserSet = {\nilvl: 0,\n- control: 1000,\n- craftsmanship: 1000,\n- cp: 450,\n- jobId: 10,\n+ control: 1500,\n+ craftsmanship: 1350,\n+ cp: 474,\n+ jobId: 8,\nlevel: 70,\nspecialist: false\n};\n@@ -217,7 +216,6 @@ export class SimulatorComponent implements OnInit, OnDestroy {\nthis.applyStats(this.selectedSet, false);\n});\n}\n- }\nimportRotation(): void {\nthis.dialog.open(ImportRotationPopupComponent)\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.ts",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix(simulator): you don't need an account anymore for custom mode
| 1
|
fix
|
simulator
|
679,913
|
07.05.2018 20:40:14
| -3,600
|
cefb19947f89ce37f41e1f639e5b036921942aa5
|
refactor(hdom-components): remove CanvasOpts, update re-exports
|
[
{
"change_type": "MODIFY",
"diff": "-export interface CanvasOpts {\n- width: number;\n- height: number;\n- [id: string]: any;\n-}\n-\n/**\n* User provided canvas life cycle methods. These differ from the usual\n* @thi.ng/hdom life cycle methods and are always passed at least the\n",
"new_path": "packages/hdom-components/src/canvas.ts",
"old_path": "packages/hdom-components/src/canvas.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -2,5 +2,6 @@ export * from \"./button\";\nexport * from \"./canvas\";\nexport * from \"./dropdown\";\nexport * from \"./link\";\n+export * from \"./notification\";\nexport * from \"./pager\";\nexport * from \"./title\";\n",
"new_path": "packages/hdom-components/src/index.ts",
"old_path": "packages/hdom-components/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(hdom-components): remove CanvasOpts, update re-exports
| 1
|
refactor
|
hdom-components
|
679,913
|
07.05.2018 20:44:35
| -3,600
|
a9574a0bd98b95a81ceb6bb9aa85734f2798afff
|
feat(associative): add mapKeysObj() / mapKeysMap()
|
[
{
"change_type": "ADD",
"diff": "+import { isFunction } from \"@thi.ng/checks/is-function\";\n+import { IObjectOf } from \"@thi.ng/api/api\";\n+\n+/**\n+ * Similar to `mapKeysObj()`, but for ES6 Maps instead of plain objects.\n+ *\n+ * @param src\n+ * @param xs\n+ */\n+export function mapKeysMap<K, V>(src: Map<K, V>, xs: Map<K, V | ((x: V) => V)>) {\n+ const res: any = { ...src };\n+ for (let p of xs) {\n+ let [k, v] = p;\n+ if (isFunction(v)) {\n+ v = v(res[k]);\n+ }\n+ res.set(k, v);\n+ }\n+ return res;\n+}\n+\n+/**\n+ * Similar to `mergeObj()`, but only supports 2 args and any function\n+ * values in `xs` will be called with respective value in `src` to\n+ * produce new value for that key. Returns new merged object and does\n+ * not modify any of the inputs.\n+ *\n+ * ```\n+ * mapKeysObj({a: \"hello\", b: 23}, {a: (x) => x + \" world\", b: 42});\n+ * // { a: 'hello world', b: 42 }\n+ * ```\n+ *\n+ * @param src\n+ * @param xs\n+ */\n+export function mapKeysObj<V>(src: IObjectOf<V>, xs: IObjectOf<V | ((x: V) => V)>) {\n+ const res: any = { ...src };\n+ for (let k in xs) {\n+ let v = xs[k];\n+ if (isFunction(v)) {\n+ v = v(res[k]);\n+ }\n+ res[k] = v;\n+ }\n+ return res;\n+}\n",
"new_path": "packages/associative/src/map-keys.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "* @param m\n* @param maps\n*/\n-export function mergeMaps<K, V>(m: Map<K, V>, ...maps: Map<K, V>[]) {\n+export function mergeMap<K, V>(m: Map<K, V>, ...maps: Map<K, V>[]) {\nfor (let mm of maps) {\nfor (let p of mm) {\nm.set(p[0], p[1]);\n",
"new_path": "packages/associative/src/merge.ts",
"old_path": "packages/associative/src/merge.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(associative): add mapKeysObj() / mapKeysMap()
| 1
|
feat
|
associative
|
791,690
|
08.05.2018 11:22:03
| 25,200
|
30eb6cee6790877c2d3e6991e9ef911e9a298e00
|
core(start-url): use window.location over fetch
|
[
{
"change_type": "MODIFY",
"diff": "@@ -143,15 +143,9 @@ module.exports = [\n// Ignore speed test; just verify that it ran.\n},\n'webapp-install-banner': {\n- // FIXME(bckenny): This is a lie, the site should pass this. Issue #4898\n- score: 0,\n+ score: 1,\nextendedInfo: {\nvalue: {\n- // FIXME(bckenny): There should not be any failures Issue #4898\n- failures: [\n- 'Service worker does not successfully serve the manifest\\'s start_url',\n- 'Unable to fetch start URL via service worker',\n- ],\nmanifestValues: {\nallChecks: [\n{id: 'hasStartUrl', passing: true},\n",
"new_path": "lighthouse-cli/test/smokehouse/pwa2-expectations.js",
"old_path": "lighthouse-cli/test/smokehouse/pwa2-expectations.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -97,7 +97,7 @@ class StartUrl extends Gatherer {\n});\nreturn driver\n- .evaluateAsync(`fetch('${startUrl}')`)\n+ .evaluateAsync(`window.location = '${startUrl}'`)\n.then(() => Promise.race([fetchPromise, timeoutPromise]));\n}\n}\n",
"new_path": "lighthouse-core/gather/gatherers/start-url.js",
"old_path": "lighthouse-core/gather/gatherers/start-url.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(start-url): use window.location over fetch (#5159)
| 1
|
core
|
start-url
|
791,690
|
08.05.2018 12:18:44
| 25,200
|
beb709294e588317d9fb0a62cfd9cb3a6672d60c
|
core(lhr): convert reportCategories to categories object
|
[
{
"change_type": "MODIFY",
"diff": "@@ -33,7 +33,9 @@ class ReportRenderer {\n// If any mutations happen to the report within the renderers, we want the original object untouched\nconst clone = /** @type {!ReportRenderer.ReportJSON} */ (JSON.parse(JSON.stringify(report)));\n- if (!Array.isArray(clone.reportCategories)) throw new Error('No reportCategories provided.');\n+ // TODO(phulce): we all agree this is technical debt we should fix\n+ if (typeof clone.categories !== 'object') throw new Error('No categories provided.');\n+ clone.reportCategories = Object.values(clone.categories);\nReportRenderer.smooshAuditResultsIntoCategories(clone.audits, clone.reportCategories);\ncontainer.textContent = ''; // Remove previous report.\n@@ -169,7 +171,7 @@ class ReportRenderer {\nif (category.id === 'performance') {\nrenderer = perfCategoryRenderer;\n}\n- categories.appendChild(renderer.render(category, report.reportGroups));\n+ categories.appendChild(renderer.render(category, report.categoryGroups));\n}\nif (scoreHeader) {\n@@ -263,8 +265,9 @@ ReportRenderer.GroupJSON; // eslint-disable-line no-unused-expressions\n* runWarnings: (!Array<string>|undefined),\n* artifacts: {traces: {defaultPass: {traceEvents: !Array}}},\n* audits: !Object<string, !ReportRenderer.AuditResultJSON>,\n+ * categories: !Object<string, !ReportRenderer.CategoryJSON>,\n* reportCategories: !Array<!ReportRenderer.CategoryJSON>,\n- * reportGroups: !Object<string, !ReportRenderer.GroupJSON>,\n+ * categoryGroups: !Object<string, !ReportRenderer.GroupJSON>,\n* configSettings: !LH.Config.Settings,\n* }}\n*/\n",
"new_path": "lighthouse-core/report/html/renderer/report-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/report-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -69,7 +69,7 @@ class ReportGenerator {\n// Possible TODO: tightly couple headers and row values\nconst header = ['category', 'name', 'title', 'type', 'score'];\n- const table = lhr.reportCategories.map(category => {\n+ const table = Object.values(lhr.categories).map(category => {\nreturn category.audits.map(catAudit => {\nconst audit = lhr.audits[catAudit.id];\n// CSV validator wants all scores to be numeric, use -1 for now\n",
"new_path": "lighthouse-core/report/report-generator.js",
"old_path": "lighthouse-core/report/report-generator.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -119,12 +119,13 @@ class Runner {\n}\n}\n- /** @type {Array<LH.Result.Category>} */\n- let reportCategories = [];\n+ /** @type {Object<string, LH.Result.Category>} */\n+ let categories = {};\nif (opts.config.categories) {\n- reportCategories = ReportScoring.scoreAllCategories(opts.config.categories, resultsById);\n+ categories = ReportScoring.scoreAllCategories(opts.config.categories, resultsById);\n}\n+ /** @type {LH.Result} */\nconst lhr = {\nuserAgent: artifacts.UserAgent,\nlighthouseVersion,\n@@ -134,8 +135,8 @@ class Runner {\nrunWarnings: lighthouseRunWarnings,\naudits: resultsById,\nconfigSettings: settings,\n- reportCategories,\n- reportGroups: opts.config.groups,\n+ categories,\n+ categoryGroups: opts.config.groups,\ntiming: {total: Date.now() - startTime},\n};\n",
"new_path": "lighthouse-core/runner.js",
"old_path": "lighthouse-core/runner.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -47,10 +47,10 @@ class ReportScoring {\n* Returns the report JSON object with computed scores.\n* @param {Object<string, LH.Config.Category>} configCategories\n* @param {Object<string, LH.Audit.Result>} resultsByAuditId\n- * @return {Array<LH.Result.Category>}\n+ * @return {Object<string, LH.Result.Category>}\n*/\nstatic scoreAllCategories(configCategories, resultsByAuditId) {\n- const scoredCategories = [];\n+ const scoredCategories = {};\nfor (const [categoryId, configCategory] of Object.entries(configCategories)) {\n// Copy category audit members\n@@ -77,12 +77,12 @@ class ReportScoring {\n}));\nconst score = ReportScoring.arithmeticMean(scores);\n- scoredCategories.push({\n+ scoredCategories[categoryId] = {\n...configCategory,\naudits,\nid: categoryId,\nscore,\n- });\n+ };\n}\nreturn scoredCategories;\n",
"new_path": "lighthouse-core/scoring.js",
"old_path": "lighthouse-core/scoring.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -105,8 +105,7 @@ describe('Module Tests', function() {\nassert.ok(results.lhr.fetchTime);\nassert.equal(results.lhr.finalUrl, exampleUrl);\nassert.equal(results.lhr.requestedUrl, exampleUrl);\n- assert.ok(Array.isArray(results.lhr.reportCategories));\n- assert.equal(results.lhr.reportCategories.length, 0);\n+ assert.equal(Object.values(results.lhr.categories).length, 0);\nassert.ok(results.lhr.audits.viewport);\nassert.strictEqual(results.lhr.audits.viewport.score, 0);\nassert.ok(results.lhr.audits.viewport.explanation);\n",
"new_path": "lighthouse-core/test/index-test.js",
"old_path": "lighthouse-core/test/index-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -36,6 +36,7 @@ describe('CategoryRenderer', () => {\nconst detailsRenderer = new DetailsRenderer(dom);\nrenderer = new CategoryRenderer(dom, detailsRenderer);\n+ sampleResults.reportCategories = Object.values(sampleResults.categories);\nReportRenderer.smooshAuditResultsIntoCategories(sampleResults.audits,\nsampleResults.reportCategories);\n});\n@@ -88,7 +89,7 @@ describe('CategoryRenderer', () => {\nit('renders a category', () => {\nconst category = sampleResults.reportCategories.find(c => c.id === 'pwa');\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst categoryEl = categoryDOM.querySelector('.lh-category-header');\nconst value = categoryDOM.querySelector('.lh-gauge__percentage');\n@@ -107,7 +108,7 @@ describe('CategoryRenderer', () => {\nconst category = sampleResults.reportCategories.find(c => c.id === 'pwa');\nconst prevDesc = category.description;\ncategory.description += ' [link text](http://example.com).';\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst description = categoryDOM.querySelector('.lh-category-header__description');\nassert.ok(description.querySelector('a'), 'description contains converted markdown links');\ncategory.description = prevDesc;\n@@ -132,19 +133,19 @@ describe('CategoryRenderer', () => {\nit('renders manual audits if the category contains them', () => {\nconst pwaCategory = sampleResults.reportCategories.find(cat => cat.id === 'pwa');\n- const categoryDOM = renderer.render(pwaCategory, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(pwaCategory, sampleResults.categoryGroups);\nassert.ok(categoryDOM.querySelector('.lh-audit-group--manual .lh-audit-group__summary'));\nassert.equal(categoryDOM.querySelectorAll('.lh-audit--manual').length, 3,\n'score shows informative and dash icon');\nconst perfCategory = sampleResults.reportCategories.find(cat => cat.id === 'performance');\n- const categoryDOM2 = renderer.render(perfCategory, sampleResults.reportGroups);\n+ const categoryDOM2 = renderer.render(perfCategory, sampleResults.categoryGroups);\nassert.ok(!categoryDOM2.querySelector('.lh-audit-group--manual'));\n});\nit('renders not applicable audits if the category contains them', () => {\nconst a11yCategory = sampleResults.reportCategories.find(cat => cat.id === 'accessibility');\n- const categoryDOM = renderer.render(a11yCategory, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(a11yCategory, sampleResults.categoryGroups);\nassert.ok(categoryDOM.querySelector(\n'.lh-audit-group--not-applicable .lh-audit-group__summary'));\n@@ -157,15 +158,19 @@ describe('CategoryRenderer', () => {\n);\nconst bestPracticeCat = sampleResults.reportCategories.find(cat => cat.id === 'best-practices');\n- const categoryDOM2 = renderer.render(bestPracticeCat, sampleResults.reportGroups);\n+ const categoryDOM2 = renderer.render(bestPracticeCat, sampleResults.categoryGroups);\nassert.ok(!categoryDOM2.querySelector('.lh-audit-group--not-applicable'));\n});\ndescribe('category with groups', () => {\n- const category = sampleResults.reportCategories.find(cat => cat.id === 'accessibility');\n+ let category;\n+\n+ beforeEach(() => {\n+ category = sampleResults.reportCategories.find(cat => cat.id === 'accessibility');\n+ });\nit('renders the category header', () => {\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst gauge = categoryDOM.querySelector('.lh-gauge__percentage');\nassert.equal(gauge.textContent.trim(), '35', 'score is 0-100');\n@@ -184,7 +189,7 @@ describe('CategoryRenderer', () => {\n// TODO waiting for decision regarding this header\nit.skip('renders the failed audits grouped by group', () => {\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst failedAudits = category.audits.filter(audit => {\nreturn audit.result.score !== 1 && !audit.result.scoreDisplayMode === 'not-applicable';\n});\n@@ -195,7 +200,7 @@ describe('CategoryRenderer', () => {\n});\nit('renders the passed audits grouped by group', () => {\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst passedAudits = category.audits.filter(audit =>\naudit.result.scoreDisplayMode !== 'not-applicable' && audit.result.score === 1);\nconst passedAuditTags = new Set(passedAudits.map(audit => audit.group));\n@@ -205,7 +210,7 @@ describe('CategoryRenderer', () => {\n});\nit('renders all the audits', () => {\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst auditsElements = categoryDOM.querySelectorAll('.lh-audit');\nassert.equal(auditsElements.length, category.audits.length);\n});\n@@ -214,7 +219,7 @@ describe('CategoryRenderer', () => {\ndescribe('grouping passed/failed/manual', () => {\nit('separates audits in the DOM', () => {\nconst category = sampleResults.reportCategories.find(c => c.id === 'pwa');\n- const elem = renderer.render(category, sampleResults.reportGroups);\n+ const elem = renderer.render(category, sampleResults.categoryGroups);\nconst passedAudits = elem.querySelectorAll('.lh-passed-audits .lh-audit');\nconst failedAudits = elem.querySelectorAll('.lh-failed-audits .lh-audit');\nconst manualAudits = elem.querySelectorAll('.lh-audit-group--manual .lh-audit');\n@@ -228,7 +233,7 @@ describe('CategoryRenderer', () => {\nconst origCategory = sampleResults.reportCategories.find(c => c.id === 'pwa');\nconst category = JSON.parse(JSON.stringify(origCategory));\ncategory.audits.forEach(audit => audit.result.score = 0);\n- const elem = renderer.render(category, sampleResults.reportGroups);\n+ const elem = renderer.render(category, sampleResults.categoryGroups);\nconst passedAudits = elem.querySelectorAll('.lh-passed-audits > .lh-audit');\nconst failedAudits = elem.querySelectorAll('.lh-failed-audits > .lh-audit');\n",
"new_path": "lighthouse-core/test/report/html/renderer/category-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/category-renderer-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -24,6 +24,7 @@ const TEMPLATE_FILE = fs.readFileSync(__dirname +\n'/../../../../report/html/templates.html', 'utf8');\ndescribe('PerfCategoryRenderer', () => {\n+ let category;\nlet renderer;\nbefore(() => {\n@@ -39,6 +40,8 @@ describe('PerfCategoryRenderer', () => {\nconst dom = new DOM(document);\nconst detailsRenderer = new DetailsRenderer(dom);\nrenderer = new PerformanceCategoryRenderer(dom, detailsRenderer);\n+ sampleResults.reportCategories = Object.values(sampleResults.categories);\n+ category = sampleResults.reportCategories.find(cat => cat.id === 'performance');\nReportRenderer.smooshAuditResultsIntoCategories(sampleResults.audits,\nsampleResults.reportCategories);\n});\n@@ -50,10 +53,8 @@ describe('PerfCategoryRenderer', () => {\nglobal.CategoryRenderer = undefined;\n});\n- const category = sampleResults.reportCategories.find(cat => cat.id === 'performance');\n-\nit('renders the category header', () => {\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst score = categoryDOM.querySelector('.lh-category-header');\nconst value = categoryDOM.querySelector('.lh-category-header .lh-gauge__percentage');\nconst title = score.querySelector('.lh-category-header__title');\n@@ -65,13 +66,13 @@ describe('PerfCategoryRenderer', () => {\n});\nit('renders the sections', () => {\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst sections = categoryDOM.querySelectorAll('.lh-category > .lh-audit-group');\nassert.equal(sections.length, 4);\n});\nit('renders the metrics', () => {\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst metricsSection = categoryDOM.querySelectorAll('.lh-category > .lh-audit-group')[0];\nconst metricAudits = category.audits.filter(audit => audit.group === 'metrics');\n@@ -81,7 +82,7 @@ describe('PerfCategoryRenderer', () => {\n});\nit('renders the failing performance opportunities', () => {\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst oppAudits = category.audits.filter(audit => audit.group === 'load-opportunities' &&\naudit.result.score !== 1);\n@@ -109,14 +110,14 @@ describe('PerfCategoryRenderer', () => {\n};\nconst fakeCategory = Object.assign({}, category, {audits: [auditWithDebug]});\n- const categoryDOM = renderer.render(fakeCategory, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(fakeCategory, sampleResults.categoryGroups);\nconst debugEl = categoryDOM.querySelector('.lh-load-opportunity .lh-debug');\nassert.ok(debugEl, 'did not render debug');\n});\nit('renders the failing diagnostics', () => {\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst diagnosticSection = categoryDOM.querySelectorAll('.lh-category > .lh-audit-group')[2];\nconst diagnosticAudits = category.audits.filter(audit => audit.group === 'diagnostics' &&\n@@ -126,7 +127,7 @@ describe('PerfCategoryRenderer', () => {\n});\nit('renders the passed audits', () => {\n- const categoryDOM = renderer.render(category, sampleResults.reportGroups);\n+ const categoryDOM = renderer.render(category, sampleResults.categoryGroups);\nconst passedSection = categoryDOM.querySelector('.lh-category > .lh-passed-audits');\nconst passedAudits = category.audits.filter(audit =>\n",
"new_path": "lighthouse-core/test/report/html/renderer/performance-category-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/performance-category-renderer-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -57,6 +57,7 @@ describe('ReportRenderer', () => {\nconst detailsRenderer = new DetailsRenderer(dom);\nconst categoryRenderer = new CategoryRenderer(dom, detailsRenderer);\nrenderer = new ReportRenderer(dom, categoryRenderer);\n+ sampleResults.reportCategories = Object.values(sampleResults.categories);\n});\nafter(() => {\n",
"new_path": "lighthouse-core/test/report/html/renderer/report-renderer-test.js",
"old_path": "lighthouse-core/test/report/html/renderer/report-renderer-test.js"
},
{
"change_type": "MODIFY",
"diff": "\"onlyCategories\": null,\n\"skipAudits\": null\n},\n- \"reportCategories\": [\n- {\n+ \"categories\": {\n+ \"performance\": {\n\"name\": \"Performance\",\n\"audits\": [\n{\n\"id\": \"performance\",\n\"score\": 0.69\n},\n- {\n+ \"pwa\": {\n\"name\": \"Progressive Web App\",\n\"description\": \"These checks validate the aspects of a Progressive Web App, as specified by the baseline [PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist).\",\n\"manualDescription\": \"These checks are required by the baseline [PWA Checklist](https://developers.google.com/web/progressive-web-apps/checklist) but are not automatically checked by Lighthouse. They do not affect your score but it's important that you verify them manually.\",\n\"id\": \"pwa\",\n\"score\": 0.36\n},\n- {\n+ \"accessibility\": {\n\"name\": \"Accessibility\",\n\"description\": \"These checks highlight opportunities to [improve the accessibility of your web app](https://developers.google.com/web/fundamentals/accessibility). Only a subset of accessibility issues can be automatically detected so manual testing is also encouraged.\",\n\"manualDescription\": \"These items address areas which an automated testing tool cannot cover. Learn more in our guide on [conducting an accessibility review](https://developers.google.com/web/fundamentals/accessibility/how-to-review).\",\n\"id\": \"accessibility\",\n\"score\": 0.35\n},\n- {\n+ \"best-practices\": {\n\"name\": \"Best Practices\",\n\"audits\": [\n{\n\"id\": \"best-practices\",\n\"score\": 0\n},\n- {\n+ \"seo\": {\n\"name\": \"SEO\",\n\"description\": \"These checks ensure that your page is optimized for search engine results ranking. There are additional factors Lighthouse does not check that may affect your search ranking. [Learn more](https://support.google.com/webmasters/answer/35769).\",\n\"manualDescription\": \"Run these additional validators on your site to check additional SEO best practices.\",\n\"id\": \"seo\",\n\"score\": null\n}\n- ],\n- \"reportGroups\": {\n+ },\n+ \"categoryGroups\": {\n\"metrics\": {\n\"title\": \"Metrics\"\n},\n",
"new_path": "lighthouse-core/test/results/sample_v2.json",
"old_path": "lighthouse-core/test/results/sample_v2.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -419,7 +419,7 @@ describe('Runner', () => {\n});\n- it('returns reportCategories', () => {\n+ it('returns categories', () => {\nconst url = 'https://example.com/';\nconst config = new Config({\npasses: [{\n@@ -446,8 +446,8 @@ describe('Runner', () => {\nassert.equal(gatherRunnerRunSpy.called, true, 'GatherRunner.run was not called');\nassert.equal(results.lhr.audits['content-width'].name, 'content-width');\nassert.equal(results.lhr.audits['content-width'].score, 1);\n- assert.equal(results.lhr.reportCategories[0].score, 1);\n- assert.equal(results.lhr.reportCategories[0].audits[0].id, 'content-width');\n+ assert.equal(results.lhr.categories.category.score, 1);\n+ assert.equal(results.lhr.categories.category.audits[0].id, 'content-width');\n});\n});\n",
"new_path": "lighthouse-core/test/runner-test.js",
"old_path": "lighthouse-core/test/runner-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -56,10 +56,10 @@ describe('ReportScoring', () => {\nconst scoredCategories = ReportScoring.scoreAllCategories(categories, resultsByAuditId);\n- assert.equal(scoredCategories[0].id, 'categoryA');\n- assert.equal(scoredCategories[0].score, 0);\n- assert.equal(scoredCategories[1].id, 'categoryB');\n- assert.equal(scoredCategories[1].score, 0.55);\n+ assert.equal(scoredCategories.categoryA.id, 'categoryA');\n+ assert.equal(scoredCategories.categoryA.score, 0);\n+ assert.equal(scoredCategories.categoryB.id, 'categoryB');\n+ assert.equal(scoredCategories.categoryB.score, 0.55);\n});\nit('should weight notApplicable audits as 0', () => {\n@@ -83,8 +83,8 @@ describe('ReportScoring', () => {\nconst scoredCategories = ReportScoring.scoreAllCategories(categories, resultsByAuditId);\n- assert.equal(scoredCategories[0].id, 'categoryA');\n- assert.equal(scoredCategories[0].score, 0.5);\n+ assert.equal(scoredCategories.categoryA.id, 'categoryA');\n+ assert.equal(scoredCategories.categoryA.score, 0.5);\n});\n});\n});\n",
"new_path": "lighthouse-core/test/scoring-test.js",
"old_path": "lighthouse-core/test/scoring-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -21,9 +21,9 @@ declare global {\n/** An object containing the results of the audits, keyed by the audits' `id` identifier. */\naudits: Record<string, Audit.Result>;\n/** The top-level categories, their overall scores, and member audits. */\n- reportCategories: Result.Category[];\n+ categories: Record<string, Result.Category>;\n/** Descriptions of the groups referenced by CategoryMembers. */\n- reportGroups?: Record<string, Result.Group>;\n+ categoryGroups?: Record<string, Result.ReportGroup>;\n// Additional non-LHR-lite information.\n@@ -33,6 +33,8 @@ declare global {\nrunWarnings: string[];\n/** The User-Agent string of the browser used run Lighthouse for these results. */\nuserAgent: string;\n+ /** Execution timings for the Lighthouse run */\n+ timing: {total: number, [t: string]: number};\n}\n// Result namespace\n@@ -61,7 +63,7 @@ declare global {\ngroup?: string;\n}\n- export interface Group {\n+ export interface ReportGroup {\n/** The title of the display group. */\ntitle: string;\n/** A brief description of the purpose of the display group. */\n",
"new_path": "typings/lhr.d.ts",
"old_path": "typings/lhr.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(lhr): convert reportCategories to categories object (#5155)
| 1
|
core
|
lhr
|
448,063
|
08.05.2018 13:53:33
| -7,200
|
f4beea90797002f0fec0ae2246c7e5ab293eb6b8
|
fix: correct depth analysis of unordered dependencies for secondaries
|
[
{
"change_type": "MODIFY",
"diff": "@@ -48,4 +48,25 @@ describe(`DepthBuilder`, () => {\nexpect(groups[3]).to.have.same.members(['b']);\nexpect(groups[4]).to.have.same.members(['a']);\n});\n+\n+ /**\n+ * This scenario is visually documented:\n+ * https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggVERcbmIgLS0-IGRcbmIgLS0-IGNcbmIgLS0-IGVcbmEgLS0-IGJcbmEgLS0-IGRcbmEgLS0-IGNcbmEgLS0-IGVcbmQgLS0-IGVcbmMgLS0-IGRcbmMgLS0-IGUiLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ\n+ */\n+ it(`should group an unordered complex scenario`, () => {\n+ const builder = new DepthBuilder();\n+ builder.add('b', ['d','c','e']);\n+ builder.add('a', ['b', 'd', 'c', 'e']);\n+ builder.add('d','e');\n+ builder.add('c', ['d','e']);\n+ builder.add('e');\n+\n+ const groups = builder.build();\n+ expect(groups.length).to.equal(5);\n+ expect(groups[0]).to.have.same.members(['e']);\n+ expect(groups[1]).to.have.same.members(['d']);\n+ expect(groups[2]).to.have.same.members(['c']);\n+ expect(groups[3]).to.have.same.members(['b']);\n+ expect(groups[4]).to.have.same.members(['a']);\n+ });\n});\n",
"new_path": "src/lib/brocc/depth.spec.ts",
"old_path": "src/lib/brocc/depth.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -86,6 +86,8 @@ export class DepthBuilder {\nconst dependencyDepth = nodeDepths.get(parent.token);\nif (currentDepth > dependencyDepth) {\n+ // Push the dependency to the queue again and track its depth\n+ nodeQueue.push(parent);\nnodeDepths.set(parent.token, currentDepth);\n}\n});\n",
"new_path": "src/lib/brocc/depth.ts",
"old_path": "src/lib/brocc/depth.ts"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
fix: correct depth analysis of unordered dependencies for secondaries (#846)
| 1
|
fix
| null |
807,849
|
08.05.2018 13:54:23
| 25,200
|
ee0c7be7e07930efa8a0c7e60c671b2ccdfbbdb7
|
chore(ci): add node 10 to test matrix
|
[
{
"change_type": "MODIFY",
"diff": "@@ -6,6 +6,7 @@ git:\nsudo: false\nlanguage: node_js\nnode_js:\n+ - '10'\n- '8'\n- '6'\n",
"new_path": ".travis.yml",
"old_path": ".travis.yml"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,6 +6,7 @@ shallow_clone: true\nenvironment:\nNO_UPDATE_NOTIFIER: \"1\"\nmatrix:\n+ - nodejs_version: \"10\"\n- nodejs_version: \"8\"\n- nodejs_version: \"6\"\n",
"new_path": "appveyor.yml",
"old_path": "appveyor.yml"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
chore(ci): add node 10 to test matrix
| 1
|
chore
|
ci
|
679,913
|
08.05.2018 14:48:31
| -3,600
|
c0950d654ccf428b16e9e8c42661193eaef0ecbf
|
feat(hdom-components): add buttonGroup
|
[
{
"change_type": "ADD",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+\n+import { ButtonArgs, Button } from \"./button\";\n+\n+/**\n+ * Button group component config options.\n+ */\n+export interface ButtonGroupOpts {\n+ /**\n+ * Pre-configured stateless button component function for first\n+ * button in group. MUST be provided.\n+ */\n+ first: Button;\n+ /**\n+ * Pre-configured stateless button component function for inner\n+ * buttons in group. Only used if at least 3 buttons in group.\n+ * If not specified, `first` will be used.\n+ */\n+ inner?: Button;\n+ /**\n+ * Pre-configured stateless button component function for last\n+ * button in group. If not specified, `first` will be used.\n+ */\n+ last?: Button;\n+ /**\n+ * Attribs for button group container.\n+ */\n+ attribs?: IObjectOf<any>;\n+}\n+\n+export interface ButtonGroupArgs {\n+ /**\n+ * User supplied attribute overrides.\n+ */\n+ attribs: IObjectOf<any>;\n+ /**\n+ * Disabled flag for entire button group.\n+ * Default: none\n+ */\n+ disabled: boolean;\n+}\n+\n+/**\n+ * Argument type for a single button in the group, e.g.\n+ *\n+ * ```\n+ * [{onclick: () => alert(\"foo\") }, [\"i.fas.fa-check\"], \"foo\"]\n+ * ```\n+ */\n+export interface ButtonGroupItem extends Array<any> {\n+ [0]: ButtonArgs;\n+ [id: number]: any;\n+}\n+\n+/**\n+ * Higher order function to create a new stateless button group\n+ * component, pre-configured via user supplied options. The returned\n+ * component function accepts the following arguments:\n+ *\n+ * - hdom context object (unused)\n+ * - partial `ButtonGroupArgs` object (extra attribs, disabled flag)\n+ * - button group items (varargs)\n+ *\n+ * Any `attribs` provided as arg via `ButtonGroupArgs` are merged with\n+ * the default options provided to the HOF. If `disabled` is true, ALL\n+ * buttons in the group will be disabled, regardless of their individual\n+ * settings. The group can have any number of elements, given as\n+ * varargs.\n+ *\n+ * @param opts\n+ */\n+export const buttonGroup = (opts: ButtonGroupOpts) =>\n+ (_, args: ButtonGroupArgs, ...buttons: ButtonGroupItem[]) =>\n+ [\"div\", { ...opts.attribs, ...args.attribs }, ...groupBody(opts, args.disabled, buttons)];\n+\n+const groupBody = (opts: ButtonGroupOpts, disabled: boolean, buttons: ButtonGroupItem[]) => {\n+ switch (buttons.length) {\n+ case 0:\n+ return;\n+ case 1:\n+ return [bt(opts.inner || opts.first, disabled, buttons[0])];\n+ case 2:\n+ return [\n+ bt(opts.first, disabled, buttons[0]),\n+ bt(opts.last || opts.first, disabled, buttons[1])\n+ ];\n+ default: {\n+ const res = [bt(opts.first, disabled, buttons[0])];\n+ const el = opts.inner || opts.first\n+ const n = buttons.length - 1;\n+ for (let i = 1; i < n; i++) {\n+ res[i] = bt(el, disabled, buttons[i]);\n+ }\n+ res[n] = bt(opts.last || opts.first, disabled, buttons[n]);\n+ return res;\n+ }\n+ }\n+};\n+\n+const bt = (el: Button, disabled: boolean, bt: ButtonGroupItem) =>\n+ disabled ?\n+ [el, { ...bt[0], disabled: true }, ...bt.slice(1)] :\n+ [el, ...bt];\n\\ No newline at end of file\n",
"new_path": "packages/hdom-components/src/button-group.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -36,6 +36,8 @@ export interface ButtonArgs {\ndisabled: boolean;\n}\n+export type Button = (_: any, args: Partial<ButtonArgs>, ...body: any[]) => any;\n+\n/**\n* Higher order function to create a new stateless button component,\n* pre-configured via user supplied options. The returned component\n@@ -50,7 +52,7 @@ export interface ButtonArgs {\n* button version to create. The button can have any number of body\n* elements (e.g. icon and label), given as varargs.\n*/\n-export const button = (opts?: Partial<ButtonOpts>) => {\n+export const button = (opts?: Partial<ButtonOpts>): Button => {\n// init with defaults\nopts = {\ntag: \"a\",\n",
"new_path": "packages/hdom-components/src/button.ts",
"old_path": "packages/hdom-components/src/button.ts"
},
{
"change_type": "MODIFY",
"diff": "export * from \"./button\";\n+export * from \"./button-group\";\nexport * from \"./canvas\";\nexport * from \"./dropdown\";\nexport * from \"./link\";\n",
"new_path": "packages/hdom-components/src/index.ts",
"old_path": "packages/hdom-components/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(hdom-components): add buttonGroup
| 1
|
feat
|
hdom-components
|
730,429
|
08.05.2018 16:29:52
| 14,400
|
d70aabda8d9613b47e33cc3eb914d5494a20745e
|
feat(samples): add basic components
|
[
{
"change_type": "ADD",
"diff": "+.iconButton {\n+ height: 50px;\n+ width: 50px;\n+ background-color: blueviolet;\n+}\n",
"new_path": "samples/BasicComponents.css",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import React from 'react';\n+\n+import Button from '@ciscospark/react-component-button';\n+import Icon, {ICONS} from '@ciscospark/react-component-icon';\n+\n+\n+function BasicComponents() {\n+ function onClick() {\n+ // eslint-disable-next-line no-alert\n+ window.alert('onClick');\n+ }\n+\n+ const buttonContainerStyle = {\n+ width: '40px',\n+ height: '40px',\n+ border: '1px solid rgba(0, 0, 0, 0.06)',\n+ borderRadius: '50%'\n+ };\n+\n+ return (\n+ <div>\n+ <h3>Buttons</h3>\n+ <div style={{display: 'flex', flexDirection: 'row'}}>\n+ <div style={buttonContainerStyle}>\n+ <Button accessibilityLabel=\"Main Menu\" iconColor=\"black\" iconType={ICONS.ICON_TYPE_WAFFLE} onClick={onClick} />\n+ </div>\n+ <div style={buttonContainerStyle}>\n+ <Button\n+ iconColor=\"purple\"\n+ iconType={ICONS.ICON_TYPE_DELETE}\n+ onClick={onClick}\n+ title=\"delete\"\n+ />\n+ </div>\n+ </div>\n+ <h3>Icons</h3>\n+ <div style={{display: 'flex', flexDirection: 'row'}}>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Add Icon\"\n+ type={ICONS.ICON_TYPE_ADD}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Contact Icon\"\n+ type={ICONS.ICON_TYPE_CONTACT}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Delete Icon\"\n+ type={ICONS.ICON_TYPE_DELETE}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"DND Icon\"\n+ type={ICONS.ICON_TYPE_DND}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Document Icon\"\n+ type={ICONS.ICON_TYPE_DOCUMENT}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Exit Icon\"\n+ type={ICONS.ICON_TYPE_EXIT}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"External User Icon\"\n+ type={ICONS.ICON_TYPE_EXTERNAL_USER}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"External User Outline Icon\"\n+ type={ICONS.ICON_TYPE_EXTERNAL_USER_OUTLINE}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Files Icon\"\n+ type={ICONS.ICON_TYPE_FILES}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Flagged Icon\"\n+ type={ICONS.ICON_TYPE_FLAGGED}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Flagged Outline Icon\"\n+ type={ICONS.ICON_TYPE_FLAGGED_OUTLINE}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Invite Icon\"\n+ type={ICONS.ICON_TYPE_INVITE}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Message Icon\"\n+ type={ICONS.ICON_TYPE_MESSAGE}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Message Outline Icon\"\n+ type={ICONS.ICON_TYPE_MESSAGE_OUTLINE}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"More Icon\"\n+ type={ICONS.ICON_TYPE_MORE}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Mute Icon\"\n+ type={ICONS.ICON_TYPE_MUTE_OUTLINE}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Participant List Icon\"\n+ type={ICONS.ICON_TYPE_PARTICIPANT_LIST}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"PTO Icon\"\n+ type={ICONS.ICON_TYPE_PTO}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Right Arrow Icon\"\n+ type={ICONS.ICON_TYPE_RIGHT_ARROW}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Video Cross Outline Icon\"\n+ type={ICONS.ICON_TYPE_VIDEO_CROSS_OUTLINE}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Video Outline Icon\"\n+ type={ICONS.ICON_TYPE_VIDEO_OUTLINE}\n+ />\n+ </div>\n+ <div style={{height: '25px', width: '25px', backgroundColor: 'blueviolet'}}>\n+ <Icon\n+ color=\"white\"\n+ title=\"Waffle Icon\"\n+ type={ICONS.ICON_TYPE_WAFFLE}\n+ />\n+ </div>\n+ </div>\n+ </div>\n+ );\n+}\n+\n+export default BasicComponents;\n",
"new_path": "samples/BasicComponents.js",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "import React from 'react';\n+import BasicComponents from './BasicComponents';\nimport RecentsComponents from './recents-components';\nfunction Main() {\nreturn (\n<div>\n<h1>React Samples</h1>\n+ <h2>Basic Components</h2>\n+ <BasicComponents />\n<h2>Recents Components</h2>\n<RecentsComponents />\n</div>\n",
"new_path": "samples/Main.js",
"old_path": "samples/Main.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
feat(samples): add basic components
| 1
|
feat
|
samples
|
807,849
|
08.05.2018 17:20:14
| 25,200
|
d3a8128c31c8794fa413c26b329f1f2f8a32cf50
|
fix(child-process): Prevent duplicate logs when any package-oriented execution fails
Previously, avoiding duplicate logging required special handling per use-case and only covered non-streaming variants.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -89,9 +89,14 @@ describe(\"ExecCommand\", () => {\nexpect(ChildProcessUtilities.spawn).toHaveBeenCalledTimes(1);\nexpect(ChildProcessUtilities.spawn).lastCalledWith(\"ls\", [], {\ncwd: path.join(testDir, \"packages/package-2\"),\n+ pkg: expect.objectContaining({\n+ name: \"package-2\",\n+ }),\nenv: expect.objectContaining({\nLERNA_PACKAGE_NAME: \"package-2\",\n+ LERNA_ROOT_PATH: testDir,\n}),\n+ extendEnv: false,\nreject: true,\nshell: true,\n});\n@@ -120,9 +125,13 @@ describe(\"ExecCommand\", () => {\nexpect(ChildProcessUtilities.spawn).toHaveBeenCalledTimes(1);\nexpect(ChildProcessUtilities.spawn).lastCalledWith(\"ls\", [], {\ncwd: path.join(testDir, \"packages/package-1\"),\n+ pkg: expect.objectContaining({\n+ name: \"package-1\",\n+ }),\nenv: expect.objectContaining({\nLERNA_PACKAGE_NAME: \"package-1\",\n}),\n+ extendEnv: false,\nreject: true,\nshell: true,\n});\n",
"new_path": "commands/exec/__tests__/exec-command.test.js",
"old_path": "commands/exec/__tests__/exec-command.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -27,20 +27,21 @@ class ExecCommand extends Command {\ninitialize() {\nconst dashedArgs = this.options[\"--\"] || [];\n- const { cmd, args } = this.options;\n- this.command = cmd || dashedArgs.shift();\n- this.args = (args || []).concat(dashedArgs);\n+ this.command = this.options.cmd || dashedArgs.shift();\n+ this.args = (this.options.args || []).concat(dashedArgs);\nif (!this.command) {\nthrow new ValidationError(\"ENOCOMMAND\", \"A command to execute is required\");\n}\n- const { filteredPackages } = this;\n+ // accessing properties of process.env can be expensive,\n+ // so cache it here to reduce churn during tighter loops\n+ this.env = Object.assign({}, process.env);\nthis.batchedPackages = this.toposort\n- ? batchPackages(filteredPackages, this.options.rejectCycles)\n- : [filteredPackages];\n+ ? batchPackages(this.filteredPackages, this.options.rejectCycles)\n+ : [this.filteredPackages];\n}\nexecute() {\n@@ -48,29 +49,24 @@ class ExecCommand extends Command {\nreturn this.runCommandInPackagesParallel();\n}\n- return runParallelBatches(this.batchedPackages, this.concurrency, pkg =>\n- this.runCommandInPackage(pkg).catch(err => {\n- this.logger.error(\"exec\", `'${err.cmd}' errored in '${pkg.name}'`);\n+ const runner = this.options.stream\n+ ? pkg => this.runCommandInPackageStreaming(pkg)\n+ : pkg => this.runCommandInPackageCapturing(pkg);\n- if (err.code) {\n- // log non-lerna error cleanly\n- err.pkg = pkg;\n- }\n-\n- throw err;\n- })\n- );\n+ return runParallelBatches(this.batchedPackages, this.concurrency, runner);\n}\ngetOpts(pkg) {\nreturn {\ncwd: pkg.location,\nshell: true,\n- env: Object.assign({}, process.env, {\n+ extendEnv: false,\n+ env: Object.assign({}, this.env, {\nLERNA_PACKAGE_NAME: pkg.name,\nLERNA_ROOT_PATH: this.project.rootPath,\n}),\nreject: this.options.bail,\n+ pkg,\n};\n}\n@@ -82,20 +78,10 @@ class ExecCommand extends Command {\n[this.command].concat(this.args).join(\" \")\n);\n- return Promise.all(\n- this.filteredPackages.map(pkg =>\n- ChildProcessUtilities.spawnStreaming(\n- this.command,\n- this.args,\n- this.getOpts(pkg),\n- this.options.prefix && pkg.name\n- )\n- )\n- );\n+ return Promise.all(this.filteredPackages.map(pkg => this.runCommandInPackageStreaming(pkg)));\n}\n- runCommandInPackage(pkg) {\n- if (this.options.stream) {\n+ runCommandInPackageStreaming(pkg) {\nreturn ChildProcessUtilities.spawnStreaming(\nthis.command,\nthis.args,\n@@ -104,6 +90,7 @@ class ExecCommand extends Command {\n);\n}\n+ runCommandInPackageCapturing(pkg) {\nreturn ChildProcessUtilities.spawn(this.command, this.args, this.getOpts(pkg));\n}\n}\n",
"new_path": "commands/exec/index.js",
"old_path": "commands/exec/index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -88,7 +88,7 @@ class RunCommand extends Command {\n? pkg => this.runScriptInPackageStreaming(pkg)\n: pkg => this.runScriptInPackageCapturing(pkg);\n- return runParallelBatches(this.batchedPackages, this.concurrency, pkg => runner(pkg));\n+ return runParallelBatches(this.batchedPackages, this.concurrency, runner);\n}\nrunScriptInPackagesParallel() {\n@@ -107,19 +107,8 @@ class RunCommand extends Command {\n}\nrunScriptInPackageCapturing(pkg) {\n- return npmRunScript(this.script, this.getOpts(pkg))\n- .then(result => {\n+ return npmRunScript(this.script, this.getOpts(pkg)).then(result => {\noutput(result.stdout);\n- })\n- .catch(err => {\n- this.logger.error(\"run\", `'${this.script}' errored in '${pkg.name}'`);\n-\n- if (err.code) {\n- // log non-lerna error cleanly\n- err.pkg = pkg;\n- }\n-\n- throw err;\n});\n}\n}\n",
"new_path": "commands/run/index.js",
"old_path": "commands/run/index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -42,6 +42,19 @@ describe(\"ChildProcessUtilities\", () => {\nexpect(one.stdout).toBe(\"one\");\nexpect(two.stdout).toBe(\"two\");\n});\n+\n+ it(\"decorates opts.pkg on error if caught\", async () => {\n+ try {\n+ await ChildProcessUtilities.exec(\n+ \"theVeneratedVirginianVeteranWhoseMenAreAll\",\n+ [\"liningUpToPutMeUpOnAPedestal\"],\n+ { pkg: { name: \"hamilton\" } }\n+ );\n+ } catch (err) {\n+ expect(err.code).toBe(\"ENOENT\");\n+ expect(err.pkg).toEqual({ name: \"hamilton\" });\n+ }\n+ });\n});\ndescribe(\".spawn()\", () => {\n",
"new_path": "core/child-process/__tests__/child-process.test.js",
"old_path": "core/child-process/__tests__/child-process.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -13,8 +13,9 @@ const NUM_COLORS = colorWheel.length;\nfunction exec(command, args, opts) {\nconst options = Object.assign({ stdio: \"pipe\" }, opts);\n+ const spawned = spawnProcess(command, args, options);\n- return _spawn(command, args, options);\n+ return wrapError(spawned);\n}\nfunction execSync(command, args, opts) {\n@@ -22,10 +23,10 @@ function execSync(command, args, opts) {\n}\nfunction spawn(command, args, opts) {\n- const options = Object.assign({}, opts);\n- options.stdio = \"inherit\";\n+ const options = Object.assign({}, opts, { stdio: \"inherit\" });\n+ const spawned = spawnProcess(command, args, options);\n- return _spawn(command, args, options);\n+ return wrapError(spawned);\n}\n// istanbul ignore next\n@@ -35,7 +36,7 @@ function spawnStreaming(command, args, opts, prefix) {\nconst colorName = colorWheel[children % NUM_COLORS];\nconst color = chalk[colorName];\n- const spawned = _spawn(command, args, options);\n+ const spawned = spawnProcess(command, args, options);\nconst stdoutOpts = {};\nconst stderrOpts = {}; // mergeMultiline causes escaped newlines :P\n@@ -54,15 +55,14 @@ function spawnStreaming(command, args, opts, prefix) {\nspawned.stdout.pipe(logTransformer(stdoutOpts)).pipe(process.stdout);\nspawned.stderr.pipe(logTransformer(stderrOpts)).pipe(process.stderr);\n- return spawned;\n+ return wrapError(spawned);\n}\nfunction getChildProcessCount() {\nreturn children;\n}\n-// eslint-disable-next-line no-underscore-dangle\n-function _spawn(command, args, opts) {\n+function spawnProcess(command, args, opts) {\nchildren += 1;\nconst child = execa(command, args, opts);\n@@ -78,9 +78,29 @@ function _spawn(command, args, opts) {\nchild.once(\"exit\", drain);\nchild.once(\"error\", drain);\n+ if (opts.pkg) {\n+ child.pkg = opts.pkg;\n+ }\n+\nreturn child;\n}\n+function wrapError(spawned) {\n+ if (spawned.pkg) {\n+ return spawned.catch(err => {\n+ // istanbul ignore else\n+ if (err.code) {\n+ // log non-lerna error cleanly\n+ err.pkg = spawned.pkg;\n+ }\n+\n+ throw err;\n+ });\n+ }\n+\n+ return spawned;\n+}\n+\nexports.exec = exec;\nexports.execSync = execSync;\nexports.spawn = spawn;\n",
"new_path": "core/child-process/index.js",
"old_path": "core/child-process/index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,7 +15,7 @@ describe(\"lerna run\", () => {\ntry {\nawait cliRunner(cwd)(...args);\n} catch (err) {\n- expect(err.message).toMatch(\"run 'fail' errored in 'package-3'\");\n+ expect(err.message).toMatch(\"npm run fail --silent exited 1 in 'package-3'\");\n}\n});\n",
"new_path": "integration/lerna-run.test.js",
"old_path": "integration/lerna-run.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -7,6 +7,7 @@ module.exports = getExecOpts;\nfunction getExecOpts(pkg, registry) {\nconst opts = {\ncwd: pkg.location,\n+ pkg,\n};\nif (registry) {\n",
"new_path": "utils/get-npm-exec-opts/get-npm-exec-opts.js",
"old_path": "utils/get-npm-exec-opts/get-npm-exec-opts.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -27,6 +27,7 @@ describe(\"dist-tag\", () => {\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"npm\", [\"dist-tag\", \"add\", \"foo-pkg@1.0.0\", tag], {\ncwd: pkg.location,\n+ pkg,\n});\n});\n@@ -39,6 +40,7 @@ describe(\"dist-tag\", () => {\nnpm_config_registry: registry,\n}),\nextendEnv: false,\n+ pkg,\n});\n});\n});\n@@ -56,6 +58,7 @@ describe(\"dist-tag\", () => {\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"npm\", [\"dist-tag\", \"rm\", pkg.name, tag], {\ncwd: pkg.location,\n+ pkg,\n});\n});\n@@ -68,6 +71,7 @@ describe(\"dist-tag\", () => {\nnpm_config_registry: registry,\n}),\nextendEnv: false,\n+ pkg,\n});\n});\n});\n@@ -88,6 +92,7 @@ describe(\"dist-tag\", () => {\nexpect(ChildProcessUtilities.execSync).lastCalledWith(\"npm\", [\"dist-tag\", \"ls\", pkg.name], {\ncwd: pkg.location,\n+ pkg,\n});\n});\n@@ -102,6 +107,7 @@ describe(\"dist-tag\", () => {\nnpm_config_registry: registry,\n}),\nextendEnv: false,\n+ pkg,\n});\n});\n});\n",
"new_path": "utils/npm-dist-tag/__tests__/npm-dist-tag.test.js",
"old_path": "utils/npm-dist-tag/__tests__/npm-dist-tag.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -42,7 +42,7 @@ describe(\"npm-install\", () => {\nexpect(ChildProcessUtilities.exec).lastCalledWith(\n\"yarn\",\n[\"install\", \"--mutex\", \"file:foo\", \"--non-interactive\", \"--no-optional\"],\n- { cwd: pkg.location, stdio: \"pipe\" }\n+ { cwd: pkg.location, pkg, stdio: \"pipe\" }\n);\n});\n@@ -62,6 +62,7 @@ describe(\"npm-install\", () => {\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"npm\", [\"install\"], {\ncwd: pkg.location,\n+ pkg,\nstdio: \"inherit\",\n});\n});\n@@ -87,6 +88,7 @@ describe(\"npm-install\", () => {\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"yarn\", [\"install\", \"--non-interactive\"], {\ncwd: pkg.location,\n+ pkg,\nstdio: \"pipe\",\n});\n}\n@@ -139,6 +141,7 @@ describe(\"npm-install\", () => {\n});\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"npm\", [\"install\"], {\ncwd: pkg.location,\n+ pkg,\nstdio: \"pipe\",\n});\n});\n@@ -182,6 +185,7 @@ describe(\"npm-install\", () => {\nnpm_config_registry: config.registry,\n}),\nextendEnv: false,\n+ pkg,\nstdio: \"pipe\",\n});\n});\n@@ -220,6 +224,7 @@ describe(\"npm-install\", () => {\n});\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"npm\", [\"install\", \"--global-style\"], {\ncwd: pkg.location,\n+ pkg,\nstdio: \"pipe\",\n});\n});\n@@ -254,7 +259,7 @@ describe(\"npm-install\", () => {\nexpect(ChildProcessUtilities.exec).lastCalledWith(\n\"yarn\",\n[\"install\", \"--mutex\", \"network:12345\", \"--non-interactive\"],\n- { cwd: pkg.location, stdio: \"pipe\" }\n+ { cwd: pkg.location, pkg, stdio: \"pipe\" }\n);\n});\n@@ -292,6 +297,7 @@ describe(\"npm-install\", () => {\n});\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"npm\", [\"install\", \"--production\", \"--no-optional\"], {\ncwd: pkg.location,\n+ pkg,\nstdio: \"pipe\",\n});\n});\n@@ -332,6 +338,7 @@ describe(\"npm-install\", () => {\n});\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"npm\", [\"install\", \"--global-style\"], {\ncwd: pkg.location,\n+ pkg,\nstdio: \"pipe\",\n});\n});\n@@ -370,6 +377,7 @@ describe(\"npm-install\", () => {\n});\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"npm\", [\"ci\"], {\ncwd: pkg.location,\n+ pkg,\nstdio: \"pipe\",\n});\n});\n",
"new_path": "utils/npm-install/__tests__/npm-install.test.js",
"old_path": "utils/npm-install/__tests__/npm-install.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -25,6 +25,7 @@ describe(\"npm-publish\", () => {\n[\"publish\", \"--ignore-scripts\", \"--tag\", \"published-tag\"],\n{\ncwd: pkg.location,\n+ pkg,\n}\n);\n});\n@@ -34,6 +35,7 @@ describe(\"npm-publish\", () => {\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"npm\", [\"publish\", \"--ignore-scripts\"], {\ncwd: pkg.location,\n+ pkg,\n});\n});\n@@ -45,6 +47,7 @@ describe(\"npm-publish\", () => {\n[\"publish\", \"--ignore-scripts\", \"--tag\", \"trailing-tag\"],\n{\ncwd: pkg.location,\n+ pkg,\n}\n);\n});\n@@ -63,6 +66,7 @@ describe(\"npm-publish\", () => {\nnpm_config_registry: registry,\n}),\nextendEnv: false,\n+ pkg,\n}\n);\n});\n@@ -84,6 +88,7 @@ describe(\"npm-publish\", () => {\n],\n{\ncwd: pkg.location,\n+ pkg,\n}\n);\n});\n",
"new_path": "utils/npm-publish/__tests__/npm-publish.test.js",
"old_path": "utils/npm-publish/__tests__/npm-publish.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -27,6 +27,7 @@ describe(\"npm-run-script\", () => {\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"npm\", [\"run\", script, \"--bar\", \"baz\"], {\ncwd: config.pkg.location,\n+ pkg: config.pkg,\nreject: true,\n});\n});\n@@ -46,6 +47,7 @@ describe(\"npm-run-script\", () => {\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"npm\", [\"run\", script], {\ncwd: config.pkg.location,\n+ pkg: config.pkg,\nreject: false,\n});\n});\n@@ -64,6 +66,7 @@ describe(\"npm-run-script\", () => {\nexpect(ChildProcessUtilities.exec).lastCalledWith(\"yarn\", [\"run\", script, \"--bar\", \"baz\"], {\ncwd: config.pkg.location,\n+ pkg: config.pkg,\nreject: true,\n});\n});\n@@ -89,6 +92,7 @@ describe(\"npm-run-script\", () => {\n[\"run\", script, \"--bar\", \"baz\"],\n{\ncwd: config.pkg.location,\n+ pkg: config.pkg,\nreject: true,\n},\nconfig.pkg.name\n@@ -114,6 +118,7 @@ describe(\"npm-run-script\", () => {\n[\"run\", script],\n{\ncwd: config.pkg.location,\n+ pkg: config.pkg,\nreject: false,\n},\nundefined\n",
"new_path": "utils/npm-run-script/__tests__/npm-run-script.test.js",
"old_path": "utils/npm-run-script/__tests__/npm-run-script.test.js"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
fix(child-process): Prevent duplicate logs when any package-oriented execution fails
Previously, avoiding duplicate logging required special handling per use-case and only covered non-streaming variants.
| 1
|
fix
|
child-process
|
730,412
|
08.05.2018 18:13:16
| 0
|
76e664d63c0909919ff86b84b2ad5db4eaa875d4
|
chore(release): 0.1.294
|
[
{
"change_type": "MODIFY",
"diff": "All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n+<a name=\"0.1.294\"></a>\n+## [0.1.294](https://github.com/webex/react-ciscospark/compare/v0.1.293...v0.1.294) (2018-05-08)\n+\n+\n+### Features\n+\n+* **space-item:** add active prop ([c64761a](https://github.com/webex/react-ciscospark/commit/c64761a))\n+\n+\n+\n<a name=\"0.1.293\"></a>\n## [0.1.293](https://github.com/webex/react-ciscospark/compare/v0.1.292...v0.1.293) (2018-05-07)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.293\",\n+ \"version\": \"0.1.294\",\n\"description\": \"The Cisco Spark for React library allows developers to easily incorporate Spark functionality into an application.\",\n\"scripts\": {\n\"build\": \"./scripts/build/index.js\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(release): 0.1.294
| 1
|
chore
|
release
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.