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
⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
730,412
|
27.04.2018 17:01:08
| 0
|
c51bede6a262c08ca5213a518e138f11ade49dd9
|
chore(release): 0.1.284
|
[
{
"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.284\"></a>\n+## [0.1.284](https://github.com/webex/react-ciscospark/compare/v0.1.283...v0.1.284) (2018-04-27)\n+\n+\n+\n<a name=\"0.1.283\"></a>\n## [0.1.283](https://github.com/webex/react-ciscospark/compare/v0.1.282...v0.1.283) (2018-04-26)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.283\",\n+ \"version\": \"0.1.284\",\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.284
| 1
|
chore
|
release
|
217,922
|
27.04.2018 18:03:50
| -7,200
|
ea172813156012acc310623a53fe7bfc653e9e67
|
chore(simulator): [WIP] reliability report
|
[
{
"change_type": "MODIFY",
"diff": "@@ -19,6 +19,7 @@ import {FlawlessSynthesis} from './model/actions/progression/flawless-synthesis'\nimport {Observe} from './model/actions/other/observe';\nimport {FocusedSynthesis} from './model/actions/progression/focused-synthesis';\nimport {HastyTouch} from './model/actions/quality/hasty-touch';\n+import {RapidSynthesisII} from './model/actions/progression/rapid-synthesis-ii';\nconst infusionOfMind_Recipe: Craft = {\n'id': '3595',\n@@ -282,5 +283,12 @@ describe('Craft simulator tests', () => {\n// Expect no failure at all\nexpect(results.filter(res => !res).length).toBe(0);\n});\n+\n+ it('should be able to provide proper reliability report', () => {\n+ const simulation = new Simulation(infusionOfMind_Recipe,\n+ [new RapidSynthesisII(), new RapidSynthesisII(), new RapidSynthesisII()], alc_70_350_stats);\n+ const report = simulation.getReliabilityReport();\n+ expect(report.successPercent).toBe(20);\n+ });\n});\n});\n",
"new_path": "src/app/pages/simulator/simulation.spec.ts",
"old_path": "src/app/pages/simulator/simulation.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -11,6 +11,7 @@ export class Simulation {\npublic progression = 0;\npublic quality = 0;\n+ public startingQuality = 0;\n// Solidity of the craft\npublic solidity: number;\n@@ -25,7 +26,7 @@ export class Simulation {\npublic steps: ActionResult[] = [];\n- constructor(public readonly recipe: Craft, private actions: CraftingAction[], private _crafterStats: CrafterStats,\n+ constructor(public readonly recipe: Craft, public readonly actions: CraftingAction[], private _crafterStats: CrafterStats,\nhqIngredients: { id: number, amount: number }[] = []) {\nthis.solidity = recipe.durability;\nthis.availableCP = this._crafterStats.cp;\n@@ -38,13 +39,15 @@ export class Simulation {\nthis.quality += ingredientDetails.quality * ingredient.amount;\n}\n}\n+ this.startingQuality = this.quality;\n}\n- public getReliability(): SimulationReliabilityReport {\n+ public getReliabilityReport(): SimulationReliabilityReport {\nconst results = [];\n// Let's run the simulation 1000 times.\nfor (let i = 0; i < 1000; i++) {\nresults.push(this.run(false));\n+ this.reset();\n}\nreturn {\nsuccessPercent: (results.filter(res => res.success).length / results.length) * 100,\n@@ -53,6 +56,16 @@ export class Simulation {\n}\n}\n+ public reset(): void {\n+ this.progression = 0;\n+ this.quality = this.startingQuality;\n+ this.buffs = [];\n+ this.steps = [];\n+ this.maxCP = this.crafterStats.cp;\n+ this.availableCP = this.maxCP;\n+ this.state = 'NORMAL';\n+ }\n+\n/**\n* Run the simulation.\n* @param {boolean} linear should everything be linear (aka no fail on actions, Initial preparations never procs)\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): [WIP] reliability report
| 1
|
chore
|
simulator
|
217,922
|
27.04.2018 18:18:06
| -7,200
|
a673b73bc57c0bc821e6c8f8840dcd4136065ac3
|
chore(simulator): fixed reliability report
|
[
{
"change_type": "MODIFY",
"diff": "@@ -288,7 +288,8 @@ describe('Craft simulator tests', () => {\nconst simulation = new Simulation(infusionOfMind_Recipe,\n[new RapidSynthesisII(), new RapidSynthesisII(), new RapidSynthesisII()], alc_70_350_stats);\nconst report = simulation.getReliabilityReport();\n- expect(report.successPercent).toBe(20);\n+ expect(report.successPercent).toBeGreaterThan(15);\n+ expect(report.successPercent).toBeLessThan(25);\n});\n});\n});\n",
"new_path": "src/app/pages/simulator/simulation.spec.ts",
"old_path": "src/app/pages/simulator/simulation.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "+import {SimulationResult} from './simulation-result';\n+\nexport interface SimulationReliabilityReport {\n+ rawData: SimulationResult[];\nsuccessPercent: number;\nmedianHQPercent: number;\naverageHQPercent: number;\n",
"new_path": "src/app/pages/simulator/simulation/simulation-reliability-report.ts",
"old_path": "src/app/pages/simulator/simulation/simulation-reliability-report.ts"
},
{
"change_type": "MODIFY",
"diff": "import {ActionResult} from '../model/action-result';\nexport interface SimulationResult {\n+ progressionValue: number;\n+ qualityValue: number;\n+ finalCP: number;\nsteps: ActionResult[];\nhqPercent: number;\nsuccess: boolean;\n",
"new_path": "src/app/pages/simulator/simulation/simulation-result.ts",
"old_path": "src/app/pages/simulator/simulation/simulation-result.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -49,8 +49,10 @@ export class Simulation {\nresults.push(this.run(false));\nthis.reset();\n}\n+ const successPercent = (results.filter(res => res.success).length / results.length) * 100;\nreturn {\n- successPercent: (results.filter(res => res.success).length / results.length) * 100,\n+ rawData: results,\n+ successPercent: successPercent,\naverageHQPercent: 0,\nmedianHQPercent: 0\n}\n@@ -58,6 +60,7 @@ export class Simulation {\npublic reset(): void {\nthis.progression = 0;\n+ this.solidity = this.recipe.durability;\nthis.quality = this.startingQuality;\nthis.buffs = [];\nthis.steps = [];\n@@ -132,6 +135,9 @@ export class Simulation {\nthis.tickBuffs();\n});\nreturn {\n+ progressionValue: this.progression,\n+ qualityValue: this.quality,\n+ finalCP: this.availableCP,\nsteps: this.steps,\nhqPercent: 0, // TODO\nsuccess: this.progression >= this.recipe.progress\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 reliability report
| 1
|
chore
|
simulator
|
791,834
|
27.04.2018 18:51:29
| 25,200
|
5554c3d271646c9689e06952dee2ec7f851e9cc9
|
core(tsc): update for new
|
[
{
"change_type": "MODIFY",
"diff": "const Gatherer = require('./gatherer');\nconst Sentry = require('../../lib/sentry');\n-// TODO(bckenny): manually add 'display' for now.\n-// PR to add full FontFace props in https://github.com/DefinitelyTyped/DefinitelyTyped/pull/25045\n-/** @typedef {Exclude<keyof FontFace, 'load'|'loaded'|'status'> | 'display'} FontFaceStringKeys */\n+// All the property keys of FontFace where the value is a string and are worth\n+// using for finding font matches (see _findSameFontFamily).\n+/** @typedef {'family'|'style'|'weight'|'stretch'|'unicodeRange'|'variant'|'featureSettings'|'display'} FontFaceStringKeys */\n/** @typedef {{err: {message: string, stack: string}}} FontGatherError */\n/** @type {Array<FontFaceStringKeys>} */\n@@ -42,7 +42,6 @@ function getAllLoadedFonts(descriptors) {\nsrc: [],\n};\ndescriptors.forEach(descriptor => {\n- // @ts-ignore TODO(bckenny): see above 'display' TODO\nfontRule[descriptor] = fontFace[descriptor];\n});\n",
"new_path": "lighthouse-core/gather/gatherers/fonts.js",
"old_path": "lighthouse-core/gather/gatherers/fonts.js"
},
{
"change_type": "MODIFY",
"diff": "\"devDependencies\": {\n\"@types/chrome\": \"^0.0.60\",\n\"@types/configstore\": \"^2.1.1\",\n- \"@types/css-font-loading-module\": \"^0.0.1\",\n+ \"@types/css-font-loading-module\": \"^0.0.2\",\n\"@types/inquirer\": \"^0.0.35\",\n\"@types/lodash.isequal\": \"^4.5.2\",\n\"@types/node\": \"*\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "version \"0.9.43\"\nresolved \"https://registry.yarnpkg.com/@types/core-js/-/core-js-0.9.43.tgz#65d646c5e8c0cd1bdee37065799f9d3d48748253\"\n-\"@types/css-font-loading-module@^0.0.1\":\n- version \"0.0.1\"\n- resolved \"https://registry.yarnpkg.com/@types/css-font-loading-module/-/css-font-loading-module-0.0.1.tgz#00f3594bcb15813282b8d5595d9d997db49b2608\"\n+\"@types/css-font-loading-module@^0.0.2\":\n+ version \"0.0.2\"\n+ resolved \"https://registry.yarnpkg.com/@types/css-font-loading-module/-/css-font-loading-module-0.0.2.tgz#09f1f1772975777e37851b7b7a4389d97c210add\"\n\"@types/events@*\":\nversion \"1.2.0\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(tsc): update for new @types/css-font-loading-module (#5061)
| 1
|
core
|
tsc
|
791,723
|
27.04.2018 18:51:57
| 25,200
|
4d8c1f8ec57ec5803f40e6f0524f5ff2061e3faa
|
tests(appeveyor): exclude perf smoketest until flake is fixed.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -38,7 +38,10 @@ test_script:\n- yarn lint\n- yarn unit\n- yarn type-check\n- - yarn smoke\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\ncache:\n#- chrome-win32 -> appveyor.yml,package.json\n",
"new_path": ".appveyor.yml",
"old_path": ".appveyor.yml"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
tests(appeveyor): exclude perf smoketest until flake is fixed. (#5060)
| 1
|
tests
|
appeveyor
|
791,723
|
27.04.2018 18:57:30
| 25,200
|
3ede0eb2f07cfbfdc1f44f0133f64803e68324fc
|
docs: add html report overview writeup
|
[
{
"change_type": "MODIFY",
"diff": "@@ -9,8 +9,9 @@ _Some incomplete notes_\n* **Driver** - Interfaces with [Chrome Debugging Protocol](https://developer.chrome.com/devtools/docs/debugger-protocol) ([API viewer](https://chromedevtools.github.io/debugger-protocol-viewer/))\n* **Gatherers** - Uses Driver to collect information about the page. Minimal post-processing.\n* **Artifacts** - output of a gatherer\n-* **Audit** - Tests for a single feature/optimization/metric. Using the Artifacts as input, an audit evaluates a test and resolves to a numeric score. See [Understanding Results](./understanding-results.md) for details of the results object.\n+* **Audit** - Tests for a single feature/optimization/metric. Using the Artifacts as input, an audit evaluates a test and resolves to a numeric score. See [Understanding Results](./understanding-results.md) for details of the LHR (Lighthouse Result object).\n* **Computed Artifacts** - Generated on-demand from artifacts, these add additional meaning, and are often shared amongst multiple audits.\n+* **Report** - The report UI, created client-side from the LHR. See [HTML Report Generation Overview](./report.md) for details.\n### Audit/Report terminology\n* **Category** - Roll-up collection of audits and audit groups into a user-facing section of the report (eg. `Best Practices`). Applies weighting and overall scoring to the section. Examples: PWA, Accessibility, Best Practices.\n",
"new_path": "docs/architecture.md",
"old_path": "docs/architecture.md"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
docs: add html report overview writeup (#5059)
| 1
|
docs
| null |
791,723
|
27.04.2018 19:06:46
| 25,200
|
e61a34d82f10da9f72e4bb52a02aca95ff8fb51a
|
docs(report): minor fix of markdown link
|
[
{
"change_type": "MODIFY",
"diff": "@@ -10,7 +10,7 @@ Example standalone HTML report, delivered by the CLI: [`dbwtest-3.0.0-alpha.html\n- It runs natively in Node.js but can run in the browser after a compile step is applied during our bundling pipeline. That compile step uses a browserify transform that takes any `fs.readFileSync()` calls and replaces them with the stringified file content.\n1. [`lighthouse-core/report/html/`](https://github.com/GoogleChrome/lighthouse/tree/master/lighthouse-core/report/html) has everything required to create the HTML report.\n1. [`lighthouse-core/report/html/renderer`](https://github.com/GoogleChrome/lighthouse/tree/master/lighthouse-core/report/html/renderer) are all client-side JS files. They transform an LHR object into a report DOM tree. They are all executed within the browser.\n-1. [`lighthouse-core/report/html/report-template.html`] is where the client-side build of the DOM report is typically kicked off ([with these four lines](https://github.com/GoogleChrome/lighthouse/blob/63c999789dc08b9a3b56b22f25f478f13050da29/lighthouse-core/report/html/report-template.html#L27-L31)) However, see _Current Uses.._ below for more possibilities.\n+1. [`lighthouse-core/report/html/report-template.html`](https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/report/html/report-template.html) is where the client-side build of the DOM report is typically kicked off ([with these four lines](https://github.com/GoogleChrome/lighthouse/blob/63c999789dc08b9a3b56b22f25f478f13050da29/lighthouse-core/report/html/report-template.html#L27-L31)) However, see _Current Uses.._ below for more possibilities.\n### Data Hydration\n",
"new_path": "docs/report.md",
"old_path": "docs/report.md"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
docs(report): minor fix of markdown link (#5063)
| 1
|
docs
|
report
|
217,922
|
27.04.2018 19:15:28
| -7,200
|
4ada0a3f42f3dad00bd07e7136d49bdc4f8dfb4b
|
chore(simulator): more reliability data
|
[
{
"change_type": "MODIFY",
"diff": "@@ -290,6 +290,8 @@ describe('Craft simulator tests', () => {\nconst report = simulation.getReliabilityReport();\nexpect(report.successPercent).toBeGreaterThan(15);\nexpect(report.successPercent).toBeLessThan(25);\n+ expect(report.averageHQPercent).toBe(1);\n+ expect(report.medianHQPercent).toBe(1);\n});\n});\n});\n",
"new_path": "src/app/pages/simulator/simulation.spec.ts",
"old_path": "src/app/pages/simulator/simulation.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -43,21 +43,43 @@ export class Simulation {\n}\npublic getReliabilityReport(): SimulationReliabilityReport {\n- const results = [];\n+ const results: SimulationResult[] = [];\n// Let's run the simulation 1000 times.\nfor (let i = 0; i < 1000; i++) {\nresults.push(this.run(false));\nthis.reset();\n}\nconst successPercent = (results.filter(res => res.success).length / results.length) * 100;\n+ const hqPercent = results.reduce((p, c) => p + c.hqPercent, 0) / results.length;\n+ let hqMedian = 0;\n+ results.map(res => res.hqPercent).sort((a, b) => a - b);\n+ if (results.length % 2) {\n+ hqMedian = results[results.length / 2].hqPercent;\n+ } else {\n+ hqMedian = (results[Math.floor(results.length / 2)].hqPercent + results[Math.ceil(results.length / 2)].hqPercent) / 2;\n+ }\nreturn {\nrawData: results,\nsuccessPercent: successPercent,\n- averageHQPercent: 0,\n- medianHQPercent: 0\n+ averageHQPercent: hqPercent,\n+ medianHQPercent: hqMedian\n}\n}\n+ private medianHQ(values) {\n+\n+ values.sort(function (a, b) {\n+ return a - b;\n+ });\n+\n+ var half = Math.floor(values.length / 2);\n+\n+ if (values.length % 2)\n+ return values[half];\n+ else\n+ return (values[half - 1] + values[half]) / 2.0;\n+ }\n+\npublic reset(): void {\nthis.progression = 0;\nthis.solidity = this.recipe.durability;\n@@ -134,12 +156,21 @@ export class Simulation {\n// Tick buffs after checking synth result, so if we reach 0 solidity, synth fails.\nthis.tickBuffs();\n});\n+ // HQ percent to quality percent formulae: https://github.com/Ermad/ffxiv-craft-opt-web/blob/master/app/js/ffxivcraftmodel.js#L1455\n+ const qualityPercent = Math.min(this.quality / this.recipe.quality, 100);\n+ let hqPercent = -5.6604E-6 * Math.pow(qualityPercent, 4)\n+ + 0.0015369705 * Math.pow(qualityPercent, 3)\n+ - 0.1426469573 * Math.pow(qualityPercent, 2)\n+ + 5.6122722959 * qualityPercent - 5.5950384565;\n+ if (hqPercent < 1) {\n+ hqPercent = 1;\n+ }\nreturn {\nprogressionValue: this.progression,\nqualityValue: this.quality,\nfinalCP: this.availableCP,\nsteps: this.steps,\n- hqPercent: 0, // TODO\n+ hqPercent: hqPercent,\nsuccess: this.progression >= this.recipe.progress\n};\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
|
chore(simulator): more reliability data
| 1
|
chore
|
simulator
|
730,412
|
27.04.2018 19:26:03
| 0
|
e823281b324c3dd26e58a05d5f86eaa664ede21c
|
chore(release): 0.1.285
|
[
{
"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.285\"></a>\n+## [0.1.285](https://github.com/webex/react-ciscospark/compare/v0.1.284...v0.1.285) (2018-04-27)\n+\n+\n+\n<a name=\"0.1.284\"></a>\n## [0.1.284](https://github.com/webex/react-ciscospark/compare/v0.1.283...v0.1.284) (2018-04-27)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.284\",\n+ \"version\": \"0.1.285\",\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.285
| 1
|
chore
|
release
|
679,913
|
28.04.2018 00:13:48
| -3,600
|
f4a095a5cd364c69410a8671b7fbdcfcf180e1ce
|
feat(interceptors): add dispatchLater()
|
[
{
"change_type": "MODIFY",
"diff": "@@ -48,6 +48,7 @@ export interface IDispatch {\nreadonly state: ReadonlyAtom<any>;\ndispatch(event: Event);\ndispatchNow(event: Event);\n+ dispatchLater(event: Event, delay?: number);\n}\nexport interface Interceptor {\n",
"new_path": "packages/interceptors/src/api.ts",
"old_path": "packages/interceptors/src/api.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -324,6 +324,17 @@ export class StatelessEventBus implements\n(this.currQueue || this.eventQueue).push(e);\n}\n+ /**\n+ * Dispatches given event after `delay` milliseconds\n+ * (by default 17).\n+ *\n+ * @param e\n+ * @param delay\n+ */\n+ dispatchLater(e: api.Event, delay = 17) {\n+ setTimeout(() => this.dispatch(e), delay);\n+ }\n+\n/**\n* Triggers processing of current event queue and returns `true` if\n* any events have been processed.\n",
"new_path": "packages/interceptors/src/event-bus.ts",
"old_path": "packages/interceptors/src/event-bus.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(interceptors): add dispatchLater()
| 1
|
feat
|
interceptors
|
679,913
|
28.04.2018 01:41:18
| -3,600
|
1c469afa56dbb4ab11e0db7c559dbcb4eb875763
|
minor(examples): update rstream-grid sidebar
|
[
{
"change_type": "MODIFY",
"diff": "@@ -8,7 +8,7 @@ import { slider, SliderOpts } from \"./slider\";\nexport const sidebar = (ctx: AppContext, ...specs: SliderOpts[]) => {\nconst sliders = specs.map((s) => slider(ctx, s));\nreturn [\"div\", ctx.ui.sidebar.root,\n- [\"h2\", ctx.ui.sidebar.title, \"SVG Grid\"],\n+ [\"h3\", ctx.ui.sidebar.title, \"@thi.ng/rstream grid\"],\n...sliders,\n[buttonGroup,\n[[ev.UNDO], \"undo\"],\n@@ -17,8 +17,12 @@ export const sidebar = (ctx: AppContext, ...specs: SliderOpts[]) => {\n[[ev.SAVE_SVG], \"download svg\"]],\n[buttonGroup,\n[[ev.SAVE_ANIM], \"download anim\"]],\n+ [\"div\",\n+ \"Undo / Redo can also be triggered via \",\n+ [\"code\", \"Ctrl+Z\"], \" / \", [\"code\", \"Ctrl+Y\"],\n+ \". The last 1000 edits are stored.\"],\n[\"div\", ctx.ui.footer,\n- [link, \"https://github.com/thi-ng/umbrella/tree/master/examples/rs-undo\", \"Source\"],\n+ [link, \"https://github.com/thi-ng/umbrella/tree/master/examples/rstream-grid\", \"Source\"],\n[\"br\"],\n\"Made with \",\n[link, \"https://github.com/thi-ng/umbrella/\", \"@thi.ng/umbrella\"]]\n",
"new_path": "examples/rstream-grid/src/components/sidebar.ts",
"old_path": "examples/rstream-grid/src/components/sidebar.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -109,7 +109,7 @@ export const CONFIG: AppConfig = {\nlink: { class: \"pointer link dim white b\" },\nroot: { class: \"vw-100 vh-100 flex\" },\nsidebar: {\n- root: { class: \"bg-near-black pa2 pt3 w5 f7\" },\n+ root: { class: `bg-near-black pa2 pt3 w5 f7 ${FG_COL}` },\ntitle: { class: `mt0 ${FG_COL}` },\n},\nslider: {\n",
"new_path": "examples/rstream-grid/src/config.ts",
"old_path": "examples/rstream-grid/src/config.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
minor(examples): update rstream-grid sidebar
| 1
|
minor
|
examples
|
679,913
|
28.04.2018 13:31:54
| -3,600
|
2aaa134a77b1ae6ab0b29cd3b744a22cef502fd5
|
refactor(examples): minor update rstream-grid, add missing files
|
[
{
"change_type": "ADD",
"diff": "+<!DOCTYPE html>\n+<html lang=\"en\">\n+\n+<head>\n+ <meta charset=\"UTF-8\">\n+ <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n+ <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n+ <title>svg-grid</title>\n+ <link href=\"https://unpkg.com/tachyons@4.9.1/css/tachyons.min.css\" rel=\"stylesheet\">\n+ <!-- <link href=\"tachyons.min.css\" rel=\"stylesheet\"> -->\n+ <style>\n+ * {\n+ user-select: none;\n+ }\n+\n+ *::selection {\n+ background: none;\n+ }\n+\n+ input[type=range] {\n+ -webkit-appearance: none;\n+ width: 100%;\n+ margin: -3px 0;\n+ background: #111;\n+ }\n+\n+ input[type=range]:focus {\n+ outline: none;\n+ }\n+\n+ input[type=range]::-webkit-slider-runnable-track {\n+ width: 100%;\n+ height: 14px;\n+ cursor: pointer;\n+ box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;\n+ background: #000;\n+ border-radius: 25px;\n+ border: 0px solid rgba(0, 0, 0, 0);\n+ }\n+\n+ input[type=range]::-webkit-slider-thumb {\n+ box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;\n+ border: 0px solid #111111;\n+ height: 8px;\n+ width: 16px;\n+ border-radius: 8px;\n+ background: #ffffff;\n+ cursor: pointer;\n+ -webkit-appearance: none;\n+ margin-top: 3px;\n+ }\n+\n+ input[type=range]:focus::-webkit-slider-runnable-track {\n+ background: #1f1f1f;\n+ }\n+\n+ input[type=range]::-moz-range-track {\n+ width: 100%;\n+ height: 14px;\n+ cursor: pointer;\n+ box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;\n+ background: #000;\n+ border-radius: 25px;\n+ border: 0px solid rgba(0, 0, 0, 0);\n+ }\n+\n+ input[type=range]::-moz-range-thumb {\n+ box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;\n+ border: 0px solid #111111;\n+ height: 8px;\n+ width: 16px;\n+ border-radius: 8px;\n+ background: #ffffff;\n+ cursor: pointer;\n+ }\n+\n+ input[type=range]::-ms-track {\n+ width: 100%;\n+ height: 14px;\n+ cursor: pointer;\n+ background: transparent;\n+ border-color: transparent;\n+ color: transparent;\n+ }\n+\n+ input[type=range]::-ms-fill-lower {\n+ background: #000000;\n+ border: 0px solid rgba(0, 0, 0, 0);\n+ border-radius: 50px;\n+ box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;\n+ }\n+\n+ input[type=range]::-ms-fill-upper {\n+ background: #000;\n+ border: 0px solid rgba(0, 0, 0, 0);\n+ border-radius: 50px;\n+ box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;\n+ }\n+\n+ input[type=range]::-ms-thumb {\n+ box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;\n+ border: 0px solid #111111;\n+ width: 16px;\n+ border-radius: 8px;\n+ background: #ffffff;\n+ cursor: pointer;\n+ height: 8px;\n+ }\n+\n+ input[type=range]:focus::-ms-fill-lower {\n+ background: #000;\n+ }\n+\n+ input[type=range]:focus::-ms-fill-upper {\n+ background: #1f1f1f;\n+ }\n+ </style>\n+</head>\n+\n+<body class=\"ma0 pa0 lh-copy sans-serif bg-black white\">\n+ <div id=\"app\"></div>\n+ <script type=\"text/javascript\" src=\"bundle.js\"></script>\n+</body>\n+\n+</html>\n\\ No newline at end of file\n",
"new_path": "examples/rstream-grid/index.html",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -53,7 +53,7 @@ export interface UIAttribs {\nfooter: any;\nlink: any;\nroot: any;\n- slider: { root: any, range: any, number: any };\n+ slider: { root: any, range: any, label: any, number: any };\nsidebar: any;\n}\n",
"new_path": "examples/rstream-grid/src/api.ts",
"old_path": "examples/rstream-grid/src/api.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -40,7 +40,7 @@ export const slider = (ctx: AppContext, opts: SliderOpts) => {\ntype: \"range\",\nvalue: ctx.views[opts.view].deref(),\n}],\n- [\"div\", opts.label,\n+ [\"div\", ui.label, opts.label,\n[\"input\", {\n...ui.number,\n...opts,\n",
"new_path": "examples/rstream-grid/src/components/slider.ts",
"old_path": "examples/rstream-grid/src/components/slider.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -13,6 +13,7 @@ import * as paths from \"./paths\";\nimport { SLIDERS } from \"./sliders\";\nconst FG_COL = \"light-silver\";\n+const LINK_COL = \"white\";\n// main App configuration\nexport const CONFIG: AppConfig = {\n@@ -28,19 +29,19 @@ export const CONFIG: AppConfig = {\n// Docs here:\n// https://github.com/thi-ng/umbrella/blob/master/packages/interceptors/src/event-bus.ts#L14\nevents: {\n+ // generate slider event handlers. each uses the `snapshot()`\n+ // interceptor to record a snapshot of the current app state\n+ // before applying new slider value\n...SLIDERS.reduce(\n- (events, spec) => {\n- events[spec.event] = [\n+ (events, spec) =>\n+ (events[spec.event] = [\nsnapshot(),\nvalueSetter(spec.path)\n- ];\n- return events;\n- }, {}),\n+ ], events),\n+ {}),\n[ev.UPDATE_SVG]: [valueSetter(paths.SVG)],\n[ev.SAVE_SVG]: (state) => ({ [fx.SAVE_SVG]: getIn(state, paths.SVG) }),\n- [ev.SAVE_ANIM]: () => ({\n- [fx.SAVE_ANIM]: true\n- })\n+ [ev.SAVE_ANIM]: () => ({ [fx.SAVE_ANIM]: true })\n},\n// custom side effects\n@@ -50,24 +51,19 @@ export const CONFIG: AppConfig = {\n// finally triggers download to local disk\n[fx.SAVE_SVG]: (src) => {\nsrc = src.slice();\n- src[1] = {\n- ...src[1],\n- width: 1000,\n- height: 1000,\n- };\n+ src[1] = { ...src[1], width: 1000, height: 1000 };\ndownload(`grid-${Date.now()}.svg`, serialize(src));\n},\n- // triggers download of 18 svg files, each with a different rotation\n- // in the 0-90 degrees interval\n- [fx.SAVE_ANIM]: (_, bus) => {\n+ // triggers download of 18 svg files (each delayed by 1sec),\n+ // each with a different rotation in the 0-90 degrees interval\n+ [fx.SAVE_ANIM]: (_, bus) =>\nfromIterable(range(0, 90, 5), 1000)\n.subscribe({\nnext: (x) => {\nbus.dispatch([ev.SET_THETA, x]);\nbus.dispatchLater([ev.SAVE_SVG]);\n}\n- });\n- }\n+ })\n},\nrootComponent: main,\n@@ -103,10 +99,10 @@ export const CONFIG: AppConfig = {\n// these attribs are being passed to all component functions\n// as part of the AppContext object\nui: {\n- button: { class: `pointer bg-${FG_COL} hover-bg-white bg-animate black pa2 mr1 w-100 ttu b tracked-tight` },\n+ button: { class: `pointer bg-${FG_COL} hover-bg-${LINK_COL} bg-animate black pa2 mr1 w-100 ttu b tracked-tight` },\nbuttongroup: { class: \"flex mb1\" },\nfooter: { class: \"absolute bottom-1\" },\n- link: { class: \"pointer link dim white b\" },\n+ link: { class: `pointer link dim ${LINK_COL} b` },\nroot: { class: \"vw-100 vh-100 flex\" },\nsidebar: {\nroot: { class: `bg-near-black pa2 pt3 w5 f7 ${FG_COL}` },\n@@ -115,6 +111,7 @@ export const CONFIG: AppConfig = {\nslider: {\nroot: { class: `mb3 ttu b tracked-tight ${FG_COL}` },\nrange: { class: \"w-100\" },\n+ label: { class: \"pl2\" },\nnumber: { class: `fr w3 tr ttu bn bg-transparent ${FG_COL}` },\n},\n}\n",
"new_path": "examples/rstream-grid/src/config.ts",
"old_path": "examples/rstream-grid/src/config.ts"
},
{
"change_type": "MODIFY",
"diff": "/**\n* Helper function to trigger download of given `src` string as local\n* file with filename `name` and mime `type`. Wraps `src` as blob and\n- * creates an object URL for download. The URL auto-expires after 10\n- * seconds to free up memory.\n+ * creates an object URL for download. By default, the URL auto-expires\n+ * after 10 seconds to free up memory.\n*\n* @param name\n* @param src\n* @param type\n+ * @param expire\n*/\n-export function download(name: string, src: string, type = \"image/svg\") {\n+export function download(name: string, src: string, type = \"image/svg\", expire = 10000) {\nconst blob = new Blob([src], { type });\nconst uri = URL.createObjectURL(blob);\nconst a = document.createElement(\"a\");\n@@ -18,8 +19,6 @@ export function download(name: string, src: string, type = \"image/svg\") {\na.click();\ndocument.body.removeChild(a);\nif (uri.indexOf(\"blob:\") === 0) {\n- setTimeout(() => {\n- URL.revokeObjectURL(uri);\n- }, 10000);\n+ setTimeout(() => URL.revokeObjectURL(uri), expire);\n}\n}\n",
"new_path": "examples/rstream-grid/src/download.ts",
"old_path": "examples/rstream-grid/src/download.ts"
},
{
"change_type": "ADD",
"diff": "+module.exports = {\n+ entry: \"./src/index.ts\",\n+ output: {\n+ path: __dirname,\n+ filename: \"bundle.js\"\n+ },\n+ resolve: {\n+ extensions: [\".ts\", \".js\"]\n+ },\n+ module: {\n+ rules: [\n+ { test: /\\.ts$/, use: \"ts-loader\" }\n+ ]\n+ },\n+ devServer: {\n+ contentBase: \".\"\n+ }\n+};\n",
"new_path": "examples/rstream-grid/webpack.config.js",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(examples): minor update rstream-grid, add missing files
| 1
|
refactor
|
examples
|
679,913
|
28.04.2018 21:49:14
| -3,600
|
c4d8851d3c2bb0d83d1045a945925d79e9660b58
|
fix(interceptors): multiple sidefx value assignment
|
[
{
"change_type": "MODIFY",
"diff": "@@ -500,7 +500,7 @@ export class StatelessEventBus implements\nthis.dispatchNow(v);\n}\n} else {\n- if (ctx[k]) {\n+ ctx[k] || (ctx[k] = []);\nif (isArray(v[0])) {\nfor (let e of v) {\ne !== undefined && ctx[k].push(e);\n@@ -508,9 +508,6 @@ export class StatelessEventBus implements\n} else {\nctx[k].push(v)\n}\n- } else {\n- ctx[k] = [v];\n- }\n}\n}\n}\n",
"new_path": "packages/interceptors/src/event-bus.ts",
"old_path": "packages/interceptors/src/event-bus.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
fix(interceptors): multiple sidefx value assignment
| 1
|
fix
|
interceptors
|
217,922
|
28.04.2018 22:18:06
| -7,200
|
2447c7a15077430e50d8dae1a1f41b70a4832cd5
|
chore(simulator): fix for aot build
|
[
{
"change_type": "MODIFY",
"diff": "@@ -61,7 +61,7 @@ export class SimulatorComponent implements OnInit {\nthis.hqIngredients$.next(ingredients);\n}\n- private simulation$: Observable<Simulation>;\n+ public simulation$: Observable<Simulation>;\npublic result$: Observable<SimulationResult>;\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): fix for aot build
| 1
|
chore
|
simulator
|
679,913
|
29.04.2018 13:45:02
| -3,600
|
ac60404e2f2c20e1de274115e09f353459f099ac
|
fix(checks): exclude functions in isArrayLike()
|
[
{
"change_type": "MODIFY",
"diff": "export function isArrayLike(x: any): x is ArrayLike<any> {\n- return Array.isArray(x) || (x != null && x.length !== undefined);\n+ return (x != null && typeof x !== \"function\" && x.length !== undefined);\n}\n",
"new_path": "packages/checks/src/is-arraylike.ts",
"old_path": "packages/checks/src/is-arraylike.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -62,6 +62,7 @@ describe(\"checks\", function () {\nassert(!isArrayLike(0), \"zero\");\nassert(!isArrayLike(null), \"null\");\nassert(!isArrayLike(undefined), \"null\");\n+ assert(!isArrayLike((x, y) => x + y), \"null\");\n});\nit(\"isObject\", () => {\n",
"new_path": "packages/checks/test/index.ts",
"old_path": "packages/checks/test/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
fix(checks): exclude functions in isArrayLike()
| 1
|
fix
|
checks
|
217,922
|
29.04.2018 13:47:06
| -7,200
|
fe9ecf9044ea75853e865025c54beb8d03bb8e5c
|
chore(simulator): added more byregots actions, fixed miracle
|
[
{
"change_type": "MODIFY",
"diff": "@@ -29,12 +29,14 @@ export abstract class BuffAction extends CraftingAction {\nprotected abstract getTick(): (simulation: Simulation) => void;\nexecute(simulation: Simulation): void {\n+ if (simulation.hasBuff(this.getBuff())) {\n+ simulation.removeBuff(this.getBuff());\n+ }\nsimulation.buffs.push(this.getAppliedBuff(simulation));\n}\ncanBeUsed(simulationState: Simulation): boolean {\n- // You can't use a buff twice\n- return !simulationState.hasBuff(this.getBuff());\n+ return true;\n}\ngetDurabilityCost(simulationState: Simulation): number {\n",
"new_path": "src/app/pages/simulator/model/actions/buff-action.ts",
"old_path": "src/app/pages/simulator/model/actions/buff-action.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -8,6 +8,11 @@ export class InnerQuiet extends BuffAction {\nreturn Buff.INNER_QUIET;\n}\n+ canBeUsed(simulationState: Simulation): boolean {\n+ // You can't use IQ if it's already there\n+ return super.canBeUsed(simulationState) && !simulationState.hasBuff(this.getBuff());\n+ }\n+\ngetBaseCPCost(simulationState: Simulation): number {\nreturn 18;\n}\n",
"new_path": "src/app/pages/simulator/model/actions/buff/inner-quiet.ts",
"old_path": "src/app/pages/simulator/model/actions/buff/inner-quiet.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -16,4 +16,8 @@ export class ByregotsBrow extends ByregotsBlessing {\ngetPotency(simulation: Simulation): number {\nreturn 150 + simulation.getBuff(Buff.INNER_QUIET).stacks * 10;\n}\n+\n+ getIds(): number[] {\n+ return [100120, 100121, 100122, 100123, 100124, 100125, 100126, 100127];\n+ }\n}\n",
"new_path": "src/app/pages/simulator/model/actions/quality/byregots-brow.ts",
"old_path": "src/app/pages/simulator/model/actions/quality/byregots-brow.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -9,8 +9,14 @@ export class ByregotsMiracle extends QualityAction {\n}\nexecute(simulation: Simulation): void {\n- super.execute(simulation);\n+ // Divides stacks by 2, but adds one because it increased progression (done by QualityAction implementation)\nsimulation.getBuff(Buff.INNER_QUIET).stacks = Math.floor(simulation.getBuff(Buff.INNER_QUIET).stacks / 2);\n+ super.execute(simulation);\n+ }\n+\n+ onFail(simulation: Simulation): void {\n+ // Stacks are still reduces upon failing.\n+ simulation.getBuff(Buff.INNER_QUIET).stacks = Math.floor(simulation.getBuff(Buff.INNER_QUIET).stacks / 2)\n}\ngetBaseCPCost(simulationState: Simulation): number {\n",
"new_path": "src/app/pages/simulator/model/actions/quality/byregots-miracle.ts",
"old_path": "src/app/pages/simulator/model/actions/quality/byregots-miracle.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -43,6 +43,8 @@ import {SpecialtyReinforce} from './actions/other/specialty-reinforce';\nimport {SpecialtyReflect} from './actions/other/specialty-reflect';\nimport {Observe} from './actions/other/observe';\nimport {Injectable} from '@angular/core';\n+import {ByregotsMiracle} from './actions/quality/byregots-miracle';\n+import {ByregotsBrow} from './actions/quality/byregots-brow';\n@Injectable()\nexport class CraftingActionsRegistry {\n@@ -68,7 +70,8 @@ export class CraftingActionsRegistry {\nnew HastyTouch(),\nnew HastyTouchII(),\nnew ByregotsBlessing(),\n- // TODO Byregot's brow\n+ new ByregotsBrow(),\n+ new ByregotsMiracle(),\nnew PreciseTouch(),\nnew FocusedTouch(),\nnew PatientTouch(),\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): added more byregots actions, fixed miracle
| 1
|
chore
|
simulator
|
679,913
|
29.04.2018 14:28:22
| -3,600
|
7fdf17218e869eafc23fa698efb9ba09444dea05
|
perf(api): major speedup equivObject(), update equivSet()
equivSet() now only checks keys
add equivMap() to check full entries/pairs
|
[
{
"change_type": "MODIFY",
"diff": "@@ -32,8 +32,11 @@ export function equiv(a, b): boolean {\nif (isArrayLike(a) && isArrayLike(b)) {\nreturn equivArrayLike(a, b);\n}\n- if ((isSet(a) && isSet(b)) || (isMap(a) && isMap(b))) {\n- return equivSetLike(a, b);\n+ if (isSet(a) && isSet(b)) {\n+ return equivSet(a, b);\n+ }\n+ if (isMap(a) && isMap(b)) {\n+ return equivMap(a, b);\n}\nif (isDate(a) && isDate(b)) {\nreturn a.getTime() === b.getTime();\n@@ -53,22 +56,24 @@ function equivArrayLike(a: ArrayLike<any>, b: ArrayLike<any>) {\nreturn l < 0;\n}\n-function equivSetLike(a: Set<any>, b: Set<any>) {\n+function equivSet(a: Set<any>, b: Set<any>) {\n+ if (a.size !== b.size) return false;\n+ return equiv([...a.keys()].sort(), [...b.keys()].sort());\n+}\n+\n+function equivMap(a: Map<any, any>, b: Map<any, any>) {\nif (a.size !== b.size) return false;\nreturn equiv([...a].sort(), [...b].sort());\n}\nfunction equivObject(a, b) {\n- const keys = new Set(Object.keys(a).concat(Object.keys(b)));\n- for (let k of keys) {\n- if (a.hasOwnProperty(k)) {\n- if (b.hasOwnProperty(k)) {\n- if (equiv(a[k], b[k])) {\n- continue;\n- }\n- }\n- }\n+ const ka = Object.keys(a);\n+ if (ka.length !== Object.keys(b).length) return false;\n+ for (let i = ka.length, k; --i >= 0;) {\n+ k = ka[i];\n+ if (!b.hasOwnProperty(k) || !equiv(a[k], b[k])) {\nreturn false;\n}\n+ }\nreturn true;\n}\n",
"new_path": "packages/api/src/equiv.ts",
"old_path": "packages/api/src/equiv.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
perf(api): major speedup equivObject(), update equivSet()
- equivSet() now only checks keys
- add equivMap() to check full entries/pairs
| 1
|
perf
|
api
|
679,913
|
29.04.2018 14:32:09
| -3,600
|
b86d5b25b6a5f8c62dca4005f2c66958cc13470b
|
refactor(examples): update hdom-basics
|
[
{
"change_type": "MODIFY",
"diff": "@@ -5,16 +5,13 @@ import { start } from \"@thi.ng/hdom\";\n// (not used here, see `hdom-context-basics` example for details)\nconst greeter = (_, name) => [\"h1.title\", \"hello \", name];\n-// component w/ local state\n+// counter component w/ local state\nconst counter = (i = 0) => {\n- return () => [\"button\", { onclick: () => (i++) }, `clicks: ${i}`];\n+ const attribs = { onclick: () => (i++) };\n+ return () => [\"button\", attribs, `clicks: ${i}`];\n};\n-const app = () => {\n- // initialization steps\n- // ...\n- // root component is just a static array\n- return [\"div#app\", [greeter, \"world\"], counter(), counter(100)];\n-};\n+// root component is a simple array\n+const app = [\"div#app\", [greeter, \"world\"], counter(), counter(100)];\n-start(document.body, app());\n+start(document.body, app);\n",
"new_path": "examples/hdom-basics/src/index.ts",
"old_path": "examples/hdom-basics/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(examples): update hdom-basics
| 1
|
refactor
|
examples
|
217,922
|
29.04.2018 16:33:39
| -7,200
|
57ee9909bb760d5efae18a3e2815edeef98e8d38
|
chore(simulator): fixed a bug with level difference and blessings
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,6 +15,7 @@ namespace Extractor\nconst string GameDirectory = @\"F:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\";\nARealmReversed realm = new ARealmReversed(GameDirectory, \"SaintCoinach.History.zip\", SaintCoinach.Ex.Language.English, \"app_data.sqlite\");\nLocalize localize = new Localize(realm);\n+ /*\nExtractItemNames(localize, realm);\nExtractNames(localize, realm.GameData.GetSheet<ENpcResident>(), \"Singular\", \"npcs\");\nExtractNames(localize, realm.GameData.GetSheet<PlaceName>(), \"Name\", \"places\");\n@@ -28,6 +29,13 @@ namespace Extractor\nExtractActionIcons(realm.GameData);\nExtractNames(localize, realm.GameData.GetSheet<ClassJob>(), \"Abbreviation\", \"job-abbr\");\nExtractNames(localize, realm.GameData.GetSheet<ClassJob>(), \"Name\", \"job-name\");\n+ */\n+ ExtractCraftFoods(realm.GameData);\n+ }\n+\n+ static void ExtractCraftFoods(XivCollection gameData)\n+ {\n+\n}\nstatic void ExtractActionIcons(XivCollection gameData)\n",
"new_path": "data-extraction/SaintCoinach/XIVExtractor/Extractor/Program.cs",
"old_path": "data-extraction/SaintCoinach/XIVExtractor/Extractor/Program.cs"
},
{
"change_type": "MODIFY",
"diff": "@@ -26,7 +26,7 @@ export class InnerQuiet extends BuffAction {\n}\nprotected getInitialStacks(): number {\n- return 1;\n+ return 0;\n}\nprotected getTick(): (simulation: Simulation) => void {\n",
"new_path": "src/app/pages/simulator/model/actions/buff/inner-quiet.ts",
"old_path": "src/app/pages/simulator/model/actions/buff/inner-quiet.ts"
},
{
"change_type": "MODIFY",
"diff": "import {CraftingAction} from './crafting-action';\nimport {Simulation} from '../../simulation/simulation';\nimport {Buff} from '../buff.enum';\n+import {Tables} from '../tables';\n+import {CrafterStats} from '../crafter-stats';\n/**\n* This is for every progress and quality actions\n*/\nexport abstract class GeneralAction extends CraftingAction {\n+ protected getLevelDifference(simulation: Simulation): number {\n+ let recipeLevel = simulation.recipe.rlvl;\n+ const stats: CrafterStats = simulation.crafterStats;\n+ const crafterLevel = Tables.LEVEL_TABLE[stats.level] || stats.level;\n+ let levelDifference = crafterLevel - recipeLevel;\n+ // If ingenuity 2\n+ if (simulation.hasBuff(Buff.INGENUITY_II)) {\n+ recipeLevel = Tables.INGENUITY_II_RLVL_TABLE[simulation.recipe.rlvl] || simulation.recipe.rlvl - 7;\n+ levelDifference = crafterLevel - recipeLevel;\n+ if (levelDifference < 0) {\n+ levelDifference = Math.max(levelDifference, -5);\n+ }\n+ }\n+ // If ingenuity\n+ if (simulation.hasBuff(Buff.INGENUITY)) {\n+ recipeLevel = Tables.INGENUITY_RLVL_TABLE[simulation.recipe.rlvl] || simulation.recipe.rlvl - 5;\n+ levelDifference = crafterLevel - recipeLevel;\n+ if (levelDifference < 0) {\n+ levelDifference = Math.max(levelDifference, -6);\n+ }\n+ }\n+ return levelDifference;\n+ }\n+\ngetDurabilityCost(simulationState: Simulation): number {\nconst baseCost = this.getBaseDurabilityCost(simulationState);\nif (simulationState.hasBuff(Buff.WASTE_NOT) || simulationState.hasBuff(Buff.WASTE_NOT_II)) {\n",
"new_path": "src/app/pages/simulator/model/actions/general-action.ts",
"old_path": "src/app/pages/simulator/model/actions/general-action.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,8 +15,8 @@ export class Rumination extends CraftingAction {\nexecute(simulation: Simulation): void {\n// Formulae from https://github.com/Ermad/ffxiv-craft-opt-web/blob/master/app/js/ffxivcraftmodel.js#L594\n- simulation.availableCP += (simulation.getBuff(Buff.INNER_QUIET).stacks * 21 -\n- Math.pow(simulation.getBuff(Buff.INNER_QUIET).stacks, 2) + 10) / 2;\n+ simulation.availableCP += ((simulation.getBuff(Buff.INNER_QUIET).stacks - 1) * 21 -\n+ Math.pow((simulation.getBuff(Buff.INNER_QUIET).stacks - 1), 2) + 10) / 2;\nif (simulation.availableCP > simulation.maxCP) {\nsimulation.availableCP = simulation.maxCP;\n}\n",
"new_path": "src/app/pages/simulator/model/actions/other/rumination.ts",
"old_path": "src/app/pages/simulator/model/actions/other/rumination.ts"
},
{
"change_type": "MODIFY",
"diff": "import {Simulation} from '../../simulation/simulation';\nimport {GeneralAction} from './general-action';\nimport {CrafterStats} from '../crafter-stats';\n-import {Buff} from '../buff.enum';\nimport {Tables} from '../tables';\nimport {ActionType} from './action-type';\n@@ -18,23 +17,16 @@ export abstract class ProgressAction extends GeneralAction {\n* @returns {number}\n*/\nprivate getBaseProgression(simulation: Simulation): number {\n- let recipeLevel = simulation.recipe.rlvl;\n+ const recipeLevel = simulation.recipe.rlvl;\nconst stats: CrafterStats = simulation.crafterStats;\nconst crafterLevel = Tables.LEVEL_TABLE[stats.level] || stats.level;\n- // If ingenuity\n- if (simulation.hasBuff(Buff.INGENUITY)) {\n- recipeLevel = Tables.INGENUITY_RLVL_TABLE[simulation.recipe.rlvl] || simulation.recipe.rlvl - 5;\n- } else if (simulation.hasBuff(Buff.INGENUITY_II)) {\n- recipeLevel = Tables.INGENUITY_II_RLVL_TABLE[simulation.recipe.rlvl] || simulation.recipe.rlvl - 5;\n- }\n- const levelDifference = Math.max(crafterLevel - recipeLevel, -6);\n+ const levelDifference = this.getLevelDifference(simulation);\nlet baseProgress = 0;\nlet levelCorrectionFactor = 0;\nlet recipeLevelPenalty = 0;\n-\n- if (crafterLevel > 60) {\n+ if (crafterLevel > 250) {\nbaseProgress = 1.834712812e-5 * stats.craftsmanship * stats.craftsmanship + 1.904074773e-1 * stats.craftsmanship + 1.544103837;\n- } else if (crafterLevel > 50) {\n+ } else if (crafterLevel > 110) {\nbaseProgress = 2.09860e-5 * stats.craftsmanship * stats.craftsmanship + 0.196184 * stats.craftsmanship + 2.68452;\n} else {\nbaseProgress = 0.214959 * stats.craftsmanship + 1.6;\n@@ -69,6 +61,6 @@ export abstract class ProgressAction extends GeneralAction {\n}\nexecute(simulation: Simulation): void {\n- simulation.progression += Math.round(this.getBaseProgression(simulation) * this.getPotency(simulation) / 100);\n+ simulation.progression += Math.floor(this.getBaseProgression(simulation) * this.getPotency(simulation) / 100);\n}\n}\n",
"new_path": "src/app/pages/simulator/model/actions/progress-action.ts",
"old_path": "src/app/pages/simulator/model/actions/progress-action.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -12,18 +12,11 @@ export abstract class QualityAction extends GeneralAction {\n}\nprivate getBaseQuality(simulation: Simulation): number {\n- let recipeLevel = simulation.recipe.rlvl;\n+ const recipeLevel = simulation.recipe.rlvl;\nconst stats: CrafterStats = simulation.crafterStats;\nlet recipeLevelPenalty = 0;\nlet levelCorrectionFactor = 0;\n- const crafterLevel = Tables.LEVEL_TABLE[stats.level] || stats.level;\n- // If ingenuity\n- if (simulation.hasBuff(Buff.INGENUITY)) {\n- recipeLevel = Tables.INGENUITY_RLVL_TABLE[simulation.recipe.rlvl] || simulation.recipe.rlvl - 5;\n- } else if (simulation.hasBuff(Buff.INGENUITY_II)) {\n- recipeLevel = Tables.INGENUITY_II_RLVL_TABLE[simulation.recipe.rlvl] || simulation.recipe.rlvl - 5;\n- }\n- const levelDifference = Math.max(crafterLevel - recipeLevel, -6);\n+ const levelDifference = this.getLevelDifference(simulation);\nconst baseQuality = 3.46e-5 * stats.getControl(simulation) * stats.getControl(simulation)\n+ 0.3514 * stats.getControl(simulation)\n@@ -54,11 +47,8 @@ export abstract class QualityAction extends GeneralAction {\nreturn baseQuality * (1 + levelCorrectionFactor) * (1 + recipeLevelPenalty);\n}\n- execute(simulation: Simulation): void {\n+ execute(simulation: Simulation, skipStackAddition = false): void {\nlet qualityIncrease = this.getBaseQuality(simulation) * this.getPotency(simulation) / 100;\n- if (simulation.hasBuff(Buff.INNER_QUIET) && simulation.getBuff(Buff.INNER_QUIET).stacks < 11) {\n- simulation.getBuff(Buff.INNER_QUIET).stacks++;\n- }\nswitch (simulation.state) {\ncase 'EXCELLENT':\nqualityIncrease *= 4;\n@@ -76,7 +66,10 @@ export abstract class QualityAction extends GeneralAction {\nqualityIncrease *= 2;\nsimulation.removeBuff(Buff.GREAT_STRIDES);\n}\n- simulation.quality += Math.floor(qualityIncrease);\n+ simulation.quality += Math.ceil(qualityIncrease);\n+ if (simulation.hasBuff(Buff.INNER_QUIET) && simulation.getBuff(Buff.INNER_QUIET).stacks < 11 && !skipStackAddition) {\n+ simulation.getBuff(Buff.INNER_QUIET).stacks++;\n+ }\n}\n}\n",
"new_path": "src/app/pages/simulator/model/actions/quality-action.ts",
"old_path": "src/app/pages/simulator/model/actions/quality-action.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -30,7 +30,7 @@ export class ByregotsBlessing extends QualityAction {\n}\ngetPotency(simulation: Simulation): number {\n- return 100 + simulation.getBuff(Buff.INNER_QUIET).stacks * 20;\n+ return 100 + (simulation.getBuff(Buff.INNER_QUIET).stacks - 1) * 20;\n}\n}\n",
"new_path": "src/app/pages/simulator/model/actions/quality/byregots-blessing.ts",
"old_path": "src/app/pages/simulator/model/actions/quality/byregots-blessing.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -14,7 +14,7 @@ export class ByregotsBrow extends ByregotsBlessing {\n}\ngetPotency(simulation: Simulation): number {\n- return 150 + simulation.getBuff(Buff.INNER_QUIET).stacks * 10;\n+ return 150 + (simulation.getBuff(Buff.INNER_QUIET).stacks - 1) * 10;\n}\ngetIds(): number[] {\n",
"new_path": "src/app/pages/simulator/model/actions/quality/byregots-brow.ts",
"old_path": "src/app/pages/simulator/model/actions/quality/byregots-brow.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -9,9 +9,11 @@ export class ByregotsMiracle extends QualityAction {\n}\nexecute(simulation: Simulation): void {\n+ // Don't add stack now, We'll add it manually after the reduction is done.\n+ super.execute(simulation, true);\n// Divides stacks by 2, but adds one because it increased progression (done by QualityAction implementation)\nsimulation.getBuff(Buff.INNER_QUIET).stacks = Math.floor(simulation.getBuff(Buff.INNER_QUIET).stacks / 2);\n- super.execute(simulation);\n+ simulation.getBuff(Buff.INNER_QUIET).stacks++;\n}\nonFail(simulation: Simulation): void {\n@@ -36,6 +38,6 @@ export class ByregotsMiracle extends QualityAction {\n}\ngetPotency(simulation: Simulation): number {\n- return 100 + simulation.getBuff(Buff.INNER_QUIET).stacks * 20;\n+ return 100 + (simulation.getBuff(Buff.INNER_QUIET).stacks - 1) * 15;\n}\n}\n",
"new_path": "src/app/pages/simulator/model/actions/quality/byregots-miracle.ts",
"old_path": "src/app/pages/simulator/model/actions/quality/byregots-miracle.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -12,7 +12,7 @@ export class PatientTouch extends QualityAction {\n}\nonFail(simulation: Simulation): void {\n- simulation.getBuff(Buff.INNER_QUIET).stacks = Math.ceil(simulation.getBuff(Buff.INNER_QUIET).stacks / 2);\n+ simulation.getBuff(Buff.INNER_QUIET).stacks = Math.floor(simulation.getBuff(Buff.INNER_QUIET).stacks / 2);\n}\ncanBeUsed(simulationState: Simulation): boolean {\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"
},
{
"change_type": "MODIFY",
"diff": "@@ -17,9 +17,8 @@ export class CrafterStats {\nlet control = this._control;\n// First of all, apply IQ control bonus\nif (simulationState.hasBuff(Buff.INNER_QUIET)) {\n- // Minus one because stacks start at 1 but the first one doesn't count, the maximum buff is 2, not 2.2.\n- const innerQuietStacks = simulationState.getBuff(Buff.INNER_QUIET).stacks - 1;\n- control += 0.2 * innerQuietStacks * this._control;\n+ const innerQuietStacks = simulationState.getBuff(Buff.INNER_QUIET).stacks;\n+ control += 0.2 * (innerQuietStacks - 1) * this._control;\n}\n// Then innovation, based on base control, not buffed one\nif (simulationState.hasBuff(Buff.INNOVATION)) {\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": "import {Craft} from '../../../model/garland-tools/craft';\nimport {CrafterStats} from '../model/crafter-stats';\n+export const gradeII_infusion_of_str_Recipe: Craft = {\n+ 'id': '32644',\n+ 'job': 14,\n+ 'rlvl': 350,\n+ 'durability': 70,\n+ 'quality': 25881,\n+ 'progress': 3548,\n+ 'lvl': 70,\n+ 'stars': 3,\n+ 'yield': 3,\n+ 'hq': 1,\n+ 'quickSynth': 1,\n+ 'controlReq': 1350,\n+ 'craftsmanshipReq': 1500,\n+ 'unlockId': 22315,\n+ 'ingredients': [\n+ {\n+ 'id': 21085,\n+ 'amount': 1,\n+ 'quality': 2680\n+ },\n+ {\n+ 'id': 19907,\n+ 'amount': 1,\n+ 'quality': 2573\n+ },\n+ {\n+ 'id': 19911,\n+ 'amount': 2,\n+ 'quality': 2546\n+ },\n+ {\n+ 'id': 20014,\n+ 'amount': 1,\n+ 'quality': 2591\n+ },\n+ {\n+ 'id': 19,\n+ 'amount': 2\n+ },\n+ {\n+ 'id': 18,\n+ 'amount': 2\n+ }\n+ ],\n+ 'complexity': {\n+ 'nq': 165,\n+ 'hq': 170\n+ }\n+};\n+\nexport const infusionOfMind_Recipe: Craft = {\n'id': '3595',\n'job': 14,\n@@ -55,3 +106,11 @@ export const alc_70_350_stats: CrafterStats = new CrafterStats(\n474,\ntrue,\n70);\n+\n+export const acchan_stats: CrafterStats = new CrafterStats(\n+ 14,\n+ 1500,\n+ 1536,\n+ 539,\n+ true,\n+ 70);\n",
"new_path": "src/app/pages/simulator/test/mocks.ts",
"old_path": "src/app/pages/simulator/test/mocks.ts"
},
{
"change_type": "MODIFY",
"diff": "import {SteadyHandII} from '../model/actions/buff/steady-hand-ii';\nimport {BasicTouch} from '../model/actions/quality/basic-touch';\nimport {Simulation} from '../simulation/simulation';\n-import {Craft} from '../../../model/garland-tools/craft';\n-import {CrafterStats} from '../model/crafter-stats';\nimport {BasicSynthesis} from '../model/actions/progression/basic-synthesis';\nimport {SteadyHand} from '../model/actions/buff/steady-hand';\nimport {InnerQuiet} from '../model/actions/buff/inner-quiet';\n@@ -20,8 +18,17 @@ import {Observe} from '../model/actions/other/observe';\nimport {FocusedSynthesis} from '../model/actions/progression/focused-synthesis';\nimport {HastyTouch} from '../model/actions/quality/hasty-touch';\nimport {RapidSynthesisII} from '../model/actions/progression/rapid-synthesis-ii';\n-import {alc_70_350_stats, infusionOfMind_Recipe} from './mocks';\n-\n+import {acchan_stats, alc_70_350_stats, gradeII_infusion_of_str_Recipe, infusionOfMind_Recipe} from './mocks';\n+import {ComfortZone} from '../model/actions/buff/comfort-zone';\n+import {SpecialtyReflect} from '../model/actions/other/specialty-reflect';\n+import {PieceByPiece} from '../model/actions/progression/piece-by-piece';\n+import {PrudentTouch} from '../model/actions/quality/prudent-touch';\n+import {FocusedTouch} from '../model/actions/quality/focused-touch';\n+import {GreatStrides} from '../model/actions/buff/great-strides';\n+import {Innovation} from '../model/actions/buff/innovation';\n+import {ByregotsMiracle} from '../model/actions/quality/byregots-miracle';\n+import {Rumination} from '../model/actions/other/rumination';\n+import {CarefulSynthesisIII} from '../model/actions/progression/careful-synthesis-iii';\ndescribe('Craft simulator tests', () => {\n@@ -33,10 +40,16 @@ describe('Craft simulator tests', () => {\nexpect(simulation.progression).toBeCloseTo(352, 1);\n});\n+ it('should be able to predict correct progression on action for high level crafts', () => {\n+ const simulation = new Simulation(gradeII_infusion_of_str_Recipe, [new BasicSynthesis()], acchan_stats);\n+ simulation.run(true);\n+ expect(simulation.progression).toBe(237);\n+ });\n+\nit('should be able to predict correct quality increase on action', () => {\n- const simulation = new Simulation(infusionOfMind_Recipe, [new SteadyHandII(), new BasicTouch()], alc_70_350_stats);\n- simulation.run();\n- expect(simulation.quality).toBeCloseTo(569, 1);\n+ const simulation = new Simulation(gradeII_infusion_of_str_Recipe, [new BasicTouch()], acchan_stats);\n+ simulation.run(true);\n+ expect(simulation.quality).toBe(292);\n});\nit('should apply stroke of genius on specialist craft start', () => {\n@@ -106,7 +119,7 @@ describe('Craft simulator tests', () => {\n[new InnerQuiet(), new SteadyHandII(), new BasicTouch(), new BasicTouch()],\nalc_70_350_stats);\nsimulation.run();\n- expect(simulation.quality).toBeCloseTo(1262, 1);\n+ expect(simulation.quality).toBeCloseTo(1264, 1);\n});\n});\n@@ -152,7 +165,7 @@ describe('Craft simulator tests', () => {\n[new SteadyHand(), new Ingenuity(), new BasicSynthesis()],\nalc_70_350_stats);\nsimulation.run();\n- expect(simulation.progression).toBe(452);\n+ expect(simulation.progression).toBe(451);\n});\nit('should properly reduce recipe level with Ingenuity II, influencing progression', () => {\n@@ -232,14 +245,29 @@ describe('Craft simulator tests', () => {\nexpect(results.filter(res => !res).length).toBe(0);\n});\n- it('should be able to provide proper reliability report', () => {\n+ xit('should be able to provide proper reliability report', () => {\nconst simulation = new Simulation(infusionOfMind_Recipe,\n- [new RapidSynthesisII(), new RapidSynthesisII(), new RapidSynthesisII()], alc_70_350_stats);\n+ [new RapidSynthesisII(), new RapidSynthesisII(), new RapidSynthesisII()], acchan_stats);\nconst report = simulation.getReliabilityReport();\nexpect(report.successPercent).toBeGreaterThan(15);\nexpect(report.successPercent).toBeLessThan(25);\nexpect(report.averageHQPercent).toBe(1);\nexpect(report.medianHQPercent).toBe(1);\n});\n+\n+ it('should be consistent with current rotations', () => {\n+ const acchan_macro = [new InitialPreparations(), new ComfortZone(), new InnerQuiet(), new SpecialtyReflect(),\n+ new SteadyHandII(), new PieceByPiece(), new PrudentTouch(), new PrudentTouch(), new PrudentTouch(), new PrudentTouch(),\n+ new Observe(), new FocusedTouch(), new ManipulationII(), new ComfortZone(), new Ingenuity(), new Observe(),\n+ new FocusedTouch(), new GreatStrides(), new Observe(), new FocusedTouch(), new IngenuityII(), new SteadyHandII(),\n+ new Innovation(), new PrudentTouch(), new GreatStrides(), new ByregotsMiracle(), new PieceByPiece(),\n+ new Rumination(), new Ingenuity(), new Observe(), new FocusedSynthesis(), new Observe(), new FocusedSynthesis(),\n+ new CarefulSynthesisIII()];\n+ const simulation = new Simulation(gradeII_infusion_of_str_Recipe, acchan_macro, acchan_stats);\n+ simulation.run(true);\n+ expect(simulation.progression).toBe(3557);\n+ expect(simulation.quality).toBe(24839);\n+ expect(simulation.availableCP).toBe(0);\n+ });\n});\n});\n",
"new_path": "src/app/pages/simulator/test/simulation.spec.ts",
"old_path": "src/app/pages/simulator/test/simulation.spec.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): fixed a bug with level difference and blessings
| 1
|
chore
|
simulator
|
679,913
|
29.04.2018 17:58:22
| -3,600
|
a7c5eafc42122338e388dda7993c0760d50337ed
|
refactor(examples): update todo list
|
[
{
"change_type": "MODIFY",
"diff": "-/*\n- * Obligatory Todo list demo (in < 50 LOC excl. comments)\n- * Total filesize: 18KB minified\n- *\n- * Other packages used:\n- * - @thi.ng/atom for state handling\n- * - @thi.ng/transducers for task list processing\n- *\n- * @author Karsten Schmidt\n- */\n-\nimport { IObjectOf } from \"@thi.ng/api/api\";\nimport { Atom, Cursor, History } from \"@thi.ng/atom\";\nimport { start } from \"@thi.ng/hdom/start\";\n@@ -28,6 +17,11 @@ const db = new Atom({ tasks: {}, nextID: 0 });\nconst tasks = new History<IObjectOf<Task>>(new Cursor(db, \"tasks\"), 100);\n// cursor for direct access to `nextID`\nconst nextID = new Cursor<number>(db, \"nextID\");\n+// create derived view of tasks transformed into components\n+const items = db.addView(\n+ \"tasks\",\n+ (tasks) => [...iterator(map(([id, t]) => taskItem(id, t)), pairs(tasks))]\n+);\n// state updaters\n// each applies its updates via the history atom wrapper\n@@ -37,43 +31,47 @@ const toggleTask = (id) => tasks.swap((tasks) => updateIn(tasks, [id, \"done\"], d\nconst updateTask = (id, body) => tasks.swap((tasks) => setIn(tasks, [id, \"body\"], body));\n// single task component\n-// the text field uses lifecycle hooks to set keyboard focus for new tasks\n-const taskItem = (id, task: Task) =>\n- [\"div\",\n- { class: \"task\" + (task.done ? \" done\" : \"\") },\n- [\"input\",\n- {\n+const taskItem = (id, task: Task) => {\n+ const checkAttribs = {\ntype: \"checkbox\",\nchecked: task.done,\nonclick: () => toggleTask(id),\n- }],\n- [{\n- init: (el) => !el.value && el.focus(),\n- render: () =>\n- [\"input\",\n- {\n+ };\n+ const textAttribs = {\ntype: \"text\",\nplaceholder: \"todo...\",\nvalue: task.body,\nonkeydown: (e) => e.key === \"Enter\" && e.target.blur(),\nonblur: (e) => updateTask(id, (<HTMLInputElement>e.target).value)\n- }]\n- }]];\n+ };\n+ return [\"div\",\n+ { class: \"task\" + (task.done ? \" done\" : \"\") },\n+ [\"input\", checkAttribs],\n+ [\"input\", textAttribs]]\n+};\n// complete task list\n// uses transducer to transform all tasks using above component function\nconst taskList = () => {\n- const tasks = db.deref().tasks;\n- return Object.keys(tasks).length ?\n- [\"div#tasks\", ...iterator(map(([id, t]) => taskItem(id, t)), pairs(tasks))] :\n+ const _items = items.deref();\n+ return _items.length ?\n+ [\"div#tasks\", _items] :\n[\"div\", \"nothing todo, get busy...\"];\n};\n-const toolbar = () =>\n+const button = (onclick, body) =>\n+ (_, disabled) => [\"button\", { onclick, disabled }, body];\n+\n+const toolbar = () => {\n+ const btAdd = button(() => addNewTask(), \"+ Add\");\n+ const btUndo = button(() => tasks.undo(), \"Undo\");\n+ const btRedo = button(() => tasks.redo(), \"Redo\");\n+ return () =>\n[\"div#toolbar\",\n- [\"button\", { onclick: () => addNewTask() }, \"+ Add\"],\n- [\"button\", { onclick: () => tasks.undo(), disabled: !tasks.canUndo() }, \"Undo\"],\n- [\"button\", { onclick: () => tasks.redo(), disabled: !tasks.canRedo() }, \"Redo\"]];\n+ [btAdd],\n+ [btUndo, !tasks.canUndo()],\n+ [btRedo, !tasks.canRedo()]];\n+};\n// static header component (simple array)\nconst header =\n@@ -81,5 +79,9 @@ const header =\n[\"small\", \"made with \\u2764 \",\n[\"a\", { href: \"https://github.com/thi-ng/umbrella/tree/master/packages/hdom\" }, \"@thi.ng/hdom\"]]];\n+const app = () => {\n+ return [\"div\", header, toolbar(), taskList]\n+};\n+\n// kick off UI w/ root component function\n-start(\"app\", () => [\"div\", header, toolbar, taskList]);\n+start(\"app\", app());\n",
"new_path": "examples/todo-list/src/index.ts",
"old_path": "examples/todo-list/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(examples): update todo list
| 1
|
refactor
|
examples
|
217,922
|
29.04.2018 18:54:52
| -7,200
|
55e89231af4766271b09dd02db3358cef1172e36
|
chore(simulator): drag & drop reordering
|
[
{
"change_type": "MODIFY",
"diff": "\"integrity\": \"sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g==\",\n\"dev\": true\n},\n+ \"ng-drag-drop\": {\n+ \"version\": \"4.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/ng-drag-drop/-/ng-drag-drop-4.0.1.tgz\",\n+ \"integrity\": \"sha1-tDSiJI3vk35Y6mrSQZivGJslks8=\"\n+ },\n\"ng-push\": {\n\"version\": \"0.2.1\",\n\"resolved\": \"https://registry.npmjs.org/ng-push/-/ng-push-0.2.1.tgz\",\n",
"new_path": "package-lock.json",
"old_path": "package-lock.json"
},
{
"change_type": "MODIFY",
"diff": "\"hammerjs\": \"^2.0.8\",\n\"intl\": \"^1.2.5\",\n\"jwt-decode\": \"^2.2.0\",\n+ \"ng-drag-drop\": \"^4.0.1\",\n\"ng-push\": \"^0.2.1\",\n\"ngx-clipboard\": \"10.0.0\",\n\"ngx-markdown\": \"^1.5.2\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -59,6 +59,7 @@ import {AlarmsSidebarModule} from './modules/alarms-sidebar/alarms-sidebar.modul\nimport {MarkdownModule} from 'ngx-markdown';\nimport {WikiModule} from './pages/wiki/wiki.module';\nimport {SimulatorModule} from './pages/simulator/simulator.module';\n+import {NgDragDropModule} from 'ng-drag-drop';\nexport function HttpLoaderFactory(http: HttpClient) {\nreturn new TranslateHttpLoader(http);\n@@ -73,6 +74,8 @@ export function HttpLoaderFactory(http: HttpClient) {\nMarkdownModule.forRoot(),\n+ NgDragDropModule.forRoot(),\n+\nTranslateModule.forRoot({\nloader: {\nprovide: TranslateLoader,\n",
"new_path": "src/app/app.module.ts",
"old_path": "src/app/app.module.ts"
},
{
"change_type": "MODIFY",
"diff": "</mat-card>\n<mat-card>\n<div class=\"actions\">\n- <app-action *ngFor=\"let step of resultData.simulation.steps; let index = index\"\n+ <app-action draggable\n+ droppable\n+ dragOverClass=\"drag-over\"\n+ (onDrop)=\"moveSkill($event.dragData, index)\"\n+ [dragData]=\"index\"\n+ *ngFor=\"let step of resultData.simulation.steps; let index = index\"\n(actionclick)=\"removeAction(index)\"\n[action]=\"step.action\"\n[simulation]=\"resultData.simulation\"></app-action>\n+ <div class=\"end-drag-zone\" droppable\n+ dragOverClass=\"drag-over\"\n+ (onDrop)=\"moveSkill($event.dragData, resultData.simulation.steps.length - 1)\"></div>\n</div>\n</mat-card>\n<mat-card>\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": "@@ -139,6 +139,30 @@ mat-progress-bar {\njustify-content: flex-start;\nflex-wrap: wrap;\nmin-height: 50px;\n+ app-action {\n+ display: flex;\n+ &.drag-over::before {\n+ content: \" \";\n+ display: block;\n+ margin-top: 5px;\n+ width: 40px;\n+ height: 40px;\n+ border: 2px dashed rgba(0, 0, 0, 0.7);\n+ border-radius: 5px;\n+ }\n+ }\n+ .end-drag-zone {\n+ display: block;\n+ margin-top: 5px;\n+ opacity: 0;\n+ width: 40px;\n+ height: 40px;\n+ &.drag-over {\n+ opacity: 1;\n+ border: 2px dashed rgba(0, 0, 0, 0.7);\n+ border-radius: 5px;\n+ }\n+ }\n}\n.buffs {\n@@ -148,6 +172,7 @@ mat-progress-bar {\nmin-height: 38px;\n.buff-container {\nposition: relative;\n+ margin: 0 2px;\n.stacks {\nposition: absolute;\ntop: 0;\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": "@@ -115,6 +115,12 @@ export class SimulatorComponent implements OnInit {\nreturn `./assets/icons/status/${Buff[effBuff.buff].toLowerCase()}.png`;\n}\n+ moveSkill(originIndex: number, targetIndex: number): void {\n+ const actions = this.actions$.getValue();\n+ actions.splice(targetIndex, 0, actions.splice(originIndex, 1)[0]);\n+ this.actions$.next(actions);\n+ }\n+\napplyStats(set: GearSet): void {\nthis.crafterStats = new CrafterStats(\nset.jobId,\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": "@@ -22,6 +22,7 @@ import {CoreModule} from 'app/core/core.module';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {SettingsModule} from 'app/pages/settings/settings.module';\nimport {TooltipModule} from '../../modules/tooltip/tooltip.module';\n+import {NgDragDropModule} from 'ng-drag-drop';\nconst routes: Routes = [\n{\n@@ -38,6 +39,7 @@ const routes: Routes = [\nRouterModule.forChild(routes),\nTranslateModule,\n+ NgDragDropModule,\nMatProgressBarModule,\nMatCardModule,\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(simulator): drag & drop reordering
| 1
|
chore
|
simulator
|
217,922
|
29.04.2018 19:15:53
| -7,200
|
4575ea85f312f2f19eee7c459f7ec5506367d3b2
|
chore(simulator): HQ ingredients management
|
[
{
"change_type": "MODIFY",
"diff": "</div>\n<div class=\"config-row\">\n<h3>{{'SIMULATOR.CONFIGURATION.Ingredients' | translate}}</h3>\n- TODO HQ ingredients\n+ <mat-list>\n+ <mat-list-item *ngFor=\"let ingredient of hqIngredientsData\">\n+ <span matLine [appXivdbTooltip]=\"ingredient.id\">{{ingredient.id | itemName | i18n}}</span>\n+ <i matLine>{{ingredient.quality}}</i>\n+ <mat-input-container>\n+ <input matInput type=\"number\" [(ngModel)]=\"ingredient.amount\" min=\"0\" max=\"{{ingredient.max}}\">\n+ <span matSuffix>/{{ingredient.max}}</span>\n+ </mat-input-container>\n+ </mat-list-item>\n+ </mat-list>\n+ <button mat-raised-button color=\"accent\" (click)=\"hqIngredients = hqIngredientsData\">\n+ {{'SIMULATOR.CONFIGURATION.Apply_ingredients' | translate}}\n+ </button>\n</div>\n<div class=\"config-row\">\n<h3>{{'SIMULATOR.CONFIGURATION.Consumables' | translate}}</h3>\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, Input, OnInit} from '@angular/core';\n+import {Component, Input} from '@angular/core';\nimport {Craft} from '../../../../model/garland-tools/craft';\nimport {Simulation} from '../../simulation/simulation';\nimport {Observable} from 'rxjs/Observable';\n@@ -23,7 +23,7 @@ import {Buff} from 'app/pages/simulator/model/buff.enum';\ntemplateUrl: './simulator.component.html',\nstyleUrls: ['./simulator.component.scss']\n})\n-export class SimulatorComponent implements OnInit {\n+export class SimulatorComponent {\n@Input()\nitemId: number;\n@@ -75,8 +75,16 @@ export class SimulatorComponent implements OnInit {\npublic selectedSet: GearSet;\n+ public hqIngredientsData: { id: number, amount: number, max: number, quality: number }[] = [];\n+\nconstructor(private registry: CraftingActionsRegistry, private media: ObservableMedia, private userService: UserService,\nprivate dataService: DataService, private htmlTools: HtmlToolsService) {\n+ this.recipe$.subscribe(recipe => {\n+ this.hqIngredientsData = recipe.ingredients\n+ .filter(i => i.id > 20)\n+ .map(ingredient => ({id: ingredient.id, amount: 0, max: ingredient.amount, quality: ingredient.quality}));\n+ });\n+\nthis.gearsets$ = this.userService.getUserData()\n.mergeMap(user => {\nif (user.anonymous) {\n@@ -172,9 +180,4 @@ export class SimulatorComponent implements OnInit {\nisMobile(): boolean {\nreturn this.media.isActive('xs') || this.media.isActive('sm');\n}\n-\n- ngOnInit(): void {\n- this.actions = [];\n- this.hqIngredients = [];\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": "@@ -15,6 +15,7 @@ import {\nMatInputModule,\nMatProgressBarModule,\nMatSelectModule,\n+ MatListModule,\n} from '@angular/material';\nimport {ActionComponent} from './components/action/action.component';\nimport {CraftingActionsRegistry} from './model/crafting-actions-registry';\n@@ -49,6 +50,7 @@ const routes: Routes = [\nMatExpansionModule,\nMatCheckboxModule,\nMatInputModule,\n+ MatListModule,\nCommonComponentsModule,\nTooltipModule,\n",
"new_path": "src/app/pages/simulator/simulator.module.ts",
"old_path": "src/app/pages/simulator/simulator.module.ts"
},
{
"change_type": "MODIFY",
"diff": "\"Specialist\": \"Specialist\",\n\"Ingredients\": \"Ingredients\",\n\"Consumables\": \"Consumables\",\n- \"Apply_stats\": \"Apply stats\"\n+ \"Apply_stats\": \"Apply stats\",\n+ \"Apply_ingredients\": \"Apply HQ ingredients\"\n}\n}\n}\n",
"new_path": "src/assets/i18n/en.json",
"old_path": "src/assets/i18n/en.json"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): HQ ingredients management
| 1
|
chore
|
simulator
|
679,913
|
29.04.2018 22:56:39
| -3,600
|
31ec3af4d8f5fb77ea5e835019c0ee9ed9ea0c60
|
perf(hdom): update event handling in diffAttributes()
avoid replacing element if changed event handlers
update removeAttribs()
|
[
{
"change_type": "MODIFY",
"diff": "@@ -9,8 +9,6 @@ import {\nsetAttrib\n} from \"./dom\";\n-// import { DEBUG } from \"./api\";\n-\nconst isArray = isa.isArray;\nconst isString = iss.isString;\nconst diffArray = diff.diffArray;\n@@ -47,7 +45,7 @@ function _diffElement(parent: Element, prev: any, curr: any, child: number) {\nconst edits = delta.linear;\nconst el = parent.children[child];\nlet i, j, k, eq, e, status, idx, val;\n- if (edits[0][0] !== 0 || (i = prev[1]).key !== (j = curr[1]).key || hasChangedEvents(i, j)) {\n+ if (edits[0][0] !== 0 || (i = prev[1]).key !== (j = curr[1]).key) {\n// DEBUG && console.log(\"replace:\", prev, curr);\nreleaseDeep(prev);\nremoveChild(parent, child);\n@@ -119,30 +117,25 @@ function releaseDeep(tag: any) {\n(<any>tag).__release.apply(tag, (<any>tag).__args);\ndelete (<any>tag).__release;\n}\n- for (let i = tag.length - 1; i >= 2; i--) {\n+ for (let i = tag.length; --i >= 2;) {\nreleaseDeep(tag[i]);\n}\n}\n}\n-function hasChangedEvents(prev: any, curr: any) {\n- for (let k in curr) {\n- if (k.indexOf(\"on\") === 0 && prev[k] !== curr[k]) {\n- return true;\n- }\n- }\n- return false;\n-}\n-\nfunction diffAttributes(el: Element, prev: any, curr: any) {\nlet i, e, edits;\nconst delta = diffObject(prev, curr);\n- removeAttribs(el, delta.dels);\n- for (edits = delta.edits, i = edits.length - 1; i >= 0; i--) {\n+ removeAttribs(el, delta.dels, prev);\n+ for (edits = delta.edits, i = edits.length; --i >= 0;) {\ne = edits[i];\n- setAttrib(el, e[0], e[1], curr);\n+ const a = e[0];\n+ if (a.indexOf(\"on\") === 0) {\n+ el.removeEventListener(a.substr(2), prev[a]);\n+ }\n+ setAttrib(el, a, e[1], curr);\n}\n- for (edits = delta.adds, i = edits.length - 1; i >= 0; i--) {\n+ for (edits = delta.adds, i = edits.length; --i >= 0;) {\ne = edits[i];\nsetAttrib(el, e, curr[e], curr);\n}\n@@ -151,7 +144,7 @@ function diffAttributes(el: Element, prev: any, curr: any) {\nfunction extractEquivElements(edits: diff.DiffLogEntry<any>[]) {\nlet k, v, e, ek;\nconst equiv = {};\n- for (let i = edits.length - 1; i >= 0; i--) {\n+ for (let i = edits.length; --i >= 0;) {\ne = edits[i];\nv = e[2];\nif (isArray(v) && (k = v[1].key) !== undefined) {\n",
"new_path": "packages/hdom/src/diff.ts",
"old_path": "packages/hdom/src/diff.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -161,9 +161,14 @@ export function updateValueAttrib(el: HTMLInputElement, v: any) {\n}\n}\n-export function removeAttribs(el: Element, attribs: string[]) {\n- for (let i = attribs.length - 1; i >= 0; i--) {\n- el.removeAttribute(attribs[i]);\n+export function removeAttribs(el: Element, attribs: string[], prev: any) {\n+ for (let i = attribs.length; --i >= 0;) {\n+ const a = attribs[i];\n+ if (a.indexOf(\"on\") === 0) {\n+ el.removeEventListener(a.substr(2), prev[a]);\n+ } else {\n+ el.removeAttribute(a);\n+ }\n}\n}\n",
"new_path": "packages/hdom/src/dom.ts",
"old_path": "packages/hdom/src/dom.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
perf(hdom): update event handling in diffAttributes()
- avoid replacing element if changed event handlers
- update removeAttribs()
| 1
|
perf
|
hdom
|
217,922
|
29.04.2018 23:38:20
| -7,200
|
55cb4c2eea33b576dc16169131d17279d2e4ffda
|
chore(simulator): first elements for WwW implementation
|
[
{
"change_type": "MODIFY",
"diff": "@@ -26,7 +26,7 @@ export abstract class BuffAction extends CraftingAction {\nprotected abstract getInitialStacks(): number;\n- protected abstract getTick(): (simulation: Simulation) => void;\n+ protected abstract getTick(): (simulation: Simulation, linear?: boolean) => void;\nexecute(simulation: Simulation): void {\nif (simulation.hasBuff(this.getBuff())) {\n",
"new_path": "src/app/pages/simulator/model/actions/buff-action.ts",
"old_path": "src/app/pages/simulator/model/actions/buff-action.ts"
},
{
"change_type": "ADD",
"diff": "+import {BuffAction} from '../buff-action';\n+import {Simulation} from '../../../simulation/simulation';\n+import {Buff} from '../../buff.enum';\n+\n+export class WhistleWhileYouWork extends BuffAction {\n+\n+ getBaseCPCost(simulationState: Simulation): number {\n+ return 36;\n+ }\n+\n+ protected getBuff(): Buff {\n+ return Buff.WHISTLE_WHILE_YOU_WORK;\n+ }\n+\n+ getDuration(simulation: Simulation): number {\n+ return Infinity;\n+ }\n+\n+ getIds(): number[] {\n+ return [];\n+ }\n+\n+ protected getInitialStacks(): number {\n+ return 11;\n+ }\n+\n+ protected getTick(): (simulation: Simulation, linear?: boolean) => void {\n+ return (simulation, linear) => {\n+ // If we're in linear mode, consider each turn as matching the condition.\n+ if (linear || simulation.state === 'GOOD' || simulation.state === 'EXCELLENT') {\n+ simulation.getBuff(Buff.WHISTLE_WHILE_YOU_WORK).stacks--;\n+ }\n+ // When it reaches the end, progress is increased\n+ if (simulation.getBuff(Buff.WHISTLE_WHILE_YOU_WORK).stacks === 0) {\n+ // TODO\n+ }\n+ };\n+ }\n+\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/buff/whistle-while-you-work.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -6,7 +6,7 @@ export interface EffectiveBuff {\nstacks: number;\nbuff: Buff;\n- tick?: (simulationState: Simulation) => void;\n+ tick?: (simulationState: Simulation, linear?: boolean) => void;\nappliedStep: number;\n}\n",
"new_path": "src/app/pages/simulator/model/effective-buff.ts",
"old_path": "src/app/pages/simulator/model/effective-buff.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -192,14 +192,14 @@ export class Simulation {\nreturn this.steps[this.steps.length - 1];\n}\n- private tickBuffs(): void {\n+ private tickBuffs(linear = false): void {\nfor (const effectiveBuff of this.buffs) {\n// We are checking the appliedStep because ticks only happen at the beginning of the second turn after the application,\n// For instance, Great strides launched at turn 1 will start to loose duration at the beginning of turn 3\nif (effectiveBuff.appliedStep + 1 < this.steps.length) {\n// If the buff has something to do, let it do it\nif (effectiveBuff.tick !== undefined) {\n- effectiveBuff.tick(this);\n+ effectiveBuff.tick(this, linear);\n}\neffectiveBuff.duration--;\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
|
chore(simulator): first elements for WwW implementation
| 1
|
chore
|
simulator
|
217,922
|
29.04.2018 23:39:21
| -7,200
|
a2f11989c464b442a8b82d54974c0fb4a2b5ff13
|
chore(simulator): first elements for consumables extraction
|
[
{
"change_type": "MODIFY",
"diff": "@@ -30,12 +30,48 @@ namespace Extractor\nExtractNames(localize, realm.GameData.GetSheet<ClassJob>(), \"Abbreviation\", \"job-abbr\");\nExtractNames(localize, realm.GameData.GetSheet<ClassJob>(), \"Name\", \"job-name\");\n*/\n- ExtractCraftFoods(realm.GameData);\n+ ExtractConsumables(realm.GameData);\n}\n- static void ExtractCraftFoods(XivCollection gameData)\n+ static void ExtractConsumables(XivCollection gameData)\n{\n-\n+ JArray res = new JArray();\n+ foreach (var item in gameData.GetSheet<Item>())\n+ {\n+ if (item.ItemAction.Type == 844 || item.ItemAction.Type == 845)\n+ {\n+ try\n+ {\n+ if (gameData.GetSheet<ItemFood>().ContainsRow(item.ItemAction.GetData(1)))\n+ {\n+ var food = gameData.GetSheet<ItemFood>()[item.ItemAction.GetData(1)];\n+ if (food != null)\n+ {\n+ JObject foodRow = new JObject();\n+ foreach (var param in food.Parameters)\n+ {\n+ if (param.BaseParam.DefaultValue.ToString() == \"CP\" || param.BaseParam.DefaultValue.ToString() == \"Control\" || param.BaseParam.DefaultValue.ToString() == \"Craftsmanship\")\n+ {\n+ Console.WriteLine(param.BaseParam.DefaultValue.ToString());\n+ JArray paramRow = new JArray();\n+ foreach (var value in param.Values)\n+ {\n+ paramRow.Add(value);\n+ }\n+ Console.WriteLine(\"Adding row\");\n+ foodRow.Add(\"itemId\", item.Key);\n+ foodRow.Add(param.BaseParam.DefaultValue.ToString(), paramRow);\n+ }\n+ }\n+ res.Add(foodRow);\n+ }\n+ }\n+ }\n+ catch (Exception ex) { }\n+ }\n+ }\n+ string json = Regex.Replace(res.ToString(), \"(\\\"(?:[^\\\"\\\\\\\\]|\\\\\\\\.)*\\\")|\\\\s+\", \"$1\");\n+ File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + \"..\\\\..\\\\..\\\\..\\\\..\\\\..\\\\src\\\\app\\\\core\\\\data\\\\sources\\\\consumables.json\", json);\n}\nstatic void ExtractActionIcons(XivCollection gameData)\n",
"new_path": "data-extraction/SaintCoinach/XIVExtractor/Extractor/Program.cs",
"old_path": "data-extraction/SaintCoinach/XIVExtractor/Extractor/Program.cs"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): first elements for consumables extraction
| 1
|
chore
|
simulator
|
730,429
|
30.04.2018 09:58:54
| 14,400
|
db24d97a8aae89c8cb07fedea704907485d8fa36
|
docs(widget-recents): update prop-types for SpacesList
|
[
{
"change_type": "MODIFY",
"diff": "@@ -12,7 +12,8 @@ const propTypes = {\nhasGroupCalling: PropTypes.bool,\nonCallClick: PropTypes.func,\nonClick: PropTypes.func,\n- spaces: PropTypes.arrayOf(\n+ spaces: PropTypes.oneOfType([\n+ PropTypes.arrayOf(\nPropTypes.shape({\navatarUrl: PropTypes.string,\ncallStartTime: PropTypes.number,\n@@ -26,7 +27,10 @@ const propTypes = {\nteamName: PropTypes.string,\ntype: PropTypes.string\n})\n- )\n+ ),\n+ // Can accept an object that can iterated with `forEach`\n+ PropTypes.object\n+ ])\n};\nconst defaultProps = {\n",
"new_path": "packages/node_modules/@ciscospark/widget-recents/src/components/spaces-list/index.js",
"old_path": "packages/node_modules/@ciscospark/widget-recents/src/components/spaces-list/index.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
docs(widget-recents): update prop-types for SpacesList
| 1
|
docs
|
widget-recents
|
730,429
|
30.04.2018 10:12:33
| 14,400
|
7c6c2de3526e6351076f655ccb5877cc6cf03227
|
feat(spaces-list): moved to individual component
|
[
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"@ciscospark/react-component-spaces-list\",\n+ \"description\": \"Cisco Spark React Spaces List\",\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-component-spaces-list/package.json",
"old_path": null
},
{
"change_type": "RENAME",
"diff": "@@ -8,20 +8,22 @@ const propTypes = {\ncurrentUser: PropTypes.shape({\nid: PropTypes.string.isRequired\n}).isRequired,\n- formatMessage: PropTypes.func.isRequired,\n- hasGroupCalling: PropTypes.bool,\n+ hasCalling: PropTypes.bool,\nonCallClick: PropTypes.func,\nonClick: PropTypes.func,\nspaces: PropTypes.oneOfType([\nPropTypes.arrayOf(\nPropTypes.shape({\navatarUrl: PropTypes.string,\n+ activityText: PropTypes.oneOfType([\n+ PropTypes.string,\n+ PropTypes.element\n+ ]),\ncallStartTime: PropTypes.number,\nid: PropTypes.string,\nisDecrypting: PropTypes.bool,\nisUnread: PropTypes.bool,\nlastActivityTime: PropTypes.string,\n- latestActivity: PropTypes.object,\nname: PropTypes.string,\nteamColor: PropTypes.string,\nteamName: PropTypes.string,\n@@ -34,7 +36,7 @@ const propTypes = {\n};\nconst defaultProps = {\n- hasGroupCalling: false,\n+ hasCalling: false,\nonCallClick: () => {},\nonClick: () => {},\nspaces: []\n@@ -42,8 +44,7 @@ const defaultProps = {\nexport default function SpacesList({\ncurrentUser,\n- formatMessage,\n- hasGroupCalling,\n+ hasCalling,\nonCallClick,\nonClick,\nspaces\n@@ -51,8 +52,7 @@ export default function SpacesList({\nconst recents = [];\nspaces.forEach((space) => recents.push(<SpaceItem\ncurrentUser={currentUser}\n- formatMessage={formatMessage}\n- hasGroupCalling={hasGroupCalling}\n+ hasCalling={hasCalling}\nkey={space.id}\nonCallClick={onCallClick}\nonClick={onClick}\n",
"new_path": "packages/node_modules/@ciscospark/react-component-spaces-list/src/index.js",
"old_path": "packages/node_modules/@ciscospark/widget-recents/src/components/spaces-list/index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -32,6 +32,7 @@ import LoadingScreen from '@ciscospark/react-component-loading-screen';\nimport Spinner from '@ciscospark/react-component-spinner';\nimport ErrorDisplay from '@ciscospark/react-component-error-display';\nimport CallDataActivityMessage from '@ciscospark/react-component-call-data-activity';\n+import SpacesList from '@ciscospark/react-component-spaces-list';\nimport messages from './messages';\nimport getRecentsWidgetProps from './selector';\n@@ -39,7 +40,7 @@ import {\nupdateWidgetStatus,\nupdateVisibilityCount\n} from './actions';\n-import SpacesList from './components/spaces-list';\n+\nimport styles from './styles.css';\nimport {\neventNames,\n@@ -616,7 +617,7 @@ export class RecentsWidget extends Component {\n<SpacesList\ncurrentUser={currentUser}\nformatMessage={formatMessage}\n- hasGroupCalling={hasGroupCalling}\n+ hasCalling={hasGroupCalling}\nonCallClick={handleCallClick}\nonClick={this.handleSpaceClick}\nspaces={spacesListWithActivityText}\n",
"new_path": "packages/node_modules/@ciscospark/widget-recents/src/container.js",
"old_path": "packages/node_modules/@ciscospark/widget-recents/src/container.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
feat(spaces-list): moved to individual component
| 1
|
feat
|
spaces-list
|
730,413
|
30.04.2018 10:17:57
| 14,400
|
36a7ccd1e8c0bdf785ea8bf52717282567fa1505
|
chore(tooling): exit jenkins job on first process failure
|
[
{
"change_type": "MODIFY",
"diff": "@@ -130,12 +130,17 @@ ansiColor('xterm') {\n]) {\nsh '''#!/bin/bash -ex\nsource ~/.nvm/nvm.sh\n- nvm use v8.9.1\n+ nvm use 8.9.1\nNODE_ENV=test npm run build:package widget-space && npm run build:package widget-recents\n- CISCOSPARK_CLIENT_ID=C873b64d70536ed26df6d5f81e01dafccbd0a0af2e25323f7f69c7fe46a7be340 SAUCE=true PORT=4569 SAUCE_CONNECT_PORT=5006 BROWSER=firefox INTEGRATION=true npm run test:integration &\n- sleep 60 && CISCOSPARK_CLIENT_ID=C873b64d70536ed26df6d5f81e01dafccbd0a0af2e25323f7f69c7fe46a7be340 SAUCE=true PORT=4568 SAUCE_CONNECT_PORT=5005 BROWSER=chrome INTEGRATION=true npm run test:integration &\n- sleep 120 && CISCOSPARK_CLIENT_ID=C873b64d70536ed26df6d5f81e01dafccbd0a0af2e25323f7f69c7fe46a7be340 SAUCE=true PORT=4567 SAUCE_CONNECT_PORT=5004 BROWSER=chrome INTEGRATION=true PLATFORM=\"windows 10\" npm run test:integration &\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+ set -m\n+ (\n+ (CISCOSPARK_CLIENT_ID=C873b64d70536ed26df6d5f81e01dafccbd0a0af2e25323f7f69c7fe46a7be340 SAUCE=true PORT=4569 SAUCE_CONNECT_PORT=5006 BROWSER=firefox npm run test:integration || kill 0) &\n+ (sleep 60; CISCOSPARK_CLIENT_ID=C873b64d70536ed26df6d5f81e01dafccbd0a0af2e25323f7f69c7fe46a7be340 SAUCE=true PORT=4568 SAUCE_CONNECT_PORT=5005 BROWSER=chrome 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\" npm run test:integration || kill 0) &\nwait\n+ )\n'''\narchiveArtifacts 'reports/**/*'\njunit '**/reports/junit/wdio/*.xml'\n",
"new_path": "Jenkinsfile",
"old_path": "Jenkinsfile"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): exit jenkins job on first process failure
| 1
|
chore
|
tooling
|
730,429
|
30.04.2018 10:30:36
| 14,400
|
90c38edfb3b0f4a336f4373a0ad1ab4e59e46139
|
feat(samples): add recents components to samples
|
[
{
"change_type": "MODIFY",
"diff": "import React from 'react';\n+import RecentsComponents from './recents-components';\n+\nfunction Main() {\nreturn (\n<div>\n- React Samples\n+ <h1>React Samples</h1>\n+ <h2>Recents Components</h2>\n+ <RecentsComponents />\n</div>\n);\n}\n",
"new_path": "samples/Main.js",
"old_path": "samples/Main.js"
},
{
"change_type": "MODIFY",
"diff": "<title>Widget Samples</title>\n<style>\nbody {\n+ padding: 25px;\nmargin: 0;\n+ font-family: CiscoSans, Helvetica, Arial, sans-serif;\n}\n</style>\n</head>\n",
"new_path": "samples/index.html",
"old_path": "samples/index.html"
},
{
"change_type": "MODIFY",
"diff": "import React from 'react';\nimport ReactDOM from 'react-dom';\n+import '@ciscospark/react-component-spark-fonts';\n+\nimport Main from './Main';\nReactDOM.render(\n",
"new_path": "samples/index.js",
"old_path": "samples/index.js"
},
{
"change_type": "ADD",
"diff": "+import React from 'react';\n+\n+import JoinCallButton from '@ciscospark/react-component-join-call-button';\n+import SpaceItem from '@ciscospark/react-component-space-item';\n+import SpacesList from '@ciscospark/react-component-spaces-list';\n+\n+function RecentsComponents() {\n+ function onCallClick(id) {\n+ // eslint-disable-next-line no-alert\n+ window.alert(`onCallClick: ${id}`);\n+ }\n+\n+ function onClick(id) {\n+ // eslint-disable-next-line no-alert\n+ window.alert(`onClick: ${id}`);\n+ }\n+\n+ function onJoinClick() {\n+ // eslint-disable-next-line no-alert\n+ window.alert('onJoinClick');\n+ }\n+\n+ const currentUser = {\n+ id: 'abc-123'\n+ };\n+\n+ const spacesListSpaces = [\n+ {\n+ id: 'decrypting-space',\n+ isDecrypting: true,\n+ name: 'Webex User'\n+ },\n+ {\n+ activityText: 'Hey there!',\n+ callStartTime: Date.now(),\n+ id: 'jane-doe-space',\n+ lastActivityTime: '9:05 PM',\n+ latestActivity: {\n+ actorName: 'Jane Doe',\n+ type: 'post'\n+ },\n+ isUnread: true,\n+ name: 'Webex User',\n+ teamColor: 'blue',\n+ teamName: 'Best Team'\n+ }\n+ ];\n+\n+ return (\n+ <div>\n+ <h3>JoinCallButton</h3>\n+ <JoinCallButton\n+ callStartTime={Date.now()}\n+ onJoinClick={onJoinClick}\n+ />\n+ <h3>SpaceItem</h3>\n+ <SpaceItem\n+ currentUser={currentUser}\n+ formatMessage={(a) => a}\n+ id=\"decrypting-space\"\n+ isDecrypting\n+ name=\"Webex User\"\n+ onClick={onClick}\n+ />\n+ <SpaceItem\n+ activityText=\"Hi there!\"\n+ currentUser={currentUser}\n+ formatMessage={(a) => a}\n+ id=\"jane-doe-space\"\n+ lastActivityTime=\"9:05 PM\"\n+ latestActivity={{\n+ actorName: 'Jane Doe',\n+ type: 'post'\n+ }}\n+ isUnread\n+ hasCalling\n+ onCallClick={onCallClick}\n+ onClick={onClick}\n+ name=\"Webex User\"\n+ teamColor=\"blue\"\n+ teamName=\"Best Team\"\n+ />\n+ <SpaceItem\n+ activityText=\"Calling!\"\n+ callStartTime={Date.now()}\n+ currentUser={currentUser}\n+ formatMessage={(a) => a}\n+ id=\"jane-doe-space\"\n+ lastActivityTime=\"9:05 PM\"\n+ latestActivity={{\n+ actorName: 'Jane Doe',\n+ type: 'post'\n+ }}\n+ isUnread\n+ hasCalling\n+ onCallClick={onCallClick}\n+ onClick={onClick}\n+ name=\"Webex User\"\n+ teamColor=\"blue\"\n+ teamName=\"Best Team\"\n+ />\n+ <h3>SpaceList</h3>\n+ <SpacesList\n+ currentUser={currentUser}\n+ formatMessage={(a) => a}\n+ hasCalling\n+ onCallClick={onCallClick}\n+ onClick={onClick}\n+ spaces={spacesListSpaces}\n+ />\n+ <SpacesList\n+ currentUser={currentUser}\n+ formatMessage={(a) => a}\n+ onCallClick={onCallClick}\n+ onClick={onClick}\n+ spaces={spacesListSpaces}\n+ />\n+ </div>\n+ );\n+}\n+\n+export default RecentsComponents;\n",
"new_path": "samples/recents-components/index.js",
"old_path": null
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
feat(samples): add recents components to samples
| 1
|
feat
|
samples
|
730,414
|
30.04.2018 10:40:29
| 14,400
|
1aed8401d2c9552e809fa1cfbf1c15bf1309fbb6
|
chore(npm publish): ensure project config is maintained at home dir
|
[
{
"change_type": "MODIFY",
"diff": "@@ -207,7 +207,10 @@ ansiColor('xterm') {\nstring(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')\n]) {\ntry {\n- sh 'echo \\'//registry.npmjs.org/:_authToken=${NPM_TOKEN}\\' > $HOME/.npmrc'\n+ // Copy & update config file\n+ sh 'cp .npmrc $HOME/.npmrc'\n+ sh 'echo \\'//registry.npmjs.org/:_authToken=${NPM_TOKEN}\\' >> $HOME/.npmrc'\n+ // Publish\necho ''\necho 'Reminder: E403 errors below are normal. They occur for any package that has no updates to publish'\necho ''\n@@ -216,6 +219,8 @@ ansiColor('xterm') {\nnvm use v8.9.1\nnpm run publish:components\n'''\n+ // Clean up home dir\n+ sh 'rm $HOME/.npmrc'\n}\ncatch (error) {\nwarn(\"failed to publish to npm ${error.toString()}\")\n",
"new_path": "Jenkinsfile",
"old_path": "Jenkinsfile"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(npm publish): ensure project config is maintained at home dir
| 1
|
chore
|
npm publish
|
730,413
|
30.04.2018 12:43:09
| 14,400
|
8be3b14021e0fa173608308cac36508034137f15
|
refactor(journeys): define job names in a helper object
|
[
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,16 @@ import SauceLabs from 'saucelabs';\n// eslint-disable-next-line prefer-destructuring\nconst argv = require('yargs').argv;\n+\n+export const jobNames = {\n+ multiple: 'react-widget-multiple',\n+ oneOnOneDataApi: 'react-widget-oneOnOne-dataApi',\n+ oneOnOneGlobal: 'react-widget-oneOnOne-global',\n+ recentsDataApi: 'react-widget-recents-dataApi',\n+ recentsGlobal: 'react-widget-recents-global',\n+ spaceDataApi: 'react-widget-space-dataApi',\n+ spaceGlobal: 'react-widget-space-global'\n+};\n/**\n* Move mouse a specified amount of pixels\n* Origin is set to the element that matches the selector passed\n",
"new_path": "test/journeys/lib/test-helpers/index.js",
"old_path": "test/journeys/lib/test-helpers/index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -7,7 +7,7 @@ import CiscoSpark from '@ciscospark/spark-core';\nimport testUsers from '@ciscospark/test-helper-test-users';\nimport waitForPromise from '../../lib/wait-for-promise';\n-import {moveMouse, renameJob, updateJobStatus} from '../../lib/test-helpers';\n+import {jobNames, moveMouse, renameJob, updateJobStatus} from '../../lib/test-helpers';\nimport {elements as spaceElements} from '../../lib/test-helpers/space-widget/main';\nimport {sendMessage, verifyMessageReceipt} from '../../lib/test-helpers/space-widget/messaging';\n@@ -20,7 +20,6 @@ import {\ndescribe('Multiple Widgets', () => {\nconst browserLocal = browser.select('browserLocal');\nconst browserRemote = browser.select('browserRemote');\n- const jobName = 'react-widget-multiple';\nlet docbrown, lorraine, marty;\nlet conversation, oneOnOneConversation;\n@@ -28,7 +27,7 @@ describe('Multiple Widgets', () => {\nlet allPassed = true;\nbefore('start new sauce session', () => {\n- renameJob(jobName);\n+ renameJob(jobNames.multiple);\n});\nbefore('load browser', () => {\n@@ -243,7 +242,7 @@ describe('Multiple Widgets', () => {\n});\nafter(() => {\n- updateJobStatus(jobName, allPassed);\n+ updateJobStatus(jobNames.multiple, allPassed);\n});\nafter('disconnect', () => Promise.all([\n",
"new_path": "test/journeys/specs/multiple/index.js",
"old_path": "test/journeys/specs/multiple/index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -11,7 +11,7 @@ import {\nFEATURE_FLAG_ROSTER\n} from '../../../lib/test-helpers/space-widget/roster';\nimport {elements, openMenuAndClickButton} from '../../../lib/test-helpers/space-widget/main';\n-import {renameJob, updateJobStatus} from '../../../lib/test-helpers';\n+import {jobNames, renameJob, updateJobStatus} from '../../../lib/test-helpers';\ndescribe('Widget Space: One on One: Data API', () => {\nconst browserLocal = browser.select('browserLocal');\n@@ -20,13 +20,12 @@ describe('Widget Space: One on One: Data API', () => {\nlet allPassed = true;\nconst mccoyName = 'Bones Mccoy';\nconst spockName = 'Mr Spock';\n- const jobName = 'react-widget-oneOnOne-dataApi';\nbefore('start new sauce session', () => {\nif (process.env.INTEGRATION) {\nbrowser.reload();\n}\n- renameJob(jobName);\n+ renameJob(jobNames.oneOnOneDataApi);\n});\nbefore('load browsers', () => {\n@@ -179,6 +178,6 @@ describe('Widget Space: One on One: Data API', () => {\n});\nafter(() => {\n- updateJobStatus(jobName, allPassed);\n+ updateJobStatus(jobNames.oneOnOneDataApi, allPassed);\n});\n});\n",
"new_path": "test/journeys/specs/oneOnOne/dataApi/basic.js",
"old_path": "test/journeys/specs/oneOnOne/dataApi/basic.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -4,7 +4,7 @@ import '@ciscospark/plugin-logger';\nimport CiscoSpark from '@ciscospark/spark-core';\nimport testUsers from '@ciscospark/test-helper-test-users';\n-import {renameJob, updateJobStatus} from '../../../lib/test-helpers';\n+import {jobNames, renameJob, updateJobStatus} from '../../../lib/test-helpers';\nimport {elements as rosterElements, hasParticipants, FEATURE_FLAG_ROSTER} from '../../../lib/test-helpers/space-widget/roster';\nimport {runAxe} from '../../../lib/axe';\nimport {elements, openMenuAndClickButton} from '../../../lib/test-helpers/space-widget/main';\n@@ -14,13 +14,12 @@ describe('Widget Space: One on One', () => {\nlet mccoy, spock;\nlet allPassed = true;\n- const jobName = 'react-widget-oneOnOne-global';\nconst mccoyName = 'Bones Mccoy';\nconst spockName = 'Mr Spock';\nbefore('start new sauce session', () => {\nbrowser.reload();\n- renameJob(jobName);\n+ renameJob(jobNames.oneOnOneGlobal);\n});\nbefore('load browsers', () => {\n@@ -190,7 +189,7 @@ describe('Widget Space: One on One', () => {\n});\nafter(() => {\n- updateJobStatus(jobName, allPassed);\n+ updateJobStatus(jobNames.oneOnOneGlobal, allPassed);\n});\nif (process.env.DEBUG_JOURNEYS) {\n",
"new_path": "test/journeys/specs/oneOnOne/global/basic.js",
"old_path": "test/journeys/specs/oneOnOne/global/basic.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,7 +6,7 @@ import '@ciscospark/internal-plugin-conversation';\nimport '@ciscospark/internal-plugin-feature';\nimport CiscoSpark from '@ciscospark/spark-core';\n-import {moveMouse, renameJob, updateJobStatus} from '../../../lib/test-helpers';\n+import {jobNames, moveMouse, renameJob, updateJobStatus} from '../../../lib/test-helpers';\nimport {FEATURE_FLAG_GROUP_CALLING, elements as meetElements, hangup} from '../../../lib/test-helpers/space-widget/meet';\nimport {\ncreateSpaceAndPost,\n@@ -18,7 +18,6 @@ import {\ndescribe('Widget Recents: Data API', () => {\nconst browserLocal = browser.select('browserLocal');\nconst browserRemote = browser.select('browserRemote');\n- const jobName = 'react-widget-recents-dataApi';\nlet allPassed = true;\nlet docbrown, lorraine, marty;\n@@ -28,7 +27,7 @@ describe('Widget Recents: Data API', () => {\nif (process.env.INTEGRATION) {\nbrowser.reload();\n}\n- renameJob(jobName);\n+ renameJob(jobNames.recentsDataApi);\n});\n@@ -195,7 +194,7 @@ describe('Widget Recents: Data API', () => {\n});\nafter(() => {\n- updateJobStatus(jobName, allPassed);\n+ updateJobStatus(jobNames.recentsDataApi, allPassed);\n});\nafter('disconnect', () => Promise.all([\n",
"new_path": "test/journeys/specs/recents/dataApi/basic.js",
"old_path": "test/journeys/specs/recents/dataApi/basic.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -10,7 +10,7 @@ import waitForPromise from '../../../lib/wait-for-promise';\nimport {runAxe} from '../../../lib/axe';\nimport {clearEventLog, getEventLog} from '../../../lib/events';\n-import {moveMouse, renameJob, updateJobStatus} from '../../../lib/test-helpers';\n+import {jobNames, moveMouse, renameJob, updateJobStatus} from '../../../lib/test-helpers';\nimport {FEATURE_FLAG_GROUP_CALLING, elements as meetElements, hangup} from '../../../lib/test-helpers/space-widget/meet';\nimport {\ncreateSpaceAndPost,\n@@ -22,7 +22,6 @@ import {\ndescribe('Widget Recents', () => {\nconst browserLocal = browser.select('browserLocal');\nconst browserRemote = browser.select('browserRemote');\n- const jobName = 'react-widget-recents-global';\nlet allPassed = true;\nlet docbrown, lorraine, marty;\n@@ -30,7 +29,7 @@ describe('Widget Recents', () => {\nbefore('start new sauce session', () => {\nbrowser.reload();\n- renameJob(jobName);\n+ renameJob(jobNames.recentsGlobal);\n});\nbefore('load browser for recents widget', () => {\n@@ -262,7 +261,7 @@ describe('Widget Recents', () => {\n});\nafter(() => {\n- updateJobStatus(jobName, allPassed);\n+ updateJobStatus(jobNames.recentsGlobal, allPassed);\n});\nafter('disconnect', () => Promise.all([\n",
"new_path": "test/journeys/specs/recents/global/basic.js",
"old_path": "test/journeys/specs/recents/global/basic.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,7 +5,7 @@ import '@ciscospark/plugin-logger';\nimport CiscoSpark from '@ciscospark/spark-core';\nimport '@ciscospark/internal-plugin-conversation';\n-import {renameJob, updateJobStatus} from '../../../lib/test-helpers';\n+import {jobNames, renameJob, updateJobStatus} from '../../../lib/test-helpers';\nimport {elements, openMenuAndClickButton} from '../../../lib/test-helpers/space-widget/main';\nimport {\nelements as rosterElements,\n@@ -17,7 +17,6 @@ import {\ndescribe('Widget Space: Data API', () => {\nconst browserLocal = browser.select('browserLocal');\n- const jobName = 'react-widget-space-dataApi';\nlet allPassed = true;\nlet biff, docbrown, lorraine, marty;\n@@ -27,7 +26,7 @@ describe('Widget Space: Data API', () => {\nif (process.env.INTEGRATION) {\nbrowser.reload();\n}\n- renameJob(jobName);\n+ renameJob(jobNames.spaceDataApi);\n});\nbefore('load browsers', () => {\n@@ -223,7 +222,7 @@ describe('Widget Space: Data API', () => {\n});\nafter(() => {\n- updateJobStatus(jobName, allPassed);\n+ updateJobStatus(jobNames.spaceDataApi, allPassed);\n});\nafter('disconnect', () => marty.spark.internal.mercury.disconnect());\n",
"new_path": "test/journeys/specs/space/dataApi/basic.js",
"old_path": "test/journeys/specs/space/dataApi/basic.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,7 +5,7 @@ import '@ciscospark/plugin-logger';\nimport CiscoSpark from '@ciscospark/spark-core';\nimport '@ciscospark/internal-plugin-conversation';\n-import {renameJob, updateJobStatus} from '../../../lib/test-helpers';\n+import {jobNames, renameJob, updateJobStatus} from '../../../lib/test-helpers';\nimport {runAxe} from '../../../lib/axe';\nimport {\nelements as rosterElements,\n@@ -18,7 +18,6 @@ import {elements, openMenuAndClickButton} from '../../../lib/test-helpers/space-\ndescribe('Widget Space', () => {\nconst browserLocal = browser.select('browserLocal');\n- const jobName = 'react-widget-space-global';\nlet allPassed = true;\nlet biff, docbrown, lorraine, marty;\n@@ -26,7 +25,7 @@ describe('Widget Space', () => {\nbefore('start new sauce session', () => {\nbrowser.reload();\n- renameJob(jobName);\n+ renameJob(jobNames.spaceGlobal);\n});\nbefore('load browsers', () => {\n@@ -228,7 +227,7 @@ describe('Widget Space', () => {\n});\nafter(() => {\n- updateJobStatus(jobName, allPassed);\n+ updateJobStatus(jobNames.spaceGlobal, allPassed);\n});\nafter('disconnect', () => marty.spark.internal.mercury.disconnect());\n",
"new_path": "test/journeys/specs/space/global/basic.js",
"old_path": "test/journeys/specs/space/global/basic.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
refactor(journeys): define job names in a helper object
| 1
|
refactor
|
journeys
|
730,414
|
30.04.2018 12:50:54
| 14,400
|
d0a8a8f975a456c87077b9eddf0678071ab40e1b
|
chore(static analysis): add token to fix nvm sourcing error
|
[
{
"change_type": "MODIFY",
"diff": "@@ -98,12 +98,16 @@ ansiColor('xterm') {\n}\nstage('Static Analysis') {\n+ withCredentials([\n+ string(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')\n+ ]) {\nsh '''#!/bin/bash -ex\nsource ~/.nvm/nvm.sh\nnvm use v8.9.1\nnpm run static-analysis\n'''\n}\n+ }\nstage('Unit Tests') {\nsh '''#!/bin/bash -ex\n@@ -219,8 +223,6 @@ ansiColor('xterm') {\nnvm use v8.9.1\nnpm run publish:components\n'''\n- // Clean up home dir\n- sh 'rm $HOME/.npmrc'\n}\ncatch (error) {\nwarn(\"failed to publish to npm ${error.toString()}\")\n",
"new_path": "Jenkinsfile",
"old_path": "Jenkinsfile"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(static analysis): add token to fix nvm sourcing error
| 1
|
chore
|
static analysis
|
791,690
|
30.04.2018 13:14:55
| 25,200
|
756ee632cd14ba72485064f283f14449a94d1ceb
|
core(lantern): use securityOrigin on record
|
[
{
"change_type": "MODIFY",
"diff": "@@ -42,13 +42,6 @@ class NetworkNode extends Node {\n* @return {LH.WebInspector.NetworkRequest}\n*/\nget record() {\n- // Ensure that the record has an origin value\n- if (this._record.origin === undefined) {\n- this._record.origin = this._record.parsedURL\n- ? `${this._record.parsedURL.scheme}://${this._record.parsedURL.host}`\n- : null;\n- }\n-\nreturn this._record;\n}\n",
"new_path": "lighthouse-core/lib/dependency-graph/network-node.js",
"old_path": "lighthouse-core/lib/dependency-graph/network-node.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -96,7 +96,7 @@ module.exports = class ConnectionPool {\nreturn this._connectionsByRecord.get(record);\n}\n- const origin = String(record.origin);\n+ const origin = String(record.parsedURL.securityOrigin());\n/** @type {TcpConnection[]} */\nconst connections = this._connectionsByOrigin.get(origin) || [];\nconst wasConnectionWarm = !!this._connectionReusedByRequestId.get(record.requestId);\n",
"new_path": "lighthouse-core/lib/dependency-graph/simulator/connection-pool.js",
"old_path": "lighthouse-core/lib/dependency-graph/simulator/connection-pool.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -22,7 +22,7 @@ class NetworkAnalyzer {\nstatic groupByOrigin(records) {\nconst grouped = new Map();\nrecords.forEach(item => {\n- const key = item.origin;\n+ const key = item.parsedURL.securityOrigin();\nconst group = grouped.get(key) || [];\ngroup.push(item);\ngrouped.set(key, group);\n@@ -179,7 +179,7 @@ class NetworkAnalyzer {\nif (!Number.isFinite(timing.sendEnd) || timing.sendEnd < 0) return;\nconst ttfb = timing.receiveHeadersEnd - timing.sendEnd;\n- const origin = record.origin;\n+ const origin = record.parsedURL.securityOrigin();\nconst rtt = rttByOrigin.get(origin) || rttByOrigin.get(NetworkAnalyzer.SUMMARY) || 0;\nreturn Math.max(ttfb - rtt, 0);\n});\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": "@@ -25,7 +25,7 @@ describe('Byte efficiency base audit', () => {\nconst networkRecord = {\nrequestId: 1,\nurl: 'http://example.com/',\n- parsedURL: {scheme: 'http'},\n+ parsedURL: {scheme: 'http', securityOrigin: () => 'http://example.com'},\n_transferSize: 400000,\n_timing: {receiveHeadersEnd: 0},\n};\n",
"new_path": "lighthouse-core/test/audits/byte-efficiency/byte-efficiency-audit-test.js",
"old_path": "lighthouse-core/test/audits/byte-efficiency/byte-efficiency-audit-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -51,7 +51,8 @@ describe('Render blocking resources audit', () => {\nbeforeEach(() => {\nrequestId = 1;\nrecord = props => {\n- const ret = Object.assign({parsedURL: {}, requestId: requestId++}, props);\n+ const parsedURL = {securityOrigin: () => 'http://example.com'};\n+ const ret = Object.assign({parsedURL, requestId: requestId++}, props);\nObject.defineProperty(ret, 'transferSize', {\nget() {\nreturn ret._transferSize;\n@@ -62,7 +63,7 @@ describe('Render blocking resources audit', () => {\n});\nit('computes savings from deferring', () => {\n- const serverResponseTimeByOrigin = new Map([['undefined://undefined', 100]]);\n+ const serverResponseTimeByOrigin = new Map([['http://example.com', 100]]);\nconst simulator = new Simulator({rtt: 1000, serverResponseTimeByOrigin});\nconst documentNode = new NetworkNode(record({_transferSize: 4000}));\nconst styleNode = new NetworkNode(record({_transferSize: 3000}));\n@@ -81,7 +82,7 @@ describe('Render blocking resources audit', () => {\n});\nit('computes savings from inlining', () => {\n- const serverResponseTimeByOrigin = new Map([['undefined://undefined', 100]]);\n+ const serverResponseTimeByOrigin = new Map([['http://example.com', 100]]);\nconst simulator = new Simulator({rtt: 1000, serverResponseTimeByOrigin});\nconst documentNode = new NetworkNode(record({_transferSize: 10 * 1000}));\nconst styleNode = new NetworkNode(\n",
"new_path": "lighthouse-core/test/audits/byte-efficiency/render-blocking-resources-test.js",
"old_path": "lighthouse-core/test/audits/byte-efficiency/render-blocking-resources-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -19,7 +19,8 @@ describe('DependencyGraph/Simulator/NetworkAnalyzer', () => {\nfunction addOriginToRecord(record) {\nconst parsed = record.parsedURL || {};\n- record.origin = `${parsed.scheme}://${parsed.host}`;\n+ parsed.securityOrigin = () => `${parsed.scheme}://${parsed.host}`;\n+ if (!record.parsedURL) record.parsedURL = parsed;\n}\nfunction createRecord(opts) {\n@@ -27,7 +28,6 @@ describe('DependencyGraph/Simulator/NetworkAnalyzer', () => {\nreturn Object.assign(\n{\nurl,\n- origin: url.match(/.*\\.com/)[0],\nrequestId: recordId++,\nconnectionId: 0,\nconnectionReused: false,\n@@ -35,7 +35,7 @@ describe('DependencyGraph/Simulator/NetworkAnalyzer', () => {\nendTime: 0.01,\ntransferSize: 0,\nprotocol: 'http/1.1',\n- parsedURL: {scheme: url.match(/https?/)[0]},\n+ parsedURL: {scheme: url.match(/https?/)[0], securityOrigin: () => url.match(/.*\\.com/)[0]},\n_timing: opts.timing || null,\n},\nopts\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"
},
{
"change_type": "MODIFY",
"diff": "@@ -20,9 +20,8 @@ function request(opts) {\nreturn Object.assign({\nrequestId: opts.requestId || nextRequestId++,\nurl,\n- origin: url,\ntransferSize: opts.transferSize || 1000,\n- parsedURL: {scheme},\n+ parsedURL: {scheme, securityOrigin: () => url},\n_timing: opts.timing,\n}, opts);\n}\n",
"new_path": "lighthouse-core/test/lib/dependency-graph/simulator/simulator-test.js",
"old_path": "lighthouse-core/test/lib/dependency-graph/simulator/simulator-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -17,7 +17,6 @@ declare global {\nurl: string;\n_url: string;\nprotocol: string;\n- origin: string | null;\nparsedURL: ParsedURL;\nstartTime: number;\n@@ -54,6 +53,7 @@ declare global {\nexport interface ParsedURL {\nscheme: string;\nhost: string;\n+ securityOrigin(): string;\n}\nexport interface ResourceType {\n",
"new_path": "typings/web-inspector.d.ts",
"old_path": "typings/web-inspector.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(lantern): use securityOrigin on record (#5071)
| 1
|
core
|
lantern
|
730,414
|
30.04.2018 13:16:39
| 14,400
|
08cb4609bd203d5a7f6a6c1ea12e21d8aec8e885
|
chore(unit tests): add token to fix nvm sourcing error
|
[
{
"change_type": "MODIFY",
"diff": "@@ -110,12 +110,16 @@ ansiColor('xterm') {\n}\nstage('Unit Tests') {\n+ withCredentials([\n+ string(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')\n+ ]) {\nsh '''#!/bin/bash -ex\nsource ~/.nvm/nvm.sh\nnvm use v8.9.1\nnpm run jest\n'''\n}\n+ }\nstage('Journey Tests') {\nwithCredentials([\n",
"new_path": "Jenkinsfile",
"old_path": "Jenkinsfile"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(unit tests): add token to fix nvm sourcing error
| 1
|
chore
|
unit tests
|
730,414
|
30.04.2018 13:32:45
| 14,400
|
678e5f54f489ee7e5a730bfbc79cefb97e9582c1
|
chore(build): add tokens to stages to fix nvm sourcing error
|
[
{
"change_type": "MODIFY",
"diff": "@@ -123,6 +123,7 @@ ansiColor('xterm') {\nstage('Journey Tests') {\nwithCredentials([\n+ string(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN'),\nstring(credentialsId: 'ddfd04fb-e00a-4df0-9250-9a7cb37bce0e', variable: 'CISCOSPARK_CLIENT_SECRET'),\nusernamePassword(credentialsId: 'SAUCE_LABS_VALIDATED_MERGE_CREDENTIALS', passwordVariable: 'SAUCE_ACCESS_KEY', usernameVariable: 'SAUCE_USERNAME'),\nstring(credentialsId: 'CISCOSPARK_APPID_SECRET', variable: 'CISCOSPARK_APPID_SECRET'),\n@@ -142,6 +143,9 @@ ansiColor('xterm') {\n}\nstage('Bump version') {\n+ withCredentials([\n+ string(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')\n+ ]) {\nsh '''#!/bin/bash -ex\nsource ~/.nvm/nvm.sh\nnvm use v8.9.1\n@@ -152,9 +156,11 @@ ansiColor('xterm') {\n'''\npackageJsonVersion = readFile '.version'\n}\n+ }\nstage('Build for CDN'){\nwithCredentials([\n+ string(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN'),\nusernamePassword(credentialsId: 'MESSAGE_DEMO_CLIENT', passwordVariable: 'MESSAGE_DEMO_CLIENT_SECRET', usernameVariable: 'MESSAGE_DEMO_CLIENT_ID'),\nfile(credentialsId: 'web-sdk-cdn-private-key', variable: 'PRIVATE_KEY_PATH'),\nstring(credentialsId: 'web-sdk-cdn-private-key-passphrase', variable: 'PRIVATE_KEY_PASSPHRASE'),\n",
"new_path": "Jenkinsfile",
"old_path": "Jenkinsfile"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(build): add tokens to stages to fix nvm sourcing error
| 1
|
chore
|
build
|
217,922
|
30.04.2018 13:53:19
| -7,200
|
89ebf367c17bfda1fe2cf91558f6aeeb07fd2283
|
chore(simulator): fixes for some whistle actions
|
[
{
"change_type": "MODIFY",
"diff": "@@ -11,7 +11,8 @@ export class NymeiasWheel extends CraftingAction {\n}\nexecute(simulation: Simulation): void {\n- simulation.repair(Tables.NYMEIAS_WHEEL_TABLE[simulation.getBuff(Buff.WHISTLE_WHILE_YOU_WORK).stacks])\n+ simulation.repair(Tables.NYMEIAS_WHEEL_TABLE[simulation.getBuff(Buff.WHISTLE_WHILE_YOU_WORK).stacks]);\n+ simulation.removeBuff(Buff.WHISTLE_WHILE_YOU_WORK);\n}\ngetBaseCPCost(simulationState: Simulation): number {\n",
"new_path": "src/app/pages/simulator/model/actions/other/nymeias-wheel.ts",
"old_path": "src/app/pages/simulator/model/actions/other/nymeias-wheel.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -18,8 +18,11 @@ export class TrainedHand extends GeneralAction {\nif (simulation.getBuff(Buff.WHISTLE_WHILE_YOU_WORK).stacks % 3 === 0) {\nprogressPotency += 50;\n}\n- simulation.quality += baseQualityIncrease * qualityPotency / 100;\n- simulation.progression += baseProgressIncrease * progressPotency / 100;\n+ simulation.quality += Math.floor(baseQualityIncrease * qualityPotency / 100);\n+ simulation.progression += Math.floor(baseProgressIncrease * progressPotency / 100);\n+ if (simulation.getBuff(Buff.INNER_QUIET).stacks < 11) {\n+ simulation.getBuff(Buff.INNER_QUIET).stacks++;\n+ }\n}\ngetBaseCPCost(simulationState: Simulation): number {\n",
"new_path": "src/app/pages/simulator/model/actions/other/trained-hand.ts",
"old_path": "src/app/pages/simulator/model/actions/other/trained-hand.ts"
},
{
"change_type": "MODIFY",
"diff": "\"Craftsmanship\": \"Craftsmanship\",\n\"Control\": \"Control\",\n\"Specialist\": \"Specialist\",\n- \"Ingredients\": \"Ingredients\",\n+ \"Ingredients\": \"HQ Ingredients\",\n\"Consumables\": \"Consumables\",\n\"Apply_stats\": \"Apply stats\",\n\"Apply_ingredients\": \"Apply HQ ingredients\"\n",
"new_path": "src/assets/i18n/en.json",
"old_path": "src/assets/i18n/en.json"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): fixes for some whistle actions
| 1
|
chore
|
simulator
|
791,723
|
30.04.2018 15:43:04
| 25,200
|
29935223e6b7ece21b993c998d38b338bfa8af2b
|
report: tweak tooltips
|
[
{
"change_type": "MODIFY",
"diff": "--section-indent: 16px;\n--audit-group-indent: 16px;\n--audit-indent: 16px;\n+ --text-indent: 8px;\n--expandable-indent: 20px;\n--secondary-text-color: #565656;\n/*--accent-color: #3879d9;*/\n@@ -352,12 +353,14 @@ summary {\n}\n.lh-perf-metric {\n- position: relative;\n+ border-top: 1px solid var(--report-secondary-border-color);\n+}\n+\n+.lh-perf-metric__innerwrap {\ndisplay: flex;\njustify-content: space-between;\n-\n- padding: calc(2 * var(--lh-audit-vpadding)) 0;\n- border-top: 1px solid var(--report-secondary-border-color);\n+ margin: var(--lh-audit-vpadding) 0;\n+ padding: var(--lh-audit-vpadding) var(--text-indent);\n}\n.lh-perf-metric__header {\n@@ -941,11 +944,15 @@ summary.lh-passed-audits-summary {\nopacity: 0;\n}\n+.tooltip-boundary:hover {\n+ background-color: #F8F9FA;\n+}\n+\n.tooltip-boundary:hover .tooltip {\ndisplay: block;\nanimation: fadeInTooltip 150ms;\nanimation-fill-mode: forwards;\n- animation-delay: 500ms;\n+ animation-delay: 900ms;\nmin-width: 15em;\nbackground: #ffffff;\npadding: 15px;\n@@ -962,6 +969,7 @@ summary.lh-passed-audits-summary {\nborder-width: 10px;\nposition: absolute;\nbottom: -20px;\n+ right: 6px;\ntransform: rotate(180deg);\npointer-events: 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 perf metric -->\n<template id=\"tmpl-lh-perf-metric\">\n- <div class=\"lh-perf-metric tooltip-boundary\">\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\"><span></span></div>\n<div class=\"lh-perf-metric__description tooltip\"></div>\n</div>\n+ </div>\n</template>\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: tweak tooltips
| 1
|
report
| null |
730,413
|
30.04.2018 15:50:04
| 14,400
|
fe5fee4c0b490e68a849e4ce95dc935c6b1923dd
|
chore(tooling): move comments outside shell script
|
[
{
"change_type": "MODIFY",
"diff": "@@ -128,12 +128,12 @@ ansiColor('xterm') {\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+ // 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\nsh '''#!/bin/bash -ex\nsource ~/.nvm/nvm.sh\nnvm use 8.9.1\nNODE_ENV=test npm run build:package widget-space && npm run build:package widget-recents\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\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",
"new_path": "Jenkinsfile",
"old_path": "Jenkinsfile"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): move comments outside shell script
| 1
|
chore
|
tooling
|
217,922
|
30.04.2018 16:32:30
| -7,200
|
f0b85f3bbed4eb2eb1a3a27f2ec140c7fa18fdca
|
chore(simulator): style adjustments and preparation for persistence
|
[
{
"change_type": "ADD",
"diff": "+import {Injectable, NgZone} from '@angular/core';\n+import {FirestoreStorage} from './storage/firebase/firestore-storage';\n+import {Workshop} from '../../model/other/workshop';\n+import {NgSerializerService} from '@kaiu/ng-serializer';\n+import {AngularFirestore} from 'angularfire2/firestore';\n+import {Observable} from 'rxjs/Observable';\n+import {DocumentChangeAction} from 'angularfire2/firestore/interfaces';\n+import {List} from '../../model/list/list';\n+import {PendingChangesService} from './pending-changes/pending-changes.service';\n+import {CraftingRotation} from '../../model/other/crafting-rotation';\n+\n+@Injectable()\n+export class CraftingRotationService extends FirestoreStorage<CraftingRotation> {\n+\n+ constructor(protected firestore: AngularFirestore, protected serializer: NgSerializerService, protected zone: NgZone,\n+ protected pendingChangesService: PendingChangesService) {\n+ super(firestore, serializer, zone, pendingChangesService);\n+ }\n+\n+ getUserRotations(uid: string): Observable<CraftingRotation[]> {\n+ return this.firestore.collection(this.getBaseUri(), ref => ref.where('authorId', '==', uid))\n+ .snapshotChanges()\n+ .map((snaps: DocumentChangeAction[]) => {\n+ const workshops = snaps.map(snap => {\n+ const valueWithKey: CraftingRotation = <CraftingRotation>{$key: snap.payload.doc.id, ...snap.payload.doc.data()};\n+ delete snap.payload;\n+ return valueWithKey;\n+ });\n+ return this.serializer.deserialize<CraftingRotation>(workshops, [this.getClass()]);\n+ });\n+ }\n+\n+ protected getBaseUri(): string {\n+ return '/rotations';\n+ }\n+\n+ protected getClass(): any {\n+ return CraftingRotation;\n+ }\n+\n+}\n",
"new_path": "src/app/core/database/crafting-rotation.service.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {DataModel} from '../../core/database/storage/data-model';\n+\n+export class CraftingRotation extends DataModel {\n+\n+ public rotation: string[];\n+\n+ public authorId: string;\n+\n+ // TODO Food\n+\n+ public description: string;\n+}\n",
"new_path": "src/app/model/other/crafting-rotation.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": ".steps {\nwhite-space: nowrap;\n- font-size: 2.1rem;\n+ font-size: 1.2rem;\nmargin-right: 20px;\npadding-bottom: 10px;\ndisplay: flex;\n@@ -49,15 +49,19 @@ mat-progress-bar {\nalign-items: center;\njustify-content: center;\nflex-direction: column;\n+ margin-right: 10px;\n.durability-value {\n- font-size: 3rem;\n+ font-size: 2rem;\n}\n}\n.right-part {\nflex-grow: 1;\n- padding: 0 10px;\n+ padding: 0 5px;\n.right-row {\n- padding: 20px 0;\n+ padding: 5px 0;\n+ h3 {\n+ margin-bottom: 5px;\n+ }\n.value-bar {\ndisplay: flex;\nalign-items: center;\n@@ -88,7 +92,7 @@ mat-progress-bar {\nalign-items: center;\nmat-progress-bar {\nopacity: .7;\n- height: 8px;\n+ height: 5px;\nflex: 0 1 300px;\n}\n.cp-amount {\n@@ -123,7 +127,7 @@ mat-progress-bar {\nalign-items: center;\nmat-progress-bar {\nopacity: .7;\n- height: 8px;\n+ height: 5px;\nflex: 0 1 300px;\n}\n.cp-amount {\n@@ -207,5 +211,9 @@ mat-progress-bar {\n}\nmat-card {\n- margin: 10px 0;\n+ margin: 5px 0;\n+ padding: 16px;\n+ mat-card-subtitle {\n+ margin-bottom: 0;\n+ }\n}\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": "@@ -15,4 +15,6 @@ export interface ActionResult {\nsolidityDifference: number;\n// If the action is skipped because the craft is finished\nskipped: boolean;\n+ // State of the step\n+ state: 'NORMAL' | 'EXCELLENT' | 'GOOD' | 'POOR';\n}\n",
"new_path": "src/app/pages/simulator/model/action-result.ts",
"old_path": "src/app/pages/simulator/model/action-result.ts"
},
{
"change_type": "ADD",
"diff": "+import {BuffAction} from '../buff-action';\n+import {Simulation} from '../../../simulation/simulation';\n+import {Buff} from '../../buff.enum';\n+\n+export class HeartOfTheCrafter extends BuffAction {\n+\n+ getBaseCPCost(simulationState: Simulation): number {\n+ return 45;\n+ }\n+\n+ protected getBuff(): Buff {\n+ return Buff.HEART_OF_CRAFTER;\n+ }\n+\n+ getDuration(simulation: Simulation): number {\n+ return 7;\n+ }\n+\n+ getIds(): number[] {\n+ return [100179, 100180, 100181, 100182, 100183, 100184, 100185, 100186];\n+ }\n+\n+ protected getInitialStacks(): number {\n+ return 0;\n+ }\n+\n+ protected getTick(): (simulation: Simulation, linear?: boolean) => void {\n+ return undefined;\n+ }\n+\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/buff/heart-of-the-crafter.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -31,9 +31,10 @@ export class WhistleWhileYouWork extends BuffAction {\nprotected getTick(): (simulation: Simulation, linear?: boolean) => void {\nreturn (simulation, linear) => {\n- // If we're in linear mode, consider each even turn as matching the condition, as you can't have each turn GOOD, ever.\n- if ((linear && simulation.steps.length % 2 === 0 && simulation.steps.length > 0)\n- || simulation.state === 'GOOD' || simulation.state === 'EXCELLENT') {\n+ const stepsForGood = simulation.hasBuff(Buff.HEART_OF_CRAFTER) ? 2 : 4;\n+ // If we're in linear mode, consider one out of 4 steps as matching the condition, as you can't have each turn GOOD, ever.\n+ if ((linear && simulation.steps.length % stepsForGood === 0 && simulation.steps.length > 0)\n+ || simulation.lastStep.state === 'GOOD' || simulation.lastStep.state === 'EXCELLENT') {\nsimulation.getBuff(Buff.WHISTLE_WHILE_YOU_WORK).stacks--;\n}\n// When it reaches the end, progress is increased\n",
"new_path": "src/app/pages/simulator/model/actions/buff/whistle-while-you-work.ts",
"old_path": "src/app/pages/simulator/model/actions/buff/whistle-while-you-work.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -49,6 +49,7 @@ import {WhistleWhileYouWork} from './actions/buff/whistle-while-you-work';\nimport {Satisfaction} from './actions/other/satisfaction';\nimport {NymeiasWheel} from './actions/other/nymeias-wheel';\nimport {TrainedHand} from './actions/other/trained-hand';\n+import {HeartOfTheCrafter} from './actions/buff/heart-of-the-crafter';\n@Injectable()\nexport class CraftingActionsRegistry {\n@@ -106,6 +107,7 @@ export class CraftingActionsRegistry {\nnew MakersMark(),\nnew InitialPreparations(),\nnew WhistleWhileYouWork(),\n+ new HeartOfTheCrafter(),\n// Specialties\nnew SpecialtyRefurbish(),\n@@ -121,4 +123,12 @@ export class CraftingActionsRegistry {\nreturn CraftingActionsRegistry.ALL_ACTIONS.filter(action => action.getType() === type);\n}\n+ public serializeRotation(rotation: CraftingAction[]): string[] {\n+ return rotation.map(action => action.getName());\n+ }\n+\n+ public deserializeRotation(rotation: string[]): CraftingAction[] {\n+ return rotation.map(actionName => CraftingActionsRegistry.ALL_ACTIONS.find(el => el.getName() === actionName))\n+ .filter(action => action !== undefined);\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"
},
{
"change_type": "MODIFY",
"diff": "@@ -109,7 +109,8 @@ export class Simulation {\naddedProgression: 0,\ncpDifference: 0,\nskipped: true,\n- solidityDifference: 0\n+ solidityDifference: 0,\n+ state: this.state,\n});\n}\n// Tick buffs after checking synth result, so if we reach 0 durability, synth fails.\n@@ -153,7 +154,8 @@ export class Simulation {\naddedProgression: this.progression - progressionBefore,\ncpDifference: CPCost,\nskipped: false,\n- solidityDifference: action.getDurabilityCost(this)\n+ solidityDifference: action.getDurabilityCost(this),\n+ state: this.state\n});\nif (this.progression >= this.recipe.progress) {\nthis.success = true;\n",
"new_path": "src/app/pages/simulator/simulation/simulation.ts",
"old_path": "src/app/pages/simulator/simulation/simulation.ts"
},
{
"change_type": "MODIFY",
"diff": "@import './theme.scss';\n-// Font size based on screen width\n-@media (min-width: 858px) {\n- html {\n- font-size: 12px;\n- }\n-}\n-\n-@media (min-width: 780px) {\n- html {\n- font-size: 11px;\n- }\n-}\n-\n-@media (min-width: 702px) {\n- html {\n- font-size: 10px;\n- }\n-}\n-\n-@media (min-width: 724px) {\n- html {\n- font-size: 9px;\n- }\n-}\n-\n-@media (max-width: 623px) {\n- html {\n- font-size: 8px;\n- }\n-}\nbody {\npadding-top: 64px;\n",
"new_path": "src/styles.scss",
"old_path": "src/styles.scss"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): style adjustments and preparation for persistence
| 1
|
chore
|
simulator
|
217,922
|
30.04.2018 16:52:32
| -7,200
|
567c51aa75eb5d2b99893d602e4b268f73b9d6b9
|
chore(simulator): fixed inner quiet initial stacks error
|
[
{
"change_type": "MODIFY",
"diff": "@@ -26,7 +26,7 @@ export class InnerQuiet extends BuffAction {\n}\nprotected getInitialStacks(): number {\n- return 0;\n+ return 1;\n}\nprotected getTick(): (simulation: Simulation) => void {\n",
"new_path": "src/app/pages/simulator/model/actions/buff/inner-quiet.ts",
"old_path": "src/app/pages/simulator/model/actions/buff/inner-quiet.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): fixed inner quiet initial stacks error
| 1
|
chore
|
simulator
|
217,922
|
30.04.2018 16:55:08
| -7,200
|
81527eb301fc5aaa1119c5e31e26ab1b0c7ca55a
|
chore(simulator): fixed tests
|
[
{
"change_type": "MODIFY",
"diff": "@@ -67,6 +67,7 @@ export class Simulation {\n}\npublic reset(): void {\n+ delete this.success;\nthis.progression = 0;\nthis.durability = this.recipe.durability;\nthis.quality = this.startingQuality;\n",
"new_path": "src/app/pages/simulator/simulation/simulation.ts",
"old_path": "src/app/pages/simulator/simulation/simulation.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -110,7 +110,7 @@ describe('Craft simulator tests', () => {\nconst simulation = new Simulation(infusionOfMind_Recipe,\n[new InnerQuiet(), new SteadyHandII(), new BasicTouch()],\nalc_70_350_stats);\n- simulation.run();\n+ simulation.run(true);\nexpect(simulation.getBuff(Buff.INNER_QUIET).stacks).toBe(2);\n});\n@@ -118,7 +118,7 @@ describe('Craft simulator tests', () => {\nconst simulation = new Simulation(infusionOfMind_Recipe,\n[new InnerQuiet(), new SteadyHandII(), new BasicTouch(), new BasicTouch()],\nalc_70_350_stats);\n- simulation.run();\n+ simulation.run(true);\nexpect(simulation.quality).toBeCloseTo(1264, 1);\n});\n});\n@@ -245,7 +245,7 @@ describe('Craft simulator tests', () => {\nexpect(results.filter(res => !res).length).toBe(0);\n});\n- xit('should be able to provide proper reliability report', () => {\n+ it('should be able to provide proper reliability report', () => {\nconst simulation = new Simulation(infusionOfMind_Recipe,\n[new RapidSynthesisII(), new RapidSynthesisII(), new RapidSynthesisII()], acchan_stats);\nconst report = simulation.getReliabilityReport();\n",
"new_path": "src/app/pages/simulator/test/simulation.spec.ts",
"old_path": "src/app/pages/simulator/test/simulation.spec.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): fixed tests
| 1
|
chore
|
simulator
|
791,690
|
30.04.2018 17:08:24
| 25,200
|
25f920e09d5ab091b9d9e23cc2c57780c8aab0b2
|
report(table): handle null cells
|
[
{
"change_type": "MODIFY",
"diff": "@@ -137,7 +137,8 @@ class UnminifiedCSS extends ByteEfficiencyAudit {\n// If the ratio is minimal, the file is likely already minified, so ignore it.\n// If the total number of bytes to be saved is quite small, it's also safe to ignore.\nif (result.wastedPercent < IGNORE_THRESHOLD_IN_PERCENT ||\n- result.wastedBytes < IGNORE_THRESHOLD_IN_BYTES) continue;\n+ result.wastedBytes < IGNORE_THRESHOLD_IN_BYTES ||\n+ !Number.isFinite(result.wastedBytes)) continue;\nresults.push(result);\n}\n",
"new_path": "lighthouse-core/audits/byte-efficiency/unminified-css.js",
"old_path": "lighthouse-core/audits/byte-efficiency/unminified-css.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -84,7 +84,8 @@ class UnminifiedJavaScript extends ByteEfficiencyAudit {\n// If the ratio is minimal, the file is likely already minified, so ignore it.\n// If the total number of bytes to be saved is quite small, it's also safe to ignore.\nif (result.wastedPercent < IGNORE_THRESHOLD_IN_PERCENT ||\n- result.wastedBytes < IGNORE_THRESHOLD_IN_BYTES) continue;\n+ result.wastedBytes < IGNORE_THRESHOLD_IN_BYTES ||\n+ !Number.isFinite(result.wastedBytes)) continue;\nresults.push(result);\n} catch (err) {\ndebugString = `Unable to process ${networkRecord._url}: ${err.message}`;\n",
"new_path": "lighthouse-core/audits/byte-efficiency/unminified-javascript.js",
"old_path": "lighthouse-core/audits/byte-efficiency/unminified-javascript.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -203,7 +203,7 @@ class DetailsRenderer {\nfor (const heading of details.headings) {\nconst value = /** @type {number|string|!DetailsRenderer.DetailsJSON} */ (row[heading.key]);\n- if (typeof value === 'undefined') {\n+ if (typeof value === 'undefined' || value === null) {\nthis._dom.createChildOf(rowElem, 'td', 'lh-table-column--empty');\ncontinue;\n}\n",
"new_path": "lighthouse-core/report/html/renderer/details-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/details-renderer.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report(table): handle null cells (#5075)
| 1
|
report
|
table
|
217,922
|
30.04.2018 17:34:20
| -7,200
|
cf99be0ca96da7167936aadd362bd285a51032ba
|
chore(simulator): added reliability report display
|
[
{
"change_type": "MODIFY",
"diff": "</div>\n</div>\n</mat-expansion-panel>\n-<div *ngIf=\"simulation$ | async as simulation\" [class.mobile]=\"isMobile()\">\n+<div *ngIf=\"simulation$ | async as simulation\">\n<div *ngIf=\"result$ | async as resultData\">\n<mat-card *ngIf=\"!isMobile()\">\n<mat-card-header>\n<span class=\"cp-amount\">{{resultData.simulation.availableCP}}/{{resultData.simulation.maxCP}}</span>\n</div>\n</div>\n+ <div class=\"report\" *ngIf=\"report$ | async as report\">\n+ <span class=\"report-row\">\n+ {{'SIMULATOR.Reliability' | translate}}: {{report.successPercent}}%\n+ </span>\n+ <span class=\"report-row\">\n+ {{'SIMULATOR.Average_hq' | translate}}: {{report.averageHQPercent}}%\n+ </span>\n+ </div>\n</div>\n</div>\n</mat-card-content>\n</div>\n</div>\n</div>\n+ <div class=\"report\" *ngIf=\"report$ | async as report\">\n+ <span class=\"report-row\">\n+ {{'SIMULATOR.Reliability' | translate}}: {{report.successPercent}}%\n+ </span>\n+ <span class=\"report-row\">\n+ {{'SIMULATOR.Average_hq' | translate}}: {{report.averageHQPercent}}%\n+ </span>\n+ </div>\n</mat-card-content>\n</mat-card>\n<mat-card>\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": "@@ -76,7 +76,8 @@ mat-progress-bar {\n}\n.bottom-part {\ndisplay: flex;\n- justify-content: space-between;\n+ justify-content: flex-start;\n+ align-items: center;\n.hq-chances {\ndisplay: flex;\njustify-content: space-between;\n@@ -86,7 +87,7 @@ mat-progress-bar {\nmargin-right: 40px;\n}\n.cp-progress {\n- flex: 1 1 auto;\n+ flex: 0 1 400px;\n.cp-bar {\ndisplay: flex;\nalign-items: center;\n@@ -100,6 +101,13 @@ mat-progress-bar {\n}\n}\n}\n+ .report {\n+ display: flex;\n+ justify-content: space-between;\n+ align-items: flex-end;\n+ flex: 0 1 300px;\n+ height: 40px;\n+ }\n}\n}\n}\n@@ -136,6 +144,13 @@ mat-progress-bar {\n}\n}\n}\n+ .report {\n+ display: flex;\n+ justify-content: space-between;\n+ align-items: flex-end;\n+ flex: 1 1 auto;\n+ height: 40px;\n+ }\n}\n.actions {\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": "@@ -103,16 +103,31 @@ export class SimulatorComponent {\nif (!this.customMode) {\nObservable.combineLatest(this.recipe$, this.gearsets$, (recipe, gearsets) => {\n- return gearsets.find(set => set.jobId === recipe.job);\n+ let userSet = gearsets.find(set => set.jobId === recipe.job);\n+ if (userSet === undefined) {\n+ userSet = {\n+ ilvl: 0,\n+ control: 1000,\n+ craftsmanship: 1000,\n+ cp: 450,\n+ jobId: 10,\n+ level: 70,\n+ specialist: false\n+ };\n+ }\n+ return userSet;\n}).subscribe(set => {\nthis.selectedSet = set;\nthis.applyStats(set);\n});\n}\n- this.report$ = this.simulation$.map(simulation => simulation.getReliabilityReport());\n-\nthis.result$ = this.simulation$.map(simulation => simulation.run(true));\n+\n+ this.report$ = this.result$\n+ .filter(res => res.success === true)\n+ .mergeMap(() => this.simulation$)\n+ .map(simulation => simulation.getReliabilityReport());\n}\ngetStars(nb: number): string {\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 {Simulation} from '../../simulation/simulation';\nimport {GeneralAction} from './general-action';\n-import {CrafterStats} from '../crafter-stats';\n-import {Tables} from '../tables';\nimport {Buff} from '../buff.enum';\nimport {ActionType} from './action-type';\n",
"new_path": "src/app/pages/simulator/model/actions/quality-action.ts",
"old_path": "src/app/pages/simulator/model/actions/quality-action.ts"
},
{
"change_type": "MODIFY",
"diff": "\"Simulate_tooltip\": \"Craft in simulator\",\n\"Configuration\": \"Configuration\",\n\"Level\": \"Level\",\n+ \"Reliability\": \"Reliability\",\n+ \"Average_hq\": \"Average HQ\",\n\"CATEGORY\": {\n\"Progression\": \"Progression\",\n\"Quality\": \"Quality\",\n",
"new_path": "src/assets/i18n/en.json",
"old_path": "src/assets/i18n/en.json"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): added reliability report display
| 1
|
chore
|
simulator
|
217,922
|
30.04.2018 17:59:31
| -7,200
|
57c2d2adb30c5f1b4489599ccbe7d3623e84def3
|
chore(simulator): removed filter on simulation completed for report
|
[
{
"change_type": "MODIFY",
"diff": "@@ -125,7 +125,6 @@ export class SimulatorComponent {\nthis.result$ = this.simulation$.map(simulation => simulation.run(true));\nthis.report$ = this.result$\n- .filter(res => res.success === true)\n.mergeMap(() => this.simulation$)\n.map(simulation => simulation.getReliabilityReport());\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": "@@ -116,6 +116,10 @@ export class Simulation {\n}\n// Tick buffs after checking synth result, so if we reach 0 durability, synth fails.\nthis.tickBuffs(linear);\n+ // Tick state to change it for next turn if not in linear mode\n+ if (!linear) {\n+ this.tickState();\n+ }\n});\n// HQ percent to quality percent formulae: https://github.com/Ermad/ffxiv-craft-opt-web/blob/master/app/js/ffxivcraftmodel.js#L1455\n@@ -219,6 +223,60 @@ export class Simulation {\nthis.buffs = this.buffs.filter(buff => buff.duration > 0);\n}\n+ /**\n+ * Changes the state of the craft,\n+ * source: https://github.com/Ermad/ffxiv-craft-opt-web/blob/master/app/js/ffxivcraftmodel.js#L255\n+ */\n+ private tickState(): void {\n+ // If current state is EXCELLENT, then next one is poor\n+ if (this.state === 'EXCELLENT') {\n+ this.state = 'POOR';\n+ return;\n+ }\n+\n+ // Good\n+ const recipeLevel = this.recipe.rlvl;\n+ const qualityAssurance = this.crafterStats.level >= 63;\n+ let goodChances = 0;\n+ if (recipeLevel >= 300) { // 70*+\n+ goodChances = qualityAssurance ? 0.11 : 0.10;\n+ } else if (recipeLevel >= 276) { // 65+\n+ goodChances = qualityAssurance ? 0.17 : 0.15;\n+ } else if (recipeLevel >= 255) { // 61+\n+ goodChances = qualityAssurance ? 0.22 : 0.20;\n+ } else if (recipeLevel >= 150) { // 60+\n+ goodChances = qualityAssurance ? 0.11 : 0.10;\n+ } else if (recipeLevel >= 136) { // 55+\n+ goodChances = qualityAssurance ? 0.17 : 0.15;\n+ } else {\n+ goodChances = qualityAssurance ? 0.27 : 0.25;\n+ }\n+\n+ // Excellent\n+ let excellentChances = 0;\n+ if (recipeLevel >= 300) { // 70*+\n+ excellentChances = 0.01;\n+ } else if (recipeLevel >= 255) { // 61+\n+ excellentChances = 0.02;\n+ } else if (recipeLevel >= 150) { // 60+\n+ excellentChances = 0.01;\n+ } else {\n+ excellentChances = 0.02;\n+ }\n+\n+ const exRandom = Math.random();\n+ if (exRandom <= excellentChances) {\n+ this.state = 'EXCELLENT';\n+ } else {\n+ const goodRandom = Math.random();\n+ if (goodRandom <= goodChances) {\n+ this.state = 'GOOD';\n+ } else {\n+ this.state = 'NORMAL';\n+ }\n+ }\n+ }\n+\npublic repair(amount: number): void {\nthis.durability += amount;\nif (this.durability > this.recipe.durability) {\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): removed filter on simulation completed for report
| 1
|
chore
|
simulator
|
217,922
|
30.04.2018 18:23:14
| -7,200
|
1b9abb5737d21ad0195979dc8f81073c52a1d45c
|
chore(simulator): added the filter back for report, perf issues otherwise
|
[
{
"change_type": "MODIFY",
"diff": "@@ -125,6 +125,7 @@ export class SimulatorComponent {\nthis.result$ = this.simulation$.map(simulation => simulation.run(true));\nthis.report$ = this.result$\n+ .filter(res => res.success)\n.mergeMap(() => this.simulation$)\n.map(simulation => simulation.getReliabilityReport());\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): added the filter back for report, perf issues otherwise
| 1
|
chore
|
simulator
|
730,412
|
30.04.2018 18:23:42
| 0
|
b2cd69a520ae14ca584815414cee19e2ed472e71
|
chore(release): 0.1.286
|
[
{
"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.286\"></a>\n+## [0.1.286](https://github.com/webex/react-ciscospark/compare/v0.1.285...v0.1.286) (2018-04-30)\n+\n+\n+\n<a name=\"0.1.285\"></a>\n## [0.1.285](https://github.com/webex/react-ciscospark/compare/v0.1.284...v0.1.285) (2018-04-27)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.285\",\n+ \"version\": \"0.1.286\",\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.286
| 1
|
chore
|
release
|
679,913
|
30.04.2018 19:36:07
| -3,600
|
12b8dcb378e25034e8faa082ccdfeeb559fafb44
|
fix(examples): CA dropdown
|
[
{
"change_type": "MODIFY",
"diff": "@@ -110,18 +110,23 @@ const ruleBoxes = (prefix, i, rstride = 9) =>\n.map((rule, j) => checkbox(rule, (e) => setRule(i, j, e.target.checked))),\n];\n+const isPreset = (id) => presets.findIndex((x) => x[0] === id) !== -1;\n+\n// Use Conway CA default state rules [[dead], [alive]] if no preset present in hash\napplyRules(location.hash.length > 18 ? location.hash.substr(1) : presets[1][0]);\n// define & start main app component\nstart(\"app\", () => {\n+ const id = location.hash.substr(1);\nreturn [\"div\",\nruleBoxes(\"birth\", 0),\nruleBoxes(\"survive\", 1),\n[\"div\",\n[\"button\", { onclick: () => randomizeRules() }, \"randomize rules\"],\n[\"button\", { onclick: () => randomizeGrid() }, \"reset grid\"],\n- [dropdown, { onchange: (e) => applyRules(e.target.value) }, presets, location.hash.substr(1)]\n+ [dropdown, { onchange: (e) => applyRules(e.target.value) },\n+ presets,\n+ isPreset(id) ? id : \"\"]\n],\n[\"pre\", format(grid = convolve(grid, rules, W, H), W)]\n];\n",
"new_path": "examples/cellular-automata/src/index.ts",
"old_path": "examples/cellular-automata/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
fix(examples): CA dropdown
| 1
|
fix
|
examples
|
730,412
|
30.04.2018 20:56:04
| 0
|
2931b08a7b5884be621c5d7363e93fe4b9616b72
|
chore(release): 0.1.287
|
[
{
"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.287\"></a>\n+## [0.1.287](https://github.com/webex/react-ciscospark/compare/v0.1.286...v0.1.287) (2018-04-30)\n+\n+\n+\n<a name=\"0.1.286\"></a>\n## [0.1.286](https://github.com/webex/react-ciscospark/compare/v0.1.285...v0.1.286) (2018-04-30)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.286\",\n+ \"version\": \"0.1.287\",\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.287
| 1
|
chore
|
release
|
679,913
|
30.04.2018 20:56:19
| -3,600
|
431527a5b2a748a16d8f1e21463f97af4ccd809c
|
perf(diff): add option to only build linear edit log
extract edit log stages into buildFullLog()/buildLinearLog()
buildLinearLog() approx 1.8x faster
|
[
{
"change_type": "MODIFY",
"diff": "@@ -12,7 +12,7 @@ import { ArrayDiff } from \"./api\";\n* Various optimizations, fixes & refactorings.\n* By default uses `@thi.ng/api/equiv` for equality checks.\n*/\n-export function diffArray<T>(_a: T[], _b: T[], equiv = _equiv) {\n+export function diffArray<T>(_a: T[], _b: T[], equiv = _equiv, linearOnly = false) {\nconst state = <ArrayDiff<T>>{\ndistance: 0,\nadds: {},\n@@ -24,11 +24,6 @@ export function diffArray<T>(_a: T[], _b: T[], equiv = _equiv) {\nreturn state;\n}\nconst reverse = _a.length >= _b.length;\n- const adds = state[reverse ? \"dels\" : \"adds\"];\n- const dels = state[reverse ? \"adds\" : \"dels\"];\n- const linear = state.linear;\n- const aID = reverse ? -1 : 1;\n- const dID = reverse ? 1 : -1;\nlet a, b, na, nb;\nif (reverse) {\n@@ -89,20 +84,44 @@ export function diffArray<T>(_a: T[], _b: T[], equiv = _equiv) {\nr = pp[2];\n}\n- for (let i = epc.length - 1, px = 0, py = 0; i >= 0; i--) {\n+ if (linearOnly) {\n+ buildLinearLog<T>(epc, state, a, b, reverse);\n+ } else {\n+ buildFullLog<T>(epc, state, a, b, reverse);\n+ }\n+ return state;\n+}\n+\n+function buildFullLog<T>(epc: any[], state: ArrayDiff<T>, a: any, b: any, reverse: boolean) {\n+ const linear = state.linear;\n+ let adds, dels, aID, dID;\n+ if (reverse) {\n+ adds = state.dels;\n+ dels = state.adds;\n+ aID = -1;\n+ dID = 1;\n+ } else {\n+ adds = state.adds;\n+ dels = state.dels;\n+ aID = 1;\n+ dID = -1;\n+ }\n+ for (let i = epc.length, px = 0, py = 0; --i >= 0;) {\nconst e = epc[i];\nlet v;\nwhile (px < e[0] || py < e[1]) {\n- const d = e[1] - e[0];\n- if (d > py - px) {\n+ const d = e[1] - e[0], dp = py - px;\n+ if (d > dp) {\nadds[py] = v = b[py];\nlinear.push([aID, py, v]);\npy++;\n- } else if (d < py - px) {\n+ }\n+ else if (d < dp) {\ndels[px] = v = a[px];\nlinear.push([dID, px, v]);\npx++;\n- } else {\n+ }\n+ else {\nstate.const[px] = v = a[px];\nlinear.push([0, px, v]);\npx++;\n@@ -110,5 +129,29 @@ export function diffArray<T>(_a: T[], _b: T[], equiv = _equiv) {\n}\n}\n}\n- return state;\n+}\n+\n+function buildLinearLog<T>(epc: any[], state: ArrayDiff<T>, a: any, b: any, reverse: boolean) {\n+ const linear = state.linear;\n+ const aID = reverse ? -1 : 1;\n+ const dID = reverse ? 1 : -1;\n+ for (let i = epc.length, px = 0, py = 0; --i >= 0;) {\n+ const e = epc[i];\n+ while (px < e[0] || py < e[1]) {\n+ const d = e[1] - e[0], dp = py - px;\n+ if (d > dp) {\n+ linear.push([aID, py, b[py]]);\n+ py++;\n+ }\n+ else if (d < dp) {\n+ linear.push([dID, px, a[px]]);\n+ px++;\n+ }\n+ else {\n+ linear.push([0, px, a[px]]);\n+ px++;\n+ py++;\n+ }\n+ }\n+ }\n}\n",
"new_path": "packages/diff/src/array.ts",
"old_path": "packages/diff/src/array.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
perf(diff): add option to only build linear edit log
- extract edit log stages into buildFullLog()/buildLinearLog()
- buildLinearLog() approx 1.8x faster
| 1
|
perf
|
diff
|
679,913
|
30.04.2018 20:56:47
| -3,600
|
7a543a50dccc84569380ec8d63c402a03ad08600
|
perf(hdom): only build linear diff edit log
|
[
{
"change_type": "MODIFY",
"diff": "+import { equiv } from \"@thi.ng/api/equiv\";\nimport * as isa from \"@thi.ng/checks/is-array\";\nimport * as iss from \"@thi.ng/checks/is-string\";\nimport * as diff from \"@thi.ng/diff\";\n@@ -38,7 +39,7 @@ export function diffElement(root: Element, prev: any, curr: any) {\n}\nfunction _diffElement(parent: Element, prev: any, curr: any, child: number) {\n- const delta = diffArray(prev, curr);\n+ const delta = diffArray(prev, curr, equiv, true);\nif (delta.distance === 0) {\nreturn;\n}\n",
"new_path": "packages/hdom/src/diff.ts",
"old_path": "packages/hdom/src/diff.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
perf(hdom): only build linear diff edit log
| 1
|
perf
|
hdom
|
730,412
|
30.04.2018 22:09:03
| 0
|
52b2ba5fa6c5f196cad0ed40fc5264e9e4d9547f
|
chore(release): 0.1.288
|
[
{
"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.288\"></a>\n+## [0.1.288](https://github.com/webex/react-ciscospark/compare/v0.1.287...v0.1.288) (2018-04-30)\n+\n+\n+### Features\n+\n+* **widget-recents:** remove call.answer and call.reject events ([88e19d9](https://github.com/webex/react-ciscospark/commit/88e19d9))\n+* **widget-recents:** remove incoming call screen ([7f2f0d2](https://github.com/webex/react-ciscospark/commit/7f2f0d2))\n+\n+\n+\n<a name=\"0.1.287\"></a>\n## [0.1.287](https://github.com/webex/react-ciscospark/compare/v0.1.286...v0.1.287) (2018-04-30)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.287\",\n+ \"version\": \"0.1.288\",\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.288
| 1
|
chore
|
release
|
791,834
|
30.04.2018 22:37:54
| 25,200
|
b38cdd3c5779035c7d64839dd5751e1b7c8d01a2
|
deps(speedline): use speedline's types instead of our own
|
[
{
"change_type": "MODIFY",
"diff": "\"rimraf\": \"^2.6.1\",\n\"robots-parser\": \"^2.0.1\",\n\"semver\": \"^5.3.0\",\n- \"speedline\": \"1.3.0\",\n+ \"speedline\": \"1.3.2\",\n\"update-notifier\": \"^2.1.0\",\n\"ws\": \"3.3.2\",\n\"yargs\": \"3.32.0\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -320,7 +320,7 @@ declare global {\npessimisticGraph: Gatherer.Simulation.GraphNode;\n}\n- export type Speedline = ReturnType<typeof speedline>;\n+ export type Speedline = speedline.Output<'speedIndex'>;\n// TODO(bckenny): all but navigationStart could actually be undefined.\nexport interface TraceTimes {\n",
"new_path": "typings/artifacts.d.ts",
"old_path": "typings/artifacts.d.ts"
},
{
"change_type": "DELETE",
"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-\n-declare module 'speedline' {\n- interface SpeedlineOutput {\n- beginning: number;\n- end: number;\n- frames: Array<{\n- getHistogram(): number[][];\n- getTimeStamp(): number;\n- getImage(): Buffer;\n- setProgress(progress: number, isInterpolated: boolean): void;\n- setPerceptualProgress(progress: number, isInterpolated: boolean): void;\n- getProgress(): number;\n- getPerceptualProgress(): number;\n- isProgressInterpolated(): boolean;\n- isPerceptualProgressInterpolated(): boolean;\n- }>;\n- first: number;\n- complete: number;\n- duration: number;\n-\n- // TODO: speedIndex may actually be optional based on input options.\n- // Use a more clever way to declare these exist based on SpeedlineOptions['include']\n- speedIndex: number;\n- perceptualSpeedIndex?: number;\n- }\n-\n- interface SpeedlineOptions {\n- timeOrigin?: number;\n- fastMode?: boolean;\n- include?: 'all' | 'speedIndex' | 'perceptualSpeedIndex';\n- }\n-\n- function speedline(trace: LH.TraceEvent[], opts: SpeedlineOptions): SpeedlineOutput;\n-\n- export = speedline;\n-}\n",
"new_path": null,
"old_path": "typings/speedline/index.d.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -442,9 +442,9 @@ axios@^0.16.2:\nfollow-redirects \"^1.2.3\"\nis-buffer \"^1.1.5\"\n-babar@0.0.3:\n- version \"0.0.3\"\n- resolved \"https://registry.yarnpkg.com/babar/-/babar-0.0.3.tgz#2f394d4a5918f7e1ae9e5408e9a96f3f935ee1e2\"\n+babar@0.2.0:\n+ version \"0.2.0\"\n+ resolved \"https://registry.yarnpkg.com/babar/-/babar-0.2.0.tgz#79bc0f029721467207f2b6baedf96b3938ad7db0\"\ndependencies:\ncolors \"~0.6.2\"\n@@ -4649,11 +4649,12 @@ spdx-license-ids@^1.0.2:\nversion \"1.2.2\"\nresolved \"https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57\"\n-speedline@1.3.0:\n- version \"1.3.0\"\n- resolved \"https://registry.yarnpkg.com/speedline/-/speedline-1.3.0.tgz#201c458ca7aba2ac847fe5860c1a92966aaed3a9\"\n+speedline@1.3.2:\n+ version \"1.3.2\"\n+ resolved \"https://registry.yarnpkg.com/speedline/-/speedline-1.3.2.tgz#b48bf899568d917bbb14c8397453b14c4c0d0ed0\"\ndependencies:\n- babar \"0.0.3\"\n+ \"@types/node\" \"*\"\n+ babar \"0.2.0\"\nimage-ssim \"^0.2.0\"\njpeg-js \"^0.1.2\"\nloud-rejection \"^1.6.0\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
deps(speedline): use speedline's types instead of our own (#5078)
| 1
|
deps
|
speedline
|
743,913
|
30.04.2018 23:11:19
| 14,400
|
9d71ac745baeaf5f5277dd5aef6b4b4316acfafb
|
feat: add support for global middleware, useful for shared tasks like metrics
|
[
{
"change_type": "MODIFY",
"diff": "@@ -12,7 +12,7 @@ install:\n# Get the latest stable version of Node 0.STABLE.latest\n- ps: Install-Product node $env:nodejs_version\n# Typical npm stuff.\n- - npm -g install npm@latest\n+ - npm i npm@5\n- npm install\n# Post-install test scripts.\n",
"new_path": "appveyor.yml",
"old_path": "appveyor.yml"
},
{
"change_type": "MODIFY",
"diff": "@@ -929,6 +929,35 @@ To submit a new translation for yargs:\n<a name=\"nargs\"></a>.nargs(key, count)\n-----------\n+.middleware(callbacks)\n+------------------------------------\n+\n+Define global middleware functions to be called first, in list order, for all cli command.\n+\n+The `callbacks` parameter can be a function or a list of functions. Each callback gets passed a reference to argv.\n+\n+```js\n+const mwFunc1 = argv => console.log('I\\'m a middleware function');\n+const mwFunc2 = argv => console.log('I\\'m another middleware function');\n+\n+yargs\n+ .command('myCommand', 'some command', {}, function(argv){\n+ console.log('Running myCommand!');\n+ })\n+ .middleware([mwFunc1, mwFunc2]).argv;\n+```\n+When calling `myCommand` from the command line, mwFunc1 gets called first, then mwFunc2, and finally the command's handler. The console output is:\n+```\n+I'm a middleware function\n+I'm another middleware function\n+Running myCommand!\n+```\n+\n+\n+<a name=\"middleware\"></a>.middleware(callbacks)\n+--------------------\n+\n+\nThe number of arguments that should be consumed after a key. This can be a\nuseful hint to prevent parsing ambiguity. For example:\n",
"new_path": "docs/api.md",
"old_path": "docs/api.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -9,15 +9,17 @@ const DEFAULT_MARKER = /(^\\*)|(^\\$0)/\n// handles parsing positional arguments,\n// and populating argv with said positional\n// arguments.\n-module.exports = function command (yargs, usage, validation) {\n+module.exports = function command (yargs, usage, validation, globalMiddleware) {\nconst self = {}\nlet handlers = {}\nlet aliasMap = {}\nlet defaultCommand\n+ globalMiddleware = globalMiddleware || []\nself.addHandler = function addHandler (cmd, description, builder, handler, middlewares) {\nlet aliases = []\nhandler = handler || (() => {})\nmiddlewares = middlewares || []\n+ middlewares = globalMiddleware.concat(middlewares)\nif (Array.isArray(cmd)) {\naliases = cmd.slice(1)\ncmd = cmd[0]\n",
"new_path": "lib/command.js",
"old_path": "lib/command.js"
},
{
"change_type": "ADD",
"diff": "+module.exports = function (globalMiddleware, context) {\n+ return function (callback) {\n+ if (Array.isArray(callback)) {\n+ Array.prototype.push.apply(globalMiddleware, callback)\n+ } else if (typeof callback === 'object') {\n+ globalMiddleware.push(callback)\n+ }\n+ return context\n+ }\n+}\n",
"new_path": "lib/middleware.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+'use strict'\n+/* global describe, it, beforeEach, afterEach */\n+\n+const middlewareFactory = require('../lib/middleware')\n+let yargs\n+require('chai').should()\n+\n+describe('middleware', () => {\n+ beforeEach(() => {\n+ yargs = require('../')\n+ })\n+\n+ afterEach(() => {\n+ delete require.cache[require.resolve('../')]\n+ })\n+ it('should add a list of callbacks to global middleware', () => {\n+ const globalMiddleware = []\n+\n+ middlewareFactory(globalMiddleware)(['callback1', 'callback2'])\n+\n+ globalMiddleware.should.have.lengthOf(2)\n+ })\n+\n+ it('should add a single callback to global middleware', () => {\n+ const globalMiddleware = []\n+\n+ middlewareFactory(globalMiddleware)({})\n+\n+ globalMiddleware.should.have.lengthOf(1)\n+ })\n+\n+ it('runs all middleware before reaching the handler', function (done) {\n+ yargs(['mw'])\n+ .middleware([\n+ function (argv) {\n+ argv.mw1 = 'mw1'\n+ },\n+ function (argv) {\n+ argv.mw2 = 'mw2'\n+ }\n+ ])\n+ .command(\n+ 'mw',\n+ 'adds func list to middleware',\n+ function () {},\n+ function (argv) {\n+ // we should get the argv filled with data from the middleware\n+ argv.mw1.should.equal('mw1')\n+ argv.mw2.should.equal('mw2')\n+ return done()\n+ }\n+ )\n+ .exitProcess(false) // defaults to true.\n+ .argv\n+ })\n+})\n",
"new_path": "test/middleware.js",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -11,6 +11,7 @@ const Y18n = require('y18n')\nconst objFilter = require('./lib/obj-filter')\nconst setBlocking = require('set-blocking')\nconst applyExtends = require('./lib/apply-extends')\n+const middlewareFactory = require('./lib/middleware')\nconst YError = require('./lib/yerror')\nexports = module.exports = Yargs\n@@ -21,6 +22,7 @@ function Yargs (processArgs, cwd, parentRequire) {\nlet command = null\nlet completion = null\nlet groups = {}\n+ let globalMiddleware = []\nlet output = ''\nlet preservedGroups = {}\nlet usage = null\n@@ -31,6 +33,8 @@ function Yargs (processArgs, cwd, parentRequire) {\nupdateFiles: false\n})\n+ self.middleware = middlewareFactory(globalMiddleware, self)\n+\nif (!cwd) cwd = process.cwd()\nself.$0 = process.argv\n@@ -117,7 +121,7 @@ function Yargs (processArgs, cwd, parentRequire) {\n// instances of all our helpers -- otherwise just reset.\nusage = usage ? usage.reset(localLookup) : Usage(self, y18n)\nvalidation = validation ? validation.reset(localLookup) : Validation(self, usage, y18n)\n- command = command ? command.reset() : Command(self, usage, validation)\n+ command = command ? command.reset() : Command(self, usage, validation, globalMiddleware)\nif (!completion) completion = Completion(self, usage, command)\ncompletionCommand = null\n",
"new_path": "yargs.js",
"old_path": "yargs.js"
}
] |
JavaScript
|
MIT License
|
yargs/yargs
|
feat: add support for global middleware, useful for shared tasks like metrics (#1119)
| 1
|
feat
| null |
217,922
|
30.04.2018 23:55:51
| -7,200
|
23e8dcdb9e280525ab10c315dd1975df3dee7010
|
chore(simulator): custom mode for speculative rotations !
|
[
{
"change_type": "ADD",
"diff": "+<mat-expansion-panel expanded=\"true\">\n+ <mat-expansion-panel-header>\n+ <mat-panel-title>\n+ {{'SIMULATOR.CUSTOM.Recipe_configuration' | translate}}\n+ </mat-panel-title>\n+ </mat-expansion-panel-header>\n+ <div class=\"details-form\">\n+ <mat-input-container>\n+ <input type=\"number\" matInput placeholder=\"{{'SIMULATOR.CUSTOM.Recipe_level' | translate}}\"\n+ [(ngModel)]=\"recipe.rlvl\">\n+ </mat-input-container>\n+ <mat-input-container>\n+ <input type=\"number\" matInput placeholder=\"{{'SIMULATOR.CUSTOM.Recipe_progress' | translate}}\"\n+ [(ngModel)]=\"recipe.progress\">\n+ </mat-input-container>\n+ <mat-input-container>\n+ <input type=\"number\" matInput placeholder=\"{{'SIMULATOR.CUSTOM.Recipe_quality' | translate}}\"\n+ [(ngModel)]=\"recipe.quality\">\n+ </mat-input-container>\n+ <mat-input-container>\n+ <input type=\"number\" matInput placeholder=\"{{'SIMULATOR.CUSTOM.Recipe_durability' | translate}}\"\n+ [(ngModel)]=\"recipe.durability\">\n+ </mat-input-container>\n+ </div>\n+</mat-expansion-panel>\n+\n+<app-simulator [recipe]=\"recipe\" [customMode]=\"true\"></app-simulator>\n",
"new_path": "src/app/pages/simulator/components/custom-simulator-page/custom-simulator-page.component.html",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+mat-expansion-panel {\n+ margin-bottom: 5px;\n+ .details-form {\n+ display: flex;\n+ flex-wrap: wrap;\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/components/custom-simulator-page/custom-simulator-page.component.scss",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {Component} from '@angular/core';\n+import {Craft} from '../../../../model/garland-tools/craft';\n+\n+@Component({\n+ selector: 'app-custom-simulator-page',\n+ templateUrl: './custom-simulator-page.component.html',\n+ styleUrls: ['./custom-simulator-page.component.scss']\n+})\n+export class CustomSimulatorPageComponent {\n+\n+ public recipe: Partial<Craft> = {\n+ rlvl: 350,\n+ durability: 70,\n+ quality: 24000,\n+ progress: 6500,\n+ ingredients: []\n+ };\n+\n+ constructor() {\n+ }\n+\n+}\n",
"new_path": "src/app/pages/simulator/components/custom-simulator-page/custom-simulator-page.component.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "</div>\n<div class=\"set-details\" *ngIf=\"selectedSet !== undefined\">\n<div class=\"details-row\">\n- <mat-form-field matTooltip=\"{{selectedSet.craftsmanship + this.getBonusValue('Craftsmanship', selectedSet.craftsmanship)}}\"\n+ <mat-form-field\n+ matTooltip=\"{{selectedSet.craftsmanship + this.getBonusValue('Craftsmanship', selectedSet.craftsmanship)}}\"\nmatTooltipPosition=\"above\">\n<input matInput type=\"number\" [readonly]=\"!customSet\" [(ngModel)]=\"selectedSet.craftsmanship\"\n[placeholder]=\"'SIMULATOR.CONFIGURATION.Craftsmanship' | translate\">\n<span matSuffix>(+{{this.getBonusValue('Craftsmanship', selectedSet.craftsmanship)}})</span>\n</mat-form-field>\n- <mat-form-field matTooltip=\"{{selectedSet.control + this.getBonusValue('Control', selectedSet.control)}}\"\n+ <mat-form-field\n+ matTooltip=\"{{selectedSet.control + this.getBonusValue('Control', selectedSet.control)}}\"\nmatTooltipPosition=\"above\">\n<input matInput type=\"number\" [readonly]=\"!customSet\" [(ngModel)]=\"selectedSet.control\"\n[placeholder]=\"'SIMULATOR.CONFIGURATION.Control' | translate\">\n</button>\n</div>\n</div>\n- <div class=\"config-row\">\n+ <div class=\"config-row\" *ngIf=\"!customMode\">\n<h3>{{'SIMULATOR.CONFIGURATION.Ingredients' | translate}}</h3>\n<mat-list>\n<mat-list-item *ngFor=\"let ingredient of hqIngredientsData\">\n<div *ngIf=\"result$ | async as resultData\">\n<mat-card *ngIf=\"!isMobile()\">\n<mat-card-header>\n- <a mat-card-avatar href=\"{{itemId | itemLink | i18n}}\" target=\"_blank\">\n+ <a *ngIf=\"itemId !== undefined\" mat-card-avatar href=\"{{itemId | itemLink | i18n}}\" target=\"_blank\">\n<img mat-card-avatar [appXivdbTooltip]=\"itemId\" src=\"{{itemIcon | icon}}\"\nalt=\"{{itemId | itemName | i18n}}\">\n</a>\n+ <div *ngIf=\"itemId !== undefined\">\n<mat-card-title>\n{{itemId | itemName | i18n}}\n</mat-card-title>\n<mat-card-subtitle *ngIf=\"recipe$ | async as recipeData\">\n{{recipeData.lvl}} {{getStars(recipeData.stars)}}\n</mat-card-subtitle>\n+ </div>\n<span class=\"steps\">\n{{'SIMULATOR.Step_counter' | translate}} {{resultData.simulation.steps.length}}\n</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": "@@ -25,8 +25,13 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {SettingsModule} from 'app/pages/settings/settings.module';\nimport {TooltipModule} from '../../modules/tooltip/tooltip.module';\nimport {NgDragDropModule} from 'ng-drag-drop';\n+import {CustomSimulatorPageComponent} from './components/custom-simulator-page/custom-simulator-page.component';\nconst routes: Routes = [\n+ {\n+ path: 'simulator/custom',\n+ component: CustomSimulatorPageComponent\n+ },\n{\npath: 'simulator/:itemId',\ncomponent: SimulatorPageComponent\n@@ -61,6 +66,7 @@ const routes: Routes = [\nSettingsModule,\n],\ndeclarations: [\n+ CustomSimulatorPageComponent,\nSimulatorPageComponent,\nSimulatorComponent,\nActionComponent\n",
"new_path": "src/app/pages/simulator/simulator.module.ts",
"old_path": "src/app/pages/simulator/simulator.module.ts"
},
{
"change_type": "MODIFY",
"diff": "\"Level\": \"Level\",\n\"Reliability\": \"Reliability\",\n\"Average_hq\": \"Average HQ\",\n+ \"Specialist\": \"Specialist\",\n+ \"CUSTOM\": {\n+ \"Recipe_configuration\": \"Recipe configuration\",\n+ \"Recipe_level\": \"Recipe level\",\n+ \"Recipe_progress\": \"Max progress\",\n+ \"Recipe_quality\": \"Max quality\",\n+ \"Recipe_durability\": \"Durability\"\n+ },\n\"CATEGORY\": {\n\"Progression\": \"Progression\",\n\"Quality\": \"Quality\",\n",
"new_path": "src/assets/i18n/en.json",
"old_path": "src/assets/i18n/en.json"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): custom mode for speculative rotations !
| 1
|
chore
|
simulator
|
791,676
|
01.05.2018 00:57:31
| -7,200
|
21b100fbdbad18f0e749ab3b6626557ad4426f27
|
core(webapp-install): simplify start_url warning when no SW is found
|
[
{
"change_type": "MODIFY",
"diff": "@@ -44,13 +44,12 @@ class WebappInstallBanner extends MultiCheckAudit {\n};\n}\n- static assessManifest(artifacts, result) {\n- const {manifestValues, failures} = result;\n+ static assessManifest(manifestValues) {\nif (manifestValues.isParseFailure) {\n- failures.push(manifestValues.parseFailureReason);\n- return;\n+ return [manifestValues.parseFailureReason];\n}\n+ const failures = [];\nconst bannerCheckIds = [\n'hasName',\n'hasShortName',\n@@ -65,40 +64,62 @@ class WebappInstallBanner extends MultiCheckAudit {\nfailures.push(item.failureText);\n}\n});\n+\n+ return failures;\n}\n- static assessServiceWorker(artifacts, result) {\n+ static assessServiceWorker(artifacts) {\n+ const failures = [];\nconst hasServiceWorker = SWAudit.audit(artifacts).rawValue;\nif (!hasServiceWorker) {\n- result.failures.push('Site does not register a service worker');\n+ failures.push('Site does not register a service worker');\n}\n+\n+ return failures;\n}\n- static assessOfflineStartUrl(artifacts, result) {\n+ static assessOfflineStartUrl(artifacts) {\n+ const failures = [];\n+ const warnings = [];\nconst hasOfflineStartUrl = artifacts.StartUrl.statusCode === 200;\nif (!hasOfflineStartUrl) {\n- result.failures.push('Service worker does not successfully serve the manifest\\'s start_url');\n- if (artifacts.StartUrl.debugString) result.failures.push(artifacts.StartUrl.debugString);\n+ failures.push('Service worker does not successfully serve the manifest\\'s start_url');\n+ if (artifacts.StartUrl.debugString) {\n+ failures.push(artifacts.StartUrl.debugString);\n+ }\n}\nif (artifacts.StartUrl.debugString) {\n- result.warnings.push(artifacts.StartUrl.debugString);\n+ warnings.push(artifacts.StartUrl.debugString);\n}\n+\n+ return {failures, warnings};\n}\nstatic audit_(artifacts) {\n- const failures = [];\n- const warnings = [];\n+ let offlineFailures = [];\n+ let offlineWarnings = [];\nreturn artifacts.requestManifestValues(artifacts.Manifest).then(manifestValues => {\n- const result = {warnings, failures, manifestValues};\n- WebappInstallBanner.assessManifest(artifacts, result);\n- WebappInstallBanner.assessServiceWorker(artifacts, result);\n- WebappInstallBanner.assessOfflineStartUrl(artifacts, result);\n+ const manifestFailures = WebappInstallBanner.assessManifest(manifestValues);\n+ const swFailures = WebappInstallBanner.assessServiceWorker(artifacts);\n+ if (!swFailures.length) {\n+ const {failures, warnings} = WebappInstallBanner.assessOfflineStartUrl(artifacts);\n+ offlineFailures = failures;\n+ offlineWarnings = warnings;\n+ }\n- return result;\n+ return {\n+ warnings: offlineWarnings,\n+ failures: [\n+ ...manifestFailures,\n+ ...swFailures,\n+ ...offlineFailures,\n+ ],\n+ manifestValues,\n+ };\n});\n}\n}\n",
"new_path": "lighthouse-core/audits/webapp-install-banner.js",
"old_path": "lighthouse-core/audits/webapp-install-banner.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -134,8 +134,7 @@ describe('PWA: webapp install banner audit', () => {\nassert.strictEqual(result.rawValue, false);\nassert.ok(result.debugString.includes('service worker'), result.debugString);\nconst failures = result.extendedInfo.value.failures;\n- // start url will be -1 as well so failures will be 2\n- assert.strictEqual(failures.length, 2, failures);\n+ assert.strictEqual(failures.length, 1, failures);\n});\n});\n",
"new_path": "lighthouse-core/test/audits/webapp-install-banner-test.js",
"old_path": "lighthouse-core/test/audits/webapp-install-banner-test.js"
},
{
"change_type": "MODIFY",
"diff": "\"score\": 0,\n\"displayValue\": \"\",\n\"rawValue\": false,\n- \"debugString\": \"Failures: No manifest was fetched, Site does not register a service worker, Service worker does not successfully serve the manifest's start_url, No start URL to fetch: No usable web app manifest found on page http://localhost:10200/dobetterweb/dbw_tester.html.\",\n+ \"debugString\": \"Failures: No manifest was fetched, Site does not register a service worker.\",\n\"extendedInfo\": {\n\"value\": {\n- \"warnings\": [\n- \"No start URL to fetch: No usable web app manifest found on page http://localhost:10200/dobetterweb/dbw_tester.html\"\n- ],\n+ \"warnings\": [],\n\"failures\": [\n\"No manifest was fetched\",\n- \"Site does not register a service worker\",\n- \"Service worker does not successfully serve the manifest's start_url\",\n- \"No start URL to fetch: No usable web app manifest found on page http://localhost:10200/dobetterweb/dbw_tester.html\"\n+ \"Site does not register a service worker\"\n],\n\"manifestValues\": {\n\"isParseFailure\": true,\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(webapp-install): simplify start_url warning when no SW is found (#5067)
| 1
|
core
|
webapp-install
|
791,690
|
01.05.2018 09:35:46
| 25,200
|
2803c0cbe23ec0d88381483ee796ce67627a88c0
|
core(preconnect): use lantern to compute savings
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,6 +15,8 @@ const UnusedBytes = require('./byte-efficiency/byte-efficiency-audit');\n// @see https://github.com/GoogleChrome/lighthouse/issues/3106#issuecomment-333653747\nconst PRECONNECT_SOCKET_MAX_IDLE = 15;\n+const IGNORE_THRESHOLD_IN_MS = 50;\n+\nclass UsesRelPreconnectAudit extends Audit {\n/**\n* @return {LH.Audit.Meta}\n@@ -65,18 +67,23 @@ class UsesRelPreconnectAudit extends Audit {\n/**\n* @param {LH.Artifacts} artifacts\n+ * @param {LH.Audit.Context} context\n* @return {Promise<LH.Audit.Product>}\n*/\n- static async audit(artifacts) {\n+ static async audit(artifacts, context) {\nconst devtoolsLog = artifacts.devtoolsLogs[UsesRelPreconnectAudit.DEFAULT_PASS];\nconst URL = artifacts.URL;\n+ const settings = context.settings;\nlet maxWasted = 0;\n- const [networkRecords, mainResource] = await Promise.all([\n+ const [networkRecords, mainResource, loadSimulator] = await Promise.all([\nartifacts.requestNetworkRecords(devtoolsLog),\nartifacts.requestMainResource({devtoolsLog, URL}),\n+ artifacts.requestLoadSimulator({devtoolsLog, settings}),\n]);\n+ const {rtt, additionalRttByOrigin} = loadSimulator.getOptions();\n+\n/** @type {Map<string, LH.WebInspector.NetworkRequest[]>} */\nconst origins = new Map();\nnetworkRecords\n@@ -113,17 +120,27 @@ class UsesRelPreconnectAudit extends Audit {\nreturn (record.startTime < firstRecord.startTime) ? record: firstRecord;\n});\n- const connectionTime =\n- firstRecordOfOrigin._timing.connectEnd - firstRecordOfOrigin._timing.dnsStart;\n+ const securityOrigin = firstRecordOfOrigin.parsedURL.securityOrigin();\n+\n+ // Approximate the connection time with the duration of TCP (+potentially SSL) handshake\n+ // DNS time can be large but can also be 0 if a commonly used origin that's cached, so make\n+ // no assumption about DNS.\n+ const additionalRtt = additionalRttByOrigin.get(securityOrigin) || 0;\n+ let connectionTime = rtt + additionalRtt;\n+ // TCP Handshake will be at least 2 RTTs for TLS connections\n+ if (firstRecordOfOrigin.parsedURL.scheme === 'https') connectionTime = connectionTime * 2;\n+\nconst timeBetweenMainResourceAndDnsStart =\nfirstRecordOfOrigin.startTime * 1000 -\nmainResource.endTime * 1000 +\nfirstRecordOfOrigin._timing.dnsStart;\n+\nconst wastedMs = Math.min(connectionTime, timeBetweenMainResourceAndDnsStart);\n+ if (wastedMs < IGNORE_THRESHOLD_IN_MS) return;\n+\nmaxWasted = Math.max(wastedMs, maxWasted);\nresults.push({\n- url: firstRecordOfOrigin.parsedURL.securityOrigin(),\n- type: 'ms',\n+ url: securityOrigin,\nwastedMs: wastedMs,\n});\n});\n",
"new_path": "lighthouse-core/audits/uses-rel-preconnect.js",
"old_path": "lighthouse-core/audits/uses-rel-preconnect.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -31,6 +31,7 @@ class Simulator {\n* @param {LH.Gatherer.Simulation.Options} [options]\n*/\nconstructor(options) {\n+ /** @type {Required<LH.Gatherer.Simulation.Options>} */\nthis._options = Object.assign(\n{\nrtt: mobile3G.rttMs,\n@@ -38,6 +39,8 @@ class Simulator {\nmaximumConcurrentRequests: DEFAULT_MAXIMUM_CONCURRENT_REQUESTS,\ncpuSlowdownMultiplier: mobile3G.cpuSlowdownMultiplier,\nlayoutTaskMultiplier: DEFAULT_LAYOUT_TASK_MULTIPLIER,\n+ additionalRttByOrigin: new Map(),\n+ serverResponseTimeByOrigin: new Map(),\n},\noptions\n);\n@@ -278,6 +281,13 @@ class Simulator {\n}\n}\n+ /**\n+ * @return {Required<LH.Gatherer.Simulation.Options>}\n+ */\n+ getOptions() {\n+ return this._options;\n+ }\n+\n/**\n* Estimates the time taken to process all of the graph's nodes.\n* @param {Node} graph\n",
"new_path": "lighthouse-core/lib/dependency-graph/simulator/simulator.js",
"old_path": "lighthouse-core/lib/dependency-graph/simulator/simulator.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -20,6 +20,17 @@ const mainResource = {\n};\ndescribe('Performance: uses-rel-preconnect audit', () => {\n+ let simulator;\n+ let simulatorOptions;\n+\n+ beforeEach(() => {\n+ simulator = {getOptions: () => simulatorOptions};\n+ simulatorOptions = {\n+ rtt: 100,\n+ additionalRttByOrigin: new Map(),\n+ };\n+ });\n+\nit(`shouldn't suggest preconnect for same origin`, async () => {\nconst networkRecords = [\nmainResource,\n@@ -34,9 +45,10 @@ describe('Performance: uses-rel-preconnect audit', () => {\ndevtoolsLogs: {[UsesRelPreconnect.DEFAULT_PASS]: []},\nrequestNetworkRecords: () => Promise.resolve(networkRecords),\nrequestMainResource: () => Promise.resolve(mainResource),\n+ requestLoadSimulator: () => Promise.resolve(simulator),\n};\n- const {score, rawValue, details} = await UsesRelPreconnect.audit(artifacts);\n+ const {score, rawValue, details} = await UsesRelPreconnect.audit(artifacts, {});\nassert.equal(score, 1);\nassert.equal(rawValue, 0);\nassert.equal(details.items.length, 0);\n@@ -54,9 +66,10 @@ describe('Performance: uses-rel-preconnect audit', () => {\ndevtoolsLogs: {[UsesRelPreconnect.DEFAULT_PASS]: []},\nrequestNetworkRecords: () => Promise.resolve(networkRecords),\nrequestMainResource: () => Promise.resolve(mainResource),\n+ requestLoadSimulator: () => Promise.resolve(simulator),\n};\n- const {score, rawValue, details} = await UsesRelPreconnect.audit(artifacts);\n+ const {score, rawValue, details} = await UsesRelPreconnect.audit(artifacts, {});\nassert.equal(score, 1);\nassert.equal(rawValue, 0);\nassert.equal(details.items.length, 0);\n@@ -74,9 +87,10 @@ describe('Performance: uses-rel-preconnect audit', () => {\ndevtoolsLogs: {[UsesRelPreconnect.DEFAULT_PASS]: []},\nrequestNetworkRecords: () => Promise.resolve(networkRecords),\nrequestMainResource: () => Promise.resolve(mainResource),\n+ requestLoadSimulator: () => Promise.resolve(simulator),\n};\n- const {score, rawValue, details} = await UsesRelPreconnect.audit(artifacts);\n+ const {score, rawValue, details} = await UsesRelPreconnect.audit(artifacts, {});\nassert.equal(score, 1);\nassert.equal(rawValue, 0);\nassert.equal(details.items.length, 0);\n@@ -100,9 +114,10 @@ describe('Performance: uses-rel-preconnect audit', () => {\ndevtoolsLogs: {[UsesRelPreconnect.DEFAULT_PASS]: []},\nrequestNetworkRecords: () => Promise.resolve(networkRecords),\nrequestMainResource: () => Promise.resolve(mainResource),\n+ requestLoadSimulator: () => Promise.resolve(simulator),\n};\n- const {score, rawValue, details} = await UsesRelPreconnect.audit(artifacts);\n+ const {score, rawValue, details} = await UsesRelPreconnect.audit(artifacts, {});\nassert.equal(score, 1);\nassert.equal(rawValue, 0);\nassert.equal(details.items.length, 0);\n@@ -121,9 +136,10 @@ describe('Performance: uses-rel-preconnect audit', () => {\ndevtoolsLogs: {[UsesRelPreconnect.DEFAULT_PASS]: []},\nrequestNetworkRecords: () => Promise.resolve(networkRecords),\nrequestMainResource: () => Promise.resolve(mainResource),\n+ requestLoadSimulator: () => Promise.resolve(simulator),\n};\n- const {score, rawValue, details} = await UsesRelPreconnect.audit(artifacts);\n+ const {score, rawValue, details} = await UsesRelPreconnect.audit(artifacts, {});\nassert.equal(score, 1);\nassert.equal(rawValue, 0);\nassert.equal(details.items.length, 0);\n@@ -136,6 +152,7 @@ describe('Performance: uses-rel-preconnect audit', () => {\nurl: 'https://cdn.example.com/first',\ninitiatorRequest: () => null,\nparsedURL: {\n+ scheme: 'https',\nsecurityOrigin: () => 'https://cdn.example.com',\n},\nstartTime: 2,\n@@ -149,6 +166,7 @@ describe('Performance: uses-rel-preconnect audit', () => {\nurl: 'https://cdn.example.com/second',\ninitiatorRequest: () => null,\nparsedURL: {\n+ scheme: 'https',\nsecurityOrigin: () => 'https://cdn.example.com',\n},\nstartTime: 3,\n@@ -163,13 +181,14 @@ describe('Performance: uses-rel-preconnect audit', () => {\ndevtoolsLogs: {[UsesRelPreconnect.DEFAULT_PASS]: []},\nrequestNetworkRecords: () => Promise.resolve(networkRecords),\nrequestMainResource: () => Promise.resolve(mainResource),\n+ requestLoadSimulator: () => Promise.resolve(simulator),\n};\n- const {rawValue, extendedInfo} = await UsesRelPreconnect.audit(artifacts);\n+ const {rawValue, extendedInfo} = await UsesRelPreconnect.audit(artifacts, {});\nassert.equal(rawValue, 200);\nassert.equal(extendedInfo.value.length, 1);\nassert.deepStrictEqual(extendedInfo.value, [\n- {url: 'https://cdn.example.com', wastedMs: 200, type: 'ms'},\n+ {url: 'https://cdn.example.com', wastedMs: 200},\n]);\n});\n@@ -180,7 +199,8 @@ describe('Performance: uses-rel-preconnect audit', () => {\nurl: 'https://cdn.example.com/first',\ninitiatorRequest: () => null,\nparsedURL: {\n- securityOrigin: () => 'https://cdn.example.com',\n+ scheme: 'http',\n+ securityOrigin: () => 'http://cdn.example.com',\n},\nstartTime: 2,\n_timing: {\n@@ -193,6 +213,7 @@ describe('Performance: uses-rel-preconnect audit', () => {\nurl: 'https://othercdn.example.com/second',\ninitiatorRequest: () => null,\nparsedURL: {\n+ scheme: 'https',\nsecurityOrigin: () => 'https://othercdn.example.com',\n},\nstartTime: 1.2,\n@@ -207,14 +228,20 @@ describe('Performance: uses-rel-preconnect audit', () => {\ndevtoolsLogs: {[UsesRelPreconnect.DEFAULT_PASS]: []},\nrequestNetworkRecords: () => Promise.resolve(networkRecords),\nrequestMainResource: () => Promise.resolve(mainResource),\n+ requestLoadSimulator: () => Promise.resolve(simulator),\n+ };\n+\n+ simulatorOptions = {\n+ rtt: 100,\n+ additionalRttByOrigin: new Map([['https://othercdn.example.com', 50]]),\n};\n- const {rawValue, extendedInfo} = await UsesRelPreconnect.audit(artifacts);\n+ const {rawValue, extendedInfo} = await UsesRelPreconnect.audit(artifacts, {});\nassert.equal(rawValue, 300);\nassert.equal(extendedInfo.value.length, 2);\nassert.deepStrictEqual(extendedInfo.value, [\n- {url: 'https://othercdn.example.com', wastedMs: 300, type: 'ms'},\n- {url: 'https://cdn.example.com', wastedMs: 200, type: 'ms'},\n+ {url: 'https://othercdn.example.com', wastedMs: 300},\n+ {url: 'http://cdn.example.com', wastedMs: 100},\n]);\n});\n});\n",
"new_path": "lighthouse-core/test/audits/uses-rel-preconnect-test.js",
"old_path": "lighthouse-core/test/audits/uses-rel-preconnect-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -41,7 +41,6 @@ declare global {\nexport interface Options {\nrtt?: number;\nthroughput?: number;\n- fallbackTTFB?: number;\nmaximumConcurrentRequests?: number;\ncpuSlowdownMultiplier?: number;\nlayoutTaskMultiplier?: number;\n",
"new_path": "typings/gatherer.d.ts",
"old_path": "typings/gatherer.d.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -18,6 +18,8 @@ declare global {\n_url: string;\nprotocol: string;\nparsedURL: ParsedURL;\n+ // Use parsedURL.securityOrigin() instead\n+ origin: never;\nstartTime: number;\nendTime: number;\n",
"new_path": "typings/web-inspector.d.ts",
"old_path": "typings/web-inspector.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(preconnect): use lantern to compute savings (#5070)
| 1
|
core
|
preconnect
|
679,913
|
01.05.2018 11:06:57
| -3,600
|
a93cb98b61260cedce179dd522aad34f541619f1
|
fix(hdom): boolean attrib reset/removal
|
[
{
"change_type": "MODIFY",
"diff": "@@ -136,7 +136,7 @@ export function setAttrib(el: Element, id: string, val: any, attribs?: any) {\n}\n}\n} else {\n- el.removeAttribute(id);\n+ el[id] ? (el[id] = null) : el.removeAttribute(id);\n}\nreturn el;\n}\n@@ -167,7 +167,7 @@ export function removeAttribs(el: Element, attribs: string[], prev: any) {\nif (a.indexOf(\"on\") === 0) {\nel.removeEventListener(a.substr(2), prev[a]);\n} else {\n- el.removeAttribute(a);\n+ el[a] ? (el[a] = null) : el.removeAttribute(a);\n}\n}\n}\n",
"new_path": "packages/hdom/src/dom.ts",
"old_path": "packages/hdom/src/dom.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
fix(hdom): boolean attrib reset/removal
| 1
|
fix
|
hdom
|
791,723
|
01.05.2018 11:30:40
| 25,200
|
9b15f7097115dcef416804adc00919f35c1515f5
|
deps(extension): bump browserify version and sub-deps
|
[
{
"change_type": "MODIFY",
"diff": "\"devDependencies\": {\n\"babel-plugin-syntax-object-rest-spread\": \"^6.13.0\",\n\"brfs\": \"^1.6.1\",\n- \"browserify\": \"^16.1.1\",\n+ \"browserify\": \"^16.2.0\",\n\"del\": \"^2.2.0\",\n\"gulp\": \"^3.9.1\",\n\"gulp-chrome-manifest\": \"0.0.13\",\n",
"new_path": "lighthouse-extension/package.json",
"old_path": "lighthouse-extension/package.json"
},
{
"change_type": "MODIFY",
"diff": "JSONStream@^1.0.3:\n- version \"1.3.0\"\n- resolved \"https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.0.tgz#680ab9ac6572a8a1a207e0b38721db1c77b215e5\"\n+ version \"1.3.2\"\n+ resolved \"https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea\"\ndependencies:\njsonparse \"^1.2.0\"\nthrough \">=2.2.7 <3\"\n@@ -15,17 +15,13 @@ acorn-jsx@^3.0.0:\ndependencies:\nacorn \"^3.0.4\"\n-acorn-node@^1.3.0:\n+acorn-node@^1.2.0, acorn-node@^1.3.0:\nversion \"1.3.0\"\nresolved \"https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.3.0.tgz#5f86d73346743810ef1269b901dbcbded020861b\"\ndependencies:\nacorn \"^5.4.1\"\nxtend \"^4.0.1\"\n-acorn@^2.7.0:\n- version \"2.7.0\"\n- resolved \"https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7\"\n-\nacorn@^3.0.4:\nversion \"3.3.0\"\nresolved \"https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a\"\n@@ -168,8 +164,8 @@ arrify@^1.0.0:\nresolved \"https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d\"\nasn1.js@^4.0.0:\n- version \"4.9.1\"\n- resolved \"https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.1.tgz#48ba240b45a9280e94748990ba597d216617fd40\"\n+ version \"4.10.1\"\n+ resolved \"https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0\"\ndependencies:\nbn.js \"^4.0.0\"\ninherits \"^2.0.1\"\n@@ -212,16 +208,16 @@ balanced-match@^1.0.0:\nresolved \"https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767\"\nbase64-js@^1.0.2:\n- version \"1.2.0\"\n- resolved \"https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1\"\n+ version \"1.3.0\"\n+ resolved \"https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3\"\nbeeper@^1.0.0:\nversion \"1.1.1\"\nresolved \"https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809\"\nbn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:\n- version \"4.11.6\"\n- resolved \"https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215\"\n+ version \"4.11.8\"\n+ resolved \"https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f\"\nbody-parser@~1.14.0:\nversion \"1.14.2\"\n@@ -270,16 +266,17 @@ brfs@^1.6.1:\nthrough2 \"^2.0.0\"\nbrorand@^1.0.1:\n- version \"1.0.7\"\n- resolved \"https://registry.yarnpkg.com/brorand/-/brorand-1.0.7.tgz#6677fa5e4901bdbf9c9ec2a748e28dca407a9bfc\"\n+ version \"1.1.0\"\n+ resolved \"https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f\"\nbrowser-pack@^6.0.1:\n- version \"6.0.2\"\n- resolved \"https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.0.2.tgz#f86cd6cef4f5300c8e63e07a4d512f65fbff4531\"\n+ version \"6.1.0\"\n+ resolved \"https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.1.0.tgz#c34ba10d0b9ce162b5af227c7131c92c2ecd5774\"\ndependencies:\nJSONStream \"^1.0.3\"\n- combine-source-map \"~0.7.1\"\n+ combine-source-map \"~0.8.0\"\ndefined \"^1.0.0\"\n+ safe-buffer \"^5.1.1\"\nthrough2 \"^2.0.0\"\numd \"^3.0.0\"\n@@ -290,26 +287,27 @@ browser-resolve@^1.11.0, browser-resolve@^1.7.0:\nresolve \"1.1.7\"\nbrowserify-aes@^1.0.0, browserify-aes@^1.0.4:\n- version \"1.0.6\"\n- resolved \"https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a\"\n+ version \"1.2.0\"\n+ resolved \"https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48\"\ndependencies:\n- buffer-xor \"^1.0.2\"\n+ buffer-xor \"^1.0.3\"\ncipher-base \"^1.0.0\"\ncreate-hash \"^1.1.0\"\n- evp_bytestokey \"^1.0.0\"\n+ evp_bytestokey \"^1.0.3\"\ninherits \"^2.0.1\"\n+ safe-buffer \"^5.0.1\"\nbrowserify-cipher@^1.0.0:\n- version \"1.0.0\"\n- resolved \"https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a\"\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0\"\ndependencies:\nbrowserify-aes \"^1.0.4\"\nbrowserify-des \"^1.0.0\"\nevp_bytestokey \"^1.0.0\"\nbrowserify-des@^1.0.0:\n- version \"1.0.0\"\n- resolved \"https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd\"\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.1.tgz#3343124db6d7ad53e26a8826318712bdc8450f9c\"\ndependencies:\ncipher-base \"^1.0.1\"\ndes.js \"^1.0.0\"\n@@ -327,8 +325,8 @@ browserify-rsa@^4.0.0:\nrandombytes \"^2.0.1\"\nbrowserify-sign@^4.0.0:\n- version \"4.0.0\"\n- resolved \"https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.0.tgz#10773910c3c206d5420a46aad8694f820b85968f\"\n+ version \"4.0.4\"\n+ resolved \"https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298\"\ndependencies:\nbn.js \"^4.1.1\"\nbrowserify-rsa \"^4.0.0\"\n@@ -344,9 +342,9 @@ browserify-zlib@~0.2.0:\ndependencies:\npako \"~1.0.5\"\n-browserify@^16.1.1:\n- version \"16.1.1\"\n- resolved \"https://registry.yarnpkg.com/browserify/-/browserify-16.1.1.tgz#7905ec07e0147c4d90f92001944050a6e1c2844e\"\n+browserify@^16.2.0:\n+ version \"16.2.0\"\n+ resolved \"https://registry.yarnpkg.com/browserify/-/browserify-16.2.0.tgz#04ba47c4150555532978453818160666aa3bd8a7\"\ndependencies:\nJSONStream \"^1.0.3\"\nassert \"^1.4.0\"\n@@ -386,7 +384,7 @@ browserify@^16.1.1:\nshell-quote \"^1.6.1\"\nstream-browserify \"^2.0.0\"\nstream-http \"^2.0.0\"\n- string_decoder \"~1.0.0\"\n+ string_decoder \"^1.1.1\"\nsubarg \"^1.0.0\"\nsyntax-error \"^1.1.1\"\nthrough2 \"^2.0.0\"\n@@ -394,7 +392,7 @@ browserify@^16.1.1:\ntty-browserify \"0.0.1\"\nurl \"~0.11.0\"\nutil \"~0.10.1\"\n- vm-browserify \"~0.0.1\"\n+ vm-browserify \"^1.0.0\"\nxtend \"^4.0.0\"\nbuffer-crc32@~0.2.3:\n@@ -405,11 +403,15 @@ buffer-equal@0.0.1:\nversion \"0.0.1\"\nresolved \"https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-0.0.1.tgz#91bc74b11ea405bc916bc6aa908faafa5b4aac4b\"\n+buffer-from@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531\"\n+\nbuffer-shims@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51\"\n-buffer-xor@^1.0.2:\n+buffer-xor@^1.0.3:\nversion \"1.0.3\"\nresolved \"https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9\"\n@@ -499,11 +501,12 @@ chrome-manifest@^0.2.4:\nsort-json \"^1.2.0\"\nunderscore.string \"^3.0.3\"\n-cipher-base@^1.0.0, cipher-base@^1.0.1:\n- version \"1.0.3\"\n- resolved \"https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.3.tgz#eeabf194419ce900da3018c207d212f2a6df0a07\"\n+cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:\n+ version \"1.0.4\"\n+ resolved \"https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de\"\ndependencies:\ninherits \"^2.0.1\"\n+ safe-buffer \"^5.0.1\"\ncircular-json@^0.3.1:\nversion \"0.3.1\"\n@@ -549,9 +552,9 @@ color-support@^1.1.3:\nversion \"1.1.3\"\nresolved \"https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2\"\n-combine-source-map@~0.7.1:\n- version \"0.7.2\"\n- resolved \"https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.7.2.tgz#0870312856b307a87cc4ac486f3a9a62aeccc09e\"\n+combine-source-map@^0.8.0, combine-source-map@~0.8.0:\n+ version \"0.8.0\"\n+ resolved \"https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.8.0.tgz#a58d0df042c186fcf822a8e8015f5450d2d79a8b\"\ndependencies:\nconvert-source-map \"~1.1.0\"\ninline-source-map \"~0.6.0\"\n@@ -562,7 +565,7 @@ concat-map@0.0.1:\nversion \"0.0.1\"\nresolved \"https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b\"\n-concat-stream@^1.4.7, concat-stream@~1.5.1:\n+concat-stream@^1.4.7:\nversion \"1.5.2\"\nresolved \"https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266\"\ndependencies:\n@@ -578,6 +581,15 @@ concat-stream@^1.6.0:\nreadable-stream \"^2.2.2\"\ntypedarray \"^0.0.6\"\n+concat-stream@^1.6.1:\n+ version \"1.6.2\"\n+ resolved \"https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34\"\n+ dependencies:\n+ buffer-from \"^1.0.0\"\n+ inherits \"^2.0.3\"\n+ readable-stream \"^2.2.2\"\n+ typedarray \"^0.0.6\"\n+\nconcat-stream@~1.6.0:\nversion \"1.6.1\"\nresolved \"https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.1.tgz#261b8f518301f1d834e36342b9fea095d2620a26\"\n@@ -619,27 +631,32 @@ core-util-is@~1.0.0:\nresolved \"https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7\"\ncreate-ecdh@^4.0.0:\n- version \"4.0.0\"\n- resolved \"https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d\"\n+ version \"4.0.1\"\n+ resolved \"https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.1.tgz#44223dfed533193ba5ba54e0df5709b89acf1f82\"\ndependencies:\nbn.js \"^4.1.0\"\nelliptic \"^6.0.0\"\n-create-hash@^1.1.0, create-hash@^1.1.1:\n- version \"1.1.2\"\n- resolved \"https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.2.tgz#51210062d7bb7479f6c65bb41a92208b1d61abad\"\n+create-hash@^1.1.0, create-hash@^1.1.2:\n+ version \"1.2.0\"\n+ resolved \"https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196\"\ndependencies:\ncipher-base \"^1.0.1\"\ninherits \"^2.0.1\"\n- ripemd160 \"^1.0.0\"\n- sha.js \"^2.3.6\"\n+ md5.js \"^1.3.4\"\n+ ripemd160 \"^2.0.1\"\n+ sha.js \"^2.4.0\"\n-create-hmac@^1.1.0, create-hmac@^1.1.2:\n- version \"1.1.4\"\n- resolved \"https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.4.tgz#d3fb4ba253eb8b3f56e39ea2fbcb8af747bd3170\"\n+create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:\n+ version \"1.1.7\"\n+ resolved \"https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff\"\ndependencies:\n+ cipher-base \"^1.0.3\"\ncreate-hash \"^1.1.0\"\ninherits \"^2.0.1\"\n+ ripemd160 \"^2.0.0\"\n+ safe-buffer \"^5.0.1\"\n+ sha.js \"^2.4.8\"\ncross-spawn@^5.1.0:\nversion \"5.1.0\"\n@@ -650,8 +667,8 @@ cross-spawn@^5.1.0:\nwhich \"^1.2.9\"\ncrypto-browserify@^3.0.0:\n- version \"3.11.0\"\n- resolved \"https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.0.tgz#3652a0906ab9b2a7e0c3ce66a408e957a2485522\"\n+ version \"3.12.0\"\n+ resolved \"https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec\"\ndependencies:\nbrowserify-cipher \"^1.0.0\"\nbrowserify-sign \"^4.0.0\"\n@@ -663,6 +680,7 @@ crypto-browserify@^3.0.0:\npbkdf2 \"^3.0.3\"\npublic-encrypt \"^4.0.0\"\nrandombytes \"^2.0.0\"\n+ randomfill \"^1.0.3\"\ncurrently-unhandled@^0.4.1:\nversion \"0.4.1\"\n@@ -771,8 +789,8 @@ detective@^5.0.2:\nminimist \"^1.1.1\"\ndiffie-hellman@^5.0.0:\n- version \"5.0.2\"\n- resolved \"https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e\"\n+ version \"5.0.3\"\n+ resolved \"https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875\"\ndependencies:\nbn.js \"^4.1.0\"\nmiller-rabin \"^4.0.0\"\n@@ -810,13 +828,16 @@ ee-first@1.1.1:\nresolved \"https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d\"\nelliptic@^6.0.0:\n- version \"6.3.3\"\n- resolved \"https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.3.tgz#5482d9646d54bcb89fd7d994fc9e2e9568876e3f\"\n+ version \"6.4.0\"\n+ resolved \"https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df\"\ndependencies:\nbn.js \"^4.4.0\"\nbrorand \"^1.0.1\"\nhash.js \"^1.0.0\"\n+ hmac-drbg \"^1.0.0\"\ninherits \"^2.0.1\"\n+ minimalistic-assert \"^1.0.0\"\n+ minimalistic-crypto-utils \"^1.0.0\"\nend-of-stream@~0.1.5:\nversion \"0.1.5\"\n@@ -962,11 +983,12 @@ events@^2.0.0:\nversion \"2.0.0\"\nresolved \"https://registry.yarnpkg.com/events/-/events-2.0.0.tgz#cbbb56bf3ab1ac18d71c43bb32c86255062769f2\"\n-evp_bytestokey@^1.0.0:\n- version \"1.0.0\"\n- resolved \"https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz#497b66ad9fef65cd7c08a6180824ba1476b66e53\"\n+evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3:\n+ version \"1.0.3\"\n+ resolved \"https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02\"\ndependencies:\n- create-hash \"^1.1.1\"\n+ md5.js \"^1.3.4\"\n+ safe-buffer \"^5.1.1\"\nexpand-brackets@^0.1.4:\nversion \"0.1.5\"\n@@ -1214,7 +1236,7 @@ glob@^4.3.1:\nminimatch \"^2.0.1\"\nonce \"^1.3.0\"\n-glob@^7.0.3, glob@^7.0.5, glob@^7.1.0:\n+glob@^7.0.3, glob@^7.0.5:\nversion \"7.1.1\"\nresolved \"https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8\"\ndependencies:\n@@ -1225,7 +1247,7 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.0:\nonce \"^1.3.0\"\npath-is-absolute \"^1.0.0\"\n-glob@^7.1.2:\n+glob@^7.1.0, glob@^7.1.2:\nversion \"7.1.2\"\nresolved \"https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15\"\ndependencies:\n@@ -1442,11 +1464,27 @@ has@^1.0.0, has@^1.0.1:\ndependencies:\nfunction-bind \"^1.0.2\"\n-hash.js@^1.0.0:\n- version \"1.0.3\"\n- resolved \"https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573\"\n+hash-base@^3.0.0:\n+ version \"3.0.4\"\n+ resolved \"https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918\"\ndependencies:\ninherits \"^2.0.1\"\n+ safe-buffer \"^5.0.1\"\n+\n+hash.js@^1.0.0, hash.js@^1.0.3:\n+ version \"1.1.3\"\n+ resolved \"https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846\"\n+ dependencies:\n+ inherits \"^2.0.3\"\n+ minimalistic-assert \"^1.0.0\"\n+\n+hmac-drbg@^1.0.0:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1\"\n+ dependencies:\n+ hash.js \"^1.0.3\"\n+ minimalistic-assert \"^1.0.0\"\n+ minimalistic-crypto-utils \"^1.0.1\"\nhomedir-polyfill@^1.0.0:\nversion \"1.0.1\"\n@@ -1482,8 +1520,8 @@ iconv-lite@^0.4.17:\nresolved \"https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b\"\nieee754@^1.1.4:\n- version \"1.1.8\"\n- resolved \"https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4\"\n+ version \"1.1.11\"\n+ resolved \"https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.11.tgz#c16384ffe00f5b7835824e67b6f2bd44a5229455\"\nignore@^3.3.3:\nversion \"3.3.5\"\n@@ -1499,10 +1537,6 @@ indent-string@^2.1.0:\ndependencies:\nrepeating \"^2.0.0\"\n-indexof@0.0.1:\n- version \"0.0.1\"\n- resolved \"https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d\"\n-\ninflight@^1.0.4:\nversion \"1.0.6\"\nresolved \"https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9\"\n@@ -1552,14 +1586,15 @@ inquirer@^3.0.6:\nthrough \"^2.3.6\"\ninsert-module-globals@^7.0.0:\n- version \"7.0.1\"\n- resolved \"https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.0.1.tgz#c03bf4e01cb086d5b5e5ace8ad0afe7889d638c3\"\n+ version \"7.0.6\"\n+ resolved \"https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.0.6.tgz#15a31d9d394e76d08838b9173016911d7fd4ea1b\"\ndependencies:\nJSONStream \"^1.0.3\"\n- combine-source-map \"~0.7.1\"\n- concat-stream \"~1.5.1\"\n+ combine-source-map \"^0.8.0\"\n+ concat-stream \"^1.6.1\"\nis-buffer \"^1.1.0\"\nlexical-scope \"^1.2.0\"\n+ path-is-absolute \"^1.0.1\"\nprocess \"~0.11.0\"\nthrough2 \"^2.0.0\"\nxtend \"^4.0.0\"\n@@ -1583,10 +1618,14 @@ is-arrayish@^0.2.1:\nversion \"0.2.1\"\nresolved \"https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d\"\n-is-buffer@^1.0.2, is-buffer@^1.1.0:\n+is-buffer@^1.0.2:\nversion \"1.1.4\"\nresolved \"https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b\"\n+is-buffer@^1.1.0:\n+ version \"1.1.6\"\n+ resolved \"https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be\"\n+\nis-builtin-module@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe\"\n@@ -1711,7 +1750,7 @@ is-windows@^0.2.0:\nversion \"0.2.0\"\nresolved \"https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c\"\n-isarray@0.0.1, isarray@~0.0.1:\n+isarray@0.0.1:\nversion \"0.0.1\"\nresolved \"https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf\"\n@@ -1719,6 +1758,10 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11\"\n+isarray@^2.0.4:\n+ version \"2.0.4\"\n+ resolved \"https://registry.yarnpkg.com/isarray/-/isarray-2.0.4.tgz#38e7bcbb0f3ba1b7933c86ba1894ddfc3781bbb7\"\n+\nisexe@^1.1.1:\nversion \"1.1.2\"\nresolved \"https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0\"\n@@ -1773,8 +1816,8 @@ jsonify@~0.0.0:\nresolved \"https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73\"\njsonparse@^1.2.0:\n- version \"1.3.0\"\n- resolved \"https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.0.tgz#85fc245b1d9259acc6941960b905adf64e7de0e8\"\n+ version \"1.3.1\"\n+ resolved \"https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280\"\nkind-of@^3.0.2:\nversion \"3.1.0\"\n@@ -1783,11 +1826,11 @@ kind-of@^3.0.2:\nis-buffer \"^1.0.2\"\nlabeled-stream-splicer@^2.0.0:\n- version \"2.0.0\"\n- resolved \"https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz#a52e1d138024c00b86b1c0c91f677918b8ae0a59\"\n+ version \"2.0.1\"\n+ resolved \"https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz#9cffa32fd99e1612fd1d86a8db962416d5292926\"\ndependencies:\ninherits \"^2.0.1\"\n- isarray \"~0.0.1\"\n+ isarray \"^2.0.4\"\nstream-splicer \"^2.0.0\"\nlevn@^0.3.0, levn@~0.3.0:\n@@ -2020,6 +2063,13 @@ map-stream@~0.1.0:\nversion \"0.1.0\"\nresolved \"https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194\"\n+md5.js@^1.3.4:\n+ version \"1.3.4\"\n+ resolved \"https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d\"\n+ dependencies:\n+ hash-base \"^3.0.0\"\n+ inherits \"^2.0.1\"\n+\nmedia-typer@0.3.0:\nversion \"0.3.0\"\nresolved \"https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748\"\n@@ -2064,8 +2114,8 @@ micromatch@^2.3.7:\nregex-cache \"^0.4.2\"\nmiller-rabin@^4.0.0:\n- version \"4.0.0\"\n- resolved \"https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d\"\n+ version \"4.0.1\"\n+ resolved \"https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d\"\ndependencies:\nbn.js \"^4.0.0\"\nbrorand \"^1.0.1\"\n@@ -2096,8 +2146,12 @@ mini-lr@^0.1.8:\nqs \"~2.2.3\"\nminimalistic-assert@^1.0.0:\n- version \"1.0.0\"\n- resolved \"https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3\"\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7\"\n+\n+minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a\"\nminimatch@^2.0.1:\nversion \"2.0.10\"\n@@ -2139,8 +2193,8 @@ mkdirp@^0.5.0, mkdirp@^0.5.1:\nminimist \"0.0.8\"\nmodule-deps@^6.0.0:\n- version \"6.0.0\"\n- resolved \"https://registry.yarnpkg.com/module-deps/-/module-deps-6.0.0.tgz#4417b49a4f4d7af79b104186e5389ea99b1dc837\"\n+ version \"6.0.2\"\n+ resolved \"https://registry.yarnpkg.com/module-deps/-/module-deps-6.0.2.tgz#660217d1602b863ac8d4d16951a3720dd9aa4c80\"\ndependencies:\nJSONStream \"^1.0.3\"\nbrowser-resolve \"^1.7.0\"\n@@ -2300,8 +2354,8 @@ parents@^1.0.0, parents@^1.0.1:\npath-platform \"~0.11.15\"\nparse-asn1@^5.0.0:\n- version \"5.0.0\"\n- resolved \"https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.0.0.tgz#35060f6d5015d37628c770f4e091a0b5a278bc23\"\n+ version \"5.1.1\"\n+ resolved \"https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8\"\ndependencies:\nasn1.js \"^4.0.0\"\nbrowserify-aes \"^1.0.0\"\n@@ -2350,7 +2404,7 @@ path-exists@^2.0.0:\ndependencies:\npinkie-promise \"^2.0.0\"\n-path-is-absolute@^1.0.0:\n+path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:\nversion \"1.0.1\"\nresolved \"https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f\"\n@@ -2391,10 +2445,14 @@ pause-stream@0.0.11:\nthrough \"~2.3\"\npbkdf2@^3.0.3:\n- version \"3.0.9\"\n- resolved \"https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.9.tgz#f2c4b25a600058b3c3773c086c37dbbee1ffe693\"\n+ version \"3.0.16\"\n+ resolved \"https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.16.tgz#7404208ec6b01b62d85bf83853a8064f8d9c2a5c\"\ndependencies:\n- create-hmac \"^1.1.2\"\n+ create-hash \"^1.1.2\"\n+ create-hmac \"^1.1.4\"\n+ ripemd160 \"^2.0.1\"\n+ safe-buffer \"^5.0.1\"\n+ sha.js \"^2.4.8\"\npicker@^0.1.4:\nversion \"0.1.4\"\n@@ -2454,8 +2512,8 @@ process-nextick-args@~2.0.0:\nresolved \"https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa\"\nprocess@~0.11.0:\n- version \"0.11.9\"\n- resolved \"https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1\"\n+ version \"0.11.10\"\n+ resolved \"https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182\"\nprogress@^2.0.0:\nversion \"2.0.0\"\n@@ -2466,8 +2524,8 @@ pseudomap@^1.0.2:\nresolved \"https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3\"\npublic-encrypt@^4.0.0:\n- version \"4.0.0\"\n- resolved \"https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6\"\n+ version \"4.0.2\"\n+ resolved \"https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.2.tgz#46eb9107206bf73489f8b85b69d91334c6610994\"\ndependencies:\nbn.js \"^4.1.0\"\nbrowserify-rsa \"^4.0.0\"\n@@ -2514,9 +2572,18 @@ randomatic@^1.1.3:\nis-number \"^2.0.2\"\nkind-of \"^3.0.2\"\n-randombytes@^2.0.0, randombytes@^2.0.1:\n- version \"2.0.3\"\n- resolved \"https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec\"\n+randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5:\n+ version \"2.0.6\"\n+ resolved \"https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80\"\n+ dependencies:\n+ safe-buffer \"^5.1.0\"\n+\n+randomfill@^1.0.3:\n+ version \"1.0.4\"\n+ resolved \"https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458\"\n+ dependencies:\n+ randombytes \"^2.0.5\"\n+ safe-buffer \"^5.1.0\"\nraw-body@~2.1.5:\nversion \"2.1.7\"\n@@ -2556,7 +2623,7 @@ read-pkg@^1.0.0:\nisarray \"0.0.1\"\nstring_decoder \"~0.10.x\"\n-readable-stream@^2.0.2, readable-stream@^2.1.0, readable-stream@^2.1.5:\n+readable-stream@^2.0.2, readable-stream@^2.1.5:\nversion \"2.2.2\"\nresolved \"https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e\"\ndependencies:\n@@ -2580,6 +2647,18 @@ readable-stream@^2.2.2:\nstring_decoder \"~1.0.3\"\nutil-deprecate \"~1.0.1\"\n+readable-stream@^2.3.3:\n+ version \"2.3.6\"\n+ resolved \"https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf\"\n+ dependencies:\n+ core-util-is \"~1.0.0\"\n+ inherits \"~2.0.3\"\n+ isarray \"~1.0.0\"\n+ process-nextick-args \"~2.0.0\"\n+ safe-buffer \"~5.1.1\"\n+ string_decoder \"~1.1.1\"\n+ util-deprecate \"~1.0.1\"\n+\nreadable-stream@~1.1.9:\nversion \"1.1.14\"\nresolved \"https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9\"\n@@ -2672,16 +2751,16 @@ resolve@1.1.7:\nversion \"1.1.7\"\nresolved \"https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b\"\n-resolve@^1.1.4, resolve@^1.1.5, resolve@^1.1.6, resolve@^1.1.7:\n- version \"1.2.0\"\n- resolved \"https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c\"\n-\n-resolve@^1.4.0:\n- version \"1.5.0\"\n- resolved \"https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36\"\n+resolve@^1.1.4, resolve@^1.4.0:\n+ version \"1.7.1\"\n+ resolved \"https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3\"\ndependencies:\npath-parse \"^1.0.5\"\n+resolve@^1.1.5, resolve@^1.1.6, resolve@^1.1.7:\n+ version \"1.2.0\"\n+ resolved \"https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c\"\n+\nrestore-cursor@^2.0.0:\nversion \"2.0.0\"\nresolved \"https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf\"\n@@ -2695,9 +2774,12 @@ rimraf@^2.2.8:\ndependencies:\nglob \"^7.0.5\"\n-ripemd160@^1.0.0:\n- version \"1.0.1\"\n- resolved \"https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e\"\n+ripemd160@^2.0.0, ripemd160@^2.0.1:\n+ version \"2.0.2\"\n+ resolved \"https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c\"\n+ dependencies:\n+ hash-base \"^3.0.0\"\n+ inherits \"^2.0.1\"\nrun-async@^2.2.0:\nversion \"2.3.0\"\n@@ -2722,6 +2804,10 @@ rx-lite@*, rx-lite@^4.0.8:\nversion \"4.0.8\"\nresolved \"https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444\"\n+safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1:\n+ version \"5.1.2\"\n+ resolved \"https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d\"\n+\nsafe-buffer@~5.1.0, safe-buffer@~5.1.1:\nversion \"5.1.1\"\nresolved \"https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853\"\n@@ -2738,11 +2824,12 @@ sequencify@~0.0.7:\nversion \"0.0.7\"\nresolved \"https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c\"\n-sha.js@^2.3.6, sha.js@~2.4.4:\n- version \"2.4.8\"\n- resolved \"https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f\"\n+sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4:\n+ version \"2.4.11\"\n+ resolved \"https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7\"\ndependencies:\ninherits \"^2.0.1\"\n+ safe-buffer \"^5.0.1\"\nshallow-copy@~0.0.1:\nversion \"0.0.1\"\n@@ -2794,11 +2881,11 @@ sort-json@^1.2.0:\ndependencies:\ndetect-indent \"^4.0.0\"\n-source-map@^0.5.1, source-map@~0.5.3:\n+source-map@^0.5.1:\nversion \"0.5.6\"\nresolved \"https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412\"\n-source-map@^0.5.6:\n+source-map@^0.5.6, source-map@~0.5.3:\nversion \"0.5.7\"\nresolved \"https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc\"\n@@ -2894,12 +2981,12 @@ stream-consume@~0.1.0:\nresolved \"https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f\"\nstream-http@^2.0.0:\n- version \"2.6.3\"\n- resolved \"https://registry.yarnpkg.com/stream-http/-/stream-http-2.6.3.tgz#4c3ddbf9635968ea2cfd4e48d43de5def2625ac3\"\n+ version \"2.8.1\"\n+ resolved \"https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.1.tgz#d0441be1a457a73a733a8a7b53570bebd9ef66a4\"\ndependencies:\nbuiltin-status-codes \"^3.0.0\"\ninherits \"^2.0.1\"\n- readable-stream \"^2.1.0\"\n+ readable-stream \"^2.3.3\"\nto-arraybuffer \"^1.0.0\"\nxtend \"^4.0.0\"\n@@ -2917,11 +3004,17 @@ string-width@^2.1.0, string-width@^2.1.1:\nis-fullwidth-code-point \"^2.0.0\"\nstrip-ansi \"^4.0.0\"\n+string_decoder@^1.1.1, string_decoder@~1.1.1:\n+ version \"1.1.1\"\n+ resolved \"https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8\"\n+ dependencies:\n+ safe-buffer \"~5.1.0\"\n+\nstring_decoder@~0.10.x:\nversion \"0.10.31\"\nresolved \"https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94\"\n-string_decoder@~1.0.0, string_decoder@~1.0.3:\n+string_decoder@~1.0.3:\nversion \"1.0.3\"\nresolved \"https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab\"\ndependencies:\n@@ -2996,10 +3089,10 @@ supports-color@^4.0.0:\nhas-flag \"^2.0.0\"\nsyntax-error@^1.1.1:\n- version \"1.1.6\"\n- resolved \"https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.1.6.tgz#b4549706d386cc1c1dc7c2423f18579b6cade710\"\n+ version \"1.4.0\"\n+ resolved \"https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.4.0.tgz#2d9d4ff5c064acb711594a3e3b95054ad51d907c\"\ndependencies:\n- acorn \"^2.7.0\"\n+ acorn-node \"^1.2.0\"\ntable@^4.0.1:\nversion \"4.0.2\"\n@@ -3090,8 +3183,8 @@ typedarray@^0.0.6, typedarray@~0.0.5:\nresolved \"https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777\"\numd@^3.0.0:\n- version \"3.0.1\"\n- resolved \"https://registry.yarnpkg.com/umd/-/umd-3.0.1.tgz#8ae556e11011f63c2596708a8837259f01b3d60e\"\n+ version \"3.0.3\"\n+ resolved \"https://registry.yarnpkg.com/umd/-/umd-3.0.3.tgz#aa9fe653c42b9097678489c01000acb69f0b26cf\"\nunc-path-regex@^0.1.0:\nversion \"0.1.2\"\n@@ -3178,11 +3271,9 @@ vlq@^0.2.2:\nversion \"0.2.3\"\nresolved \"https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26\"\n-vm-browserify@~0.0.1:\n- version \"0.0.4\"\n- resolved \"https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73\"\n- dependencies:\n- indexof \"0.0.1\"\n+vm-browserify@^1.0.0:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.0.1.tgz#a15d7762c4c48fa6bf9f3309a21340f00ed23063\"\nwebsocket-driver@>=0.3.6:\nversion \"0.6.5\"\n",
"new_path": "lighthouse-extension/yarn.lock",
"old_path": "lighthouse-extension/yarn.lock"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
deps(extension): bump browserify version and sub-deps (#5076)
| 1
|
deps
|
extension
|
815,745
|
01.05.2018 12:55:23
| -10,800
|
bcf334061791f6ee495b20a92e137cb0e55f91e5
|
fix: keep dropdown closed while unselecting value
fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -1829,12 +1829,12 @@ describe('NgSelectComponent', function () {\nconst selectInput = fixture.debugElement.query(By.css('.ng-select-container'));\n// open\n- selectInput.triggerEventHandler('mousedown', createEvent({ target: {} }));\n+ selectInput.triggerEventHandler('mousedown', createEvent({ target: { className: '' } }));\ntickAndDetectChanges(fixture);\nexpect(fixture.componentInstance.select.isOpen).toBe(true);\n// close\n- selectInput.triggerEventHandler('mousedown', createEvent({ target: {} }));\n+ selectInput.triggerEventHandler('mousedown', createEvent({ target: { className: '' } }));\ntickAndDetectChanges(fixture);\nexpect(fixture.componentInstance.select.isOpen).toBe(false);\n}));\n@@ -2299,10 +2299,12 @@ describe('NgSelectComponent', function () {\n}));\n});\n- describe('Clear icon click', () => {\n+ describe('Mousedown', () => {\nlet fixture: ComponentFixture<NgSelectTestCmp>;\n- let triggerClearClick = null;\n+ let select: NgSelectComponent;\n+ let triggerMousedown = null;\n+ describe('clear icon click', () => {\nbeforeEach(fakeAsync(() => {\nfixture = createTestingModule(\nNgSelectTestCmp,\n@@ -2317,14 +2319,14 @@ describe('NgSelectComponent', function () {\nfixture.componentInstance.selectedCity = fixture.componentInstance.cities[0];\ntickAndDetectChanges(fixture);\ntickAndDetectChanges(fixture);\n- triggerClearClick = () => {\n+ triggerMousedown = () => {\nconst control = fixture.debugElement.query(By.css('.ng-select-container'))\ncontrol.triggerEventHandler('mousedown', createEvent({ target: { className: 'ng-clear' } }));\n};\n}));\nit('should clear model', fakeAsync(() => {\n- triggerClearClick();\n+ triggerMousedown();\ntickAndDetectChanges(fixture);\nexpect(fixture.componentInstance.selectedCity).toBe(null);\nexpect(fixture.componentInstance.onChange).toHaveBeenCalledTimes(1);\n@@ -2334,14 +2336,14 @@ describe('NgSelectComponent', function () {\nfixture.componentInstance.selectedCity = null;\nfixture.componentInstance.select.filterValue = 'Hey! Whats up!?';\ntickAndDetectChanges(fixture);\n- triggerClearClick();\n+ triggerMousedown();\ntickAndDetectChanges(fixture);\nexpect(fixture.componentInstance.onChange).toHaveBeenCalledTimes(0);\nexpect(fixture.componentInstance.select.filterValue).toBe(null);\n}));\nit('should not open dropdown', fakeAsync(() => {\n- triggerClearClick();\n+ triggerMousedown();\ntickAndDetectChanges(fixture);\nexpect(fixture.componentInstance.select.isOpen).toBe(false);\n}));\n@@ -2355,10 +2357,41 @@ describe('NgSelectComponent', function () {\n}));\n});\n- describe('Arrow icon click', () => {\n- let fixture: ComponentFixture<NgSelectTestCmp>;\n- let triggerArrowIconClick = null;\n+ describe('value clear icon 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+ fixture.componentInstance.selectedCities = fixture.componentInstance.cities[0];\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-value-icon' } }));\n+ };\n+ }));\n+\n+ it('should not open dropdown', fakeAsync(() => {\n+ triggerMousedown();\n+ tickAndDetectChanges(fixture);\n+ expect(select.isOpen).toBe(false);\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+\n+ describe('arrow icon click', () => {\nbeforeEach(fakeAsync(() => {\nfixture = createTestingModule(\nNgSelectTestCmp,\n@@ -2369,7 +2402,7 @@ describe('NgSelectComponent', function () {\nfixture.componentInstance.selectedCity = fixture.componentInstance.cities[0];\ntickAndDetectChanges(fixture);\n- triggerArrowIconClick = () => {\n+ triggerMousedown = () => {\nconst control = fixture.debugElement.query(By.css('.ng-select-container'))\ncontrol.triggerEventHandler('mousedown', createEvent({ target: { className: 'ng-arrow' } }));\n};\n@@ -2377,21 +2410,22 @@ describe('NgSelectComponent', function () {\nit('should toggle dropdown', fakeAsync(() => {\n// open\n- triggerArrowIconClick();\n+ triggerMousedown();\ntickAndDetectChanges(fixture);\nexpect(fixture.componentInstance.select.isOpen).toBe(true);\n// close\n- triggerArrowIconClick();\n+ triggerMousedown();\ntickAndDetectChanges(fixture);\nexpect(fixture.componentInstance.select.isOpen).toBe(false);\n// open\n- triggerArrowIconClick();\n+ triggerMousedown();\ntickAndDetectChanges(fixture);\nexpect(fixture.componentInstance.select.isOpen).toBe(true);\n}));\n});\n+ });\ndescribe('Append to', () => {\nit('should append dropdown to body', async(() => {\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": "@@ -257,6 +257,11 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C\nthis.handleArrowClick();\nreturn;\n}\n+ if (target.className.includes('ng-value-icon')) {\n+ this.focus();\n+ return;\n+ }\n+\nif (this.searchable) {\nthis.open();\n} else {\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 dropdown closed while unselecting value
fixes #496
| 1
|
fix
| null |
679,913
|
01.05.2018 12:59:18
| -3,600
|
efb288dfcb8dd9926b126f6bb968fa0d3657f410
|
feat(hdom-components): add pager component, add dep
|
[
{
"change_type": "MODIFY",
"diff": "},\n\"dependencies\": {\n\"@thi.ng/checks\": \"^1.5.1\",\n+ \"@thi.ng/iterators\": \"^4.1.9\",\n\"@types/webgl2\": \"^0.0.3\"\n},\n\"keywords\": [\n",
"new_path": "packages/hdom-components/package.json",
"old_path": "packages/hdom-components/package.json"
},
{
"change_type": "MODIFY",
"diff": "export * from \"./canvas\";\nexport * from \"./dropdown\";\nexport * from \"./link\";\n+export * from \"./pager\";\n",
"new_path": "packages/hdom-components/src/index.ts",
"old_path": "packages/hdom-components/src/index.ts"
},
{
"change_type": "ADD",
"diff": "+import { range } from \"@thi.ng/iterators/range\";\n+import { map } from \"@thi.ng/iterators/map\";\n+\n+/**\n+ * Configuration options for pager components.\n+ */\n+export 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+ *\n+ * The function is called with:\n+ *\n+ * - target page ID\n+ * - current page ID\n+ * - max pageID\n+ * - page label (page number or sourced from these options here)\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+ * \"prev page\" buttons should be disabled if the first page is\n+ * currently active.\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+ * special highlighting cases (optional).\n+ */\n+ button: (page: number, curr: number, max: number, label: any, disabled: boolean) => any;\n+ /**\n+ * Attribs for pager root element\n+ */\n+ attribs?: any;\n+ /**\n+ * Attribs for prev page button group\n+ */\n+ prevAttribs?: any;\n+ /**\n+ * Attribs for next page button group\n+ */\n+ nextAttribs?: 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+ */\n+ maxButtons?: number;\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+ */\n+ navStep?: number;\n+ /**\n+ * Label for \"first page\" button. Default: \"<<\"\n+ */\n+ labelFirst?: any;\n+ /**\n+ * Label for \"last page\" button. Default: \">>\"\n+ */\n+ labelLast?: any;\n+ /**\n+ * Label for \"prev page\" button. Default: \"<\"\n+ */\n+ labelPrev?: any;\n+ /**\n+ * Label for \"next page\" button. Default: \">\"\n+ */\n+ labelNext?: any;\n+}\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+ *\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+ * });\n+ *\n+ * // usage\n+ * [mypager, currNumItems, currPage]\n+ * ```\n+ *\n+ * @param opts\n+ */\n+export const pager = (opts: PagerOpts) => {\n+ opts = Object.assign({\n+ maxButtons: 5,\n+ pageLen: 10,\n+ navStep: 1,\n+ attribs: {},\n+ prevAttribs: {},\n+ nextAttribs: {},\n+ labelFirst: \"<<\",\n+ labelPrev: \"<\",\n+ labelNext: \">\",\n+ labelLast: \">>\",\n+ }, opts);\n+ return (_, num: number, id: number) => {\n+ const bt = opts.button;\n+ const step = opts.navStep;\n+ const maxID = Math.floor(Math.max(0, num - 1) / opts.pageLen);\n+ id = Math.max(Math.min(id, maxID), 0);\n+ return [\"div\", opts.attribs,\n+ [\"div\", opts.prevAttribs,\n+ bt(0, id, maxID, opts.labelFirst, !id),\n+ bt(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+ bt(Math.min(id + step, maxID), id, maxID, opts.labelNext, id >= maxID),\n+ bt(maxID, id, maxID, opts.labelLast, id >= maxID)],\n+ ];\n+ };\n+};\n+\n+const pageRange = (id: number, maxID: number, maxBt: number) => {\n+ if (maxID > maxBt - 1) {\n+ const from = Math.max(Math.min(id - (maxBt >> 1), maxID - maxBt + 1), 0);\n+ return range(from, from + maxBt);\n+ }\n+ return range(0, maxID + 1);\n+};\n",
"new_path": "packages/hdom-components/src/pager.ts",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(hdom-components): add pager component, add @thi.ng/iterators dep
| 1
|
feat
|
hdom-components
|
815,745
|
01.05.2018 13:14:10
| -10,800
|
aeed11133a58793883416f6dc4884c0b3a6f8c93
|
feat: open dropdown on enter
closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -1147,6 +1147,20 @@ describe('NgSelectComponent', function () {\nexpect(findByLabel).toHaveBeenCalledWith('vil')\n}));\n});\n+\n+ describe('enter', () => {\n+ it('should open dropdown when it is closed', () => {\n+ triggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Enter);\n+ expect(select.isOpen).toBe(true);\n+ });\n+\n+ it('should select option and close dropdown', () => {\n+ triggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Space);\n+ triggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Enter);\n+ expect(select.selectedItems[0].value).toEqual(fixture.componentInstance.cities[0])\n+ expect(select.isOpen).toBe(false);\n+ });\n+ });\n});\ndescribe('Outside click', () => {\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": "@@ -687,6 +687,8 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C\n} else if (this.addTag) {\nthis.selectTag();\n}\n+ } else {\n+ this.open();\n}\n$event.preventDefault();\n$event.stopPropagation();\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
|
feat: open dropdown on enter
closes #508
| 1
|
feat
| null |
791,690
|
01.05.2018 13:37:01
| 25,200
|
6159de61b6c07f8affe37f617a85be041ec06654
|
core(redirects): use lantern to compute savings
|
[
{
"change_type": "MODIFY",
"diff": "@@ -11,7 +11,7 @@ const UnusedBytes = require('./byte-efficiency/byte-efficiency-audit');\nclass Redirects extends Audit {\n/**\n- * @return {!AuditMeta}\n+ * @return {LH.Audit.Meta}\n*/\nstatic get meta() {\nreturn {\n@@ -20,18 +20,36 @@ class Redirects extends Audit {\nfailureDescription: 'Has multiple page redirects',\nscoreDisplayMode: Audit.SCORING_MODES.NUMERIC,\nhelpText: 'Redirects introduce additional delays before the page can be loaded. [Learn more](https://developers.google.com/speed/docs/insights/AvoidRedirects).',\n- requiredArtifacts: ['URL', 'devtoolsLogs'],\n+ requiredArtifacts: ['URL', 'devtoolsLogs', 'traces'],\n};\n}\n/**\n- * @param {!Artifacts} artifacts\n- * @return {!AuditResult}\n+ * @param {LH.Artifacts} artifacts\n+ * @param {LH.Audit.Context} context\n+ * @return {Promise<LH.Audit.Product>}\n*/\n- static audit(artifacts) {\n- const data = {URL: artifacts.URL, devtoolsLog: artifacts.devtoolsLogs[Audit.DEFAULT_PASS]};\n- return artifacts.requestMainResource(data)\n- .then(mainResource => {\n+ static async audit(artifacts, context) {\n+ const settings = context.settings;\n+ const trace = artifacts.traces[Audit.DEFAULT_PASS];\n+ const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];\n+\n+ const traceOfTab = await artifacts.requestTraceOfTab(trace);\n+ const networkRecords = await artifacts.requestNetworkRecords(devtoolsLog);\n+ const mainResource = await artifacts.requestMainResource({URL: artifacts.URL, devtoolsLog});\n+\n+ const metricComputationData = {trace, devtoolsLog, traceOfTab, networkRecords, settings};\n+ const metricResult = await artifacts.requestLanternInteractive(metricComputationData);\n+\n+ /** @type {Map<string, LH.Gatherer.Simulation.NodeTiming>} */\n+ const nodeTimingsByUrl = new Map();\n+ for (const [node, timing] of metricResult.pessimisticEstimate.nodeTimings.entries()) {\n+ if (node.type === 'network') {\n+ const networkNode = /** @type {LH.Gatherer.Simulation.GraphNetworkNode} */ (node);\n+ nodeTimingsByUrl.set(networkNode.record.url, timing);\n+ }\n+ }\n+\n// redirects is only available when redirects happens\nconst redirectRequests = Array.from(mainResource.redirects || []);\n@@ -53,7 +71,14 @@ class Redirects extends Audit {\nconst initialRequest = redirectRequests[i - 1];\nconst redirectedRequest = redirectRequests[i];\n- const wastedMs = (redirectedRequest.startTime - initialRequest.startTime) * 1000;\n+ const initialTiming = nodeTimingsByUrl.get(initialRequest.url);\n+ const redirectedTiming = nodeTimingsByUrl.get(redirectedRequest.url);\n+ if (!initialTiming || !redirectedTiming) {\n+ throw new Error('Could not find redirects in graph');\n+ }\n+\n+ // @ts-ignore TODO(phulce): split NodeTiming typedef, these are always defined\n+ const wastedMs = redirectedTiming.startTime - initialTiming.startTime;\ntotalWastedMs += wastedMs;\npageRedirects.push({\n@@ -64,7 +89,7 @@ class Redirects extends Audit {\nconst headings = [\n{key: 'url', itemType: 'text', text: 'Redirected URL'},\n- {key: 'wastedMs', itemType: 'ms', text: 'Time for Redirect', granularity: 1},\n+ {key: 'wastedMs', itemType: 'ms', text: 'Time for Redirect'},\n];\nconst summary = {wastedMs: totalWastedMs};\nconst details = Audit.makeTableDetails(headings, pageRedirects, summary);\n@@ -81,7 +106,6 @@ class Redirects extends Audit {\n},\ndetails,\n};\n- });\n}\n}\n",
"new_path": "lighthouse-core/audits/redirects.js",
"old_path": "lighthouse-core/audits/redirects.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -11,7 +11,7 @@ const assert = require('assert');\n/* eslint-env mocha */\nconst FAILING_THREE_REDIRECTS = {\nstartTime: 17,\n- url: 'http://exampel.com/',\n+ url: 'https://m.example.com/final',\nredirects: [\n{\nstartTime: 0,\n@@ -30,25 +30,25 @@ const FAILING_THREE_REDIRECTS = {\nconst FAILING_TWO_REDIRECTS = {\nstartTime: 446.286,\n- url: 'http://lisairish.com/',\n+ url: 'https://www.lisairish.com/',\nredirects: [\n{\nstartTime: 445.648,\n- url: 'https://lisairish.com/',\n+ url: 'http://lisairish.com/',\n},\n{\nstartTime: 445.757,\n- url: 'https://www.lisairish.com/',\n+ url: 'https://lisairish.com/',\n},\n],\n};\nconst SUCCESS_ONE_REDIRECT = {\nstartTime: 136.383,\n- url: 'https://lisairish.com/',\n+ url: 'https://www.lisairish.com/',\nredirects: [{\nstartTime: 135.873,\n- url: 'https://www.lisairish.com/',\n+ url: 'https://lisairish.com/',\n}],\n};\n@@ -58,30 +58,45 @@ const SUCCESS_NOREDIRECT = {\nredirects: [],\n};\n+describe('Performance: Redirects audit', () => {\n+ let nodeTimings;\n+\nconst mockArtifacts = (mockChain) => {\nreturn {\n- devtoolsLogs: {\n- [Audit.DEFAULT_PASS]: [],\n- },\n- requestNetworkRecords: () => {\n- return Promise.resolve([]);\n- },\n+ traces: {},\n+ devtoolsLogs: {},\n+ requestLanternInteractive: () => ({pessimisticEstimate: {nodeTimings}}),\n+ requestTraceOfTab: () => {},\n+ requestNetworkRecords: () => [],\nrequestMainResource: function() {\nreturn Promise.resolve(mockChain);\n},\n};\n};\n-describe('Performance: Redirects audit', () => {\nit('fails when 3 redirects detected', () => {\n- return Audit.audit(mockArtifacts(FAILING_THREE_REDIRECTS)).then(output => {\n+ nodeTimings = new Map([\n+ [{type: 'network', record: {url: 'http://example.com/'}}, {startTime: 0}],\n+ [{type: 'network', record: {url: 'https://example.com/'}}, {startTime: 5000}],\n+ [{type: 'network', record: {url: 'https://m.example.com/'}}, {startTime: 10000}],\n+ [{type: 'network', record: {url: 'https://m.example.com/final'}}, {startTime: 17000}],\n+ ]);\n+\n+ return Audit.audit(mockArtifacts(FAILING_THREE_REDIRECTS), {}).then(output => {\nassert.equal(output.score, 0);\nassert.equal(output.details.items.length, 4);\nassert.equal(output.rawValue, 17000);\n});\n});\n+\nit('fails when 2 redirects detected', () => {\n- return Audit.audit(mockArtifacts(FAILING_TWO_REDIRECTS)).then(output => {\n+ nodeTimings = new Map([\n+ [{type: 'network', record: {url: 'http://lisairish.com/'}}, {startTime: 0}],\n+ [{type: 'network', record: {url: 'https://lisairish.com/'}}, {startTime: 300}],\n+ [{type: 'network', record: {url: 'https://www.lisairish.com/'}}, {startTime: 638}],\n+ ]);\n+\n+ return Audit.audit(mockArtifacts(FAILING_TWO_REDIRECTS), {}).then(output => {\nassert.equal(output.score, 0.65);\nassert.equal(output.details.items.length, 3);\nassert.equal(Math.round(output.rawValue), 638);\n@@ -89,7 +104,12 @@ describe('Performance: Redirects audit', () => {\n});\nit('passes when one redirect detected', () => {\n- return Audit.audit(mockArtifacts(SUCCESS_ONE_REDIRECT)).then(output => {\n+ nodeTimings = new Map([\n+ [{type: 'network', record: {url: 'https://lisairish.com/'}}, {startTime: 0}],\n+ [{type: 'network', record: {url: 'https://www.lisairish.com/'}}, {startTime: 510}],\n+ ]);\n+\n+ return Audit.audit(mockArtifacts(SUCCESS_ONE_REDIRECT), {}).then(output => {\n// If === 1 redirect, perfect score is expected, regardless of latency\nassert.equal(output.score, 1);\n// We will still generate a table and show wasted time\n@@ -99,7 +119,7 @@ describe('Performance: Redirects audit', () => {\n});\nit('passes when no redirect detected', () => {\n- return Audit.audit(mockArtifacts(SUCCESS_NOREDIRECT)).then(output => {\n+ return Audit.audit(mockArtifacts(SUCCESS_NOREDIRECT), {}).then(output => {\nassert.equal(output.score, 1);\nassert.equal(output.details.items.length, 0);\nassert.equal(output.rawValue, 0);\n",
"new_path": "lighthouse-core/test/audits/redirects-test.js",
"old_path": "lighthouse-core/test/audits/redirects-test.js"
},
{
"change_type": "MODIFY",
"diff": "\"include\": [\n\"lighthouse-cli/**/*.js\",\n\"lighthouse-core/audits/audit.js\",\n+ \"lighthouse-core/audits/redirects.js\",\n\"lighthouse-core/audits/accessibility/**/*.js\",\n\"lighthouse-core/audits/dobetterweb/**/*.js\",\n\"lighthouse-core/audits/byte-efficiency/**/*.js\",\n",
"new_path": "tsconfig.json",
"old_path": "tsconfig.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -113,7 +113,7 @@ declare global {\nrequestSpeedline(trace: Trace): Promise<LH.Artifacts.Speedline>;\n// Metrics.\n- requestConsistentlyInteractive(data: LH.Artifacts.MetricComputationDataInput): Promise<Artifacts.LanternMetric|Artifacts.Metric>;\n+ requestInteractive(data: LH.Artifacts.MetricComputationDataInput): Promise<Artifacts.LanternMetric|Artifacts.Metric>;\nrequestEstimatedInputLatency(data: LH.Artifacts.MetricComputationDataInput): Promise<Artifacts.LanternMetric|Artifacts.Metric>;\nrequestFirstContentfulPaint(data: LH.Artifacts.MetricComputationDataInput): Promise<Artifacts.LanternMetric|Artifacts.Metric>;\nrequestFirstCPUIdle(data: LH.Artifacts.MetricComputationDataInput): Promise<Artifacts.LanternMetric|Artifacts.Metric>;\n@@ -121,7 +121,7 @@ declare global {\nrequestSpeedIndex(data: LH.Artifacts.MetricComputationDataInput): Promise<Artifacts.LanternMetric|Artifacts.Metric>;\n// Lantern metrics.\n- requestLanternConsistentlyInteractive(data: LH.Artifacts.MetricComputationData): Promise<Artifacts.LanternMetric>;\n+ requestLanternInteractive(data: LH.Artifacts.MetricComputationData): Promise<Artifacts.LanternMetric>;\nrequestLanternEstimatedInputLatency(data: LH.Artifacts.MetricComputationData): Promise<Artifacts.LanternMetric>;\nrequestLanternFirstContentfulPaint(data: LH.Artifacts.MetricComputationData): Promise<Artifacts.LanternMetric>;\nrequestLanternFirstCPUIdle(data: LH.Artifacts.MetricComputationData): Promise<Artifacts.LanternMetric>;\n",
"new_path": "typings/artifacts.d.ts",
"old_path": "typings/artifacts.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(redirects): use lantern to compute savings (#5081)
| 1
|
core
|
redirects
|
730,424
|
01.05.2018 17:41:37
| 14,400
|
f308f90695ee94d48e3e03c36f17fa49ab7ed83e
|
chore(tooling): Add netlify deploy script
|
[
{
"change_type": "MODIFY",
"diff": "CISCOSPARK_APPID_ORGID=Y2lzY29zcGFyazovL3VzL09SR0FOSVpBVElPTi80MjFhMWY4OC0zM2ViLTQ3MTUtOTY1ZS0zYzE5ZDYyZDJjMDk\n+CISCOSPARK_ACCESS_TOKEN=\n+TO_PERSON_EMAIL=\n+SPACE_ID=\n+CISCOSPARK_CLIENT_ID=\n+CISCOSPARK_CLIENT_SECRET=\n+SAUCE_USERNAME=\n+SAUCE_ACCESS_KEY=\n+NETLIFY_SITE_ID=\n+NETLIFY_ACCESS_TOKEN=\n",
"new_path": ".env.default",
"old_path": ".env.default"
},
{
"change_type": "MODIFY",
"diff": "\"clean\": \"npm run clean:dist && npm run clean:transpile\",\n\"clean:dist\": \"rimraf \\\"packages/**/dist/\\\"\",\n\"clean:transpile\": \"rimraf \\\"packages/**/es/\\\" && rimraf \\\"packages/**/cjs/\\\"\",\n+ \"deploy\": \"./scripts/deploy/index.js\",\n\"test\": \"npm run static-analysis && npm run jest\",\n\"test:clean\": \"npm run clean && npm run test\",\n\"test:automation\": \"wdio wdio.conf.js\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "ADD",
"diff": "+const path = require('path');\n+const fs = require('fs');\n+\n+const netlify = require('netlify');\n+require('dotenv').config();\n+\n+module.exports = {\n+ command: 'netlify <deployDir> [options]',\n+ desc: 'Publish a package to Netlify',\n+ builder: {\n+ deployDir: {\n+ describe: 'relative path to the directory you want to deploy'\n+ },\n+ saveUrlPath: {\n+ describe: 'save the deploy site url to a file at the provided path'\n+ }\n+ },\n+ handler: ({deployDir, saveUrlPath}) => {\n+ if (deployDir) {\n+ const siteId = process.env.NETLIFY_SITE_ID;\n+ const deployPath = path.resolve(process.cwd(), deployDir);\n+ if (!deployPath) {\n+ throw new Error(`No directory found at ${deployPath}`);\n+ }\n+ console.log(`Deploying ${deployDir} to ${siteId}`);\n+ return netlify.deploy({\n+ access_token: process.env.NETLIFY_ACCESS_TOKEN,\n+ site_id: siteId,\n+ dir: deployPath\n+ })\n+ .then((deploy) => {\n+ const deployUrl = deploy.deploy_ssl_url;\n+ console.log('Deploy successful!');\n+ console.log(deployUrl);\n+ if (saveUrlPath) {\n+ const saveUrl = path.resolve(process.cwd(), saveUrlPath);\n+ fs.writeFile(saveUrl, deployUrl, (err) => {\n+ if (err) {\n+ throw new Error('Could not write URL to file', err);\n+ }\n+ console.log(`Deploy URL written to ${saveUrlPath}`);\n+ });\n+ }\n+ return deployUrl;\n+ })\n+ .catch((error) => {\n+ if (error) {\n+ throw new Error('Something bad happened!', error);\n+ }\n+ });\n+ }\n+ return false;\n+ }\n+};\n",
"new_path": "scripts/deploy/commands/netlify.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+#!/usr/bin/env babel-node\n+/**\n+ * Deploy code to different paces\n+ */\n+\n+// eslint-disable-reason not needed for command line\n+// eslint-disable-next-line no-unused-expressions\n+require('yargs')\n+ .usage('Usage: $0 <target> [args]')\n+ .commandDir('commands')\n+ .demandCommand(1, 'Please let us know what you would like to deploy.')\n+ .help()\n+ .argv;\n+\n",
"new_path": "scripts/deploy/index.js",
"old_path": null
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): Add netlify deploy script
| 1
|
chore
|
tooling
|
730,424
|
01.05.2018 17:48:05
| 14,400
|
c4d94b310e5d65554c8b25aeb741d7c151702999
|
chore(tooling): Update to circleCI v2, add journey tests
|
[
{
"change_type": "ADD",
"diff": "+# Templates and Variables\n+test_defaults: &test_defaults\n+ docker:\n+ - image: circleci/node:8.9.4\n+ steps:\n+ - checkout\n+ - restore_cache:\n+ keys:\n+ - js-dependencies-{{ checksum \"package-lock.json\" }}\n+ - js-dependencies-\n+ - attach_workspace:\n+ at: /tmp/workspace\n+ - run:\n+ name: Integration Test\n+ command: npm run test:integration\n+ no_output_timeout: 25m\n+ - store_test_results:\n+ path: reports/junit/wdio\n+ - store_artifacts:\n+ path: reports/junit/wdio\n+ destination: wdio\n+ - store_artifacts:\n+ path: /home/circleci/.npm/_logs/\n+ destination: npm-logs\n+ - store_artifacts:\n+ path: reports/browser\n+ destination: browser\n+\n+# Main Config\n+version: 2\n+jobs:\n+ install:\n+ docker:\n+ - image: circleci/node:8.9.4\n+ steps:\n+ - checkout\n+ - restore_cache:\n+ keys:\n+ - js-dependencies-{{ checksum \"package-lock.json\" }}\n+ - run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc\n+ - run: npm install\n+ - save_cache:\n+ paths:\n+ - node_modules\n+ key: js-dependencies-{{ checksum \"package-lock.json\" }}\n+\n+ unit_tests_and_linting:\n+ docker:\n+ - image: circleci/node:8.9.4\n+ steps:\n+ - checkout\n+ - restore_cache:\n+ keys:\n+ - js-dependencies-{{ checksum \"package-lock.json\" }}\n+ - js-dependencies-\n+ - run:\n+ name: Run eslint\n+ command: npm run eslint -- --format junit -o reports/junit/js-lint-results.xml\n+ - run:\n+ name: Run all Jest test suites\n+ command: npm run jest -- --ci -i --testResultsProcessor=\"jest-junit\"\n+ environment:\n+ JEST_JUNIT_OUTPUT: reports/junit/jest/js-jest-results.xml\n+ - store_test_results:\n+ path: reports/junit\n+ - store_artifacts:\n+ path: reports/junit\n+ destination: junit\n+\n+ build_for_tests:\n+ docker:\n+ - image: circleci/node:8.9.4\n+ environment:\n+ - NODE_ENV: \"test\"\n+ steps:\n+ - checkout\n+ - restore_cache:\n+ keys:\n+ - js-dependencies-{{ checksum \"package-lock.json\" }}\n+ - js-dependencies-\n+ - run:\n+ name: Copy and build journey test static files\n+ command: npm run build test /tmp/dist-test\n+ - persist_to_workspace:\n+ root: /tmp\n+ paths:\n+ - dist-test\n+\n+ deploy_for_testing:\n+ docker:\n+ - image: circleci/node:8.9.4\n+ environment:\n+ - NETLIFY_SITE_ID: \"cb5e410a-9679-4ef3-99dc-82b89143e494\"\n+ - DEPLOY_PATH: \"/tmp/workspace/dist-test\"\n+ steps:\n+ - checkout\n+ - restore_cache:\n+ keys:\n+ - js-dependencies-{{ checksum \"package-lock.json\" }}\n+ - js-dependencies-\n+ - attach_workspace:\n+ at: /tmp/workspace\n+ - run:\n+ name: Deploy testing payload to Netlify\n+ command: npm run deploy netlify ${DEPLOY_PATH} -- --saveUrlPath=/tmp/.netlifyUrl\n+ - persist_to_workspace:\n+ root: /tmp\n+ paths:\n+ - .netlifyUrl\n+\n+ mac_firefox_integration:\n+ environment:\n+ - BROWSER: firefox\n+ - SAUCE: true\n+ <<: *test_defaults\n+\n+ mac_chrome_integration:\n+ environment:\n+ - BROWSER: chrome\n+ - SAUCE: true\n+ <<: *test_defaults\n+\n+ win10_chrome_integration:\n+ environment:\n+ - BROWSER: chrome\n+ - PLATFORM: windows 10\n+ - SAUCE: true\n+ <<: *test_defaults\n+\n+workflows:\n+ version: 2\n+ run_all_tests:\n+ jobs:\n+ - install\n+ - build_for_tests:\n+ requires:\n+ - install\n+ - unit_tests_and_linting:\n+ requires:\n+ - install\n+ - deploy_for_testing:\n+ requires:\n+ - build_for_tests\n+ - mac_firefox_integration:\n+ requires:\n+ - build_for_tests\n+ - mac_chrome_integration:\n+ requires:\n+ - build_for_tests\n+ - win10_chrome_integration:\n+ requires:\n+ - build_for_tests\n",
"new_path": ".circleci/config.yml",
"old_path": null
},
{
"change_type": "DELETE",
"diff": "-machine:\n- environment:\n- COVERAGE: true\n- NODE_ENV: test\n- XUNIT: true\n- UNIT_ONLY: true\n- node:\n- version: 8.9.1\n-\n-general:\n- artifacts:\n- - npm-debug.log\n-\n-dependencies:\n- cache_directories:\n- - node_modules\n-\n-test:\n- override:\n- - npm run static-analysis\n- - npm run jest -- --runInBand\n",
"new_path": null,
"old_path": "circle.yml"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): Update to circleCI v2, add journey tests
| 1
|
chore
|
tooling
|
730,424
|
01.05.2018 17:55:38
| 14,400
|
2f2bc2e50781fdab91ce422924d5295632015c4c
|
chore(tooling): Update to node LTS 8.11.1
|
[
{
"change_type": "MODIFY",
"diff": "# Templates and Variables\ntest_defaults: &test_defaults\ndocker:\n- - image: circleci/node:8.9.4\n+ - image: circleci/node:8.11.1\nsteps:\n- checkout\n- restore_cache:\n@@ -31,7 +31,7 @@ version: 2\njobs:\ninstall:\ndocker:\n- - image: circleci/node:8.9.4\n+ - image: circleci/node:8.11.1\nsteps:\n- checkout\n- restore_cache:\n@@ -46,7 +46,7 @@ jobs:\nunit_tests_and_linting:\ndocker:\n- - image: circleci/node:8.9.4\n+ - image: circleci/node:8.11.1\nsteps:\n- checkout\n- restore_cache:\n@@ -69,7 +69,7 @@ jobs:\nbuild_for_tests:\ndocker:\n- - image: circleci/node:8.9.4\n+ - image: circleci/node:8.11.1\nenvironment:\n- NODE_ENV: \"test\"\nsteps:\n@@ -88,7 +88,7 @@ jobs:\ndeploy_for_testing:\ndocker:\n- - image: circleci/node:8.9.4\n+ - image: circleci/node:8.11.1\nenvironment:\n- NETLIFY_SITE_ID: \"cb5e410a-9679-4ef3-99dc-82b89143e494\"\n- DEPLOY_PATH: \"/tmp/workspace/dist-test\"\n",
"new_path": ".circleci/config.yml",
"old_path": ".circleci/config.yml"
},
{
"change_type": "MODIFY",
"diff": "-v8.9.1\n+v8.11.1\n",
"new_path": ".nvmrc",
"old_path": ".nvmrc"
},
{
"change_type": "MODIFY",
"diff": "@@ -90,8 +90,8 @@ ansiColor('xterm') {\nsh 'echo \\'//registry.npmjs.org/:_authToken=${NPM_TOKEN}\\' >> .npmrc'\nsh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\n- nvm install v8.9.1\n- nvm use v8.9.1\n+ nvm install v8.11.1\n+ nvm use v8.11.1\nnpm install\ngit checkout .npmrc\n'''\n@@ -104,7 +104,7 @@ ansiColor('xterm') {\n]) {\nsh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\n- nvm use v8.9.1\n+ nvm use v8.11.1\nnpm run static-analysis\n'''\n}\n@@ -117,7 +117,7 @@ ansiColor('xterm') {\n]) {\nsh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\n- nvm use v8.9.1\n+ nvm use v8.11.1\naction=`npm run --silent tooling -- check-testable`\necho $action > .action\n'''\n@@ -140,7 +140,7 @@ ansiColor('xterm') {\n]) {\nsh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\n- nvm use v8.9.1\n+ nvm use v8.11.1\nnpm run jest\n'''\n}\n@@ -159,7 +159,7 @@ ansiColor('xterm') {\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\nsh '''#!/bin/bash -e\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@@ -181,7 +181,7 @@ ansiColor('xterm') {\n]) {\nsh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\n- nvm use v8.9.1\n+ nvm use v8.11.1\ngit diff\nnpm run release -- --release-as patch --no-verify\nversion=`grep \"version\" package.json | head -1 | awk -F: '{ print $2 }' | sed 's/[\", ]//g'`\n@@ -200,7 +200,7 @@ ansiColor('xterm') {\n]) {\nsh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\n- nvm use v8.9.1\n+ nvm use v8.11.1\nversion=`cat .version`\nexport NODE_ENV=production\nBUILD_PUBLIC_PATH=\"https://code.s4d.io/widget-space/archives/${version}/\" npm run build:package widget-space\n@@ -263,7 +263,7 @@ ansiColor('xterm') {\necho ''\nsh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\n- nvm use v8.9.1\n+ nvm use v8.11.1\nnpm run publish:components\n'''\n}\n",
"new_path": "Jenkinsfile",
"old_path": "Jenkinsfile"
},
{
"change_type": "MODIFY",
"diff": "@@ -26,8 +26,8 @@ ansiColor('xterm') {\n]) {\nsh '''#!/bin/bash -ex\nsource ~/.nvm/nvm.sh\n- nvm install v8.9.1\n- nvm use v8.9.1\n+ nvm install v8.11.1\n+ nvm use v8.11.1\nnpm install\nnpm run upgradespark\n'''\n@@ -39,7 +39,7 @@ ansiColor('xterm') {\ndef version\nsh '''#!/bin/bash -ex\nsource ~/.nvm/nvm.sh\n- nvm use v8.9.1\n+ nvm use v8.11.1\nversion=$(node ./scripts/utils/jssdkversion.js)\necho $version > .version\ngit add package.json\n",
"new_path": "Jenkinsfile.jssdk",
"old_path": "Jenkinsfile.jssdk"
},
{
"change_type": "MODIFY",
"diff": "@@ -18,8 +18,8 @@ pipeline {\nsh 'echo \\'//registry.npmjs.org/:_authToken=${NPM_TOKEN}\\' >> .npmrc'\nsh '''#!/bin/bash -ex\nsource ~/.nvm/nvm.sh\n- nvm install v8.9.1\n- nvm use v8.9.1\n+ nvm install v8.11.1\n+ nvm use v8.11.1\nnpm install\ngit checkout .npmrc\n'''\n@@ -38,8 +38,8 @@ pipeline {\nsh '''#!/bin/bash -ex\nset +x\nsource ~/.nvm/nvm.sh\n- nvm install v8.9.1\n- nvm use v8.9.1\n+ nvm install v8.11.1\n+ nvm use v8.11.1\nset -x\nCISCOSPARK_CLIENT_ID=C873b64d70536ed26df6d5f81e01dafccbd0a0af2e25323f7f69c7fe46a7be340 SAUCE=true npm run test:tap\n'''\n",
"new_path": "Jenkinsfile.tap",
"old_path": "Jenkinsfile.tap"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): Update to node LTS 8.11.1
| 1
|
chore
|
tooling
|
730,424
|
01.05.2018 18:36:18
| 14,400
|
7edc30e881baffcd6faf577d6f7a72fd59cdfaa6
|
chore(tooling): Add netlify deploy to circleci testing
|
[
{
"change_type": "MODIFY",
"diff": "@@ -7,9 +7,12 @@ test_defaults: &test_defaults\n- restore_cache:\nkeys:\n- js-dependencies-{{ checksum \"package-lock.json\" }}\n- - js-dependencies-\n- attach_workspace:\nat: /tmp/workspace\n+ - run:\n+ name: Get JOURNEY_TEST_BASE_URL from Netlify deploy\n+ command: echo \"export JOURNEY_TEST_BASE_URL=$(cat /tmp/workspace/.netlifyUrl)\" >> $BASH_ENV\n+ - run: echo \"export BUILD_NUMBER=circle-ci-${CIRCLE_BUILD_NUM}\" >> $BASH_ENV\n- run:\nname: Integration Test\ncommand: npm run test:integration\n@@ -77,7 +80,6 @@ jobs:\n- restore_cache:\nkeys:\n- js-dependencies-{{ checksum \"package-lock.json\" }}\n- - js-dependencies-\n- run:\nname: Copy and build journey test static files\ncommand: npm run build test /tmp/dist-test\n@@ -97,7 +99,6 @@ jobs:\n- restore_cache:\nkeys:\n- js-dependencies-{{ checksum \"package-lock.json\" }}\n- - js-dependencies-\n- attach_workspace:\nat: /tmp/workspace\n- run:\n@@ -143,10 +144,10 @@ workflows:\n- build_for_tests\n- mac_firefox_integration:\nrequires:\n- - build_for_tests\n+ - deploy_for_testing\n- mac_chrome_integration:\nrequires:\n- - build_for_tests\n+ - deploy_for_testing\n- win10_chrome_integration:\nrequires:\n- - build_for_tests\n+ - deploy_for_testing\n",
"new_path": ".circleci/config.yml",
"old_path": ".circleci/config.yml"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,11 +15,12 @@ const uuid = require('uuid');\nconst {inject} = require('./scripts/tests/openh264');\nconst beforeSuite = require('./scripts/tests/beforeSuite');\n-\n+const port = process.env.PORT || 4567;\n+const baseUrl = process.env.JOURNEY_TEST_BASE_URL\n+ || process.env.TAP ? 'https://code.s4d.io' : `http://localhost:${port}`;\nconst browser = process.env.BROWSER || 'chrome';\nconst platform = process.env.PLATFORM || 'mac 10.12';\nconst tunnelId = uuid.v4();\n-const port = process.env.PORT || 4567;\nconst {suite} = argv || 'integration';\nconst screenResolutionMac = '1920x1440';\nconst screenResolutionWin = '1920x1080';\n@@ -212,7 +213,7 @@ exports.config = {\n//\n// Set a base URL in order to shorten url command calls. If your url parameter starts\n// with \"/\", then the base url gets prepended.\n- baseUrl: process.env.TAP ? 'https://code.s4d.io' : `http://localhost:${port}`,\n+ baseUrl,\n//\n// Default timeout for all waitFor* commands.\nwaitforTimeout: 120000,\n",
"new_path": "wdio.conf.js",
"old_path": "wdio.conf.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): Add netlify deploy to circleci testing
| 1
|
chore
|
tooling
|
730,424
|
01.05.2018 18:54:52
| 14,400
|
77d5d8911f4d2d71af85376ba00a520c1ff79660
|
chore(tooling): Add scripts to build for testing
|
[
{
"change_type": "ADD",
"diff": "+const path = require('path');\n+\n+const fse = require('fs-extra');\n+const rimraf = require('rimraf');\n+\n+const {exec} = require('../../utils/exec');\n+\n+module.exports = {\n+ command: 'test <distPath>',\n+ desc: 'Bundle the main widgets into a distributable folder for testing',\n+ builder: {\n+ distPath: {\n+ describe: 'path to output test distributables',\n+ default: './dist-test'\n+ }\n+ },\n+ handler: ({distPath}) => {\n+ process.env.NODE_ENV = 'test';\n+ if (distPath) {\n+ const cwd = process.cwd();\n+ const dest = path.resolve(cwd, distPath);\n+ rimraf.sync(dest);\n+ fse.ensureDir(dest)\n+ .then(() => {\n+ fse.copy(path.resolve(cwd, './test/journeys/server'), dest);\n+ const axeCore = path.join(dest, 'axe-core');\n+ fse.mkdir(axeCore)\n+ .then(() => {\n+ fse.copy(path.resolve(cwd, './node_modules/axe-core'), axeCore);\n+ });\n+ return Promise.all([\n+ exec(`BUILD_DIST_PATH=${dest}/dist-space npm run build:package widget-space`),\n+ exec(`BUILD_DIST_PATH=${dest}/dist-recents npm run build:package widget-recents`)\n+ ]);\n+ })\n+ .catch((err) => {\n+ console.log(err);\n+ });\n+ }\n+ return false;\n+ }\n+};\n",
"new_path": "scripts/build/commands/test.js",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -57,7 +57,7 @@ export default webpackBaseConfig({\nentry: './index.js',\noutput: {\nfilename: 'bundle.js',\n- path: path.resolve(process.cwd(), 'dist'),\n+ path: process.env.BUILD_DIST_PATH || path.resolve(process.cwd(), 'dist'),\nsourceMapFilename: '[file].map',\npublicPath\n},\n",
"new_path": "scripts/webpack/webpack.prod.babel.js",
"old_path": "scripts/webpack/webpack.prod.babel.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): Add scripts to build for testing
| 1
|
chore
|
tooling
|
791,690
|
01.05.2018 20:02:54
| 25,200
|
8fcbb8434220741e8e902cd48e18b1a325914003
|
core(scoring): tweak performance weights
|
[
{
"change_type": "MODIFY",
"diff": "@@ -265,12 +265,13 @@ 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: 5, group: 'perf-metric'},\n- {id: 'first-meaningful-paint', weight: 3, group: 'perf-metric'},\n- {id: 'first-cpu-idle', weight: 5, group: 'perf-metric'},\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: 'speed-index', weight: 1, group: 'perf-metric'},\n- {id: 'estimated-input-latency', weight: 1, group: 'perf-metric'},\n+ {id: 'first-cpu-idle', weight: 2, group: 'perf-metric'},\n+ {id: 'estimated-input-latency', weight: 0, group: 'perf-metric'},\n+\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",
"new_path": "lighthouse-core/config/default-config.js",
"old_path": "lighthouse-core/config/default-config.js"
},
{
"change_type": "MODIFY",
"diff": "\"audits\": [\n{\n\"id\": \"first-contentful-paint\",\n- \"weight\": 5,\n+ \"weight\": 3,\n\"group\": \"perf-metric\"\n},\n{\n\"id\": \"first-meaningful-paint\",\n- \"weight\": 3,\n+ \"weight\": 1,\n\"group\": \"perf-metric\"\n},\n{\n- \"id\": \"first-cpu-idle\",\n- \"weight\": 5,\n+ \"id\": \"speed-index\",\n+ \"weight\": 4,\n\"group\": \"perf-metric\"\n},\n{\n\"group\": \"perf-metric\"\n},\n{\n- \"id\": \"speed-index\",\n- \"weight\": 1,\n+ \"id\": \"first-cpu-idle\",\n+ \"weight\": 2,\n\"group\": \"perf-metric\"\n},\n{\n\"id\": \"estimated-input-latency\",\n- \"weight\": 1,\n+ \"weight\": 0,\n\"group\": \"perf-metric\"\n},\n{\n}\n],\n\"id\": \"performance\",\n- \"score\": 0.62\n+ \"score\": 0.63\n},\n{\n\"name\": \"Progressive Web App\",\n\"title\": \"Additional items to manually check\",\n\"description\": \"Run these additional validators on your site to check additional SEO best practices.\"\n}\n- },\n- \"timing\": {\n- \"total\": 667\n}\n}\n\\ No newline at end of file\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(scoring): tweak performance weights (#5083)
| 1
|
core
|
scoring
|
217,922
|
01.05.2018 20:36:01
| -7,200
|
85d440cea9518c00c981de550f479880c47d50f0
|
chore(simulator): fixed issue with action removal and added rotation reset
|
[
{
"change_type": "MODIFY",
"diff": "-<div class=\"action-container\" (click)=\"!disabled && !notEnoughCp?actionclick.emit():null\"\n+<div class=\"action-container\" (click)=\"ignoreDisabled || (!disabled && !notEnoughCp)?actionclick.emit():null\"\n[appXivdbActionTooltip]=\"action.getId(getJobId())\">\n<div class=\"action\"\n[ngClass]=\"{'wasted': wasted, 'disabled': disabled || notEnoughCp, 'not-enough-cp': notEnoughCp}\">\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": "@@ -34,6 +34,9 @@ export class ActionComponent {\n@Input()\nhideCost = false;\n+ @Input()\n+ ignoreDisabled = false;\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": "-<button mat-mini-fab class=\"save-button\"\n+<div class=\"top-buttons\" [class.mobile]=\"isMobile()\">\n+ <button mat-mini-fab\nmatTooltip=\"{{'SIMULATOR.Persist' | translate}}\"\n- matTooltipPosition=\"right\"\n+ matTooltipPosition=\"{{isMobile()?'below':'right'}}\"\n*ngIf=\"(actions$ | async).length > 0 && rotationId === undefined\" (click)=\"save()\">\n<mat-icon>save</mat-icon>\n</button>\n+ <button mat-mini-fab\n+ matTooltip=\"{{'SIMULATOR.Reset' | translate}}\"\n+ matTooltipPosition=\"{{isMobile()?'below':'right'}}\"\n+ *ngIf=\"(actions$ | async).length > 0\" (click)=\"clearRotation()\">\n+ <mat-icon>refresh</mat-icon>\n+ </button>\n+</div>\n<mat-expansion-panel [expanded]=\"customMode\" #configPanel>\n<mat-expansion-panel-header>\n<mat-panel-title>\n*ngFor=\"let step of resultData.simulation.steps; let index = index\"\n(actionclick)=\"removeAction(index)\"\n[action]=\"step.action\"\n- [simulation]=\"resultData.simulation\"></app-action>\n+ [simulation]=\"resultData.simulation\"\n+ [ignoreDisabled]=\"true\"></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"
},
{
"change_type": "MODIFY",
"diff": "-.save-button {\n+.top-buttons {\nposition: absolute;\ntop: 5px;\nleft: 5px;\n+ display: flex;\n+ flex-direction: column;\n+ flex-wrap: wrap;\n+ &.mobile {\n+ flex-direction: row;\n+ }\n+ > button {\n+ margin: 5px;\n+ }\n}\n.steps {\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": "@@ -138,8 +138,8 @@ export class SimulatorComponent implements OnInit {\n});\nthis.simulation$ = Observable.combineLatest(\n- this.recipe$.distinctUntilChanged(),\n- this.actions$.distinctUntilChanged(),\n+ this.recipe$,\n+ this.actions$,\nthis.crafterStats$,\nthis.hqIngredients$,\n(recipe, actions, stats, hqIngredients) => new Simulation(recipe, actions, stats, hqIngredients)\n@@ -267,6 +267,14 @@ export class SimulatorComponent implements OnInit {\n}\n}\n+ clearRotation(): void {\n+ this.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+ }\n+\ngetProgressActions(): CraftingAction[] {\nreturn this.registry.getActionsByType(ActionType.PROGRESSION);\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": "@@ -99,7 +99,7 @@ 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)) {\n+ if (this.success === undefined && action.getBaseCPCost(this) <= this.availableCP && action.canBeUsed(this, linear)) {\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": "\"Rotations\": \"Crafting rotations\",\n\"No_rotations\": \"No rotations\",\n\"New_custom_rotation\": \"New custom rotation\",\n+ \"Reset\": \"Reset 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): fixed issue with action removal and added rotation reset
| 1
|
chore
|
simulator
|
730,412
|
01.05.2018 21:23:14
| 0
|
27a59e8a97b612cdf557a0962e84ffe0244033b6
|
chore(release): 0.1.289
|
[
{
"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.289\"></a>\n+## [0.1.289](https://github.com/webex/react-ciscospark/compare/v0.1.288...v0.1.289) (2018-05-01)\n+\n+\n+### Features\n+\n+* **join-call-button:** moved to individual component ([4368e04](https://github.com/webex/react-ciscospark/commit/4368e04))\n+* **samples:** add recents components to samples ([90c38ed](https://github.com/webex/react-ciscospark/commit/90c38ed))\n+* **samples:** added samples section ([ab8a0de](https://github.com/webex/react-ciscospark/commit/ab8a0de))\n+* **space-item:** moved to individual component ([3c32d6b](https://github.com/webex/react-ciscospark/commit/3c32d6b))\n+* **spaces-list:** moved to individual component ([7c6c2de](https://github.com/webex/react-ciscospark/commit/7c6c2de))\n+\n+\n+\n<a name=\"0.1.288\"></a>\n## [0.1.288](https://github.com/webex/react-ciscospark/compare/v0.1.287...v0.1.288) (2018-04-30)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.288\",\n+ \"version\": \"0.1.289\",\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.289
| 1
|
chore
|
release
|
217,922
|
01.05.2018 22:02:29
| -7,200
|
1e3c1e6e61c4d6016b42b79f45548a2961d05c59
|
chore(simulator): element actions implementation
|
[
{
"change_type": "ADD",
"diff": "+import {BuffAction} from '../buff-action';\n+import {Simulation} from '../../../simulation/simulation';\n+import {Buff} from '../../buff.enum';\n+\n+export abstract class NameOfBuff extends BuffAction {\n+\n+ canBeUsed(simulation: Simulation): boolean {\n+ return !simulation.hasBuff(Buff.NAME_OF_FIRE)\n+ && !simulation.hasBuff(Buff.NAME_OF_LIGHTNING)\n+ && !simulation.hasBuff(Buff.NAME_OF_WATER)\n+ && !simulation.hasBuff(Buff.NAME_OF_EARTH)\n+ && !simulation.hasBuff(Buff.NAME_OF_ICE)\n+ && !simulation.hasBuff(Buff.NAME_OF_THE_WIND)\n+ }\n+\n+ getBaseCPCost(simulationState: Simulation): number {\n+ return 15;\n+ }\n+\n+ getDuration(simulation: Simulation): number {\n+ return 5;\n+ }\n+\n+ protected getInitialStacks(): number {\n+ return 0;\n+ }\n+\n+ protected getTick(): (simulation: Simulation, linear?: boolean) => void {\n+ return undefined;\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/buff/name-of-buff.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {NameOfBuff} from './name-of-buff';\n+import {Buff} from '../../buff.enum';\n+\n+export class NameOfEarth extends NameOfBuff {\n+\n+ protected getBuff(): Buff {\n+ return Buff.NAME_OF_EARTH;\n+ }\n+\n+ getIds(): number[] {\n+ return [4571];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/buff/name-of-earth.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {NameOfBuff} from './name-of-buff';\n+import {Buff} from '../../buff.enum';\n+\n+export class NameOfFire extends NameOfBuff {\n+\n+ protected getBuff(): Buff {\n+ return Buff.NAME_OF_FIRE;\n+ }\n+\n+ getIds(): number[] {\n+ return [4569];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/buff/name-of-fire.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {NameOfBuff} from './name-of-buff';\n+import {Buff} from '../../buff.enum';\n+\n+export class NameOfIce extends NameOfBuff {\n+\n+ protected getBuff(): Buff {\n+ return Buff.NAME_OF_ICE;\n+ }\n+\n+ getIds(): number[] {\n+ return [4570];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/buff/name-of-ice.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {NameOfBuff} from './name-of-buff';\n+import {Buff} from '../../buff.enum';\n+\n+export class NameOfLightning extends NameOfBuff {\n+\n+ protected getBuff(): Buff {\n+ return Buff.NAME_OF_LIGHTNING;\n+ }\n+\n+ getIds(): number[] {\n+ return [4572];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/buff/name-of-lightning.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {NameOfBuff} from './name-of-buff';\n+import {Buff} from '../../buff.enum';\n+\n+export class NameOfTheWind extends NameOfBuff {\n+\n+ protected getBuff(): Buff {\n+ return Buff.NAME_OF_THE_WIND;\n+ }\n+\n+ getIds(): number[] {\n+ return [4568];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/buff/name-of-the-wind.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {NameOfBuff} from './name-of-buff';\n+import {Buff} from '../../buff.enum';\n+\n+export class NameOfWater extends NameOfBuff {\n+\n+ protected getBuff(): Buff {\n+ return Buff.NAME_OF_WATER;\n+ }\n+\n+ getIds(): number[] {\n+ return [4573];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/buff/name-of-water.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {ProgressAction} from '../progress-action';\n+import {Simulation} from '../../../simulation/simulation';\n+import {Buff} from '../../buff.enum';\n+\n+export abstract class BrandAction extends ProgressAction {\n+\n+ abstract getBuffedBy(): Buff;\n+\n+ canBeUsed(simulationState: Simulation, linear?: boolean): boolean {\n+ return true;\n+ }\n+\n+ getBaseCPCost(simulationState: Simulation): number {\n+ return 6;\n+ }\n+\n+ getBaseDurabilityCost(simulationState: Simulation): number {\n+ return 10;\n+ }\n+\n+ getBaseSuccessRate(simulationState: Simulation): number {\n+ return 90;\n+ }\n+\n+ getPotency(simulation: Simulation): number {\n+ // TODO Recipe affinity\n+ let potency = 100;\n+ if (simulation.hasBuff(this.getBuffedBy())) {\n+ potency += 200 * (1 - simulation.progression / simulation.recipe.progress);\n+ }\n+ return potency;\n+ }\n+\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/progression/brand-action.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {BrandAction} from './brand-action';\n+import {Buff} from '../../buff.enum';\n+\n+export class BrandOfEarth extends BrandAction {\n+\n+ getBuffedBy(): Buff {\n+ return Buff.NAME_OF_EARTH;\n+ }\n+\n+ getIds(): number[] {\n+ return [100050];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/progression/brand-of-earth.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {BrandAction} from './brand-action';\n+import {Buff} from '../../buff.enum';\n+\n+export class BrandOfFire extends BrandAction {\n+\n+ getBuffedBy(): Buff {\n+ return Buff.NAME_OF_FIRE;\n+ }\n+\n+ getIds(): number[] {\n+ return [100020];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/progression/brand-of-fire.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {BrandAction} from './brand-action';\n+import {Buff} from '../../buff.enum';\n+\n+export class BrandOfIce extends BrandAction {\n+\n+ getBuffedBy(): Buff {\n+ return Buff.NAME_OF_ICE;\n+ }\n+\n+ getIds(): number[] {\n+ return [100036];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/progression/brand-of-ice.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {BrandAction} from './brand-action';\n+import {Buff} from '../../buff.enum';\n+\n+export class BrandOfLightning extends BrandAction {\n+\n+ getBuffedBy(): Buff {\n+ return Buff.NAME_OF_LIGHTNING;\n+ }\n+\n+ getIds(): number[] {\n+ return [100066];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/progression/brand-of-lightning.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {BrandAction} from './brand-action';\n+import {Buff} from '../../buff.enum';\n+\n+export class BrandOfWater extends BrandAction {\n+\n+ getBuffedBy(): Buff {\n+ return Buff.NAME_OF_WATER;\n+ }\n+\n+ getIds(): number[] {\n+ return [100095];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/progression/brand-of-water.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {BrandAction} from './brand-action';\n+import {Buff} from '../../buff.enum';\n+\n+export class BrandOfWind extends BrandAction {\n+\n+ getBuffedBy(): Buff {\n+ return Buff.NAME_OF_THE_WIND;\n+ }\n+\n+ getIds(): number[] {\n+ return [100006];\n+ }\n+}\n",
"new_path": "src/app/pages/simulator/model/actions/progression/brand-of-wind.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -50,6 +50,18 @@ import {Satisfaction} from './actions/other/satisfaction';\nimport {NymeiasWheel} from './actions/other/nymeias-wheel';\nimport {TrainedHand} from './actions/other/trained-hand';\nimport {HeartOfTheCrafter} from './actions/buff/heart-of-the-crafter';\n+import {BrandOfFire} from './actions/progression/brand-of-fire';\n+import {BrandOfWind} from './actions/progression/brand-of-wind';\n+import {BrandOfEarth} from './actions/progression/brand-of-earth';\n+import {BrandOfIce} from './actions/progression/brand-of-ice';\n+import {BrandOfLightning} from './actions/progression/brand-of-lightning';\n+import {BrandOfWater} from './actions/progression/brand-of-water';\n+import {NameOfEarth} from './actions/buff/name-of-earth';\n+import {NameOfIce} from './actions/buff/name-of-ice';\n+import {NameOfFire} from './actions/buff/name-of-fire';\n+import {NameOfTheWind} from './actions/buff/name-of-the-wind';\n+import {NameOfLightning} from './actions/buff/name-of-lightning';\n+import {NameOfWater} from './actions/buff/name-of-water';\n@Injectable()\nexport class CraftingActionsRegistry {\n@@ -67,6 +79,12 @@ export class CraftingActionsRegistry {\nnew RapidSynthesisII(),\nnew FocusedSynthesis(),\nnew MuscleMemory(),\n+ new BrandOfWind(),\n+ new BrandOfFire(),\n+ new BrandOfIce(),\n+ new BrandOfEarth(),\n+ new BrandOfLightning(),\n+ new BrandOfWater(),\n// Quality actions\nnew BasicTouch(),\n@@ -108,6 +126,12 @@ export class CraftingActionsRegistry {\nnew InitialPreparations(),\nnew WhistleWhileYouWork(),\nnew HeartOfTheCrafter(),\n+ new NameOfTheWind(),\n+ new NameOfFire(),\n+ new NameOfIce(),\n+ new NameOfEarth(),\n+ new NameOfLightning(),\n+ new NameOfWater(),\n// Specialties\nnew SpecialtyRefurbish(),\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): element actions implementation
| 1
|
chore
|
simulator
|
730,424
|
01.05.2018 22:22:59
| 14,400
|
549544628ac31c33f877bd33f381fc2fd0ca43e4
|
chore(tooling): Add missing fs-extra and netlify packages
|
[
{
"change_type": "MODIFY",
"diff": "\"custom-event-polyfill\": \"^0.3.0\",\n\"file-saver\": \"^1.3.3\",\n\"firefox-profile\": \"^1.0.0\",\n+ \"fs-extra\": \"^6.0.0\",\n\"fs-promise\": \"^2.0.2\",\n\"glob\": \"^7.1.1\",\n\"highlight.js\": \"^9.12.0\",\n\"marked\": \"^0.3.6\",\n\"material-ui\": \"^0.19.4\",\n\"moment\": \"^2.17.1\",\n+ \"netlify\": \"^1.2.0\",\n\"prop-types\": \"^15.5.10\",\n\"react\": \"^16.2.0\",\n\"react-cookie\": \"^2.0.7\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): Add missing fs-extra and netlify packages
| 1
|
chore
|
tooling
|
730,424
|
01.05.2018 22:37:45
| 14,400
|
dfc412e2ea27f6e28a8aa28eca690f216bfcfbdc
|
chore(tooling): FIx wdio baseurl config
|
[
{
"change_type": "MODIFY",
"diff": "@@ -16,8 +16,10 @@ const {inject} = require('./scripts/tests/openh264');\nconst beforeSuite = require('./scripts/tests/beforeSuite');\nconst port = process.env.PORT || 4567;\n-const baseUrl = process.env.JOURNEY_TEST_BASE_URL\n- || process.env.TAP ? 'https://code.s4d.io' : `http://localhost:${port}`;\n+let baseUrl = process.env.JOURNEY_TEST_BASE_URL;\n+if (!baseUrl) {\n+ baseUrl = process.env.TAP ? 'https://code.s4d.io' : `http://localhost:${port}`;\n+}\nconst browser = process.env.BROWSER || 'chrome';\nconst platform = process.env.PLATFORM || 'mac 10.12';\nconst tunnelId = uuid.v4();\n",
"new_path": "wdio.conf.js",
"old_path": "wdio.conf.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): FIx wdio baseurl config
| 1
|
chore
|
tooling
|
217,922
|
01.05.2018 22:44:54
| -7,200
|
5939bbc8c82df0d7343c04a9e0c49ffbeb45b0bf
|
chore(simulator): import from crafting optimizer implementation
|
[
{
"change_type": "ADD",
"diff": "+<h3 mat-dialog-title>{{'SIMULATOR.Import_from_crafting_optimizer' | translate}}</h3>\n+<div mat-dialog-content>\n+ <mat-input-container>\n+ <textarea matInput placeholder=\"{{'SIMULATOR.Crafting_optimizer_code' | translate}}\" [(ngModel)]=\"importString\"\n+ rows=\"8\" cols=\"50\">\n+\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-rotation-popup/import-rotation-popup.component.html",
"old_path": null
},
{
"change_type": "ADD",
"diff": "",
"new_path": "src/app/pages/simulator/components/import-rotation-popup/import-rotation-popup.component.scss",
"old_path": "src/app/pages/simulator/components/import-rotation-popup/import-rotation-popup.component.scss"
},
{
"change_type": "ADD",
"diff": "+import {Component} from '@angular/core';\n+\n+@Component({\n+ selector: 'app-import-rotation-popup',\n+ templateUrl: './import-rotation-popup.component.html',\n+ styleUrls: ['./import-rotation-popup.component.scss']\n+})\n+export class ImportRotationPopupComponent {\n+\n+ importString: string;\n+\n+ constructor() {\n+ }\n+\n+}\n",
"new_path": "src/app/pages/simulator/components/import-rotation-popup/import-rotation-popup.component.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "*ngIf=\"(actions$ | async).length > 0\" (click)=\"clearRotation()\">\n<mat-icon>refresh</mat-icon>\n</button>\n+ <button mat-mini-fab\n+ matTooltip=\"{{'SIMULATOR.Import_from_crafting_optimizer' | translate}}\"\n+ matTooltipPosition=\"{{isMobile()?'below':'right'}}\"\n+ (click)=\"importRotation()\">\n+ <mat-icon>file_download</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": "@@ -23,6 +23,8 @@ import {medicines} from '../../../../core/data/sources/medicines';\nimport {BonusType} from '../../model/consumable-bonus';\nimport {CraftingRotation} from '../../../../model/other/crafting-rotation';\nimport {CustomCraftingRotation} from '../../../../model/other/custom-crafting-rotation';\n+import {MatDialog} from '@angular/material';\n+import {ImportRotationPopupComponent} from '../import-rotation-popup/import-rotation-popup.component';\n@Component({\nselector: 'app-simulator',\n@@ -113,7 +115,7 @@ export class SimulatorComponent implements OnInit {\nprivate recipeSync: Craft;\nconstructor(private registry: CraftingActionsRegistry, private media: ObservableMedia, private userService: UserService,\n- private dataService: DataService, private htmlTools: HtmlToolsService) {\n+ private dataService: DataService, private htmlTools: HtmlToolsService, private dialog: MatDialog) {\nthis.foods = Consumable.fromData(foods);\nthis.medicines = Consumable.fromData(medicines);\n@@ -180,6 +182,15 @@ export class SimulatorComponent implements OnInit {\n}\n}\n+ importRotation(): void {\n+ this.dialog.open(ImportRotationPopupComponent)\n+ .afterClosed()\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+ }\n+\nsave(): void {\nif (!this.customMode) {\nthis.onsave.emit({\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": "@@ -66,6 +66,73 @@ import {NameOfWater} from './actions/buff/name-of-water';\n@Injectable()\nexport class CraftingActionsRegistry {\n+ private static ACTION_IMPORT_NAMES: { short: string, full: string }[] = [\n+ {short: 'observe', full: 'Observe'},\n+ {short: 'basicSynth', full: 'BasicSynth'},\n+ {short: 'standardSynthesis', full: 'StandardSynthesis'},\n+ {short: 'carefulSynthesis', full: 'CarefulSynthesis'},\n+ {short: 'carefulSynthesis2', full: 'CarefulSynthesisII'},\n+ {short: 'rapidSynthesis', full: 'RapidSynthesis'},\n+ {short: 'flawlessSynthesis', full: 'FlawlessSynthesis'},\n+ {short: 'pieceByPiece', full: 'PieceByPiece'},\n+ {short: 'basicTouch', full: 'BasicTouch'},\n+ {short: 'standardTouch', full: 'StandardTouch'},\n+ {short: 'advancedTouch', full: 'AdvancedTouch'},\n+ {short: 'hastyTouch', full: 'HastyTouch'},\n+ {short: 'byregotsBlessing', full: 'ByregotsBlessing'},\n+ {short: 'mastersMend', full: 'MastersMend'},\n+ {short: 'mastersMend2', full: 'MastersMendII'},\n+ {short: 'rumination', full: 'Rumination'},\n+ {short: 'tricksOfTheTrade', full: 'TricksOfTheTrade'},\n+ {short: 'innerQuiet', full: 'InnerQuiet'},\n+ {short: 'manipulation', full: 'Manipulation'},\n+ {short: 'comfortZone', full: 'ComfortZone'},\n+ {short: 'steadyHand', full: 'SteadyHand'},\n+ {short: 'steadyHand2', full: 'SteadyHandII'},\n+ {short: 'wasteNot', full: 'WasteNot'},\n+ {short: 'wasteNot2', full: 'WasteNotII'},\n+ {short: 'innovation', full: 'Innovation'},\n+ {short: 'greatStrides', full: 'GreatStrides'},\n+ {short: 'ingenuity', full: 'Ingenuity'},\n+ {short: 'ingenuity2', full: 'Ingenuity2'},\n+ {short: 'byregotsBrow', full: 'ByregotsBrow'},\n+ {short: 'preciseTouch', full: 'PreciseTouch'},\n+ {short: 'makersMark', full: 'MakersMark'},\n+ {short: 'muscleMemory', full: 'MuscleMemory'},\n+ {short: 'whistle', full: 'WhistleWhileYouWork'},\n+ {short: 'satisfaction', full: 'Satisfaction'},\n+ {short: 'innovativeTouch', full: 'InnovativeTouch'},\n+ {short: 'nymeiasWheel', full: 'NymeiasWheel'},\n+ {short: 'byregotsMiracle', full: 'ByregotsMiracle'},\n+ {short: 'trainedHand', full: 'TrainedHand'},\n+ {short: 'brandOfEarth', full: 'BrandOfEarth'},\n+ {short: 'brandOfFire', full: 'BrandOfFire'},\n+ {short: 'brandOfIce', full: 'BrandOfIce'},\n+ {short: 'brandOfLightning', full: 'BrandOfLightning'},\n+ {short: 'brandOfWater', full: 'BrandOfWater'},\n+ {short: 'brandOfWind', full: 'BrandOfWind'},\n+ {short: 'nameOfEarth', full: 'NameOfEarth'},\n+ {short: 'nameOfFire', full: 'NameOfFire'},\n+ {short: 'nameOfIce', full: 'NameOfIce'},\n+ {short: 'nameOfLightning', full: 'NameOfLightning'},\n+ {short: 'nameOfWater', full: 'NameOfWater'},\n+ {short: 'nameOfWind', full: 'NameOfTheWind'},\n+ {short: 'hastyTouch2', full: 'HastyTouchII'},\n+ {short: 'carefulSynthesis3', full: 'CarefulSynthesisIII'},\n+ {short: 'rapidSynthesis2', full: 'RapidSynthesisII'},\n+ {short: 'patientTouch', full: 'PatientTouch'},\n+ {short: 'manipulation2', full: 'ManipulationII'},\n+ {short: 'prudentTouch', full: 'PrudentTouch'},\n+ {short: 'focusedSynthesis', full: 'FocusedSynthesis'},\n+ {short: 'focusedTouch', full: 'FocusedTouch'},\n+ {short: 'initialPreparations', full: 'InitialPreparations'},\n+ {short: 'specialtyReinforce', full: 'SpecialtyReinforce'},\n+ {short: 'specialtyRefurbish', full: 'SpecialtyRefurbish'},\n+ {short: 'specialtyReflect', full: 'SpecialtyReflect'},\n+ {short: 'strokeOfGenius', full: 'StrokeOfGenius'},\n+ {short: 'finishingTouches', full: 'FinishingTouches'},\n+ ];\n+\nprivate static readonly ALL_ACTIONS: CraftingAction[] = [\n// Progress actions\nnew BasicSynthesis(),\n@@ -147,6 +214,20 @@ export class CraftingActionsRegistry {\nreturn CraftingActionsRegistry.ALL_ACTIONS.filter(action => action.getType() === type);\n}\n+ public importFromCraftOpt(importArray: string[]): CraftingAction[] {\n+ return importArray.map(row => {\n+ const found = CraftingActionsRegistry.ACTION_IMPORT_NAMES\n+ .find(action => action.short === row);\n+ if (found === undefined) {\n+ return undefined\n+ }\n+ return CraftingActionsRegistry.ALL_ACTIONS\n+ .find(el => {\n+ return el.getName() === found.full;\n+ });\n+ }).filter(action => action !== undefined);\n+ }\n+\npublic serializeRotation(rotation: CraftingAction[]): string[] {\nreturn rotation.map(action => action.getName());\n}\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": "@@ -6,10 +6,21 @@ import {RouterModule, Routes} from '@angular/router';\nimport {TranslateModule} from '@ngx-translate/core';\nimport {CommonComponentsModule} from '../../modules/common-components/common-components.module';\nimport {PipesModule} from '../../pipes/pipes.module';\n+import {ActionComponent} from './components/action/action.component';\n+import {CraftingActionsRegistry} from './model/crafting-actions-registry';\n+import {CoreModule} from 'app/core/core.module';\n+import {FormsModule, ReactiveFormsModule} from '@angular/forms';\n+import {SettingsModule} from 'app/pages/settings/settings.module';\n+import {TooltipModule} from '../../modules/tooltip/tooltip.module';\n+import {NgDragDropModule} from 'ng-drag-drop';\n+import {CustomSimulatorPageComponent} from './components/custom-simulator-page/custom-simulator-page.component';\n+import {RotationsPageComponent} from './components/rotations-page/rotations-page.component';\n+import {ImportRotationPopupComponent} from './components/import-rotation-popup/import-rotation-popup.component';\nimport {\nMatButtonModule,\nMatCardModule,\nMatCheckboxModule,\n+ MatDialogModule,\nMatExpansionModule,\nMatIconModule,\nMatInputModule,\n@@ -19,15 +30,6 @@ import {\nMatSelectModule,\nMatTooltipModule,\n} from '@angular/material';\n-import {ActionComponent} from './components/action/action.component';\n-import {CraftingActionsRegistry} from './model/crafting-actions-registry';\n-import {CoreModule} from 'app/core/core.module';\n-import {FormsModule, ReactiveFormsModule} from '@angular/forms';\n-import {SettingsModule} from 'app/pages/settings/settings.module';\n-import {TooltipModule} from '../../modules/tooltip/tooltip.module';\n-import {NgDragDropModule} from 'ng-drag-drop';\n-import {CustomSimulatorPageComponent} from './components/custom-simulator-page/custom-simulator-page.component';\n-import {RotationsPageComponent} from './components/rotations-page/rotations-page.component';\nconst routes: Routes = [\n{\n@@ -73,6 +75,7 @@ const routes: Routes = [\nMatListModule,\nMatTooltipModule,\nMatProgressSpinnerModule,\n+ MatDialogModule,\nCommonComponentsModule,\nTooltipModule,\n@@ -85,7 +88,11 @@ const routes: Routes = [\nSimulatorPageComponent,\nSimulatorComponent,\nActionComponent,\n- RotationsPageComponent\n+ RotationsPageComponent,\n+ ImportRotationPopupComponent\n+ ],\n+ entryComponents: [\n+ ImportRotationPopupComponent\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": "\"No_rotations\": \"No rotations\",\n\"New_custom_rotation\": \"New custom rotation\",\n\"Reset\": \"Reset rotation\",\n+ \"Import_from_crafting_optimizer\": \"Import from crafting optimizer\",\n+ \"Crafting_optimizer_code\": \"Crafting optimizer import code\",\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): import from crafting optimizer implementation
| 1
|
chore
|
simulator
|
217,922
|
01.05.2018 22:48:10
| -7,200
|
cea897ba8971e35124e7a0b61f537b99628af472
|
chore(simulator): only add ingredient to quality if it can provide some
|
[
{
"change_type": "MODIFY",
"diff": "@@ -127,7 +127,7 @@ export class SimulatorComponent implements OnInit {\nthis.recipe$.subscribe(recipe => {\nthis.recipeSync = recipe;\nthis.hqIngredientsData = recipe.ingredients\n- .filter(i => i.id > 20)\n+ .filter(i => i.id > 20 && i.quality !== undefined)\n.map(ingredient => ({id: ingredient.id, amount: 0, max: ingredient.amount, quality: ingredient.quality}));\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): only add ingredient to quality if it can provide some
| 1
|
chore
|
simulator
|
730,424
|
01.05.2018 23:42:13
| 14,400
|
ff3393373727c82b428b8a34359b0bc01268b298
|
chore(tooling): Increase circleCI command timeout
|
[
{
"change_type": "MODIFY",
"diff": "@@ -13,7 +13,7 @@ test_defaults: &test_defaults\n- run:\nname: Integration Test\ncommand: npm run test:integration\n- no_output_timeout: 25m\n+ no_output_timeout: 40m\n- store_test_results:\npath: reports/junit/wdio\n- store_artifacts:\n",
"new_path": ".circleci/config.yml",
"old_path": ".circleci/config.yml"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): Increase circleCI command timeout
| 1
|
chore
|
tooling
|
135,558
|
02.05.2018 01:22:22
| -32,400
|
1f46b9fecd8ba76bdbdaf75775b97ff6f532cbae
|
feat(rules): support array for scope-case and type-case
As per issue port the logic from subject-case for array definitions over to scope-case and type-case.
|
[
{
"change_type": "MODIFY",
"diff": "import * as ensure from '@commitlint/ensure';\nimport message from '@commitlint/message';\n+const negated = when => when === 'never';\n+\nexport default (parsed, when, value) => {\nconst {scope} = parsed;\n@@ -8,11 +10,25 @@ export default (parsed, when, value) => {\nreturn [true];\n}\n- const negated = when === 'never';\n+ const checks = (Array.isArray(value) ? value : [value]).map(check => {\n+ if (typeof check === 'string') {\n+ return {\n+ when: 'always',\n+ case: check\n+ };\n+ }\n+ return check;\n+ });\n+\n+ const result = checks.some(check => {\n+ const r = ensure.case(scope, check.case);\n+ return negated(check.when) ? !r : r;\n+ });\n+\n+ const list = checks.map(c => c.case).join(', ');\n- const result = ensure.case(scope, value);\nreturn [\n- negated ? !result : result,\n- message([`scope must`, negated ? `not` : null, `be ${value}`])\n+ negated(when) ? !result : result,\n+ message([`scope must`, negated(when) ? `not` : null, `be ${list}`])\n];\n};\n",
"new_path": "@commitlint/rules/src/scope-case.js",
"old_path": "@commitlint/rules/src/scope-case.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -248,8 +248,63 @@ test('with uppercase scope should fail for \"never uppercase\"', async t => {\nt.is(actual, expected);\n});\n-test('with lowercase scope should succeed for \"always uppercase\"', async t => {\n+test('with uppercase scope should succeed for \"always uppercase\"', async t => {\nconst [actual] = scopeCase(await parsed.uppercase, 'always', 'uppercase');\nconst expected = true;\nt.is(actual, expected);\n});\n+\n+test('with uppercase scope should succeed for \"always [uppercase, lowercase]\"', async t => {\n+ const [actual] = scopeCase(await parsed.uppercase, 'always', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with lowercase scope should succeed for \"always [uppercase, lowercase]\"', async t => {\n+ const [actual] = scopeCase(await parsed.lowercase, 'always', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with mixedcase scope should fail for \"always [uppercase, lowercase]\"', async t => {\n+ const [actual] = scopeCase(await parsed.mixedcase, 'always', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = false;\n+ t.is(actual, expected);\n+});\n+\n+test('with mixedcase scope should pass for \"always [uppercase, lowercase, camel-case]\"', async t => {\n+ const [actual] = scopeCase(await parsed.mixedcase, 'always', [\n+ 'uppercase',\n+ 'lowercase',\n+ 'camel-case'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with mixedcase scope should pass for \"never [uppercase, lowercase]\"', async t => {\n+ const [actual] = scopeCase(await parsed.mixedcase, 'never', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with uppercase scope should fail for \"never [uppercase, lowercase]\"', async t => {\n+ const [actual] = scopeCase(await parsed.uppercase, 'never', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = false;\n+ t.is(actual, expected);\n+});\n",
"new_path": "@commitlint/rules/src/scope-case.test.js",
"old_path": "@commitlint/rules/src/scope-case.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -269,3 +269,58 @@ test('should use expected message with \"never\"', async t => {\n);\nt.true(message.indexOf('must not be upper-case') > -1);\n});\n+\n+test('with uppercase scope should succeed for \"always [uppercase, lowercase]\"', async t => {\n+ const [actual] = subjectCase(await parsed.uppercase, 'always', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with lowercase subject should succeed for \"always [uppercase, lowercase]\"', async t => {\n+ const [actual] = subjectCase(await parsed.lowercase, 'always', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with mixedcase subject should fail for \"always [uppercase, lowercase]\"', async t => {\n+ const [actual] = subjectCase(await parsed.mixedcase, 'always', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = false;\n+ t.is(actual, expected);\n+});\n+\n+test('with mixedcase subject should pass for \"always [uppercase, lowercase, camel-case]\"', async t => {\n+ const [actual] = subjectCase(await parsed.mixedcase, 'always', [\n+ 'uppercase',\n+ 'lowercase',\n+ 'camel-case'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with mixedcase scope should pass for \"never [uppercase, lowercase]\"', async t => {\n+ const [actual] = subjectCase(await parsed.mixedcase, 'never', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with uppercase scope should fail for \"never [uppercase, lowercase]\"', async t => {\n+ const [actual] = subjectCase(await parsed.uppercase, 'never', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = false;\n+ t.is(actual, expected);\n+});\n",
"new_path": "@commitlint/rules/src/subject-case.test.js",
"old_path": "@commitlint/rules/src/subject-case.test.js"
},
{
"change_type": "MODIFY",
"diff": "import * as ensure from '@commitlint/ensure';\nimport message from '@commitlint/message';\n+const negated = when => when === 'never';\n+\nexport default (parsed, when, value) => {\nconst {type} = parsed;\n@@ -8,11 +10,25 @@ export default (parsed, when, value) => {\nreturn [true];\n}\n- const negated = when === 'never';\n+ const checks = (Array.isArray(value) ? value : [value]).map(check => {\n+ if (typeof check === 'string') {\n+ return {\n+ when: 'always',\n+ case: check\n+ };\n+ }\n+ return check;\n+ });\n+\n+ const result = checks.some(check => {\n+ const r = ensure.case(type, check.case);\n+ return negated(check.when) ? !r : r;\n+ });\n+\n+ const list = checks.map(c => c.case).join(', ');\n- const result = ensure.case(type, value);\nreturn [\n- negated ? !result : result,\n- message([`type must`, negated ? `not` : null, `be ${value}`])\n+ negated(when) ? !result : result,\n+ message([`type must`, negated(when) ? `not` : null, `be ${list}`])\n];\n};\n",
"new_path": "@commitlint/rules/src/type-case.js",
"old_path": "@commitlint/rules/src/type-case.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -268,3 +268,58 @@ test('with startcase type should succeed for \"always startcase\"', async t => {\nconst expected = true;\nt.is(actual, expected);\n});\n+\n+test('with uppercase scope should succeed for \"always [uppercase, lowercase]\"', async t => {\n+ const [actual] = typeCase(await parsed.uppercase, 'always', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with lowercase subject should succeed for \"always [uppercase, lowercase]\"', async t => {\n+ const [actual] = typeCase(await parsed.lowercase, 'always', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with mixedcase subject should fail for \"always [uppercase, lowercase]\"', async t => {\n+ const [actual] = typeCase(await parsed.mixedcase, 'always', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = false;\n+ t.is(actual, expected);\n+});\n+\n+test('with mixedcase subject should pass for \"always [uppercase, lowercase, camel-case]\"', async t => {\n+ const [actual] = typeCase(await parsed.mixedcase, 'always', [\n+ 'uppercase',\n+ 'lowercase',\n+ 'camel-case'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with mixedcase scope should pass for \"never [uppercase, lowercase]\"', async t => {\n+ const [actual] = typeCase(await parsed.mixedcase, 'never', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = true;\n+ t.is(actual, expected);\n+});\n+\n+test('with uppercase scope should fail for \"never [uppercase, lowercase]\"', async t => {\n+ const [actual] = typeCase(await parsed.uppercase, 'never', [\n+ 'uppercase',\n+ 'lowercase'\n+ ]);\n+ const expected = false;\n+ t.is(actual, expected);\n+});\n",
"new_path": "@commitlint/rules/src/type-case.test.js",
"old_path": "@commitlint/rules/src/type-case.test.js"
}
] |
TypeScript
|
MIT License
|
conventional-changelog/commitlint
|
feat(rules): support array for scope-case and type-case (#312)
As per issue #307 port the logic from subject-case for array definitions over to scope-case and type-case.
| 1
|
feat
|
rules
|
217,922
|
02.05.2018 07:03:33
| -7,200
|
bc6f6cc51988cb0538869daa2f3aaa383781f999
|
chore(simulator): added waste not and waste not II in the registry, forgot about them
|
[
{
"change_type": "MODIFY",
"diff": "@@ -62,6 +62,8 @@ import {NameOfFire} from './actions/buff/name-of-fire';\nimport {NameOfTheWind} from './actions/buff/name-of-the-wind';\nimport {NameOfLightning} from './actions/buff/name-of-lightning';\nimport {NameOfWater} from './actions/buff/name-of-water';\n+import {WasteNot} from './actions/buff/waste-not';\n+import {WasteNotII} from './actions/buff/waste-not-ii';\n@Injectable()\nexport class CraftingActionsRegistry {\n@@ -185,6 +187,8 @@ export class CraftingActionsRegistry {\nnew InnerQuiet(),\nnew SteadyHand(),\nnew SteadyHandII(),\n+ new WasteNot(),\n+ new WasteNotII(),\nnew Ingenuity(),\nnew IngenuityII(),\nnew GreatStrides(),\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": "ADD",
"diff": "Binary files /dev/null and b/src/assets/icons/status/heart_of_crafter.png differ\n",
"new_path": "src/assets/icons/status/heart_of_crafter.png",
"old_path": "src/assets/icons/status/heart_of_crafter.png"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): added waste not and waste not II in the registry, forgot about them
| 1
|
chore
|
simulator
|
807,884
|
02.05.2018 09:06:31
| -36,000
|
75b91bd4b1fd3856734331e8105ebcf5d2e2314b
|
fix(add): Configure `--dev` as boolean option
|
[
{
"change_type": "MODIFY",
"diff": "@@ -87,7 +87,7 @@ describe(\"AddCommand\", () => {\nexpect(await readPkg(testDir, \"packages/package-2\")).toDependOn(\"@test/package-1\", \"~1\");\n});\n- it(\"should reference to devDepdendencies\", async () => {\n+ it(\"should add target package to devDependencies\", async () => {\nconst testDir = await initFixture(\"basic\");\nawait lernaAdd(testDir)(\"@test/package-1\", \"--dev\");\n@@ -97,6 +97,14 @@ describe(\"AddCommand\", () => {\nexpect(await readPkg(testDir, \"packages/package-4\")).toDevDependOn(\"@test/package-1\");\n});\n+ it(\"should add target package to devDependencies with alias\", async () => {\n+ const testDir = await initFixture(\"basic\");\n+\n+ await lernaAdd(testDir)(\"-D\", \"@test/package-1\");\n+\n+ expect(await readPkg(testDir, \"packages/package-2\")).toDevDependOn(\"@test/package-1\");\n+ });\n+\nit(\"should not reference packages to themeselves\", async () => {\nconst testDir = await initFixture(\"basic\");\n",
"new_path": "commands/add/__tests__/add-command.test.js",
"old_path": "commands/add/__tests__/add-command.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -22,6 +22,8 @@ exports.builder = yargs => {\n.options({\ndev: {\ngroup: \"Command Options:\",\n+ type: \"boolean\",\n+ alias: \"D\",\ndescribe: \"Save to devDependencies\",\n},\n});\n",
"new_path": "commands/add/command.js",
"old_path": "commands/add/command.js"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
fix(add): Configure `--dev` as boolean option (#1390)
| 1
|
fix
|
add
|
217,922
|
02.05.2018 09:07:23
| -7,200
|
0864617a30d96c107e6fe64b540a07826f9eca4b
|
chore(simulator): ingame macro generator and display fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -71,6 +71,14 @@ export class LocalizedDataService {\nreturn result;\n}\n+ public getCraftingAction(id: number): I18nName {\n+ const result = this.getRow(craftingActions, id) || this.getRow(actions, id);\n+ if (result === undefined) {\n+ throw new Error('Data row not found.');\n+ }\n+ return result;\n+ }\n+\nprivate getRow(array: any, id: number | string): I18nName {\nif (array === undefined) {\nreturn undefined;\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.Generated_macro' | translate}}</h3>\n+<div class=\"macro\" mat-dialog-content>\n+ <pre *ngFor=\"let macroFragment of macro\" class=\"macro-fragment\">\n+ <span class=\"macro-line\" *ngFor=\"let line of macroFragment\">{{line}}</span>\n+ </pre>\n+</div>\n+<div mat-dialog-actions>\n+ <button mat-raised-button mat-dialog-close color=\"accent\">{{'Close' | translate}}</button>\n+</div>\n",
"new_path": "src/app/pages/simulator/components/macro-popup/macro-popup.component.html",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+.macro-fragment {\n+ display: flex;\n+ flex-direction: column;\n+}\n",
"new_path": "src/app/pages/simulator/components/macro-popup/macro-popup.component.scss",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import {Component, Inject, OnInit} from '@angular/core';\n+import {MAT_DIALOG_DATA} from '@angular/material';\n+import {CraftingAction} from '../../model/actions/crafting-action';\n+import {LocalizedDataService} from '../../../../core/data/localized-data.service';\n+import {ActionType} from '../../model/actions/action-type';\n+import {I18nToolsService} from '../../../../core/tools/i18n-tools.service';\n+\n+@Component({\n+ selector: 'app-macro-popup',\n+ templateUrl: './macro-popup.component.html',\n+ styleUrls: ['./macro-popup.component.scss']\n+})\n+export class MacroPopupComponent implements OnInit {\n+\n+ public macro: string[][] = [[]];\n+\n+ private readonly maxMacroLines = 15;\n+\n+ constructor(@Inject(MAT_DIALOG_DATA) private rotation: CraftingAction[], private l12n: LocalizedDataService,\n+ private i18n: I18nToolsService) {\n+ }\n+\n+ ngOnInit() {\n+ this.rotation.forEach((action, index) => {\n+ let macroFragment = this.macro[this.macro.length - 1];\n+ // One macro is 15 lines, if this one is full, create another one.\n+ if (macroFragment.length >= this.maxMacroLines) {\n+ this.macro.push([]);\n+ macroFragment = this.macro[this.macro.length - 1];\n+ }\n+ let actionName = this.i18n.getName(this.l12n.getCraftingAction(action.getIds()[0]));\n+ if (actionName.indexOf(' ') > -1) {\n+ actionName = `\"${actionName}\"`;\n+ }\n+ macroFragment.push(`/ac ${actionName} <wait.${action.getType() === ActionType.BUFF ? 2 : 3}>`);\n+ });\n+ }\n+\n+}\n",
"new_path": "src/app/pages/simulator/components/macro-popup/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.Generate_ingame_macro' | translate}}\"\n+ matTooltipPosition=\"{{isMobile()?'below':'right'}}\"\n+ (click)=\"generateMacro()\">\n+ <span class=\"fab-xiv-label\">XIV</span>\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": ".top-buttons {\n- position: absolute;\n- top: 5px;\n- left: 5px;\n+ position: fixed;\ndisplay: flex;\nflex-direction: column;\n- flex-wrap: wrap;\n+ transform: translateX(-145%);\n&.mobile {\nflex-direction: row;\n+ position: relative;\n+ transform: none;\n+ margin-bottom: 10px;\n+ justify-content: space-evenly;\n}\n> button {\nmargin: 5px;\n.details-row {\ndisplay: flex;\njustify-content: space-evenly;\n+ flex-wrap: wrap;\n}\nmargin-bottom: 20px;\n}\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": "@@ -25,6 +25,7 @@ import {CraftingRotation} from '../../../../model/other/crafting-rotation';\nimport {CustomCraftingRotation} from '../../../../model/other/custom-crafting-rotation';\nimport {MatDialog} from '@angular/material';\nimport {ImportRotationPopupComponent} from '../import-rotation-popup/import-rotation-popup.component';\n+import {MacroPopupComponent} from '../macro-popup/macro-popup.component';\n@Component({\nselector: 'app-simulator',\n@@ -191,6 +192,10 @@ export class SimulatorComponent implements OnInit {\n.subscribe(rotation => this.actions = rotation);\n}\n+ generateMacro(): void {\n+ this.dialog.open(MacroPopupComponent, {data: this.actions$.getValue()});\n+ }\n+\nsave(): void {\nif (!this.customMode) {\nthis.onsave.emit({\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": "@@ -30,6 +30,7 @@ import {\nMatSelectModule,\nMatTooltipModule,\n} from '@angular/material';\n+import { MacroPopupComponent } from './components/macro-popup/macro-popup.component';\nconst routes: Routes = [\n{\n@@ -89,10 +90,12 @@ const routes: Routes = [\nSimulatorComponent,\nActionComponent,\nRotationsPageComponent,\n- ImportRotationPopupComponent\n+ ImportRotationPopupComponent,\n+ MacroPopupComponent\n],\nentryComponents: [\n- ImportRotationPopupComponent\n+ ImportRotationPopupComponent,\n+ MacroPopupComponent\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": "\"Reset\": \"Reset rotation\",\n\"Import_from_crafting_optimizer\": \"Import from crafting optimizer\",\n\"Crafting_optimizer_code\": \"Crafting optimizer import code\",\n+ \"Generated_macro\": \"Ingame Macro\",\n+ \"Generate_ingame_macro\": \"Generate ingame macro\",\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): ingame macro generator and display fixes
| 1
|
chore
|
simulator
|
730,413
|
02.05.2018 09:42:17
| 14,400
|
e57c7d9e99d22c538030fed98be8d536e19d06cb
|
chore(tooling): enable setting browser version using an environment variable
|
[
{
"change_type": "MODIFY",
"diff": "@@ -21,6 +21,7 @@ if (!baseUrl) {\nbaseUrl = process.env.TAP ? 'https://code.s4d.io' : `http://localhost:${port}`;\n}\nconst browser = process.env.BROWSER || 'chrome';\n+const version = process.env.VERSION || 'latest';\nconst platform = process.env.PLATFORM || 'mac 10.12';\nconst tunnelId = uuid.v4();\nconst {suite} = argv || 'integration';\n@@ -46,7 +47,8 @@ const chromeCapabilities = {\nmaxDuration: 3600,\nseleniumVersion: '3.4.0',\nscreenResolution,\n- platform\n+ platform,\n+ version\n};\nconst firefoxCapabilities = {\nbrowserName: 'firefox',\n@@ -55,7 +57,8 @@ const firefoxCapabilities = {\nmaxDuration: 3600,\nseleniumVersion: '3.4.0',\nscreenResolution,\n- platform\n+ platform,\n+ version\n};\nlet mochaTimeout = 60000;\n",
"new_path": "wdio.conf.js",
"old_path": "wdio.conf.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): enable setting browser version using an environment variable
| 1
|
chore
|
tooling
|
217,922
|
02.05.2018 10:29:50
| -7,200
|
c23de9ae206bca1523ff4f38f28da3d41025053c
|
chore(simulator): added tool crafting jobs enum
|
[
{
"change_type": "ADD",
"diff": "+export enum CraftingJob {\n+ ANY = -1,\n+ CRP = 8,\n+ BSM = 9,\n+ ARM = 10,\n+ LTW = 11,\n+ WVR = 12,\n+ GSM = 13,\n+ ALC = 14,\n+ CUL = 15,\n+}\n",
"new_path": "src/app/pages/simulator/model/crafting-job.enum.ts",
"old_path": null
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore(simulator): added tool crafting jobs enum
| 1
|
chore
|
simulator
|
217,922
|
02.05.2018 10:46:30
| -7,200
|
d6cfd2bdddf6f5e24654405e537eb79bc94943c6
|
fix: material amount now properly updated when adding crafts that uses them
closes
|
[
{
"change_type": "MODIFY",
"diff": "import {ListRow} from './list-row';\n-import {DataModel} from '../../core/database/storage/data-model';\nimport {CraftAddition} from './craft-addition';\nimport {GarlandToolsService} from '../../core/api/garland-tools.service';\nimport {I18nToolsService} from '../../core/tools/i18n-tools.service';\n@@ -301,15 +300,13 @@ export class List extends DataWithPermissions {\npublic setDone(pitem: ListRow, amount: number, excludeRecipes = false, setUsed = false): void {\nconst item = this.getItemById(pitem.id, excludeRecipes);\nconst previousDone = item.done;\n- item.done += amount;\n- if (item.done > item.amount) {\n- item.done = item.amount;\n- }\n- if (item.done < 0) {\n- item.done = 0;\n- }\nif (setUsed) {\n+ // Save previous used amount\n+ const previousUsed = item.used;\n+ // Update used amount\nitem.used += amount;\n+ // Set amount to the amount of items to add to the total, nothing can be removed so min is 0.\n+ amount = Math.max(0, amount - (item.done - previousUsed));\nif (item.used > item.amount) {\nitem.used = item.amount;\n}\n@@ -317,6 +314,13 @@ export class List extends DataWithPermissions {\nitem.used = 0;\n}\n}\n+ item.done += amount;\n+ if (item.done > item.amount) {\n+ item.done = item.amount;\n+ }\n+ if (item.done < 0) {\n+ item.done = 0;\n+ }\namount = MathTools.absoluteCeil(amount / pitem.yield);\nif (item.requires !== undefined) {\nfor (const requirement of item.requires) {\n",
"new_path": "src/app/model/list/list.ts",
"old_path": "src/app/model/list/list.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix: material amount now properly updated when adding crafts that uses them
closes #330
| 1
|
fix
| null |
730,429
|
02.05.2018 11:00:52
| 14,400
|
16e657d0b1c282bb44c7313ebc5ed960c564e2ee
|
chore(package): set env to prod when building for publish
|
[
{
"change_type": "MODIFY",
"diff": "\"start:samples\": \"npm run start samples\",\n\"start:package\": \"npm run start package\",\n\"publish\": \"cross-env-shell NODE_ENV='' ./scripts/publish/index.js\",\n- \"publish:components\": \"npm run build:components && npm run build:packagejson && npm run publish components\",\n+ \"publish:components\": \"cross-env NODE_ENV=production npm run build:components && npm run build:packagejson && npm run publish components\",\n\"upgradespark\": \"./scripts/utils/update.js\",\n\"release\": \"standard-version\",\n\"precommit\": \"lint-staged\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(package): set env to prod when building for publish
| 1
|
chore
|
package
|
217,922
|
02.05.2018 11:03:16
| -7,200
|
690ac6839f68a2209b3dcc90b5e6a2f1d1188153
|
feat: add ES language support
|
[
{
"change_type": "MODIFY",
"diff": "@@ -68,7 +68,7 @@ export class AppComponent implements OnInit {\ncustomLinksEnabled = false;\n- public locales: string[] = ['en', 'de', 'fr', 'ja', 'pt'];\n+ public static LOCALES: string[] = ['en', 'de', 'fr', 'ja', 'pt', 'es'];\nconstructor(private auth: AngularFireAuth,\nprivate router: Router,\n@@ -280,7 +280,7 @@ export class AppComponent implements OnInit {\n}\nuse(lang: string): void {\n- if (this.locales.indexOf(lang) === -1) {\n+ if (AppComponent.LOCALES.indexOf(lang) === -1) {\nlang = 'en';\n}\nthis.locale = lang;\n",
"new_path": "src/app/app.component.ts",
"old_path": "src/app/app.component.ts"
},
{
"change_type": "MODIFY",
"diff": "</div>\n<mat-menu #langMenu=\"matMenu\" yPosition=\"above\">\n- <button mat-menu-item (click)=\"use('fr')\">FR</button>\n- <button mat-menu-item (click)=\"use('en')\">EN</button>\n- <button mat-menu-item (click)=\"use('de')\">DE</button>\n- <button mat-menu-item (click)=\"use('ja')\">JA</button>\n+ <button mat-menu-item (click)=\"use(locale)\" *ngFor=\"let locale of locales\">{{locale.toUpperCase()}}</button>\n</mat-menu>\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": "import {Component} from '@angular/core';\nimport {SettingsService} from '../settings.service';\nimport {TranslateService} from '@ngx-translate/core';\n+import {AppComponent} from '../../../app.component';\n@Component({\nselector: 'app-settings',\n@@ -29,6 +30,8 @@ export class SettingsComponent {\nlocale: string;\n+ public locales: string[] = AppComponent.LOCALES;\n+\nconstructor(public settings: SettingsService,\nprivate translate: TranslateService) {\nthis.locale = this.translate.currentLang;\n@@ -38,7 +41,7 @@ export class SettingsComponent {\n}\nuse(lang: string): void {\n- if (['en', 'de', 'fr', 'ja'].indexOf(lang) === -1) {\n+ if (AppComponent.LOCALES.indexOf(lang) === -1) {\nlang = 'en';\n}\nthis.locale = lang;\n",
"new_path": "src/app/pages/settings/settings/settings.component.ts",
"old_path": "src/app/pages/settings/settings/settings.component.ts"
},
{
"change_type": "MODIFY",
"diff": "\"Crafting_optimizer_code\": \"Crafting optimizer import code\",\n\"Generated_macro\": \"Ingame Macro\",\n\"Generate_ingame_macro\": \"Generate ingame macro\",\n+ \"Share_link_copied\": \"Rotation share link copied to clipboard\",\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
|
feat: add ES language support
| 1
|
feat
| null |
791,877
|
02.05.2018 11:29:44
| 18,000
|
d7fdb1df79c562727ea3126f79d0d5e0b92f9100
|
docs(readme): remove ts command for lighthouse-cli dev
|
[
{
"change_type": "MODIFY",
"diff": "@@ -220,10 +220,6 @@ cd lighthouse\nyarn\nyarn install-all\nyarn build-all\n-\n-# The CLI is authored in TypeScript and requires compilation.\n-# If you need to make changes to the CLI, run the TS compiler in watch mode:\n-# cd lighthouse-cli && yarn dev\n```\n### Run\n",
"new_path": "readme.md",
"old_path": "readme.md"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
docs(readme): remove ts command for lighthouse-cli dev (#5088)
| 1
|
docs
|
readme
|
217,922
|
02.05.2018 11:35:22
| -7,200
|
024309d137cbbc492e9afc921338f2f7d797ab2b
|
chore(simulator): fixed some visual issues
|
[
{
"change_type": "MODIFY",
"diff": "matTooltipPosition=\"right\"\nmatTooltip=\"{{'SIMULATOR.Rotations' | translate}}\"\n[matTooltipDisabled]=\"!settings.compactSidebar\">\n- <mat-icon matListIcon>chrome_reader_mode</mat-icon>\n+ <mat-icon matListIcon>widgets</mat-icon>\n<span matLine *ngIf=\"!settings.compactSidebar\">{{'SIMULATOR.Rotations' | translate}}</span>\n</mat-list-item>\n<mat-list-item routerLink=\"/lists\" (click)=\"mobile ? sidenav.close() : null\"\n",
"new_path": "src/app/app.component.html",
"old_path": "src/app/app.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -37,6 +37,8 @@ declare const ga: Function;\n})\nexport class AppComponent implements OnInit {\n+ public static LOCALES: string[] = ['en', 'de', 'fr', 'ja', 'pt', 'es'];\n+\n@ViewChild('timers')\ntimersSidebar: MatSidenav;\n@@ -68,7 +70,7 @@ export class AppComponent implements OnInit {\ncustomLinksEnabled = false;\n- public static LOCALES: string[] = ['en', 'de', 'fr', 'ja', 'pt', 'es'];\n+ public locales = AppComponent.LOCALES;\nconstructor(private auth: AngularFireAuth,\nprivate router: Router,\n",
"new_path": "src/app/app.component.ts",
"old_path": "src/app/app.component.ts"
},
{
"change_type": "MODIFY",
"diff": "<mat-panel-title>\n{{rotation.getName()}}\n</mat-panel-title>\n+ <button mat-icon-button ngxClipboard [cbContent]=\"getLink(rotation)\"\n+ (click)=\"$event.stopPropagation()\"\n+ matTooltip=\"{{'Share' | translate}}\" matTooltipPosition=\"above\"\n+ (cbOnSuccess)=\"showCopiedNotification()\">\n+ <mat-icon>share</mat-icon>\n+ </button>\n<button mat-icon-button\n- routerLink=\"{{rotation.itemId?'/simulator/'+rotation.itemId+'/'+rotation.$key:'/simulator/custom/'+rotation.$key}}\"\n+ routerLink=\"{{rotation.defaultItemId?'/simulator/'+rotation.defaultItemId+'/'+rotation.$key:'/simulator/custom/'+rotation.$key}}\"\n(click)=\"$event.stopPropagation()\">\n<mat-icon>playlist_play</mat-icon>\n</button>\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,6 +5,8 @@ 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 {TranslateService} from '@ngx-translate/core';\n@Component({\nselector: 'app-rotations-page',\n@@ -17,7 +19,8 @@ export class RotationsPageComponent {\nrotations$: Observable<CraftingRotation[]>;\nconstructor(private rotationsService: CraftingRotationService, private userService: UserService,\n- private craftingActionsRegistry: CraftingActionsRegistry) {\n+ private craftingActionsRegistry: CraftingActionsRegistry, private snack: MatSnackBar,\n+ private translator: TranslateService) {\nthis.rotations$ = this.userService.getUserData().mergeMap(user => {\nreturn this.rotationsService.getUserRotations(user.$key);\n});\n@@ -30,4 +33,17 @@ export class RotationsPageComponent {\npublic deleteRotation(rotationId: string): void {\nthis.rotationsService.remove(rotationId).subscribe();\n}\n+\n+ public getLink(rotation: CraftingRotation): string {\n+ return `${window.location.protocol}//${window.location.host}${rotation.defaultItemId ? '/simulator/' + rotation.defaultItemId + '/' + rotation.$key : '/simulator/custom/' + rotation.$key}`;\n+ }\n+\n+ public showCopiedNotification(): void {\n+ this.snack.open(\n+ this.translator.instant('SIMULATOR.Share_link_copied'),\n+ '', {\n+ duration: 10000,\n+ extraClasses: ['snack']\n+ });\n+ }\n}\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": "@@ -27,10 +27,11 @@ import {\nMatListModule,\nMatProgressBarModule,\nMatProgressSpinnerModule,\n- MatSelectModule,\n+ MatSelectModule, MatSnackBarModule,\nMatTooltipModule,\n} from '@angular/material';\nimport { MacroPopupComponent } from './components/macro-popup/macro-popup.component';\n+import {ClipboardModule} from 'ngx-clipboard';\nconst routes: Routes = [\n{\n@@ -77,6 +78,9 @@ const routes: Routes = [\nMatTooltipModule,\nMatProgressSpinnerModule,\nMatDialogModule,\n+ MatSnackBarModule,\n+\n+ ClipboardModule,\nCommonComponentsModule,\nTooltipModule,\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(simulator): fixed some visual issues
| 1
|
chore
|
simulator
|
217,922
|
02.05.2018 11:50:39
| -7,200
|
2e4f61a08771cf84e4c79afb9e11a9303db6c98c
|
chore(simulator): add food to rotation persistence
|
[
{
"change_type": "MODIFY",
"diff": "import {DataModel} from '../../core/database/storage/data-model';\nimport {Craft} from '../garland-tools/craft';\n+import {SavedConsumables} from './saved-consumables';\n+import {DeserializeAs} from '@kaiu/serializer';\nexport class CraftingRotation extends DataModel {\n@@ -15,6 +17,9 @@ export class CraftingRotation extends DataModel {\npublic defaultItemId?: number;\n+ @DeserializeAs(SavedConsumables)\n+ public consumables: SavedConsumables = new SavedConsumables();\n+\npublic getName(): string {\nreturn `rlvl${this.recipe.rlvl} - ${this.rotation.length} steps`;\n}\n",
"new_path": "src/app/model/other/crafting-rotation.ts",
"old_path": "src/app/model/other/crafting-rotation.ts"
},
{
"change_type": "ADD",
"diff": "+import {Consumable} from '../../pages/simulator/model/consumable';\n+import {DeserializeAs} from '@kaiu/serializer';\n+\n+export class SavedConsumables {\n+\n+ @DeserializeAs(Consumable)\n+ food: Consumable;\n+\n+ @DeserializeAs(Consumable)\n+ medicine: Consumable;\n+}\n",
"new_path": "src/app/model/other/saved-consumables.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "<div *ngIf=\"recipe$ | async as recipe; else loading\">\n<app-simulator [recipe]=\"recipe\" [actions]=\"actions\" [itemId]=\"itemId\" [itemIcon]=\"itemIcon\" [canSave]=\"canSave\"\n- [rotationId]=\"rotationId\" (onsave)=\"save($event)\"></app-simulator>\n+ [rotationId]=\"rotationId\" (onsave)=\"save($event)\" [selectedFood]=\"selectedFood\"\n+ [selectedMedicine]=\"selectedMedicine\"></app-simulator>\n</div>\n<ng-template #loading>\n<mat-spinner></mat-spinner>\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": "-import {Component} from '@angular/core';\n+import {Component, Input} from '@angular/core';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {Craft} from '../../../../model/garland-tools/craft';\nimport {Observable} from 'rxjs/Observable';\n@@ -9,6 +9,7 @@ import {GearSet} from '../../model/gear-set';\nimport {CraftingActionsRegistry} from '../../model/crafting-actions-registry';\nimport {CraftingRotationService} from '../../../../core/database/crafting-rotation.service';\nimport {UserService} from '../../../../core/database/user.service';\n+import {Consumable} from '../../model/consumable';\n@Component({\nselector: 'app-simulator-page',\n@@ -33,6 +34,10 @@ export class SimulatorPageComponent {\npublic rotationId: string;\n+ public selectedFood: Consumable;\n+\n+ public selectedMedicine: Consumable;\n+\nconstructor(private userService: UserService, private rotationsService: CraftingRotationService,\nprivate router: Router, activeRoute: ActivatedRoute, private registry: CraftingActionsRegistry,\nprivate data: DataService) {\n@@ -61,6 +66,8 @@ export class SimulatorPageComponent {\nthis.actions = this.registry.deserializeRotation(res.rotation.rotation);\nthis.canSave = res.userId === res.rotation.authorId;\nthis.rotationId = res.rotation.$key;\n+ this.selectedFood = res.rotation.consumables.food;\n+ this.selectedMedicine = res.rotation.consumables.medicine;\n});\n}\n@@ -74,6 +81,7 @@ export class SimulatorPageComponent {\nresult.recipe = rotation.recipe;\nresult.description = '';\nresult.name = '';\n+ result.consumables = rotation.consumables;\nreturn result;\n}).mergeMap(preparedRotation => {\nif (preparedRotation.$key === undefined) {\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": "@@ -105,10 +105,12 @@ export class SimulatorComponent implements OnInit {\npublic foods: Consumable[] = [];\n+ @Input()\npublic selectedFood: Consumable;\npublic medicines: Consumable[] = [];\n+ @Input()\npublic selectedMedicine: Consumable;\nprivate serializedRotation: string[];\n@@ -201,14 +203,16 @@ export class SimulatorComponent implements OnInit {\nthis.onsave.emit({\n$key: this.rotationId,\nrotation: this.serializedRotation,\n- recipe: this.recipeSync\n+ recipe: this.recipeSync,\n+ consumables: {food: this.selectedFood, medicine: this.selectedMedicine}\n});\n} else {\nthis.onsave.emit(<CustomCraftingRotation>{\n$key: this.rotationId,\nstats: this.selectedSet,\nrotation: this.serializedRotation,\n- recipe: this.recipeSync\n+ recipe: this.recipeSync,\n+ consumables: {food: this.selectedFood, medicine: this.selectedMedicine}\n});\n}\n}\n@@ -263,6 +267,10 @@ 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}\naddAction(action: CraftingAction): void {\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): add food to rotation persistence
| 1
|
chore
|
simulator
|
791,723
|
02.05.2018 11:57:29
| 25,200
|
f01184d4a569261f988a671d495d237a9551b4a5
|
core: bump version to 3.0 alpha
|
[
{
"change_type": "MODIFY",
"diff": "@@ -161,7 +161,7 @@ describe('ReportRenderer', () => {\nit('renders a footer', () => {\nconst footer = renderer._renderReportFooter(sampleResults);\nconst footerContent = footer.querySelector('.lh-footer').textContent;\n- assert.ok(footerContent.includes('Generated by Lighthouse 2'), 'includes lh version');\n+ assert.ok(/Generated by Lighthouse \\d/.test(footerContent), 'includes lh version');\nassert.ok(footerContent.match(TIMESTAMP_REGEX), 'includes timestamp');\n});\n});\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": "{\n\"userAgent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3358.0 Safari/537.36\",\n- \"lighthouseVersion\": \"2.9.1\",\n+ \"lighthouseVersion\": \"3.0.0-alpha\",\n\"fetchedAt\": \"2018-03-13T00:55:45.840Z\",\n\"generatedTime\": \"Please use .fetchedAt instead\",\n\"initialUrl\": \"http://localhost/dobetterweb/dbw_tester.html\",\n",
"new_path": "lighthouse-core/test/results/sample_v2.json",
"old_path": "lighthouse-core/test/results/sample_v2.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"lighthouse\",\n- \"version\": \"2.9.1\",\n+ \"version\": \"3.0.0-alpha\",\n\"description\": \"Lighthouse\",\n\"main\": \"./lighthouse-core/index.js\",\n\"bin\": {\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core: bump version to 3.0 alpha (#5082)
| 1
|
core
| null |
791,690
|
02.05.2018 13:09:38
| 25,200
|
37f367bf61f419646cebeaa82954a87f6dffd8af
|
core(scoring): loosen metric thresholds
|
[
{
"change_type": "MODIFY",
"diff": "# Goal\nThe goal of this document is to explain how scoring works in Lighthouse and what to do to improve your Lighthouse scores across the four sections of the report.\n-Note 1: if you want a **nice spreadsheet** version of this doc to understand weighting and scoring, check out the [scoring spreadsheet](https://docs.google.com/spreadsheets/d/1dXH-bXX3gxqqpD1f7rp6ImSOhobsT1gn_GQ2fGZp8UU/edit?ts=59fb61d2#gid=0)\n+Note 1: if you want a **nice spreadsheet** version of this doc to understand weighting and scoring, check out the [scoring spreadsheet](https://docs.google.com/spreadsheets/d/1Cxzhy5ecqJCucdf1M0iOzM8mIxNc7mmx107o5nj38Eo/edit#gid=0)\n\n-*Screenshot of the [scoring spreadsheet](https://docs.google.com/spreadsheets/d/1dXH-bXX3gxqqpD1f7rp6ImSOhobsT1gn_GQ2fGZp8UU/edit?ts=59fb61d2#gid=0)*\n+*Screenshot of the [scoring spreadsheet](https://docs.google.com/spreadsheets/d/1Cxzhy5ecqJCucdf1M0iOzM8mIxNc7mmx107o5nj38Eo/edit#gid=0)*\nNote 2: if you receive a **score of 0** in any Lighthouse category, that usually indicates an error on our part. Please file an [issue](https://github.com/GoogleChrome/lighthouse/issues) so our team can look into it.\n@@ -58,7 +58,7 @@ The PWA score is calculated based on the [Baseline PWA checklist](https://develo\n# Accessibility\n### How is the accessibility score calculated?\n-The accessibility score is a weighted average of all the different audits (the weights for each audit can be found in [the scoring spreadsheet](https://docs.google.com/spreadsheets/d/1dXH-bXX3gxqqpD1f7rp6ImSOhobsT1gn_GQ2fGZp8UU/edit?ts=59fb61d2#gid=0)). Each audit is a pass/fail (meaning there is no room for partial points for getting an audit half-right). For example, that means if half your buttons have screenreader friendly names, and half don't, you don't get \"half\" of the weighted average-you get a 0 because it needs to be implemented *throughout* the page.\n+The accessibility score is a weighted average of all the different audits (the weights for each audit can be found in [the scoring spreadsheet](https://docs.google.com/spreadsheets/d/1Cxzhy5ecqJCucdf1M0iOzM8mIxNc7mmx107o5nj38Eo/edit#gid=0)). Each audit is a pass/fail (meaning there is no room for partial points for getting an audit half-right). For example, that means if half your buttons have screenreader friendly names, and half don't, you don't get \"half\" of the weighted average-you get a 0 because it needs to be implemented *throughout* the page.\n# Best Practices\n### How is the Best Practices score calculated?\n",
"new_path": "docs/scoring.md",
"old_path": "docs/scoring.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,10 +28,10 @@ class FirstContentfulPaint extends Audit {\n*/\nstatic get defaultOptions() {\nreturn {\n- // 75th and 90th percentiles HTTPArchive -> 50 and 75\n+ // 75th and 95th percentiles HTTPArchive -> median and PODR\n// https://bigquery.cloud.google.com/table/httparchive:lighthouse.2018_04_01_mobile?pli=1\n- // see https://www.desmos.com/calculator/trv2goqvsd\n- scorePODR: 1400,\n+ // see https://www.desmos.com/calculator/2t1ugwykrl\n+ scorePODR: 2900,\nscoreMedian: 4000,\n};\n}\n",
"new_path": "lighthouse-core/audits/first-contentful-paint.js",
"old_path": "lighthouse-core/audits/first-contentful-paint.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -29,10 +29,10 @@ class FirstCPUIdle extends Audit {\n*/\nstatic get defaultOptions() {\nreturn {\n- // 75th and 90th percentiles HTTPArchive -> 50 and 75\n+ // 75th and 95th percentiles HTTPArchive -> median and PODR\n// https://bigquery.cloud.google.com/table/httparchive:lighthouse.2018_04_01_mobile?pli=1\n- // see https://www.desmos.com/calculator/cwuavnclzj\n- scorePODR: 1400,\n+ // see https://www.desmos.com/calculator/yv89gz2nwf\n+ scorePODR: 2900,\nscoreMedian: 6500,\n};\n}\n",
"new_path": "lighthouse-core/audits/first-cpu-idle.js",
"old_path": "lighthouse-core/audits/first-cpu-idle.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,10 +28,10 @@ class FirstMeaningfulPaint extends Audit {\n*/\nstatic get defaultOptions() {\nreturn {\n- // 75th and 90th percentiles HTTPArchive -> 50 and 75\n+ // 75th and 95th percentiles HTTPArchive -> median and PODR\n// https://bigquery.cloud.google.com/table/httparchive:lighthouse.2018_04_01_mobile?pli=1\n- // see https://www.desmos.com/calculator/trv2goqvsd\n- scorePODR: 1400,\n+ // see https://www.desmos.com/calculator/2t1ugwykrl\n+ scorePODR: 2000,\nscoreMedian: 4000,\n};\n}\n",
"new_path": "lighthouse-core/audits/first-meaningful-paint.js",
"old_path": "lighthouse-core/audits/first-meaningful-paint.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -34,10 +34,10 @@ class InteractiveMetric extends Audit {\n*/\nstatic get defaultOptions() {\nreturn {\n- // 75th and 90th percentiles HTTPArchive -> 50 and 75\n+ // 75th and 95th percentiles HTTPArchive -> median and PODR\n// https://bigquery.cloud.google.com/table/httparchive:lighthouse.2018_04_01_mobile?pli=1\n- // see https://www.desmos.com/calculator/dohd3b0sbr\n- scorePODR: 1200,\n+ // see https://www.desmos.com/calculator/5xgy0pyrbp\n+ scorePODR: 2900,\nscoreMedian: 7300,\n};\n}\n",
"new_path": "lighthouse-core/audits/interactive.js",
"old_path": "lighthouse-core/audits/interactive.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,10 +28,10 @@ class SpeedIndex extends Audit {\n*/\nstatic get defaultOptions() {\nreturn {\n- // 75th and 90th percentiles HTTPArchive -> 50 and 75\n+ // 75th and 95th percentiles HTTPArchive -> median and PODR\n// https://bigquery.cloud.google.com/table/httparchive:lighthouse.2018_04_01_mobile?pli=1\n- // see https://www.desmos.com/calculator/y1bg8ij7ti\n- scorePODR: 1700,\n+ // see https://www.desmos.com/calculator/orvoyu9ygq\n+ scorePODR: 2900,\nscoreMedian: 5800,\n};\n}\n",
"new_path": "lighthouse-core/audits/speed-index.js",
"old_path": "lighthouse-core/audits/speed-index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -38,7 +38,7 @@ describe('Performance: first-meaningful-paint audit', () => {\nconst context = {options, settings: {throttlingMethod: 'simulate'}};\nconst fmpResult = await FMPAudit.audit(artifacts, context);\n- assert.equal(fmpResult.score, 0.73);\n+ assert.equal(fmpResult.score, 0.79);\nassert.equal(fmpResult.displayValue, '2,850\\xa0ms');\nassert.equal(Math.round(fmpResult.rawValue), 2851);\n});\n",
"new_path": "lighthouse-core/test/audits/first-meaningful-paint-test.js",
"old_path": "lighthouse-core/test/audits/first-meaningful-paint-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -31,7 +31,7 @@ describe('Performance: interactive audit', () => {\nconst settings = {throttlingMethod: 'provided'};\nreturn Interactive.audit(artifacts, {options, settings}).then(output => {\n- assert.equal(output.score, 0.97);\n+ assert.equal(output.score, 1);\nassert.equal(Math.round(output.rawValue), 1582);\nassert.equal(output.displayValue, '1,580\\xa0ms');\n});\n@@ -49,7 +49,7 @@ describe('Performance: interactive audit', () => {\nconst settings = {throttlingMethod: 'provided'};\nreturn Interactive.audit(artifacts, {options, settings}).then(output => {\n- assert.equal(output.score, 0.89);\n+ assert.equal(output.score, 0.97);\nassert.equal(Math.round(output.rawValue), 2712);\nassert.equal(output.displayValue, '2,710\\xa0ms');\n});\n",
"new_path": "lighthouse-core/test/audits/interactive-test.js",
"old_path": "lighthouse-core/test/audits/interactive-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(scoring): loosen metric thresholds (#5092)
| 1
|
core
|
scoring
|
730,424
|
02.05.2018 13:53:31
| 14,400
|
c55ea577ce0c4c4cff6891cc7cde50ee4bf05ed0
|
chore(tooling): Rename journey build command
|
[
{
"change_type": "MODIFY",
"diff": "@@ -6,7 +6,7 @@ test_defaults: &test_defaults\n- checkout\n- restore_cache:\nkeys:\n- - js-dependencies-{{ checksum \"package-lock.json\" }}\n+ - js-dependencies-{{ checksum \"package.json\" }}\n- attach_workspace:\nat: /tmp/workspace\n- run:\n@@ -39,13 +39,13 @@ jobs:\n- checkout\n- restore_cache:\nkeys:\n- - js-dependencies-{{ checksum \"package-lock.json\" }}\n+ - js-dependencies-{{ checksum \"package.json\" }}\n- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc\n- run: npm install\n- save_cache:\npaths:\n- node_modules\n- key: js-dependencies-{{ checksum \"package-lock.json\" }}\n+ key: js-dependencies-{{ checksum \"package.json\" }}\nunit_tests_and_linting:\ndocker:\n@@ -54,7 +54,7 @@ jobs:\n- checkout\n- restore_cache:\nkeys:\n- - js-dependencies-{{ checksum \"package-lock.json\" }}\n+ - js-dependencies-{{ checksum \"package.json\" }}\n- js-dependencies-\n- run:\nname: Run eslint\n@@ -79,10 +79,10 @@ jobs:\n- checkout\n- restore_cache:\nkeys:\n- - js-dependencies-{{ checksum \"package-lock.json\" }}\n+ - js-dependencies-{{ checksum \"package.json\" }}\n- run:\nname: Copy and build journey test static files\n- command: npm run build test /tmp/dist-test\n+ command: npm run build journey /tmp/dist-test\n- persist_to_workspace:\nroot: /tmp\npaths:\n@@ -98,7 +98,7 @@ jobs:\n- checkout\n- restore_cache:\nkeys:\n- - js-dependencies-{{ checksum \"package-lock.json\" }}\n+ - js-dependencies-{{ checksum \"package.json\" }}\n- attach_workspace:\nat: /tmp/workspace\n- run:\n",
"new_path": ".circleci/config.yml",
"old_path": ".circleci/config.yml"
},
{
"change_type": "RENAME",
"diff": "@@ -6,8 +6,8 @@ const rimraf = require('rimraf');\nconst {exec} = require('../../utils/exec');\nmodule.exports = {\n- command: 'test <distPath>',\n- desc: 'Bundle the main widgets into a distributable folder for testing',\n+ command: 'journey <distPath>',\n+ desc: 'Bundle the main widgets into a distributable folder for journey testing',\nbuilder: {\ndistPath: {\ndescribe: 'path to output test distributables',\n",
"new_path": "scripts/build/commands/journey.js",
"old_path": "scripts/build/commands/test.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): Rename journey build command
| 1
|
chore
|
tooling
|
679,913
|
02.05.2018 14:23:30
| -3,600
|
5a6ce274a13c70484eca5e8b4f1b828c892f57df
|
build(examples): update packages
|
[
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/async-effect/package.json",
"old_path": "examples/async-effect/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/cellular-automata/package.json",
"old_path": "examples/cellular-automata/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/dashboard/package.json",
"old_path": "examples/dashboard/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/devcards/package.json",
"old_path": "examples/devcards/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/hdom-basics/package.json",
"old_path": "examples/hdom-basics/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/hdom-benchmark/package.json",
"old_path": "examples/hdom-benchmark/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/interceptor-basics/package.json",
"old_path": "examples/interceptor-basics/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/json-components/package.json",
"old_path": "examples/json-components/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/login-form/package.json",
"old_path": "examples/login-form/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"dependencies\": {\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n}\n}\n\\ No newline at end of file\n",
"new_path": "examples/router-basics/package.json",
"old_path": "examples/router-basics/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/rstream-dataflow/package.json",
"old_path": "examples/rstream-dataflow/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"version\": \"0.0.1\",\n\"description\": \"TODO\",\n\"repository\": \"https://github.com/[your-gh-username]/rs-undo\",\n- \"author\": \"TODO\",\n+ \"author\": \"Karsten Schmidt\",\n\"license\": \"MIT\",\n\"scripts\": {\n\"build\": \"webpack --mode production --display-reasons --display-modules\",\n},\n\"devDependencies\": {\n\"@types/node\": \"^9.6.2\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"ts-loader\": \"^4.2.0\",\n\"webpack\": \"^4.5.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n}\n}\n\\ No newline at end of file\n",
"new_path": "examples/rstream-grid/package.json",
"old_path": "examples/rstream-grid/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/svg-particles/package.json",
"old_path": "examples/svg-particles/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"version\": \"0.0.1\",\n\"description\": \"TODO\",\n\"repository\": \"https://github.com/[your-gh-username]/rs-icep\",\n- \"author\": \"TODO\",\n+ \"author\": \"Karsten Schmidt\",\n\"license\": \"MIT\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"dependencies\": {\n},\n\"devDependencies\": {\n\"@types/node\": \"^9.6.2\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"ts-loader\": \"^4.2.0\",\n\"webpack\": \"^4.5.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n}\n}\n\\ No newline at end of file\n",
"new_path": "examples/svg-waveform/package.json",
"old_path": "examples/svg-waveform/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/todo-list/package.json",
"old_path": "examples/todo-list/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n\"license\": \"Apache-2.0\",\n\"scripts\": {\n- \"build\": \"webpack --mode production\",\n+ \"build\": \"webpack --mode production --display-reasons --display-modules\",\n\"start\": \"webpack-dev-server --open --mode development --devtool inline-source-map\"\n},\n\"devDependencies\": {\n\"ts-loader\": \"^4.2.0\",\n- \"typescript\": \"^2.8.1\",\n+ \"typescript\": \"^2.8.3\",\n\"webpack\": \"^4.6.0\",\n- \"webpack-cli\": \"^2.0.14\",\n+ \"webpack-cli\": \"^2.1.2\",\n\"webpack-dev-server\": \"^3.1.3\"\n},\n\"dependencies\": {\n",
"new_path": "examples/webgl/package.json",
"old_path": "examples/webgl/package.json"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
build(examples): update packages
| 1
|
build
|
examples
|
679,913
|
02.05.2018 14:25:13
| -3,600
|
6748515bfd5fc6b8aa7ec02c30567863392c48af
|
feat(interceptors): add dispatch/dispatchNow() helper interceptors
|
[
{
"change_type": "MODIFY",
"diff": "@@ -4,15 +4,17 @@ import {\nsetIn,\nupdateIn\n} from \"@thi.ng/paths\";\n-\nimport {\nEvent,\nFX_CANCEL,\n+ FX_DISPATCH,\n+ FX_DISPATCH_NOW,\nFX_STATE,\nInterceptorFn,\nInterceptorPredicate\n} from \"./api\";\n+\n/**\n* Debug interceptor to log the current event to the console.\n*/\n@@ -30,6 +32,24 @@ export function forwardSideFx(fxID: string): InterceptorFn {\nreturn (_, [__, body]) => ({ [fxID]: body });\n}\n+/**\n+ * Higher-order interceptor. Returns interceptor which assigns given\n+ * event to `FX_DISPATCH` side effect.\n+ *\n+ * @param event\n+ */\n+export const dispatch = (event: Event): InterceptorFn =>\n+ () => ({ [FX_DISPATCH]: event });\n+\n+/**\n+ * Higher-order interceptor. Returns interceptor which assigns given\n+ * event to `FX_DISPATCH_NOW` side effect.\n+ *\n+ * @param event\n+ */\n+export const dispatchNow = (event: Event): InterceptorFn =>\n+ () => ({ [FX_DISPATCH_NOW]: event });\n+\n/**\n* Higher-order interceptor. Returns interceptor which calls\n* `ctx[id].record()`, where `ctx` is the currently active\n",
"new_path": "packages/interceptors/src/interceptors.ts",
"old_path": "packages/interceptors/src/interceptors.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(interceptors): add dispatch/dispatchNow() helper interceptors
| 1
|
feat
|
interceptors
|
679,913
|
02.05.2018 14:33:08
| -3,600
|
f9a2daf263726d75a400b47a257ed9486fe08323
|
feat(hdom-components): add title component
|
[
{
"change_type": "MODIFY",
"diff": "@@ -2,3 +2,4 @@ export * from \"./canvas\";\nexport * from \"./dropdown\";\nexport * from \"./link\";\nexport * from \"./pager\";\n+export * from \"./title\";\n",
"new_path": "packages/hdom-components/src/index.ts",
"old_path": "packages/hdom-components/src/index.ts"
},
{
"change_type": "ADD",
"diff": "+export interface TitleOpts {\n+ /**\n+ * Element name for main title. Default: `h1`\n+ */\n+ element: string;\n+ /**\n+ * Attribs for main title: Default: none\n+ */\n+ attribs: any;\n+ /**\n+ * Element name for subtitle: Default: `small`\n+ */\n+ subElement: string;\n+ /**\n+ * Attribs for subtitle: Default: none\n+ */\n+ subAttribs: any;\n+}\n+\n+/**\n+ * Configurable Higher order title with optional subtitle component. The\n+ * returned component function takes two args: title, subtitle.\n+ *\n+ * ```\n+ * const h1 = title();\n+ * const h2 = title({ element: \"h2\", attribs: { class: \"blue\" }});\n+ *\n+ * [h1, \"Hello world\", \"Once upon a time...\"]\n+ *\n+ * [h2, \"Chapter 1\", \"Once upon a time...\"]\n+ * ```\n+ *\n+ * @param opts\n+ */\n+export const title = (opts?: Partial<TitleOpts>) => {\n+ opts = Object.assign(<TitleOpts>{\n+ element: \"h1\",\n+ attribs: {},\n+ subElement: \"small\",\n+ subAttribs: {},\n+ }, opts);\n+ return (_, title, subtitle) =>\n+ [opts.element, opts.attribs, title,\n+ subtitle ?\n+ [opts.subElement, opts.subAttribs, subtitle] :\n+ undefined];\n+};\n",
"new_path": "packages/hdom-components/src/title.ts",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(hdom-components): add title component
| 1
|
feat
|
hdom-components
|
730,424
|
02.05.2018 14:33:48
| 14,400
|
fcd158f953ac6f074a94f010afb11ea6b7eecbbb
|
chore(tooling): Run Circle journies in serial, skip netlify deploy
|
[
{
"change_type": "MODIFY",
"diff": "-# Templates and Variables\n-test_defaults: &test_defaults\n- docker:\n- - image: circleci/node:8.11.1\n- steps:\n- - checkout\n- - restore_cache:\n- keys:\n- - js-dependencies-{{ checksum \"package.json\" }}\n- - attach_workspace:\n- at: /tmp/workspace\n- - run:\n- name: Get JOURNEY_TEST_BASE_URL from Netlify deploy\n- command: echo \"export JOURNEY_TEST_BASE_URL=$(cat /tmp/workspace/.netlifyUrl)\" >> $BASH_ENV\n- - run: echo \"export BUILD_NUMBER=circle-ci-${CIRCLE_BUILD_NUM}\" >> $BASH_ENV\n- - run:\n- name: Integration Test\n- command: npm run test:integration\n- no_output_timeout: 40m\n- - store_test_results:\n- path: reports/junit/wdio\n- - store_artifacts:\n- path: reports/junit/wdio\n- destination: wdio\n- - store_artifacts:\n- path: /home/circleci/.npm/_logs/\n- destination: npm-logs\n- - store_artifacts:\n- path: reports/browser\n- destination: browser\n-\n# Main Config\nversion: 2\njobs:\n@@ -88,12 +57,12 @@ jobs:\npaths:\n- dist-test\n- deploy_for_testing:\n+ journey_tests:\ndocker:\n- image: circleci/node:8.11.1\nenvironment:\n- - NETLIFY_SITE_ID: \"cb5e410a-9679-4ef3-99dc-82b89143e494\"\n- - DEPLOY_PATH: \"/tmp/workspace/dist-test\"\n+ SAUCE: true\n+ STATIC_SERVER_PATH: /tmp/workspace/dist-test\nsteps:\n- checkout\n- restore_cache:\n@@ -102,31 +71,32 @@ jobs:\n- attach_workspace:\nat: /tmp/workspace\n- run:\n- name: Deploy testing payload to Netlify\n- command: npm run deploy netlify ${DEPLOY_PATH} -- --saveUrlPath=/tmp/.netlifyUrl\n- - persist_to_workspace:\n- root: /tmp\n- paths:\n- - .netlifyUrl\n-\n- mac_firefox_integration:\n- environment:\n- - BROWSER: firefox\n- - SAUCE: true\n- <<: *test_defaults\n-\n- mac_chrome_integration:\n- environment:\n- - BROWSER: chrome\n- - SAUCE: true\n- <<: *test_defaults\n+ name: Get JOURNEY_TEST_BASE_URL from Netlify deploy\n+ command: echo \"export JOURNEY_TEST_BASE_URL=$(cat /tmp/workspace/.netlifyUrl)\" >> $BASH_ENV\n+ - run: echo \"export BUILD_NUMBER=circle-ci-${CIRCLE_BUILD_NUM}\" >> $BASH_ENV\n+ - run:\n+ name: Integration Tests\n+ no_output_timeout: 40m\n+ command: |\n+ set -m\n+ (\n+ (PORT=4569 SAUCE_CONNECT_PORT=5006 BROWSER=firefox npm run test:integration || kill 0) &\n+ (sleep 60; PORT=4568 SAUCE_CONNECT_PORT=5005 BROWSER=chrome npm run test:integration || kill 0) &\n+ (sleep 120; PORT=4567 SAUCE_CONNECT_PORT=5004 BROWSER=chrome PLATFORM=\"windows 10\" npm run test:integration || kill 0) &\n+ wait\n+ )\n+ - store_test_results:\n+ path: reports/junit/wdio\n+ - store_artifacts:\n+ path: reports/junit/wdio\n+ destination: wdio\n+ - store_artifacts:\n+ path: /home/circleci/.npm/_logs/\n+ destination: npm-logs\n+ - store_artifacts:\n+ path: reports/browser\n+ destination: browser\n- win10_chrome_integration:\n- environment:\n- - BROWSER: chrome\n- - PLATFORM: windows 10\n- - SAUCE: true\n- <<: *test_defaults\nworkflows:\nversion: 2\n@@ -139,15 +109,6 @@ workflows:\n- unit_tests_and_linting:\nrequires:\n- install\n- - deploy_for_testing:\n+ - journey_tests:\nrequires:\n- build_for_tests\n- - mac_firefox_integration:\n- requires:\n- - deploy_for_testing\n- - mac_chrome_integration:\n- requires:\n- - deploy_for_testing\n- - win10_chrome_integration:\n- requires:\n- - deploy_for_testing\n",
"new_path": ".circleci/config.yml",
"old_path": ".circleci/config.yml"
},
{
"change_type": "MODIFY",
"diff": "@@ -77,6 +77,19 @@ if (!process.env.TAP) {\nservices.push('static-server');\n}\n+let staticServerFolders = [\n+ {mount: '/dist-space', path: './packages/node_modules/@ciscospark/widget-space/dist'},\n+ {mount: '/dist-recents', path: './packages/node_modules/@ciscospark/widget-recents/dist'},\n+ {mount: '/', path: './test/journeys/server/'},\n+ {mount: '/axe-core', path: './node_modules/axe-core/'}\n+];\n+\n+if (process.env.STATIC_SERVER_PATH) {\n+ staticServerFolders = [\n+ {mounth: '/', path: process.env.STATIC_SERVER_PATH}\n+ ];\n+}\n+\nexports.config = {\nseleniumInstallArgs: {version: '3.4.0'},\nseleniumArgs: {version: '3.4.0'},\n@@ -289,12 +302,7 @@ exports.config = {\nbeforeSuite,\n// Static Server setup\n- staticServerFolders: [\n- {mount: '/dist-space', path: './packages/node_modules/@ciscospark/widget-space/dist'},\n- {mount: '/dist-recents', path: './packages/node_modules/@ciscospark/widget-recents/dist'},\n- {mount: '/', path: './test/journeys/server/'},\n- {mount: '/axe-core', path: './node_modules/axe-core/'}\n- ],\n+ staticServerFolders,\nstaticServerPort: port,\nonPrepare(config, capabilities) {\nconst defs = [\n",
"new_path": "wdio.conf.js",
"old_path": "wdio.conf.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): Run Circle journies in serial, skip netlify deploy
| 1
|
chore
|
tooling
|
730,429
|
02.05.2018 14:57:45
| 14,400
|
6a3dc9ce883ec7153549a302785bce8a7a0c7e6c
|
chore(tooling): add skip-ci ability
|
[
{
"change_type": "MODIFY",
"diff": "#!groovy\n-\ndef cleanup = { ->\n// cleanup can't be a stage because it'll throw off the stage-view on the job's main page\nif (currentBuild.result != 'SUCCESS') {\n@@ -29,6 +28,8 @@ ansiColor('xterm') {\nnode('NODE_JS_BUILDER') {\ndef packageJsonVersion\n+ def skipAction\n+ def skipTests = false\ntry {\n// We're not currently using structured output, just relying\n@@ -87,7 +88,7 @@ ansiColor('xterm') {\nstring(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')\n]) {\nsh 'echo \\'//registry.npmjs.org/:_authToken=${NPM_TOKEN}\\' >> .npmrc'\n- sh '''#!/bin/bash -ex\n+ sh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\nnvm install v8.9.1\nnvm use v8.9.1\n@@ -101,7 +102,7 @@ ansiColor('xterm') {\nwithCredentials([\nstring(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')\n]) {\n- sh '''#!/bin/bash -ex\n+ sh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\nnvm use v8.9.1\nnpm run static-analysis\n@@ -109,19 +110,45 @@ ansiColor('xterm') {\n}\n}\n+ stage('Test Skipping Check') {\n+ echo \"checking if tests should be skipped\"\n+ withCredentials([\n+ string(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')\n+ ]) {\n+ sh '''#!/bin/bash -e\n+ source ~/.nvm/nvm.sh\n+ nvm use v8.9.1\n+ action=`npm run --silent tooling -- check-testable`\n+ echo $action > .action\n+ '''\n+ skipAction = readFile '.action'\n+ if (skipAction.contains('skip')) {\n+ echo \"tests should be skipped\"\n+ skipTests = true\n+ warn('Bypassing tests according to commit message instruction (or no changes requiring testing)');\n+ }\n+ else {\n+ echo \"tests should not be skipped\"\n+ }\n+ }\n+ }\n+\nstage('Unit Tests') {\n+ if (!skipTests) {\nwithCredentials([\nstring(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')\n]) {\n- sh '''#!/bin/bash -ex\n+ sh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\nnvm use v8.9.1\nnpm run jest\n'''\n}\n}\n+ }\nstage('Journey Tests') {\n+ if (!skipTests) {\nwithCredentials([\nstring(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN'),\nstring(credentialsId: 'ddfd04fb-e00a-4df0-9250-9a7cb37bce0e', variable: 'CISCOSPARK_CLIENT_SECRET'),\n@@ -130,7 +157,7 @@ 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 -ex\n+ sh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\nnvm use 8.9.1\nNODE_ENV=test npm run build:package widget-space && npm run build:package widget-recents\n@@ -146,12 +173,13 @@ ansiColor('xterm') {\njunit '**/reports/junit/wdio/*.xml'\n}\n}\n+ }\nstage('Bump version') {\nwithCredentials([\nstring(credentialsId: 'NPM_TOKEN', variable: 'NPM_TOKEN')\n]) {\n- sh '''#!/bin/bash -ex\n+ sh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\nnvm use v8.9.1\ngit diff\n@@ -170,11 +198,11 @@ ansiColor('xterm') {\nfile(credentialsId: 'web-sdk-cdn-private-key', variable: 'PRIVATE_KEY_PATH'),\nstring(credentialsId: 'web-sdk-cdn-private-key-passphrase', variable: 'PRIVATE_KEY_PASSPHRASE'),\n]) {\n- sh '''#!/bin/bash -ex\n+ sh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\nnvm use v8.9.1\nversion=`cat .version`\n- NODE_ENV=production\n+ export NODE_ENV=production\nBUILD_PUBLIC_PATH=\"https://code.s4d.io/widget-space/archives/${version}/\" npm run build:package widget-space\nBUILD_PUBLIC_PATH=\"https://code.s4d.io/widget-space/archives/${version}/\" npm run build sri widget-space\nBUILD_BUNDLE_PUBLIC_PATH=\"https://code.s4d.io/widget-space/archives/${version}/\" BUILD_PUBLIC_PATH=\"https://code.s4d.io/widget-space/archives/${version}/demo/\" npm run build:package widget-space-demo\n@@ -233,7 +261,7 @@ ansiColor('xterm') {\necho ''\necho 'Reminder: E403 errors below are normal. They occur for any package that has no updates to publish'\necho ''\n- sh '''#!/bin/bash -ex\n+ sh '''#!/bin/bash -e\nsource ~/.nvm/nvm.sh\nnvm use v8.9.1\nnpm run publish:components\n",
"new_path": "Jenkinsfile",
"old_path": "Jenkinsfile"
},
{
"change_type": "MODIFY",
"diff": "\"upgradespark\": \"./scripts/utils/update.js\",\n\"release\": \"standard-version\",\n\"precommit\": \"lint-staged\",\n- \"prepush\": \"npm run test\"\n+ \"prepush\": \"npm run test\",\n+ \"tooling\": \"./scripts/tooling/index.js\"\n},\n\"repository\": {\n\"type\": \"git\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "ADD",
"diff": "+/*!\n+ * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.\n+ */\n+\n+const wrapHandler = require('../../utils/wrap-handler');\n+const {lastLog} = require('../../utils/git');\n+\n+module.exports = {\n+ command: 'check-testable',\n+ desc: 'Check if this build has anything to test. Prints \"run\" or \"skip\"',\n+ builder: {},\n+ handler: wrapHandler(async () => {\n+ const log = await lastLog();\n+ // Merge commits tend to have previous commit messages in them, so we want\n+ // to ignore them for when checking for commands\n+ if (!log.startsWith('Merge branch') && (log.includes('[ci skip]') || log.includes('[ci-skip]'))) {\n+ console.log('skip');\n+ return;\n+ }\n+\n+ console.log('run');\n+ })\n+};\n",
"new_path": "scripts/tooling/commands/check-testable.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+#!/usr/bin/env babel-node\n+/**\n+ * Tooling Utilities\n+ * check-testable : Check if this build has anything to test. Prints \"run\" or \"skip\"\n+ */\n+\n+require('dotenv').config();\n+\n+// eslint-disable-reason not needed for command line\n+// eslint-disable-next-line no-unused-expressions\n+require('yargs')\n+ .usage('Usage: $0 <command> [args]')\n+ .commandDir('commands')\n+ .demandCommand(1, 'Please let us know what tool you\\'d like to run.')\n+ .help()\n+ .argv;\n",
"new_path": "scripts/tooling/index.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+/*!\n+ * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.\n+ */\n+const {execSync} = require('child_process');\n+\n+const debug = require('debug')('tooling:git');\n+\n+exports.diff = async function diff(tag) {\n+ debug(`diffing HEAD against ${tag}`);\n+ debug(`Shelling out to \\`git diff --name-only HEAD..${tag}\\``);\n+ const raw = String(execSync(`git diff --name-only HEAD..${tag}`));\n+\n+ debug('Done');\n+\n+ // This mapping is probably unecessary, but it's kept to minimize the number\n+ // of changes necessary to remove nodegit\n+ return raw.split('\\n').map((r) => ({path: r}));\n+};\n+\n+exports.lastLog = function lastLog() {\n+ // When we're running on Jenkins, we know there's an env var called GIT_COMMIT\n+ const treeLike = process.env.GIT_COMMIT || 'HEAD';\n+ const cmd = `git log -n 1 --format=%B ${treeLike}`;\n+ debug(`Shelling out to ${cmd}`);\n+ const log = String(execSync(cmd));\n+ debug('Done');\n+ return log;\n+};\n",
"new_path": "scripts/utils/git.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+/*!\n+ * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.\n+ */\n+\n+module.exports = function wrapHandler(fn) {\n+ return async function wrapper(...args) {\n+ try {\n+ await Reflect.apply(fn, null, args);\n+ }\n+ catch (err) {\n+ // eslint-disable-next-line no-console\n+ console.error(err);\n+ // eslint-disable-next-line no-process-exit\n+ process.exit(64);\n+ }\n+ };\n+};\n",
"new_path": "scripts/utils/wrap-handler.js",
"old_path": null
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): add skip-ci ability
| 1
|
chore
|
tooling
|
730,424
|
02.05.2018 15:08:12
| 14,400
|
3470e57eae47c828df3f7cf6d83d0eb1bdbb903d
|
chore(tooling): Fix typo in wdio.conf
|
[
{
"change_type": "MODIFY",
"diff": "@@ -86,7 +86,7 @@ let staticServerFolders = [\nif (process.env.STATIC_SERVER_PATH) {\nstaticServerFolders = [\n- {mounth: '/', path: process.env.STATIC_SERVER_PATH}\n+ {mount: '/', path: process.env.STATIC_SERVER_PATH}\n];\n}\n",
"new_path": "wdio.conf.js",
"old_path": "wdio.conf.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
chore(tooling): Fix typo in wdio.conf
| 1
|
chore
|
tooling
|
791,690
|
02.05.2018 16:44:52
| 25,200
|
27d432316fe545b6f927287ba71efdf8935758c7
|
core(opportunities): take max of savings on TTI, load
|
[
{
"change_type": "MODIFY",
"diff": "@@ -164,6 +164,8 @@ module.exports = [\n},\n},\n'efficient-animated-content': {\n+ score: '<1',\n+ rawValue: '>2000',\nextendedInfo: {\nvalue: {\nwastedKb: 666,\n",
"new_path": "lighthouse-cli/test/smokehouse/dobetterweb/dbw-expectations.js",
"old_path": "lighthouse-cli/test/smokehouse/dobetterweb/dbw-expectations.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -99,15 +99,20 @@ class UnusedBytes extends Audit {\n}\n/**\n- * Computes the estimated effect of all the byte savings on the last long task\n- * in the provided graph.\n+ * Computes the estimated effect of all the byte savings on the maximum of the following:\n+ *\n+ * - end time of the last long task in the provided graph\n+ * - (if includeLoad is true or not provided) end time of the last node in the graph\n*\n* @param {Array<LH.Audit.ByteEfficiencyResult>} results The array of byte savings results per resource\n* @param {Node} graph\n* @param {Simulator} simulator\n+ * @param {{includeLoad?: boolean}=} options\n* @return {number}\n*/\n- static computeWasteWithTTIGraph(results, graph, simulator) {\n+ static computeWasteWithTTIGraph(results, graph, simulator, options) {\n+ options = Object.assign({includeLoad: true}, options);\n+\nconst simulationBeforeChanges = simulator.simulate(graph);\n/** @type {Map<LH.Audit.ByteEfficiencyResult['url'], LH.Audit.ByteEfficiencyResult>} */\nconst resultsByUrl = new Map();\n@@ -142,14 +147,15 @@ class UnusedBytes extends Audit {\nnetworkNode.record._transferSize = originalTransferSize;\n});\n- const savingsOnTTI = Math.max(\n- Interactive.getLastLongTaskEndTime(simulationBeforeChanges.nodeTimings) -\n- Interactive.getLastLongTaskEndTime(simulationAfterChanges.nodeTimings),\n- 0\n- );\n+ const savingsOnOverallLoad = simulationBeforeChanges.timeInMs - simulationAfterChanges.timeInMs;\n+ const savingsOnTTI = Interactive.getLastLongTaskEndTime(simulationBeforeChanges.nodeTimings) -\n+ Interactive.getLastLongTaskEndTime(simulationAfterChanges.nodeTimings);\n+\n+ let savings = savingsOnTTI;\n+ if (options.includeLoad) savings = Math.max(savings, savingsOnOverallLoad);\n// Round waste to nearest 10ms\n- return Math.round(savingsOnTTI / 10) * 10;\n+ return Math.round(Math.max(savings, 0) / 10) * 10;\n}\n/**\n@@ -164,7 +170,7 @@ class UnusedBytes extends Audit {\nconst wastedBytes = results.reduce((sum, item) => sum + item.wastedBytes, 0);\nconst wastedKb = Math.round(wastedBytes / KB_IN_BYTES);\n- const wastedMs = UnusedBytes.computeWasteWithTTIGraph(results, graph, simulator);\n+ const wastedMs = this.computeWasteWithTTIGraph(results, graph, simulator);\nlet displayValue = result.displayValue || '';\nif (typeof result.displayValue === 'undefined' && wastedBytes) {\n",
"new_path": "lighthouse-core/audits/byte-efficiency/byte-efficiency-audit.js",
"old_path": "lighthouse-core/audits/byte-efficiency/byte-efficiency-audit.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -26,12 +26,12 @@ class OffscreenImages extends ByteEfficiencyAudit {\nstatic get meta() {\nreturn {\nname: 'offscreen-images',\n- description: 'Offscreen images',\n+ description: 'Defer offscreen images',\ninformative: true,\nscoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,\nhelpText:\n- 'Consider lazy-loading offscreen and hidden images to improve page load speed ' +\n- 'and time to interactive. ' +\n+ 'Consider lazy-loading offscreen and hidden images after all critical resources have ' +\n+ 'finished loading to lower time to interactive. ' +\n'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/offscreen-images).',\nrequiredArtifacts: ['ImageUsage', 'ViewportDimensions', 'traces', 'devtoolsLogs'],\n};\n@@ -81,6 +81,21 @@ class OffscreenImages extends ByteEfficiencyAudit {\n};\n}\n+ /**\n+ * The default byte efficiency audit will report max(TTI, load), since lazy-loading offscreen\n+ * images won't reduce the overall time and the wasted bytes are really only \"wasted\" for TTI,\n+ * override the function to just look at TTI savings.\n+ *\n+ * @param {Array<LH.Audit.ByteEfficiencyResult>} results\n+ * @param {LH.Gatherer.Simulation.GraphNode} graph\n+ * @param {LH.Gatherer.Simulation.Simulator} simulator\n+ * @return {number}\n+ */\n+ static computeWasteWithTTIGraph(results, graph, simulator) {\n+ return ByteEfficiencyAudit.computeWasteWithTTIGraph(results, graph, simulator,\n+ {includeLoad: false});\n+ }\n+\n/**\n* @param {LH.Artifacts} artifacts\n* @param {Array<LH.WebInspector.NetworkRequest>} networkRecords\n@@ -117,11 +132,13 @@ class OffscreenImages extends ByteEfficiencyAudit {\nreturn results;\n}, new Map());\n- // TODO(phulce): move this to always use lantern\nconst settings = context.settings;\nreturn artifacts.requestFirstCPUIdle({trace, devtoolsLog, settings}).then(firstInteractive => {\n- // @ts-ignore - see above TODO.\n- const ttiTimestamp = firstInteractive.timestamp / 1000000;\n+ // The filter below is just to be extra safe that we exclude images that were loaded post-TTI.\n+ // If we're in the Lantern case and `timestamp` isn't available, we just have to rely on the\n+ // graph simulation doing the right thing.\n+ const ttiTimestamp = firstInteractive.timestamp ? firstInteractive.timestamp / 1e6 : Infinity;\n+\nconst results = Array.from(resultsMap.values()).filter(item => {\nconst isWasteful =\nitem.wastedBytes > IGNORE_THRESHOLD_IN_BYTES &&\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": "@@ -22,7 +22,7 @@ class UsesOptimizedImages extends ByteEfficiencyAudit {\nstatic get meta() {\nreturn {\nname: 'uses-optimized-images',\n- description: 'Optimize images',\n+ description: 'Efficiently encode images',\ninformative: true,\nscoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,\nhelpText: 'Optimized images load faster and consume less cellular data. ' +\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": "@@ -17,7 +17,7 @@ class FontDisplay extends Audit {\nreturn {\nname: 'font-display',\ndescription: 'All text remains visible during webfont loads',\n- failureDescription: 'Avoid invisible text while webfonts are loading',\n+ failureDescription: 'Text is invisible while webfonts are loading',\nhelpText: 'Leverage the font-display CSS feature to ensure text is user-visible while ' +\n'webfonts are loading. ' +\n'[Learn more](https://developers.google.com/web/updates/2016/02/font-display).',\n",
"new_path": "lighthouse-core/audits/font-display.js",
"old_path": "lighthouse-core/audits/font-display.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -16,8 +16,7 @@ class Redirects extends Audit {\nstatic get meta() {\nreturn {\nname: 'redirects',\n- description: 'Avoids page redirects',\n- failureDescription: 'Has multiple page redirects',\n+ description: 'Avoid multiple page redirects',\nscoreDisplayMode: Audit.SCORING_MODES.NUMERIC,\nhelpText: 'Redirects introduce additional delays before the page can be loaded. [Learn more](https://developers.google.com/speed/docs/insights/AvoidRedirects).',\nrequiredArtifacts: ['URL', 'devtoolsLogs', 'traces'],\n",
"new_path": "lighthouse-core/audits/redirects.js",
"old_path": "lighthouse-core/audits/redirects.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -122,7 +122,7 @@ class Node {\n* Clones the entire graph connected to this node filtered by the optional predicate. If a node is\n* included by the predicate, all nodes along the paths between the two will be included. If the\n* node that was called clone is not included in the resulting filtered graph, the method will throw.\n- * @param {function(Node):boolean=} predicate\n+ * @param {function(Node):boolean} [predicate]\n* @return {Node}\n*/\ncloneWithRelationships(predicate) {\n",
"new_path": "lighthouse-core/lib/dependency-graph/node.js",
"old_path": "lighthouse-core/lib/dependency-graph/node.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -218,11 +218,41 @@ describe('Byte efficiency base audit', () => {\nlet settings = {throttlingMethod: 'simulate', throttling: modestThrottling};\nlet result = await MockAudit.audit(artifacts, {settings});\n// expect modest savings\n- assert.equal(result.rawValue, 800);\n+ assert.equal(result.rawValue, 1480);\nsettings = {throttlingMethod: 'simulate', throttling: ultraSlowThrottling};\nresult = await MockAudit.audit(artifacts, {settings});\n// expect lots of savings\nassert.equal(result.rawValue, 22350);\n});\n+\n+ it('should allow overriding of computeWasteWithTTIGraph', async () => {\n+ class MockAudit extends ByteEfficiencyAudit {\n+ static audit_(artifacts, records) {\n+ return {\n+ results: records.map(record => ({url: record.url, wastedBytes: record.transferSize})),\n+ headings: [],\n+ };\n+ }\n+ }\n+\n+ class MockJustTTIAudit extends MockAudit {\n+ static computeWasteWithTTIGraph(results, graph, simulator) {\n+ return ByteEfficiencyAudit.computeWasteWithTTIGraph(results, graph, simulator,\n+ {includeLoad: false});\n+ }\n+ }\n+\n+ const artifacts = Runner.instantiateComputedArtifacts();\n+ artifacts.traces = {defaultPass: trace};\n+ artifacts.devtoolsLogs = {defaultPass: devtoolsLog};\n+\n+ const modestThrottling = {rttMs: 150, throughputKbps: 1000, cpuSlowdownMultiplier: 2};\n+ const settings = {throttlingMethod: 'simulate', throttling: modestThrottling};\n+ const result = await MockAudit.audit(artifacts, {settings});\n+ const resultTti = await MockJustTTIAudit.audit(artifacts, {settings});\n+ // expect more savings from default\n+ assert.equal(result.rawValue, 1480);\n+ assert.equal(resultTti.rawValue, 800);\n+ });\n});\n",
"new_path": "lighthouse-core/test/audits/byte-efficiency/byte-efficiency-audit-test.js",
"old_path": "lighthouse-core/test/audits/byte-efficiency/byte-efficiency-audit-test.js"
},
{
"change_type": "MODIFY",
"diff": "},\n\"scoreDisplayMode\": \"numeric\",\n\"name\": \"redirects\",\n- \"description\": \"Avoids page redirects\",\n+ \"description\": \"Avoid multiple page redirects\",\n\"helpText\": \"Redirects introduce additional delays before the page can be loaded. [Learn more](https://developers.google.com/speed/docs/insights/AvoidRedirects).\",\n\"details\": {\n\"type\": \"table\",\n\"scoreDisplayMode\": \"numeric\",\n\"informative\": true,\n\"name\": \"offscreen-images\",\n- \"description\": \"Offscreen images\",\n- \"helpText\": \"Consider lazy-loading offscreen and hidden images to improve page load speed and time to interactive. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/offscreen-images).\",\n+ \"description\": \"Defer offscreen images\",\n+ \"helpText\": \"Consider lazy-loading offscreen and hidden images after all critical resources have finished loading to lower time to interactive. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/offscreen-images).\",\n\"details\": {\n\"type\": \"table\",\n\"headings\": [],\n\"scoreDisplayMode\": \"numeric\",\n\"informative\": true,\n\"name\": \"uses-optimized-images\",\n- \"description\": \"Optimize images\",\n+ \"description\": \"Efficiently encode images\",\n\"helpText\": \"Optimized images load faster and consume less cellular data. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/optimize-images).\",\n\"details\": {\n\"type\": \"table\",\n",
"new_path": "lighthouse-core/test/results/sample_v2.json",
"old_path": "lighthouse-core/test/results/sample_v2.json"
},
{
"change_type": "MODIFY",
"diff": "import * as _Node from '../lighthouse-core/lib/dependency-graph/node';\nimport * as _NetworkNode from '../lighthouse-core/lib/dependency-graph/network-node';\nimport * as _CPUNode from '../lighthouse-core/lib/dependency-graph/cpu-node';\n+import * as _Simulator from '../lighthouse-core/lib/dependency-graph/simulator/simulator';\nimport * as Driver from '../lighthouse-core/gather/driver';\ndeclare global {\n@@ -31,6 +32,7 @@ declare global {\nexport type GraphNode = InstanceType<typeof _Node>;\nexport type GraphNetworkNode = InstanceType<typeof _NetworkNode>;\nexport type GraphCPUNode = InstanceType<typeof _CPUNode>;\n+ export type Simulator = InstanceType<typeof _Simulator>;\nexport interface MetricCoefficients {\nintercept: number;\n",
"new_path": "typings/gatherer.d.ts",
"old_path": "typings/gatherer.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(opportunities): take max of savings on TTI, load (#5084)
| 1
|
core
|
opportunities
|
791,690
|
02.05.2018 17:22:09
| 25,200
|
9cc23a3a57925d71d0b68eef53bd3dd7e24768f3
|
core(preload): use lantern to compute savings
|
[
{
"change_type": "MODIFY",
"diff": "* 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-// @ts-nocheck\n'use strict';\nconst Audit = require('./audit');\n@@ -27,8 +26,19 @@ class UsesRelPreloadAudit extends Audit {\n};\n}\n+ /**\n+ * @param {LH.Artifacts.CriticalRequestNode} chains\n+ * @param {number} maxLevel\n+ * @param {number=} minLevel\n+ */\nstatic _flattenRequests(chains, maxLevel, minLevel = 0) {\n+ /** @type {Array<LH.WebInspector.NetworkRequest>} */\nconst requests = [];\n+\n+ /**\n+ * @param {LH.Artifacts.CriticalRequestNode} chains\n+ * @param {number} level\n+ */\nconst flatten = (chains, level) => {\nObject.keys(chains).forEach(chain => {\nif (chains[chain]) {\n@@ -49,56 +59,131 @@ class UsesRelPreloadAudit extends Audit {\nreturn requests;\n}\n+ /**\n+ * Computes the estimated effect of preloading all the resources.\n+ * @param {Set<string>} urls The array of byte savings results per resource\n+ * @param {LH.Gatherer.Simulation.GraphNode} graph\n+ * @param {LH.Gatherer.Simulation.Simulator} simulator\n+ * @param {LH.WebInspector.NetworkRequest} mainResource\n+ * @return {{wastedMs: number, results: Array<{url: string, wastedMs: number}>}}\n+ */\n+ static computeWasteWithGraph(urls, graph, simulator, mainResource) {\n+ if (!urls.size) {\n+ return {wastedMs: 0, results: []};\n+ }\n+\n+ // Preload changes the ordering of requests, simulate the original graph with flexible ordering\n+ // to have a reasonable baseline for comparison.\n+ const simulationBeforeChanges = simulator.simulate(graph, {flexibleOrdering: true});\n+\n+ const modifiedGraph = graph.cloneWithRelationships();\n+\n+ /** @type {Array<LH.Gatherer.Simulation.GraphNetworkNode>} */\n+ const nodesToPreload = [];\n+ /** @type {LH.Gatherer.Simulation.GraphNode|null} */\n+ let mainDocumentNode = null;\n+ modifiedGraph.traverse(node => {\n+ if (node.type !== 'network') return;\n+\n+ const networkNode = /** @type {LH.Gatherer.Simulation.GraphNetworkNode} */ (node);\n+ if (networkNode.record && urls.has(networkNode.record.url)) {\n+ nodesToPreload.push(networkNode);\n+ }\n+\n+ if (networkNode.record && networkNode.record.url === mainResource.url) {\n+ mainDocumentNode = networkNode;\n+ }\n+ });\n+\n+ if (!mainDocumentNode) {\n+ // Should always find the main document node\n+ throw new Error('Could not find main document node');\n+ }\n+\n+ // Preload has the effect of moving the resource's only dependency to the main HTML document\n+ // Remove all dependencies of the nodes\n+ for (const node of nodesToPreload) {\n+ node.removeAllDependencies();\n+ node.addDependency(mainDocumentNode);\n+ }\n+\n+ // Once we've modified the dependencies, simulate the new graph with flexible ordering.\n+ const simulationAfterChanges = simulator.simulate(modifiedGraph, {flexibleOrdering: true});\n+ const originalNodesByRecord = Array.from(simulationBeforeChanges.nodeTimings.keys())\n+ // @ts-ignore we don't care if all nodes without a record collect on `undefined`\n+ .reduce((map, node) => map.set(node.record, node), new Map());\n+\n+ const results = [];\n+ for (const node of nodesToPreload) {\n+ const originalNode = originalNodesByRecord.get(node.record);\n+ const timingAfter = simulationAfterChanges.nodeTimings.get(node);\n+ const timingBefore = simulationBeforeChanges.nodeTimings.get(originalNode);\n+ // @ts-ignore TODO(phulce): fix timing typedef\n+ const wastedMs = Math.round(timingBefore.endTime - timingAfter.endTime);\n+ if (wastedMs < THRESHOLD_IN_MS) continue;\n+ results.push({url: node.record.url, wastedMs});\n+ }\n+\n+ if (!results.length) {\n+ return {wastedMs: 0, results};\n+ }\n+\n+ return {\n+ // Preload won't necessarily impact the deepest chain/overall time\n+ // We'll use the maximum endTime improvement for now\n+ wastedMs: Math.max(...results.map(item => item.wastedMs)),\n+ results,\n+ };\n+ }\n+\n/**\n* @param {LH.Artifacts} artifacts\n+ * @param {LH.Audit.Context} context\n* @return {Promise<LH.Audit.Product>}\n*/\n- static audit(artifacts) {\n+ static audit(artifacts, context) {\n+ const trace = artifacts.traces[UsesRelPreloadAudit.DEFAULT_PASS];\nconst devtoolsLog = artifacts.devtoolsLogs[UsesRelPreloadAudit.DEFAULT_PASS];\nconst URL = artifacts.URL;\n+ const simulatorOptions = {trace, devtoolsLog, settings: context.settings};\nreturn Promise.all([\n+ // TODO(phulce): eliminate dependency on CRC\nartifacts.requestCriticalRequestChains({devtoolsLog, URL}),\nartifacts.requestMainResource({devtoolsLog, URL}),\n- ]).then(([critChains, mainResource]) => {\n- const results = [];\n- let maxWasted = 0;\n+ artifacts.requestPageDependencyGraph({trace, devtoolsLog}),\n+ artifacts.requestLoadSimulator(simulatorOptions),\n+ ]).then(([critChains, mainResource, graph, simulator]) => {\n// get all critical requests 2 + mainResourceIndex levels deep\nconst mainResourceIndex = mainResource.redirects ? mainResource.redirects.length : 0;\nconst criticalRequests = UsesRelPreloadAudit._flattenRequests(critChains,\n3 + mainResourceIndex, 2 + mainResourceIndex);\n- criticalRequests.forEach(request => {\n- const networkRecord = request;\n+\n+ /** @type {Set<string>} */\n+ const urls = new Set();\n+ for (const networkRecord of criticalRequests) {\nif (!networkRecord._isLinkPreload && networkRecord.protocol !== 'data') {\n- // calculate time between mainresource.endTime and resource start time\n- const wastedMs = Math.min(request._startTime - mainResource._endTime,\n- request._endTime - request._startTime) * 1000;\n-\n- if (wastedMs >= THRESHOLD_IN_MS) {\n- maxWasted = Math.max(wastedMs, maxWasted);\n- results.push({\n- url: request.url,\n- wastedMs: Util.formatMilliseconds(wastedMs),\n- });\n+ urls.add(networkRecord._url);\n}\n}\n- });\n+ const {results, wastedMs} = UsesRelPreloadAudit.computeWasteWithGraph(urls, graph, simulator,\n+ mainResource);\n// sort results by wastedTime DESC\nresults.sort((a, b) => b.wastedMs - a.wastedMs);\nconst headings = [\n{key: 'url', itemType: 'url', text: 'URL'},\n- {key: 'wastedMs', itemType: 'text', text: 'Potential Savings'},\n+ {key: 'wastedMs', itemType: 'ms', text: 'Potential Savings', granularity: 10},\n];\n- const summary = {wastedMs: maxWasted};\n+ const summary = {wastedMs};\nconst details = Audit.makeTableDetails(headings, results, summary);\nreturn {\n- score: UnusedBytes.scoreForWastedMs(maxWasted),\n- rawValue: maxWasted,\n- displayValue: Util.formatMilliseconds(maxWasted),\n+ score: UnusedBytes.scoreForWastedMs(wastedMs),\n+ rawValue: wastedMs,\n+ displayValue: Util.formatMilliseconds(wastedMs),\nextendedInfo: {\nvalue: results,\n},\n",
"new_path": "lighthouse-core/audits/uses-rel-preload.js",
"old_path": "lighthouse-core/audits/uses-rel-preload.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -110,6 +110,31 @@ class Node {\nthis._dependencies.push(node);\n}\n+ /**\n+ * @param {Node} node\n+ */\n+ removeDependent(node) {\n+ node.removeDependency(this);\n+ }\n+\n+ /**\n+ * @param {Node} node\n+ */\n+ removeDependency(node) {\n+ if (!this._dependencies.includes(node)) {\n+ return;\n+ }\n+\n+ node._dependents.splice(node._dependents.indexOf(this), 1);\n+ this._dependencies.splice(this._dependencies.indexOf(node), 1);\n+ }\n+\n+ removeAllDependencies() {\n+ for (const node of this._dependencies.slice()) {\n+ this.removeDependency(node);\n+ }\n+ }\n+\n/**\n* Clones the node's information without adding any dependencies/dependents.\n* @return {Node}\n",
"new_path": "lighthouse-core/lib/dependency-graph/node.js",
"old_path": "lighthouse-core/lib/dependency-graph/node.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -11,6 +11,10 @@ const TcpConnection = require('./tcp-connection');\nconst DEFAULT_SERVER_RESPONSE_TIME = 30;\nconst TLS_SCHEMES = ['https', 'wss'];\n+// Each origin can have 6 simulatenous connections open\n+// https://cs.chromium.org/chromium/src/net/socket/client_socket_pool_manager.cc?type=cs&q=\"int+g_max_sockets_per_group\"\n+const CONNECTIONS_PER_ORIGIN = 6;\n+\nmodule.exports = class ConnectionPool {\n/**\n* @param {LH.WebInspector.NetworkRequest[]} records\n@@ -82,15 +86,26 @@ module.exports = class ConnectionPool {\nthrow new Error(`Could not find a connection for origin: ${origin}`);\n}\n+ // Make sure each origin has minimum number of connections available for max throughput\n+ while (connections.length < CONNECTIONS_PER_ORIGIN) connections.push(connections[0].clone());\n+\nthis._connectionsByOrigin.set(origin, connections);\n}\n}\n/**\n+ * This method finds an available connection to the origin specified by the network record or null\n+ * if no connection was available. If returned, connection will not be available for other network\n+ * records until release is called.\n+ *\n+ * If ignoreConnectionReused is true, acquire will consider all connections not in use as available.\n+ * Otherwise, only connections that have matching \"warmth\" are considered available.\n+ *\n* @param {LH.WebInspector.NetworkRequest} record\n+ * @param {{ignoreConnectionReused?: boolean}} options\n* @return {?TcpConnection}\n*/\n- acquire(record) {\n+ acquire(record, options = {}) {\nif (this._connectionsByRecord.has(record)) {\n// @ts-ignore\nreturn this._connectionsByRecord.get(record);\n@@ -99,16 +114,26 @@ module.exports = class ConnectionPool {\nconst origin = String(record.parsedURL.securityOrigin());\n/** @type {TcpConnection[]} */\nconst connections = this._connectionsByOrigin.get(origin) || [];\n- const wasConnectionWarm = !!this._connectionReusedByRequestId.get(record.requestId);\n- const connection = connections.find(connection => {\n- const meetsWarmRequirement = wasConnectionWarm === connection.isWarm();\n- return meetsWarmRequirement && !this._connectionsInUse.has(connection);\n- });\n+ // Sort connections by decreasing congestion window, i.e. warmest to coldest\n+ const availableConnections = connections\n+ .filter(connection => !this._connectionsInUse.has(connection))\n+ .sort((a, b) => b.congestionWindow - a.congestionWindow);\n+\n+ const observedConnectionWasReused = !!this._connectionReusedByRequestId.get(record.requestId);\n+\n+ /** @type {TcpConnection|undefined} */\n+ let connectionToUse = availableConnections[0];\n+ if (!options.ignoreConnectionReused) {\n+ connectionToUse = availableConnections.find(\n+ connection => connection.isWarm() === observedConnectionWasReused\n+ );\n+ }\n+\n+ if (!connectionToUse) return null;\n- if (!connection) return null;\n- this._connectionsInUse.add(connection);\n- this._connectionsByRecord.set(record, connection);\n- return connection;\n+ this._connectionsInUse.add(connectionToUse);\n+ this._connectionsByRecord.set(record, connectionToUse);\n+ return connectionToUse;\n}\n/**\n",
"new_path": "lighthouse-core/lib/dependency-graph/simulator/connection-pool.js",
"old_path": "lighthouse-core/lib/dependency-graph/simulator/connection-pool.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -55,6 +55,7 @@ class Simulator {\nthis._layoutTaskMultiplier = this._cpuSlowdownMultiplier * this._options.layoutTaskMultiplier;\n// Properties reset on every `.simulate` call but duplicated here for type checking\n+ this._flexibleOrdering = false;\nthis._nodeTimings = new Map();\nthis._numberInProgressByType = new Map();\nthis._nodes = {};\n@@ -150,6 +151,16 @@ class Simulator {\n}\n}\n+ /**\n+ * @param {LH.WebInspector.NetworkRequest} record\n+ * @return {?TcpConnection}\n+ */\n+ _acquireConnection(record) {\n+ return this._connectionPool.acquire(record, {\n+ ignoreConnectionReused: this._flexibleOrdering,\n+ });\n+ }\n+\n/**\n* @param {Node} node\n* @param {number} totalElapsedTime\n@@ -170,7 +181,7 @@ class Simulator {\n// Start a network request if we're not at max requests and a connection is available\nconst numberOfActiveRequests = this._numberInProgress(node.type);\nif (numberOfActiveRequests >= this._maximumConcurrentRequests) return;\n- const connection = this._connectionPool.acquire(/** @type {NetworkNode} */ (node).record);\n+ const connection = this._acquireConnection(/** @type {NetworkNode} */ (node).record);\nif (!connection) return;\nthis._markNodeAsInProgress(node, totalElapsedTime);\n@@ -215,7 +226,8 @@ class Simulator {\nconst record = /** @type {NetworkNode} */ (node).record;\nconst timingData = this._nodeTimings.get(node);\n- const connection = /** @type {TcpConnection} */ (this._connectionPool.acquire(record));\n+ // If we're estimating time remaining, we already acquired a connection for this record, definitely non-null\n+ const connection = /** @type {TcpConnection} */ (this._acquireConnection(record));\nconst calculation = connection.simulateDownloadUntil(\nrecord.transferSize - timingData.bytesDownloaded,\n{timeAlreadyElapsed: timingData.timeElapsed, maximumTimeToElapse: Infinity}\n@@ -258,7 +270,8 @@ class Simulator {\nif (node.type !== Node.TYPES.NETWORK) throw new Error('Unsupported');\nconst record = /** @type {NetworkNode} */ (node).record;\n- const connection = /** @type {TcpConnection} */ (this._connectionPool.acquire(record));\n+ // If we're updating the progress, we already acquired a connection for this record, definitely non-null\n+ const connection = /** @type {TcpConnection} */ (this._acquireConnection(record));\nconst calculation = connection.simulateDownloadUntil(\nrecord.transferSize - timingData.bytesDownloaded,\n{\n@@ -289,12 +302,22 @@ class Simulator {\n}\n/**\n- * Estimates the time taken to process all of the graph's nodes.\n+ * Estimates the time taken to process all of the graph's nodes, returns the overall time along with\n+ * each node annotated by start/end times.\n+ *\n+ * If flexibleOrdering is set, simulator/connection pool are allowed to deviate from what was\n+ * observed in the trace/devtoolsLog and start requests as soon as they are queued (i.e. do not\n+ * wait around for a warm connection to be available if the original record was fetched on a warm\n+ * connection).\n+ *\n* @param {Node} graph\n+ * @param {{flexibleOrdering?: boolean}=} options\n* @return {LH.Gatherer.Simulation.Result}\n*/\n- simulate(graph) {\n+ simulate(graph, options) {\n+ options = Object.assign({flexibleOrdering: false}, options);\n// initialize the necessary data containers\n+ this._flexibleOrdering = options.flexibleOrdering;\nthis._initializeConnectionPool(graph);\nthis._initializeAuxiliaryData();\n@@ -318,6 +341,10 @@ class Simulator {\nthis._startNodeIfPossible(node, totalElapsedTime);\n}\n+ if (!nodesInProgress.size) {\n+ throw new Error('Failed to start a node, potential mismatch in original execution');\n+ }\n+\n// set the available throughput for all connections based on # inflight\nthis._updateNetworkCapacity();\n",
"new_path": "lighthouse-core/lib/dependency-graph/simulator/simulator.js",
"old_path": "lighthouse-core/lib/dependency-graph/simulator/simulator.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -78,6 +78,20 @@ class TcpConnection {\nreturn this._warmed;\n}\n+ /**\n+ * @return {boolean}\n+ */\n+ isH2() {\n+ return this._h2;\n+ }\n+\n+ /**\n+ * @return {number}\n+ */\n+ get congestionWindow() {\n+ return this._congestionWindow;\n+ }\n+\n/**\n* Sets the number of excess bytes that are available to this connection on future downloads, only\n* applies to H2 connections.\n@@ -88,6 +102,13 @@ class TcpConnection {\nthis._h2OverflowBytesDownloaded = bytes;\n}\n+ /**\n+ * @return {TcpConnection}\n+ */\n+ clone() {\n+ return Object.assign(new TcpConnection(this._rtt, this._throughput), this);\n+ }\n+\n/**\n* Simulates a network download of a particular number of bytes over an optional maximum amount of time\n* and returns information about the ending state.\n",
"new_path": "lighthouse-core/lib/dependency-graph/simulator/tcp-connection.js",
"old_path": "lighthouse-core/lib/dependency-graph/simulator/tcp-connection.js"
},
{
"change_type": "MODIFY",
"diff": "/* eslint-env mocha */\nconst UsesRelPreload = require('../../audits/uses-rel-preload.js');\n+const NetworkNode = require('../../lib/dependency-graph/network-node');\nconst assert = require('assert');\n+\n+const Runner = require('../../runner');\n+const pwaTrace = require('../fixtures/traces/progressive-app-m60.json');\n+const pwaDevtoolsLog = require('../fixtures/traces/progressive-app-m60.devtools.log.json');\n+\nconst defaultMainResource = {\n_endTime: 1,\n};\n+describe('Performance: uses-rel-preload audit', () => {\n+ let mockGraph;\n+ let mockSimulator;\n+\nconst mockArtifacts = (networkRecords, mockChain, mainResource = defaultMainResource) => {\nreturn {\n- devtoolsLogs: {\n- [UsesRelPreload.DEFAULT_PASS]: [],\n- },\n+ traces: {[UsesRelPreload.DEFAULT_PASS]: {traceEvents: []}},\n+ devtoolsLogs: {[UsesRelPreload.DEFAULT_PASS]: []},\nrequestCriticalRequestChains: () => {\nreturn Promise.resolve(mockChain);\n},\n+ requestLoadSimulator: () => mockSimulator,\n+ requestPageDependencyGraph: () => mockGraph,\nrequestNetworkRecords: () => networkRecords,\nrequestMainResource: () => {\nreturn Promise.resolve(mainResource);\n@@ -29,36 +40,83 @@ const mockArtifacts = (networkRecords, mockChain, mainResource = defaultMainReso\n};\n};\n-describe('Performance: uses-rel-preload audit', () => {\n- it(`should suggest preload resource`, () => {\n+ function buildNode(requestId, url) {\n+ return new NetworkNode({url, requestId});\n+ }\n+\n+ afterEach(() => {\n+ mockSimulator = undefined;\n+ });\n+\n+ it('should suggest preload resource', () => {\n+ const rootNode = buildNode(1, 'http://example.com');\n+ const mainDocumentNode = buildNode(2, 'http://www.example.com');\n+ const scriptNode = buildNode(3, 'http://www.example.com/script.js');\n+ const scriptAddedNode = buildNode(4, 'http://www.example.com/script-added.js');\n+\n+ mainDocumentNode.addDependency(rootNode);\n+ scriptNode.addDependency(mainDocumentNode);\n+ scriptAddedNode.addDependency(scriptNode);\n+\n+ mockGraph = rootNode;\n+ mockSimulator = {\n+ simulate(graph) {\n+ const nodesByUrl = new Map();\n+ graph.traverse(node => nodesByUrl.set(node.record.url, node));\n+\n+ const rootNodeLocal = nodesByUrl.get(rootNode.record.url);\n+ const mainDocumentNodeLocal = nodesByUrl.get(mainDocumentNode.record.url);\n+ const scriptNodeLocal = nodesByUrl.get(scriptNode.record.url);\n+ const scriptAddedNodeLocal = nodesByUrl.get(scriptAddedNode.record.url);\n+\n+ const nodeTimings = new Map([\n+ [rootNodeLocal, {starTime: 0, endTime: 500}],\n+ [mainDocumentNodeLocal, {startTime: 500, endTime: 1000}],\n+ [scriptNodeLocal, {startTime: 1000, endTime: 2000}],\n+ [scriptAddedNodeLocal, {startTime: 2000, endTime: 3250}],\n+ ]);\n+\n+ if (scriptAddedNodeLocal.getDependencies()[0] === mainDocumentNodeLocal) {\n+ nodeTimings.set(scriptAddedNodeLocal, {startTime: 1000, endTime: 2000});\n+ }\n+\n+ return {timeInMs: 3250, nodeTimings};\n+ },\n+ };\n+\nconst mainResource = Object.assign({}, defaultMainResource, {\n+ url: 'http://www.example.com',\nredirects: [''],\n});\nconst networkRecords = [\n{\nrequestId: '2',\n- _endTime: 1,\n_isLinkPreload: false,\n_url: 'http://www.example.com',\n},\n{\nrequestId: '3',\n- _startTime: 10,\n- _endTime: 19,\n_isLinkPreload: false,\n_url: 'http://www.example.com/script.js',\n},\n+ {\n+ requestId: '4',\n+ _isLinkPreload: false,\n+ _url: 'http://www.example.com/script-added.js',\n+ },\n];\n+\nconst chains = {\n'1': {\nchildren: {\n'2': {\n+ request: networkRecords[0],\nchildren: {\n'3': {\n- request: networkRecords[0],\n+ request: networkRecords[1],\nchildren: {\n'4': {\n- request: networkRecords[1],\n+ request: networkRecords[2],\nchildren: {},\n},\n},\n@@ -69,11 +127,12 @@ describe('Performance: uses-rel-preload audit', () => {\n},\n};\n- return UsesRelPreload.audit(mockArtifacts(networkRecords, chains, mainResource))\n- .then(output => {\n- assert.equal(output.rawValue, 9000);\n+ return UsesRelPreload.audit(mockArtifacts(networkRecords, chains, mainResource), {}).then(\n+ output => {\n+ assert.equal(output.rawValue, 1250);\nassert.equal(output.details.items.length, 1);\n- });\n+ }\n+ );\n});\nit(`shouldn't suggest preload for already preloaded records`, () => {\n@@ -100,7 +159,7 @@ describe('Performance: uses-rel-preload audit', () => {\n},\n};\n- return UsesRelPreload.audit(mockArtifacts(networkRecords, chains)).then(output => {\n+ return UsesRelPreload.audit(mockArtifacts(networkRecords, chains), {}).then(output => {\nassert.equal(output.rawValue, 0);\nassert.equal(output.details.items.length, 0);\n});\n@@ -130,9 +189,26 @@ describe('Performance: uses-rel-preload audit', () => {\n},\n};\n- return UsesRelPreload.audit(mockArtifacts(networkRecords, chains)).then(output => {\n+ return UsesRelPreload.audit(mockArtifacts(networkRecords, chains), {}).then(output => {\nassert.equal(output.rawValue, 0);\nassert.equal(output.details.items.length, 0);\n});\n});\n+\n+ it('does no throw on a real trace/devtools log', async () => {\n+ const artifacts = Object.assign({\n+ URL: {finalUrl: 'https://pwa.rocks/'},\n+ traces: {\n+ [UsesRelPreload.DEFAULT_PASS]: pwaTrace,\n+ },\n+ devtoolsLogs: {\n+ [UsesRelPreload.DEFAULT_PASS]: pwaDevtoolsLog,\n+ },\n+ }, Runner.instantiateComputedArtifacts());\n+\n+ const settings = {throttlingMethod: 'provided'};\n+ const result = await UsesRelPreload.audit(artifacts, {settings});\n+ assert.equal(result.score, 1);\n+ assert.equal(result.rawValue, 0);\n+ });\n});\n",
"new_path": "lighthouse-core/test/audits/uses-rel-preload-test.js",
"old_path": "lighthouse-core/test/audits/uses-rel-preload-test.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+const ConnectionPool = require('../../../../lib/dependency-graph/simulator/connection-pool');\n+\n+const assert = require('assert');\n+const URL = require('url').URL;\n+\n+/* eslint-env mocha */\n+describe('DependencyGraph/Simulator/ConnectionPool', () => {\n+ const rtt = 100;\n+ const throughput = 10000 * 1024;\n+ let requestId;\n+\n+ function record(data = {}) {\n+ const url = data.url || 'http://example.com';\n+ const origin = new URL(url).origin;\n+ const scheme = url.split(':')[0];\n+\n+ return Object.assign({\n+ requestId: requestId++,\n+ url,\n+ protocol: 'http/1.1',\n+ parsedURL: {scheme, securityOrigin: () => origin},\n+ }, data);\n+ }\n+\n+ beforeEach(() => {\n+ requestId = 1;\n+ });\n+\n+ describe('#constructor', () => {\n+ it('should create the pool', () => {\n+ const pool = new ConnectionPool([record()], {rtt, throughput});\n+ // Make sure 6 connections are created for each origin\n+ assert.equal(pool._connectionsByOrigin.get('http://example.com').length, 6);\n+ // Make sure it populates connectionWasReused\n+ assert.equal(pool._connectionReusedByRequestId.get(1), false);\n+\n+ const connection = pool._connectionsByOrigin.get('http://example.com')[0];\n+ assert.equal(connection._rtt, rtt);\n+ assert.equal(connection._throughput, throughput);\n+ assert.equal(connection._serverLatency, 30); // sets to default value\n+ });\n+\n+ it('should set TLS properly', () => {\n+ const recordA = record({url: 'https://example.com'});\n+ const pool = new ConnectionPool([recordA], {rtt, throughput});\n+ const connection = pool._connectionsByOrigin.get('https://example.com')[0];\n+ assert.ok(connection._ssl, 'should have set connection TLS');\n+ });\n+\n+ it('should set H2 properly', () => {\n+ const recordA = record({protocol: 'h2'});\n+ const pool = new ConnectionPool([recordA], {rtt, throughput});\n+ const connection = pool._connectionsByOrigin.get('http://example.com')[0];\n+ assert.ok(connection.isH2(), 'should have set HTTP/2');\n+ });\n+\n+ it('should set origin-specific RTT properly', () => {\n+ const additionalRttByOrigin = new Map([['http://example.com', 63]]);\n+ const pool = new ConnectionPool([record()], {rtt, throughput, additionalRttByOrigin});\n+ const connection = pool._connectionsByOrigin.get('http://example.com')[0];\n+ assert.ok(connection._rtt, rtt + 63);\n+ });\n+\n+ it('should set origin-specific server latency properly', () => {\n+ const serverResponseTimeByOrigin = new Map([['http://example.com', 63]]);\n+ const pool = new ConnectionPool([record()], {rtt, throughput, serverResponseTimeByOrigin});\n+ const connection = pool._connectionsByOrigin.get('http://example.com')[0];\n+ assert.ok(connection._serverLatency, 63);\n+ });\n+ });\n+\n+ describe('.acquire', () => {\n+ it('should remember the connection associated with each record', () => {\n+ const recordA = record();\n+ const recordB = record();\n+ const pool = new ConnectionPool([recordA, recordB], {rtt, throughput});\n+\n+ const connectionForA = pool.acquire(recordA);\n+ const connectionForB = pool.acquire(recordB);\n+ for (let i = 0; i < 10; i++) {\n+ assert.equal(pool.acquire(recordA), connectionForA);\n+ assert.equal(pool.acquire(recordB), connectionForB);\n+ }\n+\n+ assert.deepStrictEqual(pool.connectionsInUse(), [connectionForA, connectionForB]);\n+ });\n+\n+ it('should allocate at least 6 connections', () => {\n+ const pool = new ConnectionPool([record()], {rtt, throughput});\n+ for (let i = 0; i < 6; i++) {\n+ assert.ok(pool.acquire(record()), `did not find connection for ${i}th record`);\n+ }\n+ });\n+\n+ it('should allocate all connections', () => {\n+ const records = new Array(7).fill(undefined, 0, 7).map(() => record());\n+ const pool = new ConnectionPool(records, {rtt, throughput});\n+ const connections = records.map(record => pool.acquire(record));\n+ assert.ok(connections[0], 'did not find connection for 1st record');\n+ assert.ok(connections[5], 'did not find connection for 6th record');\n+ assert.ok(connections[6], 'did not find connection for 7th record');\n+ });\n+\n+ it('should respect observed connection reuse', () => {\n+ const coldRecord = record();\n+ const warmRecord = record();\n+ const pool = new ConnectionPool([coldRecord, warmRecord], {rtt, throughput});\n+ pool._connectionReusedByRequestId.set(warmRecord.requestId, true);\n+\n+ assert.ok(pool.acquire(coldRecord), 'should have acquired connection');\n+ assert.ok(!pool.acquire(warmRecord), 'should not have acquired connection');\n+ pool.release(coldRecord);\n+\n+ const connections = Array.from(pool._connectionsByOrigin.get('http://example.com'));\n+ connections.forEach((connection, i) => {\n+ connection.setWarmed(i % 2 === 0);\n+ });\n+\n+ assert.equal(pool.acquire(coldRecord), connections[1], 'should have cold connection');\n+ assert.equal(pool.acquire(warmRecord), connections[0], 'should have warm connection');\n+ pool.release(coldRecord);\n+ pool.release(warmRecord);\n+\n+ connections.forEach(connection => {\n+ connection.setWarmed(true);\n+ });\n+\n+ assert.ok(!pool.acquire(coldRecord), 'should not have acquired connection');\n+ assert.ok(pool.acquire(warmRecord), 'should have acquired connection');\n+ });\n+\n+ it('should ignore observed connection reuse when flag is present', () => {\n+ const coldRecord = record();\n+ const warmRecord = record();\n+ const pool = new ConnectionPool([coldRecord, warmRecord], {rtt, throughput});\n+ pool._connectionReusedByRequestId.set(warmRecord.requestId, true);\n+\n+ const opts = {ignoreConnectionReused: true};\n+ assert.ok(pool.acquire(coldRecord, opts), 'should have acquired connection');\n+ assert.ok(pool.acquire(warmRecord, opts), 'should have acquired connection');\n+ pool.release(coldRecord);\n+\n+ for (const connection of pool._connectionsByOrigin.get('http://example.com')) {\n+ connection.setWarmed(true);\n+ }\n+\n+ assert.ok(pool.acquire(coldRecord, opts), 'should have acquired connection');\n+ assert.ok(pool.acquire(warmRecord, opts), 'should have acquired connection');\n+ });\n+\n+ it('should acquire in order of warmness', () => {\n+ const recordA = record();\n+ const recordB = record();\n+ const recordC = record();\n+ const pool = new ConnectionPool([recordA, recordB, recordC], {rtt, throughput});\n+ pool._connectionReusedByRequestId.set(recordA.requestId, true);\n+ pool._connectionReusedByRequestId.set(recordB.requestId, true);\n+ pool._connectionReusedByRequestId.set(recordC.requestId, true);\n+\n+ const [connectionWarm, connectionWarmer, connectionWarmest] =\n+ pool._connectionsByOrigin.get('http://example.com');\n+ connectionWarm.setWarmed(true);\n+ connectionWarm.setCongestionWindow(10);\n+ connectionWarmer.setWarmed(true);\n+ connectionWarmer.setCongestionWindow(100);\n+ connectionWarmest.setWarmed(true);\n+ connectionWarmest.setCongestionWindow(1000);\n+\n+ assert.equal(pool.acquire(recordA), connectionWarmest);\n+ assert.equal(pool.acquire(recordB), connectionWarmer);\n+ assert.equal(pool.acquire(recordC), connectionWarm);\n+ });\n+ });\n+\n+ describe('.release', () => {\n+ it('noop for record without connection', () => {\n+ const recordA = record();\n+ const pool = new ConnectionPool([recordA], {rtt, throughput});\n+ assert.equal(pool.release(recordA), undefined);\n+ });\n+\n+ it('frees the connection for reissue', () => {\n+ const records = new Array(6).fill(undefined, 0, 7).map(() => record());\n+ const pool = new ConnectionPool(records, {rtt, throughput});\n+ records.push(record());\n+\n+ records.forEach(record => pool.acquire(record));\n+\n+ assert.equal(pool.connectionsInUse().length, 6);\n+ assert.ok(!pool.acquire(records[6]), 'had connection that is in use');\n+\n+ pool.release(records[0]);\n+ assert.equal(pool.connectionsInUse().length, 5);\n+\n+ assert.ok(pool.acquire(records[6]), 'could not reissue released connection');\n+ assert.ok(!pool.acquire(records[0]), 'had connection that is in use');\n+ });\n+ });\n+});\n",
"new_path": "lighthouse-core/test/lib/dependency-graph/simulator/connection-pool-test.js",
"old_path": null
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(preload): use lantern to compute savings (#5062)
| 1
|
core
|
preload
|
217,922
|
02.05.2018 18:59:56
| -7,200
|
a6c5cb307a17a127c32e4b4f3db6b02b131bfbe1
|
chore(simulator): add support for rotation not found
|
[
{
"change_type": "MODIFY",
"diff": "@@ -9,7 +9,7 @@ export class CraftingRotation extends DataModel {\npublic recipe: Partial<Craft>;\n- public rotation: string[];\n+ public rotation: string[] = [];\npublic authorId: string;\n",
"new_path": "src/app/model/other/crafting-rotation.ts",
"old_path": "src/app/model/other/crafting-rotation.ts"
},
{
"change_type": "MODIFY",
"diff": "+<div *ngIf=\"!notFound; else notFoundTemplate\">\n<div *ngIf=\"recipe$ | async as recipe; else loading\">\n<app-simulator [recipe]=\"recipe\" [actions]=\"actions\" [itemId]=\"itemId\" [itemIcon]=\"itemIcon\" [canSave]=\"canSave\"\n[rotationId]=\"rotationId\" (onsave)=\"save($event)\" [selectedFood]=\"selectedFood\"\n[selectedMedicine]=\"selectedMedicine\"></app-simulator>\n</div>\n+</div>\n<ng-template #loading>\n<mat-spinner></mat-spinner>\n</ng-template>\n+<ng-template #notFoundTemplate>\n+ {{'SIMULATOR.Rotation_not_found' | translate}}\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": "-import {Component, Input} from '@angular/core';\n+import {Component} from '@angular/core';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {Craft} from '../../../../model/garland-tools/craft';\nimport {Observable} from 'rxjs/Observable';\n@@ -38,6 +38,8 @@ export class SimulatorPageComponent {\npublic selectedMedicine: Consumable;\n+ public notFound = false;\n+\nconstructor(private userService: UserService, private rotationsService: CraftingRotationService,\nprivate router: Router, activeRoute: ActivatedRoute, private registry: CraftingActionsRegistry,\nprivate data: DataService) {\n@@ -50,6 +52,10 @@ export class SimulatorPageComponent {\n// Because only crystals change between recipes, we take the first one.\nreturn item.item.craft[0];\n});\n+ })\n+ .catch(() => {\n+ this.notFound = true;\n+ return Observable.of(null);\n});\nthis.userId$ = this.userService.getUserData()\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": "import {QualityAction} from '../quality-action';\nimport {Simulation} from '../../../simulation/simulation';\n+import {Buff} from '../../buff.enum';\nexport class PrudentTouch extends QualityAction {\ncanBeUsed(simulationState: Simulation): boolean {\n- return true;\n+ return !simulationState.hasBuff(Buff.WASTE_NOT_II) && !simulationState.hasBuff(Buff.WASTE_NOT);\n}\ngetBaseCPCost(simulationState: Simulation): number {\n",
"new_path": "src/app/pages/simulator/model/actions/quality/prudent-touch.ts",
"old_path": "src/app/pages/simulator/model/actions/quality/prudent-touch.ts"
},
{
"change_type": "MODIFY",
"diff": "\"Generated_macro\": \"Ingame Macro\",\n\"Generate_ingame_macro\": \"Generate ingame macro\",\n\"Share_link_copied\": \"Rotation share link copied to clipboard\",\n+ \"Persist\": \"Save this rotation\",\n+ \"Rotation_not_found\": \"Rotation not found\",\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): add support for rotation not found
| 1
|
chore
|
simulator
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.