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
|
08.05.2018 19:27:52
| 0
|
92c78064b84aa099d8314ffb7be4c57216585f6e
|
chore(release): 0.1.295
|
[
{
"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.295\"></a>\n+## [0.1.295](https://github.com/webex/react-ciscospark/compare/v0.1.294...v0.1.295) (2018-05-08)\n+\n+\n+\n<a name=\"0.1.294\"></a>\n## [0.1.294](https://github.com/webex/react-ciscospark/compare/v0.1.293...v0.1.294) (2018-05-08)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.294\",\n+ \"version\": \"0.1.295\",\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.295
| 1
|
chore
|
release
|
679,913
|
09.05.2018 02:51:50
| -3,600
|
5991be61140ad866e0d471a814a419609f7431d6
|
feat(associative): add new functions, update arg & return types
add commonKeys*()
add mergeMapWith() / mergeObjWith()
add mergeDeepObj()
rename mapKeys*() => mergeApply*()
update renameKeys*() arg/return types
update indexed() arg types
update join() & joinWith() arg/return types
update re-exports
|
[
{
"change_type": "ADD",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+\n+/**\n+ * Like `commonKeysObj()`, but for ES6 Maps.\n+ *\n+ * @param a\n+ * @param b\n+ */\n+export function commonKeysMap<K>(a: Map<K, any>, b: Map<K, any>) {\n+ const res: K[] = [];\n+ for (let k of a.keys()) {\n+ if (b.has(k)) {\n+ res.push(k);\n+ }\n+ }\n+ return res;\n+}\n+\n+/**\n+ * Returns array of keys present in both args, i.e. the set intersection\n+ * of the given objects' key / property sets.\n+ *\n+ * ```\n+ * commonKeys({ a: 1, b: 2 }, { c: 10, b: 20, a: 30 })\n+ * // [ \"a\", \"b\" ]\n+ * ```\n+ *\n+ * @param a\n+ * @param b\n+ */\n+export function commonKeysObj(a: IObjectOf<any>, b: IObjectOf<any>) {\n+ const res: string[] = [];\n+ for (let k in a) {\n+ if (b.hasOwnProperty(k)) {\n+ res.push(k);\n+ }\n+ }\n+ return res;\n+}\n",
"new_path": "packages/associative/src/common-keys.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "export * from \"./array-set\";\n-export * from \"./equiv-map\";\n-export * from \"./ll-set\";\n-export * from \"./sorted-map\";\n-export * from \"./sorted-set\";\n-\n+export * from \"./common-keys\";\nexport * from \"./difference\";\n-export * from \"./intersection\";\n-export * from \"./union\";\n-\n+export * from \"./equiv-map\";\nexport * from \"./indexed\";\n+export * from \"./intersection\";\nexport * from \"./invert\";\nexport * from \"./join\";\n+export * from \"./ll-set\";\n+export * from \"./merge-apply\";\n+export * from \"./merge-deep\";\n+export * from \"./merge-with\";\nexport * from \"./merge\";\nexport * from \"./rename-keys\";\nexport * from \"./select-keys\";\n+export * from \"./sorted-map\";\n+export * from \"./sorted-set\";\n+export * from \"./union\";\n",
"new_path": "packages/associative/src/index.ts",
"old_path": "packages/associative/src/index.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -3,9 +3,9 @@ import { selectKeysObj } from \"./select-keys\";\nimport { empty } from \"./utils\";\n/**\n- * Takes a set of objects and array of indexing keys. Calls\n- * `selectKeysObj` on each set value and used returned objects as new\n- * keys to group original values. Returns a map of sets.\n+ * Takes an iterable of plain objects and array of indexing keys. Calls\n+ * `selectKeysObj` on each value and uses returned objects as new keys\n+ * to group original values. Returns a new `EquivMap` of sets.\n*\n* ```\n* indexed(\n@@ -17,19 +17,17 @@ import { empty } from \"./utils\";\n* // { a: 1, b: 2 } => Set { { a: 1, b: 2 } } }\n* ```\n*\n- * @param records set of objects to index\n+ * @param records objects to index\n* @param ks keys used for indexing\n*/\n-export function indexed<T>(records: Set<T>, ks: PropertyKey[]) {\n+export function indexed<T>(records: Iterable<T>, ks: PropertyKey[]) {\nconst res = new EquivMap<any, Set<T>>();\n- let m, ik, rv;\n- for (m of records) {\n- ik = selectKeysObj(m, ks);\n+ let x, ik, rv;\n+ for (x of records) {\n+ ik = selectKeysObj(x, ks);\nrv = res.get(ik);\n- if (!rv) {\n- res.set(ik, rv = empty(records, Set));\n- }\n- rv.add(m);\n+ !rv && res.set(ik, rv = empty(records, Set));\n+ rv.add(x);\n}\nreturn res;\n}\n",
"new_path": "packages/associative/src/indexed.ts",
"old_path": "packages/associative/src/indexed.ts"
},
{
"change_type": "MODIFY",
"diff": "import { IObjectOf } from \"@thi.ng/api/api\";\n+import { commonKeysObj } from \"./common-keys\";\nimport { indexed } from \"./indexed\";\n-import { intersection } from \"./intersection\";\nimport { invertObj } from \"./invert\";\nimport { mergeObj } from \"./merge\";\nimport { renameKeysObj } from \"./rename-keys\";\n@@ -13,6 +13,7 @@ import { empty, first, objValues } from \"./utils\";\n* is assumed to have plain objects as values with at least one of the\n* keys present in both sides. Furthermore the objects in each set are\n* assumed to have the same internal structure (i.e. sets of keys).\n+ * Returns new set of same type as `xrel`.\n*\n* ```\n* join(\n@@ -33,23 +34,20 @@ import { empty, first, objValues } from \"./utils\";\n* @param xrel\n* @param yrel\n*/\n-export function join<A, B>(xrel: Set<A>, yrel: Set<B>) {\n+export function join(xrel: Set<IObjectOf<any>>, yrel: Set<IObjectOf<any>>): Set<IObjectOf<any>> {\nif (xrel.size && yrel.size) {\n- const ks = [...intersection(\n- new Set(Object.keys(first(xrel) || {})),\n- new Set(Object.keys(first(yrel) || {})))\n- ];\n- let r, s;\n+ const ks = commonKeysObj(first(xrel) || {}, first(yrel) || {});\n+ let a: Set<any>, b: Set<any>;\nif (xrel.size <= yrel.size) {\n- r = xrel;\n- s = yrel;\n+ a = xrel;\n+ b = yrel;\n} else {\n- r = yrel;\n- s = xrel;\n+ a = yrel;\n+ b = xrel;\n}\n- const idx = indexed(r, ks);\n- const res = empty(xrel, Set);\n- for (let x of s) {\n+ const idx = indexed(a, ks);\n+ const res: Set<any> = empty(xrel, Set);\n+ for (let x of b) {\nconst found = idx.get(selectKeysObj(x, ks));\nif (found) {\nfor (let f of found) {\n@@ -64,8 +62,11 @@ export function join<A, B>(xrel: Set<A>, yrel: Set<B>) {\n/**\n* Similar to `join()`, computes the join between two sets of relations,\n- * using the given keys in `kmap` only. `kmap` can also be used to\n- * rename join keys in `yrel` where needed, e.g.\n+ * using the given keys in `kmap` only for joining and ignoring others.\n+ * `kmap` can also be used to translate join keys in `yrel` where\n+ * needed. Else, if no renaming is desired, the values in `kmap` should\n+ * be the same as their respective keys, e.g. `{id: \"id\"}`. Returns new\n+ * set of same type as `xrel`.\n*\n* ```\n* joinWith(\n@@ -78,15 +79,16 @@ export function join<A, B>(xrel: Set<A>, yrel: Set<B>) {\n* {type: 2, color: \"blue\"}]),\n* {id: \"type\"}\n* )\n+ * // Set {\n+ * // { type: 1, color: 'red', id: 1, name: 'foo' },\n+ * // { type: 2, color: 'blue', id: 2, name: 'bar' } }\n* ```\n- * If no renaming is desired, the values in `kmap` should be the same as\n- * their respective keys.\n*\n* @param xrel\n* @param yrel\n* @param kmap keys to compute join for\n*/\n-export function joinWith<A, B>(xrel: Set<A>, yrel: Set<B>, kmap: IObjectOf<PropertyKey>) {\n+export function joinWith(xrel: Set<any>, yrel: Set<any>, kmap: IObjectOf<PropertyKey>): Set<any> {\nif (xrel.size && yrel.size) {\nlet r: Set<any>, s: Set<any>;\nlet k: IObjectOf<PropertyKey>;\n@@ -101,7 +103,7 @@ export function joinWith<A, B>(xrel: Set<A>, yrel: Set<B>, kmap: IObjectOf<Prope\n}\nconst idx = indexed(r, objValues(k));\nconst ks = Object.keys(k);\n- const res = empty(xrel, Set);\n+ const res: Set<any> = empty(xrel, Set);\nfor (let x of s) {\nconst found = idx.get(renameKeysObj(selectKeysObj(x, ks), k));\nif (found) {\n",
"new_path": "packages/associative/src/join.ts",
"old_path": "packages/associative/src/join.ts"
},
{
"change_type": "RENAME",
"diff": "-import { isFunction } from \"@thi.ng/checks/is-function\";\nimport { IObjectOf } from \"@thi.ng/api/api\";\n+import { isFunction } from \"@thi.ng/checks/is-function\";\n+\n+import { copy } from \"./utils\";\n/**\n- * Similar to `mapKeysObj()`, but for ES6 Maps instead of plain objects.\n+ * Similar to `mergeApplyObj()`, but for ES6 Maps instead of plain objects.\n*\n* @param src\n* @param xs\n*/\n-export function mapKeysMap<K, V>(src: Map<K, V>, xs: Map<K, V | ((x: V) => V)>) {\n- const res: any = { ...src };\n+export function mergeApplyMap<K, V>(src: Map<K, V>, xs: Map<K, V | ((x: V) => V)>) {\n+ const res: any = copy(src, Map);\nfor (let p of xs) {\nlet [k, v] = p;\n- if (isFunction(v)) {\n- v = v(res[k]);\n- }\n+ isFunction(v) && (v = v(res[k]));\nres.set(k, v);\n}\nreturn res;\n@@ -22,8 +22,8 @@ export function mapKeysMap<K, V>(src: Map<K, V>, xs: Map<K, V | ((x: V) => V)>)\n/**\n* Similar to `mergeObj()`, but only supports 2 args and any function\n* values in `xs` will be called with respective value in `src` to\n- * produce new value for that key. Returns new merged object and does\n- * not modify any of the inputs.\n+ * produce a new / derived value for that key. Returns new merged object\n+ * and does not modify any of the inputs.\n*\n* ```\n* mapKeysObj({a: \"hello\", b: 23}, {a: (x) => x + \" world\", b: 42});\n@@ -33,13 +33,11 @@ export function mapKeysMap<K, V>(src: Map<K, V>, xs: Map<K, V | ((x: V) => V)>)\n* @param src\n* @param xs\n*/\n-export function mapKeysObj<V>(src: IObjectOf<V>, xs: IObjectOf<V | ((x: V) => V)>) {\n+export function mergeApplyObj<V>(src: IObjectOf<V>, xs: IObjectOf<V | ((x: V) => V)>) {\nconst res: any = { ...src };\nfor (let k in xs) {\nlet v = xs[k];\n- if (isFunction(v)) {\n- v = v(res[k]);\n- }\n+ isFunction(v) && (v = v(res[k]));\nres[k] = v;\n}\nreturn res;\n",
"new_path": "packages/associative/src/merge-apply.ts",
"old_path": "packages/associative/src/map-keys.ts"
},
{
"change_type": "ADD",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+import { isPlainObject } from \"@thi.ng/checks/is-plain-object\";\n+\n+import { mergeObjWith } from \"./merge-with\";\n+\n+export function mergeDeepObj(dest: IObjectOf<any>, ...xs: IObjectOf<any>[]) {\n+ return mergeObjWith(\n+ (a, b) => isPlainObject(a) && isPlainObject(b) ? mergeDeepObj(a, b) : b,\n+ dest, ...xs);\n+}\n",
"new_path": "packages/associative/src/merge-deep.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+\n+import { copy } from \"./utils\";\n+\n+export function mergeMapWith<K, V>(f: (a: V, b: V) => V, dest: Map<K, V>, ...xs: Map<K, V>[]) {\n+ const res: Map<K, V> = copy(dest, Map);\n+ for (let x of xs) {\n+ for (let [k, v] of x) {\n+ if (res.has(k)) {\n+ res.set(k, f(res.get(k), v));\n+ } else {\n+ res.set(k, v);\n+ }\n+ }\n+ }\n+ return res;\n+}\n+\n+export function mergeObjWith<T>(f: (a: T, b: T) => T, dest: IObjectOf<T>, ...xs: IObjectOf<T>[]) {\n+ const res: IObjectOf<T> = { ...dest };\n+ for (let x of xs) {\n+ for (let k in x) {\n+ const v = x[k];\n+ if (res.hasOwnProperty(k)) {\n+ res[k] = f(dest[k], v);\n+ } else {\n+ res[k] = v;\n+ }\n+ }\n+ }\n+ return res;\n+}\n",
"new_path": "packages/associative/src/merge-with.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+\n/**\n- * Merges all given maps in left-to-right order into `m`.\n- * Returns `m`.\n+ * Merges all given maps in left-to-right order into `dest`.\n+ * Returns `dest`.\n*\n- * @param m\n- * @param maps\n+ * @param dest\n+ * @param xs\n*/\n-export function mergeMap<K, V>(m: Map<K, V>, ...maps: Map<K, V>[]) {\n- for (let mm of maps) {\n- for (let p of mm) {\n- m.set(p[0], p[1]);\n+export function mergeMap<K, V>(dest: Map<K, V>, ...xs: Map<K, V>[]) {\n+ for (let x of xs) {\n+ for (let pair of x) {\n+ dest.set(pair[0], pair[1]);\n}\n}\n- return m;\n+ return dest;\n}\n/**\n- * Merges all given objects in left-to-right order into `m`.\n- * Returns `m`.\n+ * Merges all given objects in left-to-right order into `dest`.\n+ * Returns `dest`.\n*\n- * @param m\n- * @param maps\n+ * @param dest\n+ * @param xs\n*/\n-export function mergeObj(m, ...maps: any[]) {\n- return Object.assign(m, ...maps);\n+export function mergeObj<T>(dest: IObjectOf<T>, ...xs: IObjectOf<T>[]): IObjectOf<T> {\n+ return Object.assign(dest, ...xs);\n}\n",
"new_path": "packages/associative/src/merge.ts",
"old_path": "packages/associative/src/merge.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -2,21 +2,38 @@ import { IObjectOf } from \"@thi.ng/api/api\";\nimport { empty } from \"./utils\";\n-export function renameKeysMap<T>(src: Map<any, T>, km: IObjectOf<T>): Map<any, T> {\n- const dest = empty(src, Map);\n- for (let p of src) {\n- const k = p[0];\n- const kk = km[k];\n- dest.set(kk !== undefined ? kk : k, p[1]);\n+/**\n+ * Renames keys in `src` using mapping provided by key map `km`. Does\n+ * support key swapping / swizzling. Does not modify original.\n+ *\n+ * @param src\n+ * @param km\n+ */\n+export function renameKeysMap<K, V>(src: Map<K, V>, km: Map<K, K>) {\n+ const dest: Map<K, V> = empty(src, Map);\n+ for (let [k, v] of src) {\n+ dest.set(km.has(k) ? km.get(k) : k, v);\n}\nreturn dest;\n}\n-export function renameKeysObj(src: any, km: IObjectOf<PropertyKey>) {\n+/**\n+ * Renames keys in `src` using mapping provided by key map `km`. Does\n+ * support key swapping / swizzling. Does not modify original.\n+ *\n+ * ```\n+ * // swap a & b, rename c\n+ * renameKeysObj({a: 1, b: 2, c: 3}, {a: \"b\", b: \"a\", c: \"cc\"})\n+ * // {b: 1, a: 2, cc: 3}\n+ * ```\n+ *\n+ * @param src\n+ * @param km\n+ */\n+export function renameKeysObj<T>(src: IObjectOf<T>, km: IObjectOf<PropertyKey>) {\nconst dest = {};\nfor (let k in src) {\n- const kk = km[k];\n- dest[kk != null ? kk : k] = src[k];\n+ dest[km.hasOwnProperty(k) ? km[k] : k] = src[k];\n}\nreturn dest;\n}\n",
"new_path": "packages/associative/src/rename-keys.ts",
"old_path": "packages/associative/src/rename-keys.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(associative): add new functions, update arg & return types
- add commonKeys*()
- add mergeMapWith() / mergeObjWith()
- add mergeDeepObj()
- rename mapKeys*() => mergeApply*()
- update renameKeys*() arg/return types
- update indexed() arg types
- update join() & joinWith() arg/return types
- update re-exports
| 1
|
feat
|
associative
|
679,913
|
09.05.2018 03:29:18
| -3,600
|
053c8c6fd1cdadb71e8702d5a056f6d4aa79ab1e
|
feat(rstream-gestures): add zoom smooth config option, update readme
|
[
{
"change_type": "MODIFY",
"diff": "@@ -24,9 +24,22 @@ export interface GestureEvent {\n}\nexport interface GestureStreamOpts extends IID<string> {\n+ /**\n+ * Initial zoom value. Default: 1\n+ */\nzoom: number;\n+ /**\n+ * Min zoom value. Default: 0.25\n+ */\nminZoom: number;\n+ /**\n+ * Max zoom value. Default: 4\n+ */\nmaxZoom: number;\n+ /**\n+ * Scaling factor for zoom changes. Default: 1\n+ */\n+ smooth: number;\n}\n/**\n@@ -57,11 +70,12 @@ export interface GestureStreamOpts extends IID<string> {\nexport function gestureStream(el: Element, opts?: Partial<GestureStreamOpts>): StreamMerge<any, GestureEvent> {\nlet isDown = false,\nclickPos: number[];\n- opts = Object.assign({\n+ opts = Object.assign(<GestureStreamOpts>{\nid: \"gestures\",\nzoom: 1,\nminZoom: 0.25,\nmaxZoom: 4,\n+ smooth: 1\n}, opts);\nlet zoom = Math.min(Math.max(opts.zoom, opts.minZoom), opts.maxZoom);\nreturn merge({\n@@ -108,7 +122,7 @@ export function gestureStream(el: Element, opts?: Partial<GestureStreamOpts>): S\nbody.delta = [pos[0] - clickPos[0], pos[1] - clickPos[1]];\nbreak;\ncase GestureType.ZOOM:\n- body.zoom = zoom = Math.min(Math.max(zoom + (<WheelEvent>e).deltaY, opts.minZoom), opts.maxZoom);\n+ body.zoom = zoom = Math.min(Math.max(zoom + (<WheelEvent>e).deltaY * opts.smooth, opts.minZoom), opts.maxZoom);\nbreak;\ndefault:\n}\n",
"new_path": "packages/rstream-gestures/src/index.ts",
"old_path": "packages/rstream-gestures/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(rstream-gestures): add zoom smooth config option, update readme
| 1
|
feat
|
rstream-gestures
|
679,913
|
09.05.2018 03:36:31
| -3,600
|
ede7691683930950143cd905e7abc5720ee16f27
|
docs(hdom-components): update readme
|
[
{
"change_type": "MODIFY",
"diff": "@@ -16,6 +16,11 @@ for use with\n&\n[@thi.ng/hiccup](https://github.com/thi-ng/umbrella/tree/master/packages/hiccup).\n+**Please see the\n+[ADR-0002](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-components/adr/0002-component-configuration.md)\n+for detailed discussion about the design intentions of these\n+components**. Feedback welcome!\n+\n## Status\nALPHA\n@@ -34,11 +39,14 @@ import * as hdc from \"@thi.ng/hdom-components\";\n### Canvas\n-- [Canvas types](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-components/src/canvas.ts) (WebGL & Canvas2D)\n+- [Canvas types](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-components/src/canvas.ts) (WebGL, WebGL2 & Canvas2D)\n### Form elements\n+- [Button](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-components/src/button.ts)\n+- [Button group](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-components/src/button-group.ts)\n- [Dropdown](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-components/src/dropdown.ts)\n+- [Pager](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-components/src/pager.ts)\n### Links\n",
"new_path": "packages/hdom-components/README.md",
"old_path": "packages/hdom-components/README.md"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
docs(hdom-components): update readme
| 1
|
docs
|
hdom-components
|
679,913
|
09.05.2018 03:51:23
| -3,600
|
68ea086480a6588d2a39e0e27c2203f2d59f33de
|
fix(hdom): native boolean attrib handling (e.g. "checked")
|
[
{
"change_type": "MODIFY",
"diff": "@@ -128,6 +128,10 @@ export function setAttrib(el: Element, id: string, val: any, attribs?: any) {\ncase \"value\":\nupdateValueAttrib(<HTMLInputElement>el, val);\nbreak;\n+ case \"checked\":\n+ // TODO add more native attribs?\n+ el[id] = val;\n+ break;\ndefault:\nif (isListener) {\nel.addEventListener(id.substr(2), val);\n@@ -136,7 +140,7 @@ export function setAttrib(el: Element, id: string, val: any, attribs?: any) {\n}\n}\n} else {\n- el[id] ? (el[id] = null) : el.removeAttribute(id);\n+ el[id] != null ? (el[id] = null) : el.removeAttribute(id);\n}\nreturn el;\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): native boolean attrib handling (e.g. "checked")
| 1
|
fix
|
hdom
|
679,913
|
09.05.2018 05:11:47
| -3,600
|
91a2b7480473fa9ff07f48f56d89c55a57087253
|
docs: add to main readme
|
[
{
"change_type": "MODIFY",
"diff": "@@ -41,6 +41,7 @@ difficulties, many combining functionality from several packages) in the\n| [`@thi.ng/dcons`](./packages/dcons) | [](https://www.npmjs.com/package/@thi.ng/dcons) | [changelog](./packages/dcons/CHANGELOG.md) |\n| [`@thi.ng/dgraph`](./packages/dgraph) | [](https://www.npmjs.com/package/@thi.ng/dgraph) | [changelog](./packages/dgraph/CHANGELOG.md) |\n| [`@thi.ng/diff`](./packages/diff) | [](https://www.npmjs.com/package/@thi.ng/diff) | [changelog](./packages/diff/CHANGELOG.md) |\n+| [`@thi.ng/dot`](./packages/dot) | [](https://www.npmjs.com/package/@thi.ng/dot) | [changelog](./packages/dot/CHANGELOG.md) |\n| [`@thi.ng/hdom`](./packages/hdom) | [](https://www.npmjs.com/package/@thi.ng/hdom) | [changelog](./packages/hdom/CHANGELOG.md) |\n| [`@thi.ng/hdom-components`](./packages/hdom-components) | [](https://www.npmjs.com/package/@thi.ng/hdom-components) | [changelog](./packages/hdom-components/CHANGELOG.md) |\n| [`@thi.ng/heaps`](./packages/heaps) | [](https://www.npmjs.com/package/@thi.ng/heaps) | [changelog](./packages/heaps/CHANGELOG.md) |\n",
"new_path": "README.md",
"old_path": "README.md"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
docs: add @thi.ng/dot to main readme
| 1
|
docs
| null |
679,913
|
09.05.2018 06:38:03
| -3,600
|
68ca46d287951c9dc7fb25c2e7df62adf54a264a
|
feat(dgraph): add leaves() & roots() iterators, update sort()
|
[
{
"change_type": "MODIFY",
"diff": "@@ -97,6 +97,14 @@ export class DGraph<T> implements\n);\n}\n+ leaves(): IterableIterator<T> {\n+ return filter((node: T) => this.isLeaf(node), this.nodes());\n+ }\n+\n+ roots(): IterableIterator<T> {\n+ return filter((node: T) => this.isRoot(node), this.nodes());\n+ }\n+\ntransitiveDependencies(x: T) {\nreturn transitive(this.dependencies, x);\n}\n@@ -108,14 +116,14 @@ export class DGraph<T> implements\nsort() {\nconst sorted: T[] = [];\nconst g = this.copy();\n- let queue = new LLSet(filter((node: T) => g.isLeaf(node), g.nodes()));\n+ let queue = new LLSet(g.leaves());\nwhile (true) {\nif (!queue.size) {\nreturn sorted.reverse();\n}\nconst node = queue.first();\nqueue.delete(node);\n- for (let d of (<LLSet<T>>g.immediateDependencies(node)).copy()) {\n+ for (let d of [...g.immediateDependencies(node)]) {\ng.removeEdge(node, d);\nif (g.isLeaf(d)) {\nqueue.add(d);\n",
"new_path": "packages/dgraph/src/index.ts",
"old_path": "packages/dgraph/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(dgraph): add leaves() & roots() iterators, update sort()
| 1
|
feat
|
dgraph
|
679,913
|
09.05.2018 07:14:53
| -3,600
|
5d2a3fe8018a4d2005b1fd9c3c28a7d70b797cdf
|
refactor(resolve-map): fix
BREAKING CHANGE: update lookup path prefix & separators
lookup paths now are prefixed with `@` instead of `->`
all path segments must be separated by `/`
update readme & tests
|
[
{
"change_type": "MODIFY",
"diff": "@@ -33,25 +33,28 @@ other refs are recursively resolved (again, provided there are no\ncycles).\nReference values are special strings representing lookup paths of other\n-values in the object and are prefixed with `->` for relative refs or\n-`->/` for absolute refs. Relative refs are resolved from currently\n-visited object and support \"../\" prefixes to access parent levels.\n-Absolute refs are always resolved from the root level (the original\n-object passed to this function).\n+values in the object and are prefixed with `@` for relative refs or\n+`@/` for absolute refs and both using `/` as path separator (Note:\n+trailing slashes are NOT allowed!). Relative refs are resolved from\n+currently visited object and support \"../\" prefixes to access any parent\n+levels. Absolute refs are always resolved from the root level (the\n+original object passed to this function).\n```ts\n-resolveMap({a: 1, b: {c: \"->d\", d: \"->/a\"} })\n+resolveMap({a: 1, b: {c: \"@d\", d: \"@/a\"} })\n// { a: 1, b: { c: 1, d: 1 } }\n```\nIf a value is a function, it is called with a single arg `resolve`, a\n-function which accepts a path (**without `->` prefix**) to look up other\n+function which accepts a path (**without `@` prefix**) to look up other\nvalues. The return value of the user provided function is used as final\nvalue for that key. This mechanism can be used to compute derived values\n-of other values stored in the object. Function values will always be\n-called only once. Therefore, in order to associate a function as value\n-to a key, it needs to be wrapped with an additional function, as shown\n-for the `e` key in the example below.\n+of other values stored anywhere in the root object. **Function values\n+will always be called only once.** Therefore, in order to associate a\n+function as value to a key, it needs to be wrapped with an additional\n+function, as shown for the `e` key in the example below. Similarly, if\n+an actual string value should happen to start with `@`, it needs to be\n+wrapped in a function (see `f` key below).\n```ts\n// `a` is derived from 1st array element in `b.d`\n@@ -59,11 +62,12 @@ for the `e` key in the example below.\n// `b.d[1]` is derived from calling `e(2)`\n// `e` is a wrapped function\nres = resolveMap({\n- a: (resolve) => resolve(\"b.c\") * 100,\n- b: { c: \"->d.0\", d: [2, (resolve) => resolve(\"../../e\")(2) ] },\n+ a: (resolve) => resolve(\"b/c\") * 100,\n+ b: { c: \"@d/0\", d: [2, (resolve) => resolve(\"../../e\")(2) ] },\ne: () => (x) => x * 10,\n+ f: () => \"@foo\",\n})\n-// { a: 200, b: { c: 2, d: [ 2, 20 ] }, e: [Function] }\n+// { a: 200, b: { c: 2, d: [ 2, 20 ] }, e: [Function], f: \"@foo\" }\nres.e(2);\n// 20\n@@ -90,18 +94,18 @@ resolveMap({\nfontsizes: [12, 16, 20]\n},\nbutton: {\n- bg: \"->/colors.text\",\n- label: \"->/colors.bg\",\n+ bg: \"@/colors/text\",\n+ label: \"@/colors/bg\",\n// resolve with abs path inside fn\n- fontsize: (resolve) => `${resolve(\"/main.fontsizes.0\")}px`,\n+ fontsize: (resolve) => `${resolve(\"/main/fontsizes/0\")}px`,\n},\nbuttonPrimary: {\n- bg: \"->/colors.selected\",\n- label: \"->/button.label\",\n+ bg: \"@/colors/selected\",\n+ label: \"@/button/label\",\n// resolve with relative path inside fn\n- fontsize: (resolve) => `${resolve(\"../main.fontsizes.2\")}px`,\n+ fontsize: (resolve) => `${resolve(\"../main/fontsizes/2\")}px`,\n}\n-})\n+});\n// {\n// colors: {\n// bg: \"white\",\n",
"new_path": "packages/resolve-map/README.md",
"old_path": "packages/resolve-map/README.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -3,7 +3,7 @@ import { isArray } from \"@thi.ng/checks/is-array\";\nimport { isFunction } from \"@thi.ng/checks/is-function\";\nimport { isPlainObject } from \"@thi.ng/checks/is-plain-object\";\nimport { isString } from \"@thi.ng/checks/is-string\";\n-import { getIn, mutIn, toPath } from \"@thi.ng/paths\";\n+import { getIn, mutIn } from \"@thi.ng/paths\";\nconst SEMAPHORE = Symbol(\"SEMAPHORE\");\n@@ -84,9 +84,9 @@ const resolveArray = (arr: any[], root?: any, path: PropertyKey[] = [], resolved\nconst _resolve = (root: any, path: PropertyKey[], resolved: any) => {\nlet v = getIn(root, path), rv = SEMAPHORE;\n- const pp = path.join(\".\");\n+ const pp = path.join(\"/\");\nif (!resolved[pp]) {\n- if (isString(v) && v.indexOf(\"->\") === 0) {\n+ if (isString(v) && v.charAt(0) === \"@\") {\nrv = _resolve(root, absPath(path, v), resolved);\n} else if (isPlainObject(v)) {\nresolveMap(v, root, path, resolved);\n@@ -104,9 +104,9 @@ const _resolve = (root: any, path: PropertyKey[], resolved: any) => {\nreturn v;\n}\n-const absPath = (curr: PropertyKey[], q: string, idx = 2): PropertyKey[] => {\n+const absPath = (curr: PropertyKey[], q: string, idx = 1): PropertyKey[] => {\nif (q.charAt(idx) === \"/\") {\n- return toPath(q.substr(idx + 1));\n+ return q.substr(idx + 1).split(\"/\");\n}\ncurr = curr.slice(0, curr.length - 1);\nconst sub = q.substr(idx).split(\"/\");\n@@ -115,7 +115,7 @@ const absPath = (curr: PropertyKey[], q: string, idx = 2): PropertyKey[] => {\n!curr.length && illegalArgs(`invalid lookup path`);\ncurr.pop();\n} else {\n- return curr.concat(toPath(sub[i]));\n+ return curr.concat(sub.slice(i));\n}\n}\n!curr.length && illegalArgs(`invalid lookup path`);\n",
"new_path": "packages/resolve-map/src/index.ts",
"old_path": "packages/resolve-map/src/index.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,53 +5,53 @@ describe(\"resolve-map\", () => {\nit(\"simple\", () => {\nassert.deepEqual(\n- resolveMap({ a: 1, b: \"->a\" }),\n+ resolveMap({ a: 1, b: \"@a\" }),\n{ a: 1, b: 1 }\n);\n});\nit(\"linked refs\", () => {\nassert.deepEqual(\n- resolveMap({ a: \"->c\", b: \"->a\", c: 1 }),\n+ resolveMap({ a: \"@c\", b: \"@a\", c: 1 }),\n{ a: 1, b: 1, c: 1 }\n);\n});\nit(\"array refs\", () => {\nassert.deepEqual(\n- resolveMap({ a: \"->c.1\", b: \"->a\", c: [1, 2] }),\n+ resolveMap({ a: \"@c/1\", b: \"@a\", c: [1, 2] }),\n{ a: 2, b: 2, c: [1, 2] }\n);\n});\nit(\"abs vs rel refs\", () => {\nassert.deepEqual(\n- resolveMap({ a1: { b: 1, c: \"->b\" }, a2: { b: 2, c: \"->b\" }, a3: { b: 3, c: \"->/a1.b\" } }),\n+ resolveMap({ a1: { b: 1, c: \"@b\" }, a2: { b: 2, c: \"@b\" }, a3: { b: 3, c: \"@/a1/b\" } }),\n{ a1: { b: 1, c: 1 }, a2: { b: 2, c: 2 }, a3: { b: 3, c: 1 } }\n);\n});\nit(\"rel parent refs\", () => {\nassert.deepEqual(\n- resolveMap({ a: { b: { c: \"->../c.d\", d: \"->c\", e: \"->/c.d\" }, c: { d: 1 } }, c: { d: 10 } }),\n+ resolveMap({ a: { b: { c: \"@../c/d\", d: \"@c\", e: \"@/c/d\" }, c: { d: 1 } }, c: { d: 10 } }),\n{ a: { b: { c: 1, d: 1, e: 10 }, c: { d: 1 } }, c: { d: 10 } }\n);\n})\nit(\"cycles\", () => {\n- assert.throws(() => resolveMap({ a: \"->a\" }));\n- assert.throws(() => resolveMap({ a: { b: \"->b\" } }));\n- assert.throws(() => resolveMap({ a: { b: \"->/a\" } }));\n- assert.throws(() => resolveMap({ a: { b: \"->/a.b\" } }));\n- assert.throws(() => resolveMap({ a: \"->b\", b: \"->a\" }));\n+ assert.throws(() => resolveMap({ a: \"@a\" }));\n+ assert.throws(() => resolveMap({ a: { b: \"@b\" } }));\n+ assert.throws(() => resolveMap({ a: { b: \"@/a\" } }));\n+ assert.throws(() => resolveMap({ a: { b: \"@/a/b\" } }));\n+ assert.throws(() => resolveMap({ a: \"@b\", b: \"@a\" }));\n});\nit(\"function refs\", () => {\nassert.deepEqual(\n- resolveMap({ a: (x) => x(\"b.c\") * 10, b: { c: \"->d\", d: \"->/e\" }, e: () => 1 }),\n+ resolveMap({ a: (x) => x(\"b/c\") * 10, b: { c: \"@d\", d: \"@/e\" }, e: () => 1 }),\n{ a: 10, b: { c: 1, d: 1 }, e: 1 }\n);\n- const res = resolveMap({ a: (x) => x(\"b.c\")() * 10, b: { c: \"->d\", d: \"->/e\" }, e: () => () => 1 });\n+ const res = resolveMap({ a: (x) => x(\"b/c\")() * 10, b: { c: \"@d\", d: \"@/e\" }, e: () => () => 1 });\nassert.equal(res.a, 10);\nassert.strictEqual(res.b.c, res.e);\nassert.strictEqual(res.b.d, res.e);\n@@ -61,7 +61,7 @@ describe(\"resolve-map\", () => {\nit(\"function resolves only once\", () => {\nlet n = 0;\nassert.deepEqual(\n- resolveMap({ a: (x) => x(\"b.c\"), b: { c: \"->d\", d: \"->/e\" }, e: () => (n++ , 1) }),\n+ resolveMap({ a: (x) => x(\"b/c\"), b: { c: \"@d\", d: \"@/e\" }, e: () => (n++ , 1) }),\n{ a: 1, b: { c: 1, d: 1 }, e: 1 }\n);\nassert.equal(n, 1);\n",
"new_path": "packages/resolve-map/test/index.ts",
"old_path": "packages/resolve-map/test/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(resolve-map): fix #21
BREAKING CHANGE: update lookup path prefix & separators
- lookup paths now are prefixed with `@` instead of `->`
- all path segments must be separated by `/`
- update readme & tests
| 1
|
refactor
|
resolve-map
|
679,913
|
09.05.2018 07:19:49
| -3,600
|
6e7599ac4b75d19e0a692d0710c158a80b7ffa84
|
docs(resolve-map): update/fix doc strings
|
[
{
"change_type": "MODIFY",
"diff": "@@ -8,45 +8,50 @@ import { getIn, mutIn } from \"@thi.ng/paths\";\nconst SEMAPHORE = Symbol(\"SEMAPHORE\");\n/**\n- * Visits all key-value pairs in depth-first order for given object and\n- * expands any reference values. Cyclic references are not allowed or\n- * checked for and if present will cause a stack overflow error.\n- * However, refs pointing to other refs are recursively resolved (again,\n- * provided there are no cycles).\n+ * Visits all key-value pairs in depth-first order for given object or\n+ * array, expands any reference values, mutates the original object and\n+ * returns it. Cyclic references are not allowed or checked for and if\n+ * present will cause a stack overflow error. However, refs pointing to\n+ * other refs are recursively resolved (again, provided there are no\n+ * cycles).\n*\n* Reference values are special strings representing lookup paths of\n- * other values in the object and are prefixed with `->` for relative\n- * refs or `->/` for absolute refs. Relative refs are resolved from\n- * currently visited object and support \"../\" prefixes to access parent\n- * levels. Absolute refs are always resolved from the root level (the\n- * original object passed to this function). Invalid lookup paths will\n- * throw an error.\n+ * other values in the object and are prefixed with `@` for relative\n+ * refs or `@/` for absolute refs and both using `/` as path separator\n+ * (Note: trailing slashes are NOT allowed!). Relative refs are resolved\n+ * from currently visited object and support \"../\" prefixes to access\n+ * any parent levels. Absolute refs are always resolved from the root\n+ * level (the original object passed to this function).\n*\n- * ```\n- * resolveMap({a: 1, b: {c: \"->d\", d: \"->/a\"} })\n+ * ```ts\n+ * resolveMap({a: 1, b: {c: \"@d\", d: \"@/a\"} })\n* // { a: 1, b: { c: 1, d: 1 } }\n* ```\n*\n* If a value is a function, it is called with a single arg `resolve`, a\n- * function which accepts a path (WITHOUT `->` prefix) to look up other\n- * values. The return value of the user provided function is used as\n- * final value for that key. This mechanism can be used to compute\n- * derived values of other values stored in the object. Function values\n- * will always be called only once. Therefore, in order to associate a\n- * function as value to a key, it needs to be wrapped with an additional\n- * function, as shown for the `e` key in the example below.\n+ * function which accepts a path (**without `@` prefix**) to look up\n+ * other values. The return value of the user provided function is used\n+ * as final value for that key. This mechanism can be used to compute\n+ * derived values of other values stored anywhere in the root object.\n+ * **Function values will always be called only once.** Therefore, in\n+ * order to associate a function as value to a key, it needs to be\n+ * wrapped with an additional function, as shown for the `e` key in the\n+ * example below. Similarly, if an actual string value should happen to\n+ * start with `@`, it needs to be wrapped in a function (see `f` key\n+ * below).\n*\n- * ```\n+ * ```ts\n* // `a` is derived from 1st array element in `b.d`\n* // `b.c` is looked up from `b.d[0]`\n* // `b.d[1]` is derived from calling `e(2)`\n* // `e` is a wrapped function\n* res = resolveMap({\n- * a: (resolve) => resolve(\"b.c\") * 100,\n- * b: { c: \"->d.0\", d: [2, (resolve) => resolve(\"../../e\")(2) ] },\n+ * a: (resolve) => resolve(\"b/c\") * 100,\n+ * b: { c: \"@d/0\", d: [2, (resolve) => resolve(\"../../e\")(2) ] },\n* e: () => (x) => x * 10,\n+ * f: () => \"@foo\",\n* })\n- * // { a: 200, b: { c: 2, d: [ 2, 20 ] }, e: [Function] }\n+ * // { a: 200, b: { c: 2, d: [ 2, 20 ] }, e: [Function], f: \"@foo\" }\n*\n* res.e(2);\n* // 20\n",
"new_path": "packages/resolve-map/src/index.ts",
"old_path": "packages/resolve-map/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
docs(resolve-map): update/fix doc strings
| 1
|
docs
|
resolve-map
|
791,690
|
09.05.2018 10:29:46
| 25,200
|
5e95e346d065f35216321bec5f6df5cc08e233ba
|
core(runner): support multiple output modes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -21,6 +21,7 @@ last-run-results.html\n*.report.html\n*.report.dom.html\n*.report.json\n+*.report.csv\n*.report.pretty\n*.artifacts.log\n",
"new_path": ".gitignore",
"old_path": ".gitignore"
},
{
"change_type": "MODIFY",
"diff": "@@ -70,7 +70,11 @@ if (cliFlags.verbose) {\n}\nlog.setLevel(cliFlags.logLevel);\n-if (cliFlags.output === printer.OutputMode.json && !cliFlags.outputPath) {\n+if (\n+ cliFlags.output.length === 1 &&\n+ cliFlags.output[0] === printer.OutputMode.json &&\n+ !cliFlags.outputPath\n+) {\ncliFlags.outputPath = 'stdout';\n}\n",
"new_path": "lighthouse-cli/bin.js",
"old_path": "lighthouse-cli/bin.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -127,11 +127,12 @@ function getFlags(manualArgv) {\n.array('onlyAudits')\n.array('onlyCategories')\n.array('skipAudits')\n+ .array('output')\n.string('extraHeaders')\n// default values\n.default('chrome-flags', '')\n- .default('output', 'html')\n+ .default('output', ['html'])\n.default('port', 0)\n.default('hostname', 'localhost')\n.check(/** @param {!LH.Flags} argv */ (argv) => {\n",
"new_path": "lighthouse-cli/cli-flags.js",
"old_path": "lighthouse-cli/cli-flags.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -69,26 +69,17 @@ function writeFile(filePath, output, outputMode) {\n}\n/**\n- * Writes the results.\n- * @param {LH.RunnerResult} results\n+ * Writes the output.\n+ * @param {string} output\n* @param {string} mode\n* @param {string} path\n- * @return {Promise<LH.RunnerResult>}\n+ * @return {Promise<void>}\n*/\n-function write(results, mode, path) {\n- return new Promise((resolve, reject) => {\n+async function write(output, mode, path) {\nconst outputPath = checkOutputPath(path);\n- const output = results.report;\n-\n- if (outputPath === 'stdout') {\n- return writeToStdout(output).then(_ => resolve(results));\n- }\n- return writeFile(outputPath, output, mode)\n- .then(_ => {\n- resolve(results);\n- })\n- .catch(err => reject(err));\n- });\n+ return outputPath === 'stdout' ?\n+ writeToStdout(output) :\n+ writeFile(outputPath, output, mode);\n}\n/**\n",
"new_path": "lighthouse-cli/printer.js",
"old_path": "lighthouse-cli/printer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -99,13 +99,12 @@ function handleError(err) {\n* @param {!LH.Flags} flags\n* @return {Promise<void>}\n*/\n-function saveResults(runnerResult, flags) {\n+async function saveResults(runnerResult, flags) {\nconst cwd = process.cwd();\n- let promise = Promise.resolve();\nconst shouldSaveResults = flags.auditMode || (flags.gatherMode === flags.auditMode);\n- if (!shouldSaveResults) return promise;\n- const {lhr, artifacts} = runnerResult;\n+ if (!shouldSaveResults) return;\n+ const {lhr, artifacts, report} = runnerResult;\n// Use the output path as the prefix for all generated files.\n// If no output path is set, generate a file prefix using the URL and date.\n@@ -115,34 +114,26 @@ function saveResults(runnerResult, flags) {\nconst resolvedPath = path.resolve(cwd, configuredPath);\nif (flags.saveAssets) {\n- promise = promise.then(_ => assetSaver.saveAssets(artifacts, lhr.audits, resolvedPath));\n+ await assetSaver.saveAssets(artifacts, lhr.audits, resolvedPath);\n}\n- return promise.then(_ => {\n- if (Array.isArray(flags.output)) {\n- return flags.output.reduce((innerPromise, outputType) => {\n+ for (const outputType of flags.output) {\nconst extension = outputType;\n- const outputPath = `${resolvedPath}.report.${extension}`;\n- return innerPromise.then(() => Printer.write(runnerResult, outputType, outputPath));\n- }, Promise.resolve());\n- } else {\n- const extension = flags.output;\n- const outputPath =\n- flags.outputPath || `${resolvedPath}.report.${extension}`;\n- return Printer.write(runnerResult, flags.output, outputPath).then(_ => {\n- if (flags.output === Printer.OutputMode[Printer.OutputMode.html]) {\n+ const output = report[flags.output.indexOf(outputType)];\n+ let outputPath = `${resolvedPath}.report.${extension}`;\n+ // If there was only a single output and the user specified an outputPath, force usage of it.\n+ if (flags.outputPath && flags.output.length === 1) outputPath = flags.outputPath;\n+ await Printer.write(output, outputType, outputPath);\n+\n+ if (outputType === Printer.OutputMode[Printer.OutputMode.html]) {\nif (flags.view) {\nopn(outputPath, {wait: false});\n} else {\n- log.log(\n- 'CLI',\n// eslint-disable-next-line max-len\n- 'Protip: Run lighthouse with `--view` to immediately open the HTML report in your browser');\n+ log.log('CLI', 'Protip: Run lighthouse with `--view` to immediately open the HTML report in your browser');\n}\n}\n- });\n}\n- });\n}\n/**\n",
"new_path": "lighthouse-cli/run.js",
"old_path": "lighthouse-cli/run.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -25,7 +25,7 @@ describe('Printer', () => {\nit('writes file for results', () => {\nconst path = './.test-file.json';\nconst report = JSON.stringify(sampleResults);\n- return Printer.write({report}, 'json', path).then(_ => {\n+ return Printer.write(report, 'json', path).then(_ => {\nconst fileContents = fs.readFileSync(path, 'utf8');\nassert.ok(/lighthouseVersion/gim.test(fileContents));\nfs.unlinkSync(path);\n@@ -35,7 +35,7 @@ describe('Printer', () => {\nit('throws for invalid paths', () => {\nconst path = '!/#@.json';\nconst report = JSON.stringify(sampleResults);\n- return Printer.write({report}, 'html', path).catch(err => {\n+ return Printer.write(report, 'html', path).catch(err => {\nassert.ok(err.code === 'ENOENT');\n});\n});\n",
"new_path": "lighthouse-cli/test/cli/printer-test.js",
"old_path": "lighthouse-cli/test/cli/printer-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -154,13 +154,15 @@ function cleanFlagsForSettings(flags = {}) {\nreturn settings;\n}\n-function merge(base, extension) {\n+// TODO(phulce): disentangle this merge function\n+function merge(base, extension, overwriteArrays = false) {\n// If the default value doesn't exist or is explicitly null, defer to the extending value\nif (typeof base === 'undefined' || base === null) {\nreturn extension;\n} else if (typeof extension === 'undefined') {\nreturn base;\n} else if (Array.isArray(extension)) {\n+ if (overwriteArrays) return extension;\nif (!Array.isArray(base)) throw new TypeError(`Expected array but got ${typeof base}`);\nconst merged = base.slice();\nextension.forEach(item => {\n@@ -171,7 +173,9 @@ function merge(base, extension) {\n} else if (typeof extension === 'object') {\nif (typeof base !== 'object') throw new TypeError(`Expected object but got ${typeof base}`);\nObject.keys(extension).forEach(key => {\n- base[key] = merge(base[key], extension[key]);\n+ const localOverwriteArrays = overwriteArrays ||\n+ (key === 'settings' && typeof base[key] === 'object');\n+ base[key] = merge(base[key], extension[key], localOverwriteArrays);\n});\nreturn base;\n}\n@@ -241,7 +245,7 @@ class Config {\nconfigJSON.passes = Config.expandGathererShorthandAndMergeOptions(configJSON.passes);\n// Override any applicable settings with CLI flags\n- configJSON.settings = merge(configJSON.settings || {}, cleanFlagsForSettings(flags));\n+ configJSON.settings = merge(configJSON.settings || {}, cleanFlagsForSettings(flags), true);\n// Generate a limited config if specified\nif (Array.isArray(configJSON.settings.onlyCategories) ||\n@@ -301,7 +305,7 @@ class Config {\n*/\nstatic augmentWithDefaults(config) {\nconst {defaultSettings, defaultPassConfig} = constants;\n- config.settings = merge(deepClone(defaultSettings), config.settings);\n+ config.settings = merge(deepClone(defaultSettings), config.settings, true);\nif (config.passes) {\nconfig.passes = config.passes.map(pass => merge(deepClone(defaultPassConfig), pass));\n}\n",
"new_path": "lighthouse-core/config/config.js",
"old_path": "lighthouse-core/config/config.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -88,10 +88,14 @@ class ReportGenerator {\n/**\n* Creates the results output in a format based on the `mode`.\n* @param {LH.Result} lhr\n- * @param {'json'|'html'|'csv'} outputMode\n- * @return {string}\n+ * @param {LH.Config.Settings['output']} outputModes\n+ * @return {string|string[]}\n*/\n- static generateReport(lhr, outputMode) {\n+ static generateReport(lhr, outputModes) {\n+ const outputAsArray = Array.isArray(outputModes);\n+ if (typeof outputModes === 'string') outputModes = [outputModes];\n+\n+ const output = outputModes.map(outputMode => {\n// HTML report.\nif (outputMode === 'html') {\nreturn ReportGenerator.generateReportHtml(lhr);\n@@ -106,6 +110,9 @@ class ReportGenerator {\n}\nthrow new Error('Invalid output mode: ' + outputMode);\n+ });\n+\n+ return outputAsArray ? output : output[0];\n}\n}\n",
"new_path": "lighthouse-core/report/report-generator.js",
"old_path": "lighthouse-core/report/report-generator.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -436,6 +436,11 @@ describe('Config', () => {\nassert.ok(config.settings.nonsense === undefined, 'did not cleanup settings');\n});\n+ it('allows overriding of array-typed settings', () => {\n+ const config = new Config({extends: true}, {output: ['html']});\n+ assert.deepStrictEqual(config.settings.output, ['html']);\n+ });\n+\nit('extends the full config', () => {\nclass CustomAudit extends Audit {\nstatic get meta() {\n",
"new_path": "lighthouse-core/test/config/config-test.js",
"old_path": "lighthouse-core/test/config/config-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -114,4 +114,11 @@ describe('ReportGenerator', () => {\nassert.ok(outputCheck.test(htmlOutput));\n});\n});\n+\n+ it('handles array of outputs', () => {\n+ const [json, html] = ReportGenerator.generateReport(sampleResults, ['json', 'html']);\n+ assert.doesNotThrow(_ => JSON.parse(json));\n+ assert.ok(/<!doctype/gim.test(html));\n+ assert.ok(/<html lang=\"en\"/gim.test(html));\n+ });\n});\n",
"new_path": "lighthouse-core/test/report/report-generator-test.js",
"old_path": "lighthouse-core/test/report/report-generator-test.js"
},
{
"change_type": "MODIFY",
"diff": "}\n},\n\"configSettings\": {\n- \"output\": \"json\",\n+ \"output\": [\n+ \"json\"\n+ ],\n\"maxWaitForLoad\": 45000,\n\"throttlingMethod\": \"devtools\",\n\"throttling\": {\n",
"new_path": "lighthouse-core/test/results/sample_v2.json",
"old_path": "lighthouse-core/test/results/sample_v2.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -543,4 +543,21 @@ describe('Runner', () => {\n]);\n});\n});\n+\n+ it('can handle array of outputs', async () => {\n+ const url = 'https://example.com';\n+ const config = new Config({\n+ extends: 'lighthouse:default',\n+ settings: {\n+ onlyCategories: ['performance'],\n+ output: ['json', 'html'],\n+ },\n+ });\n+\n+ const results = await Runner.run(null, {url, config, driverMock});\n+ assert.ok(Array.isArray(results.report) && results.report.length === 2,\n+ 'did not return multiple reports');\n+ assert.ok(JSON.parse(results.report[0]), 'did not return json output');\n+ assert.ok(/<!doctype/.test(results.report[1]), 'did not return html output');\n+ });\n});\n",
"new_path": "lighthouse-core/test/runner-test.js",
"old_path": "lighthouse-core/test/runner-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -47,8 +47,10 @@ declare global {\ncpuSlowdownMultiplier?: number\n}\n+ export type OutputMode = 'json' | 'html' | 'csv';\n+\ninterface SharedFlagsSettings {\n- output?: 'json' | 'html' | 'csv';\n+ output?: OutputMode|OutputMode[];\nmaxWaitForLoad?: number;\nblockedUrlPatterns?: string[] | null;\nadditionalTraceCategories?: string | null;\n@@ -88,7 +90,7 @@ declare global {\nexport interface RunnerResult {\nlhr: Result;\n- report: string;\n+ report: string|string[];\nartifacts: Artifacts;\n}\n",
"new_path": "typings/externs.d.ts",
"old_path": "typings/externs.d.ts"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(runner): support multiple output modes (#5154)
| 1
|
core
|
runner
|
791,690
|
09.05.2018 10:34:02
| 25,200
|
5a92d7cb187ab5bcb435cc1c2eaf80fd47d85199
|
extension: add checkbox for using Lantern/DevTools throttling
|
[
{
"change_type": "MODIFY",
"diff": "@@ -22,6 +22,16 @@ Unless required by applicable law or agreed to in writing, software distributed\n<div class=\"header-titles\">\n<h1 class=\"header-titles__main\">Lighthouse</h1>\n<h2 class=\"header-titles__url\">...</h2>\n+ <div class=\"header-titles__throttling\">\n+ <label for=\"lantern-checkbox\">\n+ <input\n+ id=\"lantern-checkbox\"\n+ type=\"checkbox\"\n+ checked />\n+ Simulate throttling for performance audits (faster)\n+ <span class=\"header-titles__new-adornment\">NEW!</span>\n+ </label>\n+ </div>\n</div>\n</header>\n",
"new_path": "lighthouse-extension/app/popup.html",
"old_path": "lighthouse-extension/app/popup.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -144,7 +144,7 @@ window.createReportPageAsBlob = function(runnerResult) {\n/**\n* Save currently selected set of category categories to local storage.\n- * @param {{selectedCategories: !Array<string>, disableExtensions: boolean}} settings\n+ * @param {{selectedCategories: !Array<string>, disableExtensions: boolean, useDevTools: boolean}} settings\n*/\nwindow.saveSettings = function(settings) {\nconst storage = {\n@@ -161,13 +161,16 @@ window.saveSettings = function(settings) {\ndisableExtensionsDuringRun = settings.disableExtensions;\nstorage[SETTINGS_KEY].disableExtensions = disableExtensionsDuringRun;\n+ // Stash throttling setting.\n+ storage[SETTINGS_KEY].useDevTools = settings.useDevTools;\n+\n// Save object to chrome local storage.\nchrome.storage.local.set(storage);\n};\n/**\n* Load selected category categories from local storage.\n- * @return {!Promise<{selectedCategories: !Object<boolean>, disableExtensions: boolean}>}\n+ * @return {!Promise<{selectedCategories: !Array<string>, disableExtensions: boolean, useDevTools: boolean}>}\n*/\nwindow.loadSettings = function() {\nreturn new Promise(resolve => {\n@@ -186,12 +189,14 @@ window.loadSettings = function() {\nconst savedCategories = Object.assign(defaultCategories, result[STORAGE_KEY]);\nconst defaultSettings = {\n+ useDevTools: false,\ndisableExtensions: disableExtensionsDuringRun,\n};\nconst savedSettings = Object.assign(defaultSettings, result[SETTINGS_KEY]);\nresolve({\n- selectedCategories: savedCategories,\n+ useDevTools: savedSettings.useDevTools,\n+ selectedCategories: Object.keys(savedCategories).filter(cat => savedCategories[cat]),\ndisableExtensions: savedSettings.disableExtensions,\n});\n});\n",
"new_path": "lighthouse-extension/app/src/lighthouse-ext-background.js",
"old_path": "lighthouse-extension/app/src/lighthouse-ext-background.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -115,20 +115,20 @@ function createOptionItem(text, id, isChecked) {\n/**\n* Click event handler for Generate Report button.\n* @param {!Window} background Reference to the extension's background page.\n- * @param {!Object<boolean>} selectedCategories\n+ * @param {{selectedCategories: !Object<boolean>, useDevTools: boolean}} settings\n*/\n-function onGenerateReportButtonClick(background, selectedCategories) {\n+function onGenerateReportButtonClick(background, settings) {\nshowRunningSubpage();\nconst feedbackEl = document.querySelector('.feedback');\nfeedbackEl.textContent = '';\n- const categoryIDs = Object.keys(selectedCategories)\n- .filter(key => !!selectedCategories[key]);\n+ const {selectedCategories, useDevTools} = settings;\nbackground.runLighthouseInExtension({\nrestoreCleanState: true,\n- }, categoryIDs).catch(err => {\n+ flags: {throttlingMethod: useDevTools ? 'devtools' : 'simulate'},\n+ }, selectedCategories).catch(err => {\nlet message = err.message;\nlet includeReportLink = true;\n@@ -158,13 +158,13 @@ function onGenerateReportButtonClick(background, selectedCategories) {\n* Generates a document fragment containing a list of checkboxes and labels\n* for the categories.\n* @param {!Window} background Reference to the extension's background page.\n- * @param {!Object<boolean>} selectedCategories\n+ * @param {!Array<string>} selectedCategories\n*/\nfunction generateOptionsList(background, selectedCategories) {\nconst frag = document.createDocumentFragment();\nbackground.getDefaultCategories().forEach(category => {\n- const isChecked = selectedCategories[category.id];\n+ const isChecked = selectedCategories.includes(category.id);\nfrag.appendChild(createOptionItem(category.name, category.id, isChecked));\n});\n@@ -194,13 +194,22 @@ function initPopup() {\nbackground.loadSettings().then(settings => {\ngenerateOptionsList(background, settings.selectedCategories);\ndocument.querySelector('.setting-disable-extensions').checked = settings.disableExtensions;\n+ document.querySelector('#lantern-checkbox').checked = !settings.useDevTools;\n+ });\n+\n+ // bind throttling control button\n+ const lanternCheckbox = document.getElementById('lantern-checkbox');\n+ lanternCheckbox.addEventListener('change', async () => {\n+ const settings = await background.loadSettings();\n+ settings.useDevTools = !lanternCheckbox.checked;\n+ background.saveSettings(settings);\n});\n// bind Generate Report button\nconst generateReportButton = document.getElementById('generate-report');\ngenerateReportButton.addEventListener('click', () => {\nbackground.loadSettings().then(settings => {\n- onGenerateReportButtonClick(background, settings.selectedCategories);\n+ onGenerateReportButtonClick(background, settings);\n});\n});\n@@ -219,7 +228,11 @@ function initPopup() {\n.map(input => input.value);\nconst disableExtensions = document.querySelector('.setting-disable-extensions').checked;\n- background.saveSettings({selectedCategories, disableExtensions});\n+ background.saveSettings({\n+ useDevTools: !lanternCheckbox.checked,\n+ selectedCategories,\n+ disableExtensions,\n+ });\noptionsEl.classList.remove(subpageVisibleClass);\n});\n",
"new_path": "lighthouse-extension/app/src/popup.js",
"old_path": "lighthouse-extension/app/src/popup.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -76,6 +76,22 @@ html, body {\ntext-overflow: ellipsis;\n}\n+.header-titles__throttling {\n+ position: relative;\n+ margin-top: 5px;\n+ padding-left: 20px;\n+}\n+\n+.header-titles__throttling input {\n+ position: absolute;\n+ left: 0;\n+}\n+\n+.header-titles__new-adornment {\n+ color: coral;\n+ font-weight: bold;\n+}\n+\n.main {\nheight: 70px;\ndisplay: flex;\n",
"new_path": "lighthouse-extension/app/styles/lighthouse.css",
"old_path": "lighthouse-extension/app/styles/lighthouse.css"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
extension: add checkbox for using Lantern/DevTools throttling (#5156)
| 1
|
extension
| null |
217,922
|
09.05.2018 15:12:35
| -7,200
|
e856697cdf3986c7c63324ca50b9f3fea8cb140f
|
chore: remove useless console.log calls
|
[
{
"change_type": "MODIFY",
"diff": "@@ -134,7 +134,6 @@ export class PermissionsPopupComponent {\n}\nsave(): void {\n- console.log(this.registry);\nthis.saving = true;\nconst usersSharedDeletions: string[] = [];\nconst usersSharedAdditions: string[] = [];\n",
"new_path": "src/app/modules/common-components/permissions-popup/permissions-popup.component.ts",
"old_path": "src/app/modules/common-components/permissions-popup/permissions-popup.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -298,7 +298,7 @@ export class ItemComponent extends ComponentWithSubscriptions implements OnInit,\nsuper();\nthis.rotations$ = this.userService.getUserData().mergeMap(user => {\nreturn this.rotationsService.getUserRotations(user.$key);\n- }).publishReplay(1).refCount().do(console.log);\n+ }).publishReplay(1).refCount();\n}\nisDraft(): boolean {\n",
"new_path": "src/app/modules/item/item/item.component.ts",
"old_path": "src/app/modules/item/item/item.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore: remove useless console.log calls
| 1
|
chore
| null |
217,922
|
09.05.2018 16:40:45
| -7,200
|
a96a51c86b7239cf74dc374d6a1696efd65bd543
|
perf: improved display performances on large lists
|
[
{
"change_type": "MODIFY",
"diff": "(click)=\"toggleAlarm(timer.itemId, timer.type)\"\nmatTooltip=\"{{timer?.zoneId | placeName | i18n}} - {{timer?.areaId | placeName | i18n}}\"\nmatTooltipPosition=\"above\">\n- <mat-icon *ngIf=\"!hasAlarm(timer.itemId)\">alarm_add</mat-icon>\n- <mat-icon *ngIf=\"hasAlarm(timer.itemId)\">alarm_on</mat-icon>\n+ <mat-icon *ngIf=\"!hasAlarm[timer.itemId]\">alarm_add</mat-icon>\n+ <mat-icon *ngIf=\"hasAlarm[timer.itemId]\">alarm_on</mat-icon>\n{{timer?.display}} <span *ngIf=\"timer?.slot as slot\">({{slot}})</span>\n<img src=\"{{getTimerIcon(timer.type)}}\" alt=\"\" class=\"type-icon\" *ngIf=\"timer.type > -1\">\n</button>\n<span>{{timer?.zoneId | placeName | i18n}} - {{timer?.areaId | placeName | i18n}}</span><br>\n<button mat-raised-button [color]=\"getTimerColor(timer.alarm) | async\"\n(click)=\"toggleAlarm(timer.itemId)\">\n- <mat-icon *ngIf=\"!hasAlarm(timer.itemId)\">alarm_add</mat-icon>\n- <mat-icon *ngIf=\"hasAlarm(timer.itemId)\">alarm_on</mat-icon>\n+ <mat-icon *ngIf=\"!hasAlarm[timer.itemId]\">alarm_add</mat-icon>\n+ <mat-icon *ngIf=\"hasAlarm[timer.itemId]\">alarm_on</mat-icon>\n{{timer?.display}} <span *ngIf=\"timer?.slot as slot\">({{slot}})</span>\n<img src=\"{{getTimerIcon(timer.type)}}\" alt=\"\" class=\"type-icon\" *ngIf=\"timer.type > -1\">\n</button>\n",
"new_path": "src/app/modules/item/item/item.component.html",
"old_path": "src/app/modules/item/item/item.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -281,6 +281,8 @@ export class ItemComponent extends ComponentWithSubscriptions implements OnInit,\nrotations$: Observable<CraftingRotation[]>;\n+ hasAlarm: { [index: number]: boolean } = {};\n+\nconstructor(private i18n: I18nToolsService,\nprivate dialog: MatDialog,\nprivate media: ObservableMedia,\n@@ -336,13 +338,6 @@ export class ItemComponent extends ComponentWithSubscriptions implements OnInit,\n}\nngOnInit(): void {\n- this.updateCanBeCrafted();\n- this.updateTradeIcon();\n- this.updateHasTimers();\n- this.updateMasterBooks();\n- this.updateTimers();\n- this.updateHasBook();\n- this.updateRequiredForEndCraft();\nif (this.item.workingOnIt !== undefined) {\nthis.userService.get(this.item.workingOnIt)\n.mergeMap(user => this.dataService.getCharacter(user.lodestoneId)).first().subscribe(char => {\n@@ -420,7 +415,7 @@ export class ItemComponent extends ComponentWithSubscriptions implements OnInit,\nreturn 'accent';\n}\nreturn '';\n- })\n+ });\n}\nupdateCanBeCrafted(): void {\n@@ -455,8 +450,8 @@ export class ItemComponent extends ComponentWithSubscriptions implements OnInit,\n}\n}\n- public hasAlarm(itemId: number): boolean {\n- return this.alarmService.hasAlarm(itemId);\n+ updateHasAlarm(itemId): void {\n+ this.hasAlarm[itemId] = this.alarmService.hasAlarm(itemId);\n}\nupdateHasTimers(): void {\n@@ -540,7 +535,8 @@ export class ItemComponent extends ComponentWithSubscriptions implements OnInit,\npublic updateTimers(): void {\nif (this.hasTimers) {\n- this.timers = this.alarmService.getTimers(this.item);\n+ this.timers = this.alarmService.getTimers(this.item)\n+ .do(timers => timers.forEach(timer => this.updateHasAlarm(timer.itemId)));\n}\n}\n",
"new_path": "src/app/modules/item/item/item.component.ts",
"old_path": "src/app/modules/item/item/item.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
perf: improved display performances on large lists
| 1
|
perf
| null |
730,429
|
09.05.2018 17:33:14
| 14,400
|
c95e2a1c51e9c1b303925a622a09237e4e736cd7
|
feat(spaces-list): remove unused currentUser prop
|
[
{
"change_type": "MODIFY",
"diff": "@@ -6,9 +6,6 @@ import SpaceItem from '@ciscospark/react-component-space-item';\nconst propTypes = {\nactiveSpaceId: PropTypes.string,\n- currentUser: PropTypes.shape({\n- id: PropTypes.string.isRequired\n- }).isRequired,\nhasCalling: PropTypes.bool,\nonCallClick: PropTypes.func,\nonClick: PropTypes.func,\n@@ -46,7 +43,6 @@ const defaultProps = {\nexport default function SpacesList({\nactiveSpaceId,\n- currentUser,\nhasCalling,\nonCallClick,\nonClick,\n@@ -55,7 +51,6 @@ export default function SpacesList({\nconst recents = [];\nspaces.forEach((space) => recents.push(<SpaceItem\nactive={space.id === activeSpaceId}\n- currentUser={currentUser}\nhasCalling={hasCalling}\nkey={space.id}\nonCallClick={onCallClick}\n",
"new_path": "packages/node_modules/@ciscospark/react-component-spaces-list/src/index.js",
"old_path": "packages/node_modules/@ciscospark/react-component-spaces-list/src/index.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
feat(spaces-list): remove unused currentUser prop
| 1
|
feat
|
spaces-list
|
217,922
|
09.05.2018 18:25:26
| -7,200
|
c87285ea4963b8005d8b19c57c5ad943329c28ea
|
fix: byregot's brow can now only be used with 2 or more Inner Quiet stacks
|
[
{
"change_type": "MODIFY",
"diff": "@@ -4,6 +4,9 @@ import {Buff} from '../../buff.enum';\nexport class ByregotsBrow extends ByregotsBlessing {\n+ canBeUsed(simulation: Simulation): boolean {\n+ return super.canBeUsed(simulation) && simulation.getBuff(Buff.INNER_QUIET).stacks >= 2;\n+ }\ngetBaseCPCost(simulationState: Simulation): number {\nreturn 18;\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"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix: byregot's brow can now only be used with 2 or more Inner Quiet stacks
| 1
|
fix
| null |
730,429
|
09.05.2018 18:49:44
| 14,400
|
c50840d3801dacff04d9ac204dbdec3e7b8d829e
|
feat(spaces-list): use react-virtualized for rendering list
|
[
{
"change_type": "MODIFY",
"diff": "\"react-redux\": \"^5.0.1\",\n\"react-syntax-highlighter\": \"^6.0.2\",\n\"react-tap-event-plugin\": \"^3.0.0\",\n+ \"react-virtualized\": \"^9.18.5\",\n\"recompose\": \"^0.26.0\",\n\"redux\": \"^3.6.0\",\n\"redux-logger\": \"^3.0.1\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n+import {AutoSizer, List} from 'react-virtualized';\n+import 'react-virtualized/styles.css';\nimport SpaceItem from '@ciscospark/react-component-space-item';\n+import Spinner from '@ciscospark/react-component-spinner';\nconst propTypes = {\nactiveSpaceId: PropTypes.string,\nhasCalling: PropTypes.bool,\n+ isLoadingMore: PropTypes.bool,\nonCallClick: PropTypes.func,\nonClick: PropTypes.func,\n- spaces: PropTypes.oneOfType([\n- PropTypes.arrayOf(\n+ spaces: PropTypes.arrayOf(\nPropTypes.shape({\navatarUrl: PropTypes.string,\nactivityText: PropTypes.oneOfType([\n@@ -27,15 +30,13 @@ const propTypes = {\nteamName: PropTypes.string,\ntype: PropTypes.string\n})\n- ),\n- // Can accept an object that can iterated with `forEach`\n- PropTypes.object\n- ])\n+ )\n};\nconst defaultProps = {\nactiveSpaceId: '',\nhasCalling: false,\n+ isLoadingMore: false,\nonCallClick: () => {},\nonClick: () => {},\nspaces: []\n@@ -44,23 +45,56 @@ const defaultProps = {\nexport default function SpacesList({\nactiveSpaceId,\nhasCalling,\n+ isLoadingMore,\nonCallClick,\nonClick,\nspaces\n}) {\n- const recents = [];\n- spaces.forEach((space) => recents.push(<SpaceItem\n+ function rowRenderer(options) {\n+ const {\n+ key,\n+ index,\n+ style\n+ } = options;\n+ if (index >= spaces.length) {\n+ return (\n+ <div key={key} style={style}>\n+ <Spinner bright />\n+ </div>\n+ );\n+ }\n+ const space = spaces[index];\n+\n+ return (\n+ <div className={classNames(`ciscospark-spaces-list-item-${index}`)} key={key} style={style}>\n+ <SpaceItem\nactive={space.id === activeSpaceId}\nhasCalling={hasCalling}\n- key={space.id}\n+ key={key}\nonCallClick={onCallClick}\nonClick={onClick}\n{...space}\n- />));\n+ />\n+ </div>\n+ );\n+ }\n+\n+ const rowCount = isLoadingMore ? spaces.length + 1 : spaces.length;\nreturn (\n- <div className={classNames('ciscospark-spaces-list')}>\n- {recents}\n+ <div style={{height: '100%', width: '100%'}}>\n+ <AutoSizer>\n+ {({height, width}) => (\n+ <List\n+ className=\"ciscospark-spaces-list\"\n+ height={height}\n+ rowCount={rowCount}\n+ rowHeight={70}\n+ rowRenderer={rowRenderer}\n+ width={width}\n+ />\n+ )}\n+ </AutoSizer>\n</div>\n);\n}\n",
"new_path": "packages/node_modules/@ciscospark/react-component-spaces-list/src/index.js",
"old_path": "packages/node_modules/@ciscospark/react-component-spaces-list/src/index.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
feat(spaces-list): use react-virtualized for rendering list
| 1
|
feat
|
spaces-list
|
730,429
|
09.05.2018 18:50:08
| 14,400
|
a672ef855a012b58c1f740719a74e1b32a216855
|
feat(widget-recents): use updated spaces list
|
[
{
"change_type": "MODIFY",
"diff": "export const UPDATE_STATUS = 'widget-recents/UPDATE_STATUS';\n-export const UPDATE_VISIBILITY_COUNT = 'widget-recents/UPDATE_VISIBILITY_COUNT';\n-\nexport function updateWidgetStatus(status) {\nreturn {\n@@ -10,12 +8,3 @@ export function updateWidgetStatus(status) {\n}\n};\n}\n-\n-export function updateVisibilityCount(count) {\n- return {\n- type: UPDATE_VISIBILITY_COUNT,\n- payload: {\n- count\n- }\n- };\n-}\n",
"new_path": "packages/node_modules/@ciscospark/widget-recents/src/actions.js",
"old_path": "packages/node_modules/@ciscospark/widget-recents/src/actions.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -29,17 +29,13 @@ import {fetchTeams} from '@ciscospark/redux-module-teams';\nimport {events as metricEvents} from '@ciscospark/react-redux-spark-metrics';\nimport LoadingScreen from '@ciscospark/react-component-loading-screen';\n-import Spinner from '@ciscospark/react-component-spinner';\nimport ErrorDisplay from '@ciscospark/react-component-error-display';\nimport CallDataActivityMessage from '@ciscospark/react-component-call-data-activity';\nimport SpacesList from '@ciscospark/react-component-spaces-list';\nimport messages from './messages';\nimport getRecentsWidgetProps from './selector';\n-import {\n- updateWidgetStatus,\n- updateVisibilityCount\n-} from './actions';\n+import {updateWidgetStatus} from './actions';\nimport styles from './styles.css';\nimport {\n@@ -59,7 +55,7 @@ const injectedPropTypes = {\nmercuryStatus: PropTypes.object.isRequired,\nmetrics: PropTypes.object.isRequired,\nspaces: PropTypes.object.isRequired,\n- spacesList: PropTypes.object.isRequired,\n+ spacesList: PropTypes.array.isRequired,\nsparkInstance: PropTypes.object,\nsparkState: PropTypes.object.isRequired,\nusers: PropTypes.object.isRequired,\n@@ -80,7 +76,6 @@ const injectedPropTypes = {\nremoveSpace: PropTypes.func.isRequired,\nupdateSpaceRead: PropTypes.func.isRequired,\nupdateSpaceWithActivity: PropTypes.func.isRequired,\n- updateVisibilityCount: PropTypes.func.isRequired,\nupdateWidgetStatus: PropTypes.func.isRequired\n};\n@@ -230,7 +225,7 @@ export class RecentsWidget extends Component {\n@autobind\ngetSpaceFromCall(call) {\n- return this.props.spacesList.get(call.instance.locus.conversationUrl.split('/').pop());\n+ return this.props.spaces.get(call.instance.locus.conversationUrl.split('/').pop());\n}\n@autobind\n@@ -289,14 +284,6 @@ export class RecentsWidget extends Component {\n}\n}\n- @autobind\n- handleShowMoreSpaces() {\n- const {\n- widgetRecents\n- } = this.props;\n- this.props.updateVisibilityCount(widgetRecents.visibilityCount + 15);\n- }\n-\n@autobind\nhandleNewActivity(activity) {\nconst {\n@@ -305,7 +292,7 @@ export class RecentsWidget extends Component {\n} = this;\nconst {\nsparkInstance,\n- spacesList\n+ spaces\n} = props;\nlet spaceId = activity.target && activity.target.id;\n@@ -320,7 +307,7 @@ export class RecentsWidget extends Component {\nspaceId = activity.object.id;\n}\n- const space = spacesList.get(spaceId);\n+ const space = spaces.get(spaceId);\nif (space) {\nprocessActivity(activity, space);\n@@ -436,10 +423,10 @@ export class RecentsWidget extends Component {\n} = this;\nconst {\nhasGroupCalling,\n- spacesList\n+ spaces\n} = props;\n- const space = spacesList.get(call.locus.conversationUrl.split('/').pop());\n+ const space = spaces.get(call.locus.conversationUrl.split('/').pop());\n// Only provide event if the call is direct\nif (hasGroupCalling || space.type === 'direct') {\ncall.acknowledge()\n@@ -467,13 +454,13 @@ export class RecentsWidget extends Component {\n@autobind\nhandleSpaceClick(spaceId) {\n- const space = this.props.spacesList.get(spaceId);\n+ const space = this.props.spaces.get(spaceId);\nthis.handleEvent(eventNames.SPACES_SELECTED, constructRoomsEventData(space));\n}\n@autobind\nhandleSpaceCallClick(spaceId) {\n- const space = this.props.spacesList.get(spaceId);\n+ const space = this.props.spaces.get(spaceId);\nconst roomData = constructRoomsEventData(space);\nthis.handleEvent(eventNames.SPACES_SELECTED, {\naction: eventNames.ACTION_CALL,\n@@ -567,20 +554,13 @@ export class RecentsWidget extends Component {\nhasGroupCalling,\nmedia,\nspacesList,\n- spaces,\ncurrentUser,\n- widgetRecents,\nwidgetStatus\n} = props;\nconst {formatMessage} = props.intl;\nconst isFetchingSpaces = widgetStatus.isFetchingRecentSpaces;\nconst hasFetchedSpaces = widgetStatus.hasFetchedRecentSpaces;\n- const hasMoreSpaces = spacesList.count() < spaces.count();\n- const isShowingMoreSpaces = widgetRecents.visibilityCount > spaces.count();\n- const showLoader = isFetchingSpaces && isShowingMoreSpaces;\n- const showMoreButton = (isFetchingSpaces || hasMoreSpaces) && !isShowingMoreSpaces;\n-\nlet displaySubtitle, displayTitle, temporary, widgetError;\nif (errors.get('hasError')) {\nwidgetError = errors.get('errors').first();\n@@ -618,24 +598,11 @@ export class RecentsWidget extends Component {\ncurrentUser={currentUser}\nformatMessage={formatMessage}\nhasCalling={hasGroupCalling}\n+ isLoadingMore={isFetchingSpaces}\nonCallClick={handleCallClick}\nonClick={this.handleSpaceClick}\nspaces={spacesListWithActivityText}\n/>\n- {\n- showMoreButton &&\n- <div className={styles.loadMoreContainer}>\n- <button className={styles.loadMoreButton} onClick={this.handleShowMoreSpaces}>\n- {formatMessage(messages.viewOlderSpacesButtonLabel)}\n- </button>\n- </div>\n- }\n- {\n- showLoader &&\n- <div className={styles.spinner}>\n- <Spinner bright />\n- </div>\n- }\n</div>\n</div>\n);\n@@ -684,7 +651,6 @@ export default connect(\nupdateSpaceRead,\nupdateSpaceWithActivity,\nstoreActivities,\n- updateVisibilityCount,\nupdateWidgetStatus\n}, dispatch)\n)(RecentsWidget);\n",
"new_path": "packages/node_modules/@ciscospark/widget-recents/src/container.js",
"old_path": "packages/node_modules/@ciscospark/widget-recents/src/container.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -10,10 +10,7 @@ import teams from '@ciscospark/redux-module-teams';\nimport avatar from '@ciscospark/redux-module-avatar';\nimport activities from '@ciscospark/redux-module-activities';\n-import {\n- UPDATE_STATUS,\n- UPDATE_VISIBILITY_COUNT\n-} from './actions';\n+import {UPDATE_STATUS} from './actions';\nconst Status = Record({\nisFetchingRecentSpaces: false,\n@@ -31,7 +28,6 @@ const Status = Record({\nconst RecentsWidget = Record({\nincomingCall: null,\n- visibilityCount: 15,\nstatus: new Status()\n});\n@@ -42,9 +38,6 @@ export function reducer(state = new RecentsWidget(), action) {\ncase UPDATE_STATUS:\nreturn state.mergeIn(['status'], action.payload.status);\n- case UPDATE_VISIBILITY_COUNT:\n- return state.set('visibilityCount', action.payload.count);\n-\ndefault:\nreturn state;\n}\n",
"new_path": "packages/node_modules/@ciscospark/widget-recents/src/reducer.js",
"old_path": "packages/node_modules/@ciscospark/widget-recents/src/reducer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -82,13 +82,11 @@ const getIncomingCall = createSelector(\n);\nconst getRecentSpaces = createSelector(\n- [getSpaces, getActivities, getCurrentUser, getUsers, getTeams, getWidget],\n- (spaces, activities, currentUser, users, teams, widget) => {\n- const {visibilityCount} = widget;\n+ [getSpaces, getActivities, getCurrentUser, getUsers, getTeams],\n+ (spaces, activities, currentUser, users, teams) => {\nlet recents = new OrderedMap();\n- let count = 0;\n- spaces.toOrderedMap().sortBy(sortByNewest).some((space) => {\n+ spaces.toOrderedMap().sortBy(sortByNewest).forEach((space) => {\nif (!space.isHidden && !space.isFetching) {\nconst spaceId = space.id;\nconst team = teams.get(space.team);\n@@ -115,12 +113,7 @@ const getRecentSpaces = createSelector(\n}\nrecents = recents.set(spaceId, constructedSpace);\n- count += 1;\n}\n- if (count >= visibilityCount) {\n- return true;\n- }\n- return false;\n});\nreturn recents;\n}\n@@ -177,6 +170,7 @@ const getRecentsWidgetProps = createSelector(\nif (spacesList && spacesList.count()) {\nlastActivityDate = spacesList.last().lastActivityTimestamp;\n}\n+ const spacesListArray = spacesList.toArray();\nconst hasGroupCalling = features.getIn(['items', FEATURE_GROUP_CALLING]);\nreturn {\nwidgetStatus: widget.get('status').toJS(),\n@@ -184,7 +178,7 @@ const getRecentsWidgetProps = createSelector(\nsparkInstance: spark.get('spark'),\nwidgetRecents: widget,\nspaces,\n- spacesList,\n+ spacesList: spacesListArray,\nhasGroupCalling,\nlastActivityDate,\nincomingCall,\n",
"new_path": "packages/node_modules/@ciscospark/widget-recents/src/selector.js",
"old_path": "packages/node_modules/@ciscospark/widget-recents/src/selector.js"
},
{
"change_type": "MODIFY",
"diff": ".spacesListWrapper {\nheight: 100%;\n+ width: 100%;\noverflow: auto;\nfont-family: CiscoSans, 'Helvetica Neue', Arial, sans-serif;\nfont-size: 16px;\nbackground: #fff;\n}\n-.spinner {\n- position: relative;\n- padding: 10px 0 40px;\n-}\n-\n.errorWrapper {\nposition: absolute;\nz-index: 1000;\n",
"new_path": "packages/node_modules/@ciscospark/widget-recents/src/styles.css",
"old_path": "packages/node_modules/@ciscospark/widget-recents/src/styles.css"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
feat(widget-recents): use updated spaces list
| 1
|
feat
|
widget-recents
|
217,922
|
09.05.2018 20:20:10
| -7,200
|
40ddb37c0a9a98745acb113511fea5969d4bd253
|
feat(simulator): food names are now sorted alphabetically, hq first
|
[
{
"change_type": "MODIFY",
"diff": "@@ -33,6 +33,7 @@ import {LocalizedDataService} from '../../../../core/data/localized-data.service\nimport {TranslateService} from '@ngx-translate/core';\nimport {Language} from 'app/core/data/language';\nimport {ConsumablesService} from 'app/pages/simulator/model/consumables.service';\n+import {I18nToolsService} from '../../../../core/tools/i18n-tools.service';\n@Component({\nselector: 'app-simulator',\n@@ -140,10 +141,20 @@ export class SimulatorComponent implements OnInit, OnDestroy {\nconstructor(private registry: CraftingActionsRegistry, private media: ObservableMedia, private userService: UserService,\nprivate dataService: DataService, private htmlTools: HtmlToolsService, private dialog: MatDialog,\nprivate pendingChanges: PendingChangesService, private localizedDataService: LocalizedDataService,\n- private translate: TranslateService, consumablesService: ConsumablesService) {\n+ private translate: TranslateService, consumablesService: ConsumablesService, i18nTools: I18nToolsService) {\n- this.foods = consumablesService.fromData(foods).reverse();\n- this.medicines = consumablesService.fromData(medicines).reverse();\n+ this.foods = consumablesService.fromData(foods)\n+ .sort((a, b) => {\n+ const aName = i18nTools.getName(this.localizedDataService.getItem(a.itemId));\n+ const bName = i18nTools.getName(this.localizedDataService.getItem(b.itemId));\n+ return aName > bName || !a.hq ? 1 : -1;\n+ });\n+ this.medicines = consumablesService.fromData(medicines)\n+ .sort((a, b) => {\n+ const aName = i18nTools.getName(this.localizedDataService.getItem(a.itemId));\n+ const bName = i18nTools.getName(this.localizedDataService.getItem(b.itemId));\n+ return aName > bName || !a.hq ? 1 : -1;\n+ });\nthis.actions$.subscribe(actions => {\nthis.dirty = false;\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
|
feat(simulator): food names are now sorted alphabetically, hq first
| 1
|
feat
|
simulator
|
791,690
|
09.05.2018 22:24:27
| 25,200
|
aa0e0893588bfab025cbf945704f1879328cf267
|
misc(npmignore): include chrome launcher script
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,6 +15,9 @@ lighthouse-extension/\nlighthouse-cli/results/\nlighthouse-logger/\n+# keep the chrome launcher script\n+!lighthouse-core/scripts/manual-chrome-launcher.js\n+\n# excluding cli/test minus smokehouse\nlighthouse-cli/test\n!lighthouse-cli/test/smokehouse\n",
"new_path": ".npmignore",
"old_path": ".npmignore"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
misc(npmignore): include chrome launcher script
| 1
|
misc
|
npmignore
|
791,690
|
09.05.2018 22:31:04
| 25,200
|
06205efcccc41a95e2f433b5f638725ecca7e637
|
core(lhr): revert default wait bump
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,7 +15,7 @@ module.exports = {\npassName: 'defaultPass',\nrecordTrace: true,\nuseThrottling: true,\n- pauseAfterLoadMs: 10000,\n+ pauseAfterLoadMs: 1000,\nnetworkQuietThresholdMs: 1000,\ncpuQuietThresholdMs: 1000,\ngatherers: [\n",
"new_path": "lighthouse-core/config/default-config.js",
"old_path": "lighthouse-core/config/default-config.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(lhr): revert default wait bump
| 1
|
core
|
lhr
|
679,913
|
09.05.2018 23:06:48
| -3,600
|
b4476cb9cf322451aa81c5df96d742c86644db93
|
refactor(hdom-components): add ButtonGroup type alias
|
[
{
"change_type": "MODIFY",
"diff": "@@ -52,6 +52,8 @@ export interface ButtonGroupItem extends Array<any> {\n[id: number]: any;\n}\n+export type ButtonGroup = (_, args: ButtonGroupArgs, ...buttons: ButtonGroupItem[]) => any;\n+\n/**\n* Higher order function to create a new stateless button group\n* component, pre-configured via user supplied options. The returned\n@@ -69,7 +71,7 @@ export interface ButtonGroupItem extends Array<any> {\n*\n* @param opts\n*/\n-export const buttonGroup = (opts: ButtonGroupOpts) =>\n+export const buttonGroup = (opts: ButtonGroupOpts): ButtonGroup =>\n(_, args: ButtonGroupArgs, ...buttons: ButtonGroupItem[]) =>\n[\"div\", { ...opts.attribs, ...args.attribs }, ...groupBody(opts, args.disabled, buttons)];\n",
"new_path": "packages/hdom-components/src/button-group.ts",
"old_path": "packages/hdom-components/src/button-group.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(hdom-components): add ButtonGroup type alias
| 1
|
refactor
|
hdom-components
|
679,913
|
09.05.2018 23:18:55
| -3,600
|
5af437c1325eea4a6e0ccd8b8f67f0162a3edc61
|
docs(hdom-components): add
|
[
{
"change_type": "MODIFY",
"diff": "WIP\n+Amended by [3. Component configuration via context](0003-component-configuration-via-context.md)\n+\n## Context\nThe components provided by this package SHOULD primarily be designed\n",
"new_path": "packages/hdom-components/adr/0002-component-configuration.md",
"old_path": "packages/hdom-components/adr/0002-component-configuration.md"
},
{
"change_type": "ADD",
"diff": "+# 3. Component configuration via context\n+\n+Date: 2018-05-09\n+\n+## Status\n+\n+WIP\n+\n+Amends [ADR-0002](0002-component-configuration.md)\n+\n+## Context\n+\n+An alternative configuration procedure to ADR-0002, possibly better\n+suited for dynamic theming, theme changes and separating the component\n+configuration between behavioral and stylistic aspects. This new\n+approach utilizes the hdom context object to retrieve theme attributes,\n+whereas the previous solution ignored the context object entirely.\n+\n+A live demo of the code discussed here is available at:\n+\n+[demo.thi.ng/umbrella/hdom-theme-adr-0003](http://demo.thi.ng/umbrella/hdom-theme-adr-0003)\n+\n+## Decision\n+\n+### Split component configuration\n+\n+#### Behavioral aspects\n+\n+Component pre-configuration options SHOULD purely consist of behavioral\n+settings and NOT include any aesthetic / theme oriented options. To\n+better express this intention, it's recommended to suffix these\n+interface names with `Behavior`, e.g. `ButtonBehavior`.\n+\n+```ts\n+interface ButtonBehavior {\n+ /**\n+ * Element name to use for enabled buttons.\n+ * Default: \"a\"\n+ */\n+ tag: string;\n+ /**\n+ * Element name to use for disabled buttons.\n+ * Default: \"span\"\n+ */\n+ tagDisabled: string;\n+ /**\n+ * Default attribs, always injected for active button states\n+ * and overridable at runtime.\n+ * Default: `{ href: \"#\", role: \"button\" }`\n+ */\n+ attribs: IObjectOf<any>;\n+}\n+```\n+\n+#### Theme stored in hdom context\n+\n+Even though there's work underway to develop a flexble theming system\n+for hdom components, the components themselves SHOULD be agnostic to\n+this and only expect to somehow obtain styling attributes from the hdom\n+context object passed to each component function. How is shown further\n+below.\n+\n+In this example we define a `theme` key in the context object, under\n+which theme options for all participating components are stored.\n+\n+```ts\n+const ctx = {\n+ ...\n+ theme: {\n+ primaryButton: {\n+ default: { class: ... },\n+ disabled: { class: ... },\n+ selected: { class: ... },\n+ },\n+ secondaryButton: {\n+ default: { class: ... },\n+ disabled: { class: ... },\n+ selected: { class: ... },\n+ },\n+ ...\n+ }\n+};\n+```\n+\n+### Component definition\n+\n+```ts\n+import { getIn, Path } from \"@thi.ng/paths\";\n+\n+/**\n+ * Instance specific runtime args. All optional.\n+ */\n+interface ButtonArgs {\n+ /**\n+ * Click event handler to be wrapped with preventDefault() call\n+ */\n+ onclick: EventListener;\n+ /**\n+ * Disabled flag. Used to determine themed version.\n+ */\n+ disabled: boolean;\n+ /**\n+ * Selected flag. Used to determine themed version.\n+ */\n+ selected: boolean;\n+ /**\n+ * Link target.\n+ */\n+ href: string;\n+}\n+\n+const button = (themeCtxPath: Path, behavior?: Partial<ButtonBehavior>) => {\n+ // init with defaults\n+ behavior = {\n+ tag: \"a\",\n+ tagDisabled: \"span\",\n+ ...behavior\n+ };\n+ behavior.attribs = { href: \"#\", role: \"button\", ...behavior.attribs };\n+ // return component function as closure\n+ return (ctx: any, args: Partial<ButtonArgs>, ...body: any[]) => {\n+ // lookup component theme config in context\n+ const theme = getIn(ctx, themeCtxPath);\n+ if (args.disabled) {\n+ return [behavior.tagDisabled, {\n+ ...behavior.attribs,\n+ ...theme.disabled,\n+ ...args,\n+ }, ...body];\n+ } else {\n+ const attribs = {\n+ ...behavior.attribs,\n+ ...theme[args.selected ? \"selected\" : \"default\"],\n+ ...args\n+ };\n+ if (args && args.onclick && (args.href == null || args.href === \"#\")) {\n+ attribs.onclick = (e) => (e.preventDefault(), args.onclick(e));\n+ }\n+ return [behavior.tag, attribs, ...body];\n+ }\n+ };\n+};\n+```\n+\n+### Component usage\n+\n+```ts\n+const darkTheme = {\n+ id: \"dark\",\n+ body: {\n+ class: \"vh-100 bg-black moon-gray pa3 sans-serif\"\n+ },\n+ link: {\n+ class: \"link dim b light-silver\"\n+ },\n+ button: {\n+ default: {\n+ class: \"dib link mr2 ph3 pv2 blue hover-lightest-blue hover-b--current br3 ba b--blue\"\n+ },\n+ selected: {\n+ class: \"dib link mr2 ph3 pv2 red hover-gold hover-b--current br3 ba b--red\"\n+ },\n+ disabled: {\n+ class: \"dib mr2 ph3 pv2 mid-gray br3 ba b--mid-gray\"\n+ }\n+ }\n+};\n+\n+const bt = button(\"theme.button\");\n+const btFixed = button(\"theme.button\", { attribs: { style: { width: \"8rem\" } } });\n+\n+const app = (ctx) =>\n+ [\"div\", ctx.theme.body,\n+ [bt, { onclick: () => alert(\"toggle\") }, \"Toggle\"],\n+ [bt, { href: \"https://github.com/thi-ng/umbrella\" }, \"External\"],\n+ [btFixed, { onclick: () => alert(\"hi\"), selected: true }, \"Selected\"],\n+ [btFixed, { disabled: true }, \"Disabled\"] ];\n+\n+// start app with theme in context\n+start(\"app\", app, { theme: darkTheme })\n+```\n+\n+## Consequences\n+\n+Consequences here...\n",
"new_path": "packages/hdom-components/adr/0003-component-configuration-via-context.md",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
docs(hdom-components): add ADR-0003
| 1
|
docs
|
hdom-components
|
679,913
|
09.05.2018 23:22:28
| -3,600
|
cea77debccef1c89b59313481bd3e1fcaa6c29cc
|
feat(examples): add hdom-theme-adr-0003 demo
|
[
{
"change_type": "ADD",
"diff": "+node_modules\n+yarn.lock\n+*.js\n",
"new_path": "examples/hdom-theme-adr-0003/.gitignore",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+# hdom-theme\n+\n+[Live demo](http://demo.thi.ng/umbrella/hdom-theme/)\n+\n+WIP demo of themed component proposal discussed in\n+[ADR-0003](https://github.com/thi-ng/umbrella/blob/develop/packages/hdom-components/adr/0002-component-configuration.md).\n+\n+```\n+git clone https://github.com/thi-ng/umbrella.git\n+cd umbrella/examples/hdom-theme\n+yarn install\n+yarn start\n+```\n+\n+## Authors\n+\n+- Karsten Schmidt\n+\n+## License\n+\n+© 2018 Karsten Schmidt // Apache Software License 2.0\n",
"new_path": "examples/hdom-theme-adr-0003/README.md",
"old_path": null
},
{
"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>hdom-theme-adr-0003</title>\n+ <link href=\"https://unpkg.com/tachyons@4.9.1/css/tachyons.min.css\" rel=\"stylesheet\">\n+ <style>\n+ .hover-b--current:hover,\n+ .hover-b--current:focus {\n+ border-color: currentColor;\n+ }\n+ </style>\n+</head>\n+\n+<body>\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/hdom-theme-adr-0003/index.html",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"hdom-theme\",\n+ \"version\": \"0.0.1\",\n+ \"repository\": \"https://github.com/thi-ng/umbrella\",\n+ \"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n+ \"license\": \"Apache-2.0\",\n+ \"scripts\": {\n+ \"build\": \"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.3.0\",\n+ \"typescript\": \"^2.8.3\",\n+ \"webpack\": \"^4.8.1\",\n+ \"webpack-cli\": \"^2.1.3\",\n+ \"webpack-dev-server\": \"^3.1.4\"\n+ },\n+ \"dependencies\": {\n+ \"@thi.ng/api\": \"latest\",\n+ \"@thi.ng/hdom\": \"latest\"\n+ }\n+}\n\\ No newline at end of file\n",
"new_path": "examples/hdom-theme-adr-0003/package.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+import { start } from \"@thi.ng/hdom/start\";\n+import { getIn, Path } from \"@thi.ng/paths\";\n+\n+interface ButtonBehavior {\n+ /**\n+ * Element name to use for enabled buttons.\n+ * Default: \"a\"\n+ */\n+ tag: string;\n+ /**\n+ * Element name to use for disabled buttons.\n+ * Default: \"span\"\n+ */\n+ tagDisabled: string;\n+ /**\n+ * Default attribs, always injected for active button states\n+ * and overridable at runtime.\n+ * Default: `{ href: \"#\", role: \"button\" }`\n+ */\n+ attribs: IObjectOf<any>;\n+}\n+\n+interface ButtonArgs {\n+ /**\n+ * Click event handler to be wrapped with preventDefault() call\n+ */\n+ onclick: EventListener;\n+ /**\n+ * Disabled flag. Used to determine themed version.\n+ */\n+ disabled: boolean;\n+ /**\n+ * Selected flag. Used to determine themed version.\n+ */\n+ selected: boolean;\n+ /**\n+ * Link target.\n+ */\n+ href: string;\n+}\n+\n+const button = (themeCtxPath: Path, behavior?: Partial<ButtonBehavior>) => {\n+ // init with defaults\n+ behavior = {\n+ tag: \"a\",\n+ tagDisabled: \"span\",\n+ ...behavior\n+ };\n+ behavior.attribs = { href: \"#\", role: \"button\", ...behavior.attribs };\n+ // return component function as closure\n+ return (ctx: any, args: Partial<ButtonArgs>, ...body: any[]) => {\n+ // lookup component theme config in context\n+ const theme = getIn(ctx, themeCtxPath);\n+ if (args.disabled) {\n+ return [behavior.tagDisabled, {\n+ ...behavior.attribs,\n+ ...theme.disabled,\n+ ...args,\n+ }, ...body];\n+ } else {\n+ const attribs = {\n+ ...behavior.attribs,\n+ ...theme[args.selected ? \"selected\" : \"default\"],\n+ ...args\n+ };\n+ if (args && args.onclick && (args.href == null || args.href === \"#\")) {\n+ attribs.onclick = (e) => (e.preventDefault(), args.onclick(e));\n+ }\n+ return [behavior.tag, attribs, ...body];\n+ }\n+ };\n+};\n+\n+const link = (ctx: any, href: string, body: any) =>\n+ [\"a\", { ...ctx.theme.link, href }, body];\n+\n+const lightTheme = {\n+ id: \"light\",\n+ body: {\n+ class: \"vh-100 bg-white dark-gray pa3 sans-serif\"\n+ },\n+ link: {\n+ class: \"link dim b black\"\n+ },\n+ button: {\n+ default: {\n+ class: \"dib link mr2 ph3 pv2 bg-lightest-blue blue hover-bg-blue hover-white bg-animate br-pill\"\n+ },\n+ selected: {\n+ class: \"dib link mr2 ph3 pv2 bg-gold washed-yellow hover-bg-orange hover-gold bg-animate br-pill\"\n+ },\n+ disabled: {\n+ class: \"dib mr2 ph3 pv2 bg-moon-gray gray br-pill\"\n+ }\n+ }\n+};\n+\n+const darkTheme = {\n+ id: \"dark\",\n+ body: {\n+ class: \"vh-100 bg-black moon-gray pa3 sans-serif\"\n+ },\n+ link: {\n+ class: \"link dim b light-silver\"\n+ },\n+ button: {\n+ default: {\n+ class: \"dib link mr2 ph3 pv2 blue hover-lightest-blue hover-b--current br3 ba b--blue\"\n+ },\n+ selected: {\n+ class: \"dib link mr2 ph3 pv2 red hover-gold hover-b--current br3 ba b--red\"\n+ },\n+ disabled: {\n+ class: \"dib mr2 ph3 pv2 mid-gray br3 ba b--mid-gray\"\n+ }\n+ }\n+};\n+\n+const ctx = { theme: lightTheme };\n+\n+const toggleTheme = () => {\n+ ctx.theme = ctx.theme === lightTheme ? darkTheme : lightTheme;\n+}\n+\n+const bt = button(\"theme.button\");\n+const btFixed = button(\"theme.button\", { attribs: { style: { width: \"8rem\" } } });\n+\n+const app = (ctx) =>\n+ [\"div\", ctx.theme.body,\n+ \"Current theme: \", ctx.theme.id,\n+ [\"p\",\n+ [bt, { onclick: toggleTheme }, \"Toggle\"],\n+ [bt, { href: \"https://github.com/thi-ng/umbrella\" }, \"External\"],\n+ [btFixed, { onclick: () => alert(\"hi\"), selected: true }, \"Selected\"],\n+ [btFixed, { disabled: true }, \"Disabled\"]],\n+ [\"p\",\n+ \"Please see \", [link, \"https://github.com/thi-ng/umbrella/blob/develop/packages/hdom-components/adr/0003-component-configuration-via-context.md\", \"ADR-0003\"], \" for details of this approach.\"],\n+ [\"p\", [link, \"https://github.com/thi-ng/umbrella/blob/develop/examples/hdom-theme-adr-0003\", \"Source\"]]\n+ ];\n+\n+start(\"app\", app, ctx);\n",
"new_path": "examples/hdom-theme-adr-0003/src/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \".\"\n+ },\n+ \"include\": [\n+ \"./src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "examples/hdom-theme-adr-0003/tsconfig.json",
"old_path": null
},
{
"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/hdom-theme-adr-0003/webpack.config.js",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(examples): add hdom-theme-adr-0003 demo
| 1
|
feat
|
examples
|
679,913
|
10.05.2018 00:17:46
| -3,600
|
d5f1037a79f2c5bf7500c2ea68afff95937ae461
|
fix(examples): fix update router-basics
|
[
{
"change_type": "MODIFY",
"diff": "@@ -44,13 +44,21 @@ export class App {\n};\nthis.addViews(this.config.views);\nthis.router = new HTMLRouter(config.router);\n+ // connect router to event bus so that routing events are processed\n+ // as part of the normal batched event processing loop\nthis.router.addListener(\nEVENT_ROUTE_CHANGED,\n(e) => this.ctx.bus.dispatch([EVENT_ROUTE_CHANGED, e.value])\n);\n+ // whenever the route has changed, record its details in the app\n+ // state. likewise, when the user or a component triggers a the\n+ // `ROUTE_TO` event we assign the target route details to a side\n+ // effect which will cause a change in the router, which then in\n+ // turn triggers the `EVENT_ROUTE_CHANGED`, completing the\n+ // circle\nthis.ctx.bus.addHandlers({\n[EVENT_ROUTE_CHANGED]: valueSetter(\"route\"),\n- [ev.ROUTE_TO]: (_, [__, route]) => ({ [ev.ROUTE_TO]: route })\n+ [ev.ROUTE_TO]: (_, [__, route]) => ({ [fx.ROUTE_TO]: route })\n});\nthis.ctx.bus.addEffect(\nfx.ROUTE_TO,\n",
"new_path": "examples/router-basics/src/app.ts",
"old_path": "examples/router-basics/src/app.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
fix(examples): fix #22, update router-basics
| 1
|
fix
|
examples
|
679,913
|
10.05.2018 01:54:18
| -3,600
|
349032108cb75c893a37fb65bbe8762a8cff7be4
|
feat(examples): add icon button
|
[
{
"change_type": "MODIFY",
"diff": "@@ -117,6 +117,11 @@ const darkTheme = {\n}\n};\n+// source: https://fontawesome.com\n+const icon =\n+ [\"svg\", { class: \"mr1\", width: \"1rem\", viewBox: \"0 0 576 512\", fill: \"currentcolor\" },\n+ [\"path\", { d: \"M576 24v127.984c0 21.461-25.96 31.98-40.971 16.971l-35.707-35.709-243.523 243.523c-9.373 9.373-24.568 9.373-33.941 0l-22.627-22.627c-9.373-9.373-9.373-24.569 0-33.941L442.756 76.676l-35.703-35.705C391.982 25.9 402.656 0 424.024 0H552c13.255 0 24 10.745 24 24zM407.029 270.794l-16 16A23.999 23.999 0 0 0 384 303.765V448H64V128h264a24.003 24.003 0 0 0 16.97-7.029l16-16C376.089 89.851 365.381 64 344 64H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V287.764c0-21.382-25.852-32.09-40.971-16.97z\" }]];\n+\nconst ctx = { theme: darkTheme };\nconst toggleTheme = () => {\n@@ -131,7 +136,7 @@ const app = (ctx) =>\n\"Current theme: \", ctx.theme.id,\n[\"p\",\n[bt, { onclick: toggleTheme }, \"Toggle\"],\n- [bt, { href: \"https://github.com/thi-ng/umbrella\" }, \"External\"],\n+ [bt, { href: \"https://github.com/thi-ng/umbrella\" }, icon, \"External\"],\n[btFixed, { onclick: () => alert(\"hi\"), selected: true }, \"Selected\"],\n[btFixed, { disabled: true }, \"Disabled\"]],\n[\"p\",\n",
"new_path": "examples/hdom-theme-adr-0003/src/index.ts",
"old_path": "examples/hdom-theme-adr-0003/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(examples): add icon button
| 1
|
feat
|
examples
|
679,913
|
10.05.2018 02:01:23
| -3,600
|
aba06b0cc118f14466a8baf71bb97dad03dbaff0
|
docs(examples): fix link
|
[
{
"change_type": "MODIFY",
"diff": "[Live demo](http://demo.thi.ng/umbrella/hdom-theme-adr-0003/)\nWIP demo of themed component proposal discussed in\n-[ADR-0003](https://github.com/thi-ng/umbrella/blob/develop/packages/hdom-components/adr/0002-component-configuration.md).\n+[ADR-0003](https://github.com/thi-ng/umbrella/blob/develop/packages/hdom-components/adr/0003-component-configuration-via-context.md).\n```\ngit clone https://github.com/thi-ng/umbrella.git\n",
"new_path": "examples/hdom-theme-adr-0003/README.md",
"old_path": "examples/hdom-theme-adr-0003/README.md"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
docs(examples): fix link
| 1
|
docs
|
examples
|
217,922
|
10.05.2018 13:52:31
| -7,200
|
3784e1f9b29079df99a84bfceb95afeada0379c5
|
feat(simulator): you can now save custom stats for your crafting jobs
|
[
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,7 @@ import {ListLayout} from '../../core/layout/list-layout';\nimport {DeserializeAs} from '@kaiu/serializer';\nimport {Alarm} from '../../core/time/alarm';\nimport {ListDetailsFilters} from '../other/list-details-filters';\n+import {GearSet} from '../../pages/simulator/model/gear-set';\nexport class AppUser extends DataModel {\nname?: string;\n@@ -30,4 +31,6 @@ export class AppUser extends DataModel {\nsharedLists: string[] = [];\n// Workshop ids user has write access to\nsharedWorkshops: string[] = [];\n+ // Saved overriden gearsets\n+ gearSets: GearSet[] = [];\n}\n",
"new_path": "src/app/model/list/app-user.ts",
"old_path": "src/app/model/list/app-user.ts"
},
{
"change_type": "MODIFY",
"diff": "<mat-checkbox [(ngModel)]=\"customSet\">\n{{'SIMULATOR.CONFIGURATION.Custom_set' | translate}}\n</mat-checkbox>\n+ <div class=\"save-button\">\n+ <button mat-mini-fab *ngIf=\"customSet && selectedSet !== undefined && !selectedSet.custom\"\n+ matTooltip=\"{{'SIMULATOR.CONFIGURATION.Save_set'}}\"\n+ color=\"accent\"\n+ (click)=\"saveSet(selectedSet)\">\n+ <mat-icon>save</mat-icon>\n+ </button>\n+ <button mat-mini-fab *ngIf=\"selectedSet !== undefined && selectedSet.custom\"\n+ matTooltip=\"{{'SIMULATOR.CONFIGURATION.Reset_set'}}\"\n+ color=\"accent\"\n+ (click)=\"resetSet(selectedSet)\">\n+ <mat-icon>refresh</mat-icon>\n+ </button>\n+ </div>\n<div *ngIf=\"gearsets$ | async as gearsets\">\n<mat-select *ngIf=\"customMode\"\n[placeholder]=\"'SIMULATOR.CONFIGURATION.Select_job' | translate\"\n<h3>{{'SIMULATOR.CONFIGURATION.Consumables' | translate}}</h3>\n<div class=\"consumables-cols\">\n<div class=\"foods\">\n- <mat-select [(ngModel)]=\"selectedFood\" placeholder=\"{{'SIMULATOR.CONFIGURATION.Food' | translate}}\">\n+ <mat-select [(ngModel)]=\"_selectedFood\" placeholder=\"{{'SIMULATOR.CONFIGURATION.Food' | translate}}\">\n<mat-option [value]=\"undefined\"></mat-option>\n<mat-option *ngFor=\"let food of foods\" [value]=\"food\">\n{{food.itemId | itemName | i18n}}\n<img src=\"/assets/icons/HQ.png\" alt=\"(HQ)\" *ngIf=\"food.hq\">\n</mat-option>\n</mat-select>\n- <div class=\"consumable-details\" *ngIf=\"selectedFood !== undefined\">\n- <div class=\"details-row\" *ngFor=\"let bonus of selectedFood.bonuses\">\n+ <div class=\"consumable-details\" *ngIf=\"_selectedFood !== undefined\">\n+ <div class=\"details-row\" *ngFor=\"let bonus of _selectedFood.bonuses\">\n{{('SIMULATOR.CONFIGURATION.STATS.'+bonus.type) | translate}}: {{bonus.value * 100}}%\n({{bonus.max}})\n</div>\n</div>\n</div>\n<div class=\"medicines\">\n- <mat-select [(ngModel)]=\"selectedMedicine\"\n+ <mat-select [(ngModel)]=\"_selectedMedicine\"\nplaceholder=\"{{'SIMULATOR.CONFIGURATION.Medicine' | translate}}\">\n<mat-option [value]=\"undefined\"></mat-option>\n<mat-option *ngFor=\"let medicine of medicines\" [value]=\"medicine\">\n<img src=\"/assets/icons/HQ.png\" alt=\"(HQ)\" *ngIf=\"medicine.hq\">\n</mat-option>\n</mat-select>\n- <div class=\"consumable-details\" *ngIf=\"selectedMedicine !== undefined\">\n- <div class=\"details-row\" *ngFor=\"let bonus of selectedMedicine.bonuses\">\n+ <div class=\"consumable-details\" *ngIf=\"_selectedMedicine !== undefined\">\n+ <div class=\"details-row\" *ngFor=\"let bonus of _selectedMedicine.bonuses\">\n{{('SIMULATOR.CONFIGURATION.STATS.'+bonus.type) | translate}}: {{bonus.value * 100}}%\n({{bonus.max}})\n</div>\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Progression' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n+ <app-action (actionclick)=\"addAction(action)\" draggable [dragData]=\"action\"\n+ [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.html",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.html"
},
{
"change_type": "MODIFY",
"diff": ".config-row {\nflex: 1 1 25%;\npadding: 25px;\n+ position: relative;\n+ .save-button {\n+ position: absolute;\n+ top: 5px;\n+ right: 5px;\n+ }\nmat-select {\nmargin: 15px 0;\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": "@@ -34,6 +34,7 @@ import {TranslateService} from '@ngx-translate/core';\nimport {Language} from 'app/core/data/language';\nimport {ConsumablesService} from 'app/pages/simulator/model/consumables.service';\nimport {I18nToolsService} from '../../../../core/tools/i18n-tools.service';\n+import {AppUser} from 'app/model/list/app-user';\n@Component({\nselector: 'app-simulator',\n@@ -103,7 +104,7 @@ export class SimulatorComponent implements OnInit, OnDestroy {\npublic set inputGearSet(set: GearSet) {\nif (set !== undefined) {\nthis.selectedSet = set;\n- this.applyStats(set);\n+ this.applyStats(set, false);\n}\n}\n@@ -115,12 +116,22 @@ export class SimulatorComponent implements OnInit, OnDestroy {\npublic foods: Consumable[] = [];\n@Input()\n- public selectedFood: Consumable;\n+ public set selectedFood(food: Consumable) {\n+ this._selectedFood = food;\n+ this.applyStats(this.selectedSet, false);\n+ }\n+\n+ public _selectedFood: Consumable;\npublic medicines: Consumable[] = [];\n@Input()\n- public selectedMedicine: Consumable;\n+ public set selectedMedicine(medicine: Consumable) {\n+ this._selectedMedicine = medicine;\n+ this.applyStats(this.selectedSet, false);\n+ }\n+\n+ public _selectedMedicine: Consumable;\nprivate serializedRotation: string[];\n@@ -138,6 +149,8 @@ export class SimulatorComponent implements OnInit, OnDestroy {\nprivate findActionsAutoTranslatedRegex: RegExp =\nnew RegExp(/\\/(ac|action)[\\s]+([^<]+)?.*/, 'i');\n+ private userData: AppUser;\n+\nconstructor(private registry: CraftingActionsRegistry, private media: ObservableMedia, private userService: UserService,\nprivate dataService: DataService, private htmlTools: HtmlToolsService, private dialog: MatDialog,\nprivate pendingChanges: PendingChangesService, private localizedDataService: LocalizedDataService,\n@@ -170,11 +183,21 @@ export class SimulatorComponent implements OnInit, OnDestroy {\n});\nthis.gearsets$ = this.userService.getUserData()\n+ .do(user => this.userData = user)\n.mergeMap(user => {\nif (user.anonymous) {\n- return Observable.of([])\n+ return Observable.of(user.gearSets)\n+ }\n+ return this.dataService.getGearsets(user.lodestoneId)\n+ .map(gearsets => {\n+ return gearsets.map(set => {\n+ const customSet = user.gearSets.find(s => s.jobId === set.jobId);\n+ if (customSet !== undefined) {\n+ return customSet;\n}\n- return this.dataService.getGearsets(user.lodestoneId);\n+ return set;\n+ });\n+ });\n});\nthis.simulation$ = Observable.combineLatest(\n@@ -223,9 +246,6 @@ export class SimulatorComponent implements OnInit, OnDestroy {\nthis.selectedSet = set;\nthis.applyStats(set, false);\n});\n- this.crafterStats$.take(2).subscribe(() => {\n- this.applyStats(this.selectedSet, false);\n- });\n}\nimportRotation(): void {\n@@ -294,7 +314,7 @@ export class SimulatorComponent implements OnInit, OnDestroy {\n$key: this.rotationId,\nrotation: this.serializedRotation,\nrecipe: this.recipeSync,\n- consumables: {food: this.selectedFood, medicine: this.selectedMedicine}\n+ consumables: {food: this._selectedFood, medicine: this._selectedMedicine}\n});\n} else {\nthis.onsave.emit(<CustomCraftingRotation>{\n@@ -302,7 +322,7 @@ export class SimulatorComponent implements OnInit, OnDestroy {\nstats: this.selectedSet,\nrotation: this.serializedRotation,\nrecipe: this.recipeSync,\n- consumables: {food: this.selectedFood, medicine: this.selectedMedicine}\n+ consumables: {food: this._selectedFood, medicine: this._selectedMedicine}\n});\n}\n}\n@@ -325,8 +345,8 @@ export class SimulatorComponent implements OnInit, OnDestroy {\ngetBonusValue(bonusType: BonusType, baseValue: number): number {\nlet bonusFromFood = 0;\nlet bonusFromMedicine = 0;\n- if (this.selectedFood !== undefined) {\n- const foodBonus = this.selectedFood.getBonus(bonusType);\n+ if (this._selectedFood !== undefined) {\n+ const foodBonus = this._selectedFood.getBonus(bonusType);\nif (foodBonus !== undefined) {\nbonusFromFood = Math.ceil(baseValue * foodBonus.value);\nif (bonusFromFood > foodBonus.max) {\n@@ -334,8 +354,8 @@ export class SimulatorComponent implements OnInit, OnDestroy {\n}\n}\n}\n- if (this.selectedMedicine !== undefined) {\n- const medicineBonus = this.selectedMedicine.getBonus(bonusType);\n+ if (this._selectedMedicine !== undefined) {\n+ const medicineBonus = this._selectedMedicine.getBonus(bonusType);\nif (medicineBonus !== undefined) {\nbonusFromMedicine = Math.ceil(baseValue * medicineBonus.value);\nif (bonusFromMedicine > medicineBonus.max) {\n@@ -359,6 +379,20 @@ export class SimulatorComponent implements OnInit, OnDestroy {\n}\n}\n+ saveSet(set: GearSet): void {\n+ // First of all, remove old gearset in userData for this job.\n+ this.userData.gearSets = this.userData.gearSets.filter(s => s.jobId !== set.jobId);\n+ // Then add this set to custom sets\n+ set.custom = true;\n+ this.userData.gearSets.push(set);\n+ this.userService.set(this.userData.$key, this.userData).subscribe();\n+ }\n+\n+ resetSet(set: GearSet): void {\n+ this.userData.gearSets = this.userData.gearSets.filter(s => s.jobId !== set.jobId);\n+ this.userService.set(this.userData.$key, this.userData).subscribe();\n+ }\n+\naddAction(action: CraftingAction): void {\nthis.actions$.next(this.actions$.getValue().concat(action));\nthis.markAsDirty();\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": "@@ -6,4 +6,5 @@ export interface GearSet {\ncraftsmanship: number;\ncp: number;\nspecialist: boolean;\n+ custom?: boolean;\n}\n",
"new_path": "src/app/pages/simulator/model/gear-set.ts",
"old_path": "src/app/pages/simulator/model/gear-set.ts"
},
{
"change_type": "MODIFY",
"diff": "\"Apply_foods\": \"Apply consumables\",\n\"Food\": \"Choose a food\",\n\"Medicine\": \"Choose a medicine\",\n+ \"Save_set\": \"Save these stats for this job\",\n+ \"Reset_set\": \"Reset these stats\",\n\"STATS\": {\n\"CP\": \"CP\",\n\"Craftsmanship\": \"Craftsmanship\",\n",
"new_path": "src/assets/i18n/en.json",
"old_path": "src/assets/i18n/en.json"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
feat(simulator): you can now save custom stats for your crafting jobs
| 1
|
feat
|
simulator
|
217,922
|
10.05.2018 13:53:41
| -7,200
|
48b6eeefd4e0d110d8438ea08e0fd0012f6ae3ce
|
feat(simulator): actions can now be dragged inside rotation (https://i.imgur.com/68jTydA.gifv)
|
[
{
"change_type": "MODIFY",
"diff": "<div>\n<h4>{{'SIMULATOR.CATEGORY.Quality' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n+ <app-action (actionclick)=\"addAction(action)\" draggable [dragData]=\"action\"\n+ [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Cp_recovery' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n+ <app-action (actionclick)=\"addAction(action)\" draggable [dragData]=\"action\"\n+ [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Buff' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n+ <app-action (actionclick)=\"addAction(action)\" draggable [dragData]=\"action\"\n+ [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Repair' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n+ <app-action (actionclick)=\"addAction(action)\" draggable [dragData]=\"action\"\n+ [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Specialty' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n+ <app-action (actionclick)=\"addAction(action)\" draggable [dragData]=\"action\"\n+ [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n<div>\n<h4>{{'SIMULATOR.CATEGORY.Other' | translate}}</h4>\n<div class=\"actions-row\">\n- <app-action (actionclick)=\"addAction(action)\" [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n+ <app-action (actionclick)=\"addAction(action)\" draggable [dragData]=\"action\"\n+ [disabled]=\"!action.canBeUsed(resultData.simulation, true) || snapshotMode\n|| resultData.simulation.success !== undefined\"\n[notEnoughCp]=\"action.getBaseCPCost(resultData.simulation) > resultData.simulation.availableCP\"\n[action]=\"action\" [simulation]=\"resultData.simulation\"\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.html",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -335,9 +335,14 @@ export class SimulatorComponent implements OnInit, OnDestroy {\nreturn `./assets/icons/status/${Buff[effBuff.buff].toLowerCase()}.png`;\n}\n- moveSkill(originIndex: number, targetIndex: number): void {\n+ moveSkill(dragData: number | CraftingAction, targetIndex: number): void {\nconst actions = this.actions$.getValue();\n- actions.splice(targetIndex, 0, actions.splice(originIndex, 1)[0]);\n+ // If the data is a number, use it as index\n+ if (+dragData === dragData) {\n+ actions.splice(targetIndex, 0, actions.splice(dragData, 1)[0]);\n+ } else if (dragData instanceof CraftingAction) {\n+ actions.splice(targetIndex, 0, dragData);\n+ }\nthis.actions$.next(actions);\nthis.markAsDirty();\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
|
feat(simulator): actions can now be dragged inside rotation (https://i.imgur.com/68jTydA.gifv)
| 1
|
feat
|
simulator
|
217,922
|
10.05.2018 14:11:30
| -7,200
|
1edc7a6fc681e786df25c4814500066c383b2667
|
feat(simulator): added links to external simulators inside crafting menu
|
[
{
"change_type": "MODIFY",
"diff": "@@ -34,6 +34,7 @@ import {MapModule} from '../map/map.module';\nimport {DatabaseModule} from '../../core/database/database.module';\nimport {RouterModule} from '@angular/router';\nimport {VentureDetailsPopupComponent} from './venture-details-popup/venture-details-popup.component';\n+import {SimulatorLinkPipe} from 'app/modules/item/simulator-link.pipe';\n@NgModule({\nimports: [\n@@ -76,6 +77,7 @@ import {VentureDetailsPopupComponent} from './venture-details-popup/venture-deta\nVendorsDetailsPopupComponent,\nVoyagesDetailsPopupComponent,\nVentureDetailsPopupComponent,\n+ SimulatorLinkPipe,\n],\nexports: [\nItemComponent\n",
"new_path": "src/app/modules/item/item.module.ts",
"old_path": "src/app/modules/item/item.module.ts"
},
{
"change_type": "MODIFY",
"diff": "-<mat-menu #simulatorMenu=\"matMenu\">\n- <button mat-menu-item routerLink=\"/simulator/{{item.id}}\">{{'SIMULATOR.New_rotation' | translate}}</button>\n- <button mat-menu-item\n- *ngFor=\"let rotation of rotations$ | async\"\n- routerLink=\"/simulator/{{item.id}}/{{rotation.$key}}\">{{rotation.getName()}}</button>\n-</mat-menu>\n-\n<!--Layout for desktop browsers-->\n<mat-list-item *ngIf=\"!(isMobile | async); else mobileLayout\"\n[ngClass]=\"{'even': even, 'auto-height':true, 'compact':settings.compactLists}\">\n<div class=\"classes\">\n<div *ngIf=\"recipe\">\n+ <mat-menu #simulatorMenu=\"matMenu\">\n+ <button mat-menu-item routerLink=\"/simulator/{{item.id}}\">{{'SIMULATOR.New_rotation' | translate}}\n+ </button>\n+ <button mat-menu-item\n+ *ngFor=\"let rotation of rotations$ | async\"\n+ routerLink=\"/simulator/{{item.id}}/{{rotation.$key}}\">{{rotation.getName()}}\n+ </button>\n+ <mat-divider></mat-divider>\n+ <a *ngIf=\"getCraft(item.recipeId) as craft\"\n+ href=\"{{craft | simulatorLink:'http://ffxiv-beta.lokyst.net' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'Doxxx'} }}\n+ </a>\n+ <a *ngIf=\"getCraft(item.recipeId) as craft\"\n+ href=\"{{craft | simulatorLink:'https://ermad.github.io/ffxiv-craft-opt-web/app' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'Ermad'} }}\n+ </a>\n+ <a *ngIf=\"getCraft(item.recipeId) as craft\"\n+ href=\"{{craft | simulatorLink:'https://ryan20340.github.io/app' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'ryan20340'} }}\n+ </a>\n+ </mat-menu>\n<button mat-icon-button [matMenuTriggerFor]=\"simulatorMenu\" *ngIf=\"getCraft(item.recipeId) as craft\">\n<img [ngClass]=\"{'crafted-by':true, 'compact': settings.compactLists}\"\nmatTooltip=\"{{craft.level}} {{craft.stars_tooltip}}\"\n</div>\n<div *ngIf=\"!recipe\">\n<div *ngFor=\"let craft of item.craftedBy\">\n+ <mat-menu #simulatorMenu=\"matMenu\">\n+ <button mat-menu-item routerLink=\"/simulator/{{item.id}}\">{{'SIMULATOR.New_rotation' |\n+ translate}}\n+ </button>\n+ <button mat-menu-item\n+ *ngFor=\"let rotation of rotations$ | async\"\n+ routerLink=\"/simulator/{{item.id}}/{{rotation.$key}}\">{{rotation.getName()}}\n+ </button>\n+ <mat-divider></mat-divider>\n+ <a href=\"{{craft | simulatorLink:'http://ffxiv-beta.lokyst.net' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'Doxxx'} }}\n+ </a>\n+ <a href=\"{{craft | simulatorLink:'https://ermad.github.io/ffxiv-craft-opt-web/app' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'Ermad'} }}\n+ </a>\n+ <a href=\"{{craft | simulatorLink:'https://ryan20340.github.io/app' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'ryan20340'} }}\n+ </a>\n+ </mat-menu>\n<button mat-icon-button [matMenuTriggerFor]=\"simulatorMenu\">\n<img [ngClass]=\"{'crafted-by':true, 'compact': settings.compactLists}\"\n*ngIf=\"craft.icon !== ''\"\n",
"new_path": "src/app/modules/item/item/item.component.html",
"old_path": "src/app/modules/item/item/item.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -308,6 +308,9 @@ export class ItemComponent extends ComponentWithSubscriptions implements OnInit,\n}\ngetCraft(recipeId: string): CraftedBy {\n+ if (this.item.craftedBy === undefined) {\n+ return undefined;\n+ }\nreturn this.item.craftedBy.find(craft => {\nreturn craft.recipeId === recipeId\n});\n",
"new_path": "src/app/modules/item/item/item.component.ts",
"old_path": "src/app/modules/item/item/item.component.ts"
},
{
"change_type": "ADD",
"diff": "+import {Pipe, PipeTransform} from '@angular/core';\n+import {SettingsService} from '../../pages/settings/settings.service';\n+import {LocalizedDataService} from '../../core/data/localized-data.service';\n+import {Recipe} from '../../model/list/recipe';\n+import {I18nName} from '../../model/list/i18n-name';\n+\n+@Pipe({\n+ name: 'simulatorLink',\n+ pure: true\n+})\n+export class SimulatorLinkPipe implements PipeTransform {\n+\n+ constructor(private settings: SettingsService, private localizedData: LocalizedDataService) {\n+ }\n+\n+ transform(craft: Recipe, baseLink: string): I18nName {\n+ return {\n+ en: `${baseLink}#/recipe?lang=en&class=${\n+ this.getJobName(craft)}&name=${this.localizedData.getItem(craft.itemId).en}`,\n+ fr: `${baseLink}#/recipe?lang=fr&class=${\n+ this.getJobName(craft)}&name=${this.localizedData.getItem(craft.itemId).fr}`,\n+ de: `${baseLink}#/recipe?lang=de&class=${\n+ this.getJobName(craft)}&name=${this.localizedData.getItem(craft.itemId).de}`,\n+ ja: `${baseLink}#/recipe?lang=ja&class=${\n+ this.getJobName(craft)}&name=${this.localizedData.getItem(craft.itemId).ja}`\n+ };\n+ }\n+\n+ getJobName(craft: Recipe): string {\n+ const splitIcon = craft.icon.split('/');\n+ const lowerCaseJobName = splitIcon[splitIcon.length - 1].replace('.png', '');\n+ return lowerCaseJobName.charAt(0).toUpperCase() + lowerCaseJobName.slice(1);\n+ }\n+\n+}\n",
"new_path": "src/app/modules/item/simulator-link.pipe.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "\"Rotation_not_found\": \"Rotation not found\",\n\"Confirm_delete\": \"Do you really want to delete this rotation?\",\n\"Toggle_snapshot_mode\": \"Toggle snapshot mode\",\n+ \"Open_in_external\": \"Open in {{name}}'s sim\",\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(simulator): added links to external simulators inside crafting menu
| 1
|
feat
|
simulator
|
217,922
|
10.05.2018 14:24:03
| -7,200
|
e1ce426697f4aaca12321acdea1ed78ceef108d0
|
style: level is now always visible for crafts on mobile
|
[
{
"change_type": "MODIFY",
"diff": "<mat-icon color=\"accent\">assignment</mat-icon>\n</button>\n<div class=\"classes\">\n- <div *ngIf=\"item.craftedBy !== undefined && item.craftedBy.length > 0\">\n- <button *ngFor=\"let craft of item.craftedBy\" [matMenuTriggerFor]=\"simulatorMenu\">\n- <img class=\"crafted-by\"\n+ <div *ngIf=\"recipe\">\n+ <mat-menu #simulatorMenu=\"matMenu\">\n+ <button mat-menu-item routerLink=\"/simulator/{{item.id}}\">{{'SIMULATOR.New_rotation' | translate}}\n+ </button>\n+ <button mat-menu-item\n+ *ngFor=\"let rotation of rotations$ | async\"\n+ routerLink=\"/simulator/{{item.id}}/{{rotation.$key}}\">{{rotation.getName()}}\n+ </button>\n+ <mat-divider></mat-divider>\n+ <a *ngIf=\"getCraft(item.recipeId) as craft\"\n+ href=\"{{craft | simulatorLink:'http://ffxiv-beta.lokyst.net' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'Doxxx'} }}\n+ </a>\n+ <a *ngIf=\"getCraft(item.recipeId) as craft\"\n+ href=\"{{craft | simulatorLink:'https://ermad.github.io/ffxiv-craft-opt-web/app' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'Ermad'} }}\n+ </a>\n+ <a *ngIf=\"getCraft(item.recipeId) as craft\"\n+ href=\"{{craft | simulatorLink:'https://ryan20340.github.io/app' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'ryan20340'} }}\n+ </a>\n+ </mat-menu>\n+ <button mat-icon-button [matMenuTriggerFor]=\"simulatorMenu\" *ngIf=\"getCraft(item.recipeId) as craft\" class=\"crafter-button\">\n+ <img [ngClass]=\"{'crafted-by':true}\" src=\"{{craft.icon}}\">\n+ <span class=\"crafter-level\">{{craft.level}} {{craft.stars_tooltip}}</span>\n+ </button>\n+ </div>\n+ <div *ngIf=\"!recipe\">\n+ <div *ngFor=\"let craft of item.craftedBy\">\n+ <mat-menu #simulatorMenu=\"matMenu\">\n+ <button mat-menu-item routerLink=\"/simulator/{{item.id}}\">{{'SIMULATOR.New_rotation' |\n+ translate}}\n+ </button>\n+ <button mat-menu-item\n+ *ngFor=\"let rotation of rotations$ | async\"\n+ routerLink=\"/simulator/{{item.id}}/{{rotation.$key}}\">{{rotation.getName()}}\n+ </button>\n+ <mat-divider></mat-divider>\n+ <a href=\"{{craft | simulatorLink:'http://ffxiv-beta.lokyst.net' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'Doxxx'} }}\n+ </a>\n+ <a href=\"{{craft | simulatorLink:'https://ermad.github.io/ffxiv-craft-opt-web/app' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'Ermad'} }}\n+ </a>\n+ <a href=\"{{craft | simulatorLink:'https://ryan20340.github.io/app' | i18n}}\"\n+ target=\"_blank\"\n+ mat-menu-item>\n+ {{'SIMULATOR.Open_in_external' | translate: {name: 'ryan20340'} }}\n+ </a>\n+ </mat-menu>\n+ <button mat-icon-button [matMenuTriggerFor]=\"simulatorMenu\" class=\"crafter-button\">\n+ <img [ngClass]=\"{'crafted-by':true, 'compact': settings.compactLists}\"\n*ngIf=\"craft.icon !== ''\"\n- matTooltip=\"{{craft.level}} {{craft.stars_tooltip}}\"\n- matTooltipPosition=\"above\" src=\"{{craft.icon}}\">\n+ src=\"{{craft.icon}}\">\n+ <span class=\"crafter-level\">{{craft.level}} {{craft.stars_tooltip}}</span>\n</button>\n</div>\n+ </div>\n<button mat-icon-button *ngIf=\"item.gatheredBy !== undefined\"\n(click)=\"openGatheredByDetails(item)\">\n<img class=\"crafted-by\"\n",
"new_path": "src/app/modules/item/item/item.component.html",
"old_path": "src/app/modules/item/item/item.component.html"
},
{
"change_type": "MODIFY",
"diff": "width: 24px;\nheight: 24px;\n}\n+ .crafter-button {\n+ position: relative;\n.crafted-by {\nheight: 24px;\n}\n+ .crafter-level {\n+ font-size: 90%;\n+ position: absolute;\n+ bottom: -20px;\n+ left: 6px;\n+ }\n+ }\n+\n.currency {\nwidth: 24px;\nmargin: 0;\n",
"new_path": "src/app/modules/item/item/item.component.scss",
"old_path": "src/app/modules/item/item/item.component.scss"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
style: level is now always visible for crafts on mobile
| 1
|
style
| null |
217,922
|
10.05.2018 14:31:53
| -7,200
|
eb123b38ae2e10b5dde95d7b9cb85b2f53346774
|
style: level is now always visible for crafts on browser (fix for firefox)
|
[
{
"change_type": "MODIFY",
"diff": "{{'SIMULATOR.Open_in_external' | translate: {name: 'ryan20340'} }}\n</a>\n</mat-menu>\n- <button mat-icon-button [matMenuTriggerFor]=\"simulatorMenu\" *ngIf=\"getCraft(item.recipeId) as craft\">\n+ <button mat-icon-button class=\"crafter-button\" [matMenuTriggerFor]=\"simulatorMenu\" *ngIf=\"getCraft(item.recipeId) as craft\">\n<img [ngClass]=\"{'crafted-by':true, 'compact': settings.compactLists}\"\n- matTooltip=\"{{craft.level}} {{craft.stars_tooltip}}\"\n- matTooltipPosition=\"above\" src=\"{{craft.icon}}\">\n+ src=\"{{craft.icon}}\">\n+ <span class=\"crafter-level\">{{craft.level}} {{craft.stars_tooltip}}</span>\n</button>\n</div>\n<div *ngIf=\"!recipe\">\n{{'SIMULATOR.Open_in_external' | translate: {name: 'ryan20340'} }}\n</a>\n</mat-menu>\n- <button mat-icon-button [matMenuTriggerFor]=\"simulatorMenu\">\n+ <button mat-icon-button class=\"crafter-button\" [matMenuTriggerFor]=\"simulatorMenu\">\n<img [ngClass]=\"{'crafted-by':true, 'compact': settings.compactLists}\"\n*ngIf=\"craft.icon !== ''\"\n- matTooltip=\"{{craft.level}} {{craft.stars_tooltip}}\"\n- matTooltipPosition=\"above\" src=\"{{craft.icon}}\">\n+ src=\"{{craft.icon}}\">\n+ <span class=\"crafter-level\">{{craft.level}} {{craft.stars_tooltip}}</span>\n</button>\n</div>\n</div>\n",
"new_path": "src/app/modules/item/item/item.component.html",
"old_path": "src/app/modules/item/item/item.component.html"
},
{
"change_type": "MODIFY",
"diff": "}\ntext-align: center;\n}\n+\n.crafted-by {\nheight: 30px;\n&.compact {\nheight: 20px;\n}\n}\n+\n+ .crafter-button {\n+ position: relative;\n+ .crafter-level {\n+ font-size: 90%;\n+ position: absolute;\n+ bottom: -22px;\n+ left: 30%;\n+ }\n+ }\n.timers-container {\ndisplay: flex;\n.timer {\nwidth: 24px;\nheight: 24px;\n}\n- .crafter-button {\n- position: relative;\n.crafted-by {\nheight: 24px;\n}\n+ .crafter-button {\n+ position: relative;\n.crafter-level {\nfont-size: 90%;\nposition: absolute;\n",
"new_path": "src/app/modules/item/item/item.component.scss",
"old_path": "src/app/modules/item/item/item.component.scss"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
style: level is now always visible for crafts on browser (fix for firefox)
| 1
|
style
| null |
679,913
|
10.05.2018 14:55:21
| -3,600
|
6d12ae0855d33c4dbef1b238527faf5f6c00c978
|
feat(equiv): add new package
|
[
{
"change_type": "ADD",
"diff": "+build\n+coverage\n+dev\n+doc\n+src*\n+test\n+.nyc_output\n+tsconfig.json\n+*.tgz\n+*.html\n",
"new_path": "packages/equiv/.npmignore",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+ Apache License\n+ Version 2.0, January 2004\n+ http://www.apache.org/licenses/\n+\n+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n+\n+ 1. Definitions.\n+\n+ \"License\" shall mean the terms and conditions for use, reproduction,\n+ and distribution as defined by Sections 1 through 9 of this document.\n+\n+ \"Licensor\" shall mean the copyright owner or entity authorized by\n+ the copyright owner that is granting the License.\n+\n+ \"Legal Entity\" shall mean the union of the acting entity and all\n+ other entities that control, are controlled by, or are under common\n+ control with that entity. For the purposes of this definition,\n+ \"control\" means (i) the power, direct or indirect, to cause the\n+ direction or management of such entity, whether by contract or\n+ otherwise, or (ii) ownership of fifty percent (50%) or more of the\n+ outstanding shares, or (iii) beneficial ownership of such entity.\n+\n+ \"You\" (or \"Your\") shall mean an individual or Legal Entity\n+ exercising permissions granted by this License.\n+\n+ \"Source\" form shall mean the preferred form for making modifications,\n+ including but not limited to software source code, documentation\n+ source, and configuration files.\n+\n+ \"Object\" form shall mean any form resulting from mechanical\n+ transformation or translation of a Source form, including but\n+ not limited to compiled object code, generated documentation,\n+ and conversions to other media types.\n+\n+ \"Work\" shall mean the work of authorship, whether in Source or\n+ Object form, made available under the License, as indicated by a\n+ copyright notice that is included in or attached to the work\n+ (an example is provided in the Appendix below).\n+\n+ \"Derivative Works\" shall mean any work, whether in Source or Object\n+ form, that is based on (or derived from) the Work and for which the\n+ editorial revisions, annotations, elaborations, or other modifications\n+ represent, as a whole, an original work of authorship. For the purposes\n+ of this License, Derivative Works shall not include works that remain\n+ separable from, or merely link (or bind by name) to the interfaces of,\n+ the Work and Derivative Works thereof.\n+\n+ \"Contribution\" shall mean any work of authorship, including\n+ the original version of the Work and any modifications or additions\n+ to that Work or Derivative Works thereof, that is intentionally\n+ submitted to Licensor for inclusion in the Work by the copyright owner\n+ or by an individual or Legal Entity authorized to submit on behalf of\n+ the copyright owner. For the purposes of this definition, \"submitted\"\n+ means any form of electronic, verbal, or written communication sent\n+ to the Licensor or its representatives, including but not limited to\n+ communication on electronic mailing lists, source code control systems,\n+ and issue tracking systems that are managed by, or on behalf of, the\n+ Licensor for the purpose of discussing and improving the Work, but\n+ excluding communication that is conspicuously marked or otherwise\n+ designated in writing by the copyright owner as \"Not a Contribution.\"\n+\n+ \"Contributor\" shall mean Licensor and any individual or Legal Entity\n+ on behalf of whom a Contribution has been received by Licensor and\n+ subsequently incorporated within the Work.\n+\n+ 2. Grant of Copyright License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ copyright license to reproduce, prepare Derivative Works of,\n+ publicly display, publicly perform, sublicense, and distribute the\n+ Work and such Derivative Works in Source or Object form.\n+\n+ 3. Grant of Patent License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ (except as stated in this section) patent license to make, have made,\n+ use, offer to sell, sell, import, and otherwise transfer the Work,\n+ where such license applies only to those patent claims licensable\n+ by such Contributor that are necessarily infringed by their\n+ Contribution(s) alone or by combination of their Contribution(s)\n+ with the Work to which such Contribution(s) was submitted. If You\n+ institute patent litigation against any entity (including a\n+ cross-claim or counterclaim in a lawsuit) alleging that the Work\n+ or a Contribution incorporated within the Work constitutes direct\n+ or contributory patent infringement, then any patent licenses\n+ granted to You under this License for that Work shall terminate\n+ as of the date such litigation is filed.\n+\n+ 4. Redistribution. You may reproduce and distribute copies of the\n+ Work or Derivative Works thereof in any medium, with or without\n+ modifications, and in Source or Object form, provided that You\n+ meet the following conditions:\n+\n+ (a) You must give any other recipients of the Work or\n+ Derivative Works a copy of this License; and\n+\n+ (b) You must cause any modified files to carry prominent notices\n+ stating that You changed the files; and\n+\n+ (c) You must retain, in the Source form of any Derivative Works\n+ that You distribute, all copyright, patent, trademark, and\n+ attribution notices from the Source form of the Work,\n+ excluding those notices that do not pertain to any part of\n+ the Derivative Works; and\n+\n+ (d) If the Work includes a \"NOTICE\" text file as part of its\n+ distribution, then any Derivative Works that You distribute must\n+ include a readable copy of the attribution notices contained\n+ within such NOTICE file, excluding those notices that do not\n+ pertain to any part of the Derivative Works, in at least one\n+ of the following places: within a NOTICE text file distributed\n+ as part of the Derivative Works; within the Source form or\n+ documentation, if provided along with the Derivative Works; or,\n+ within a display generated by the Derivative Works, if and\n+ wherever such third-party notices normally appear. The contents\n+ of the NOTICE file are for informational purposes only and\n+ do not modify the License. You may add Your own attribution\n+ notices within Derivative Works that You distribute, alongside\n+ or as an addendum to the NOTICE text from the Work, provided\n+ that such additional attribution notices cannot be construed\n+ as modifying the License.\n+\n+ You may add Your own copyright statement to Your modifications and\n+ may provide additional or different license terms and conditions\n+ for use, reproduction, or distribution of Your modifications, or\n+ for any such Derivative Works as a whole, provided Your use,\n+ reproduction, and distribution of the Work otherwise complies with\n+ the conditions stated in this License.\n+\n+ 5. Submission of Contributions. Unless You explicitly state otherwise,\n+ any Contribution intentionally submitted for inclusion in the Work\n+ by You to the Licensor shall be under the terms and conditions of\n+ this License, without any additional terms or conditions.\n+ Notwithstanding the above, nothing herein shall supersede or modify\n+ the terms of any separate license agreement you may have executed\n+ with Licensor regarding such Contributions.\n+\n+ 6. Trademarks. This License does not grant permission to use the trade\n+ names, trademarks, service marks, or product names of the Licensor,\n+ except as required for reasonable and customary use in describing the\n+ origin of the Work and reproducing the content of the NOTICE file.\n+\n+ 7. Disclaimer of Warranty. Unless required by applicable law or\n+ agreed to in writing, Licensor provides the Work (and each\n+ Contributor provides its Contributions) on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+ implied, including, without limitation, any warranties or conditions\n+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n+ PARTICULAR PURPOSE. You are solely responsible for determining the\n+ appropriateness of using or redistributing the Work and assume any\n+ risks associated with Your exercise of permissions under this License.\n+\n+ 8. Limitation of Liability. In no event and under no legal theory,\n+ whether in tort (including negligence), contract, or otherwise,\n+ unless required by applicable law (such as deliberate and grossly\n+ negligent acts) or agreed to in writing, shall any Contributor be\n+ liable to You for damages, including any direct, indirect, special,\n+ incidental, or consequential damages of any character arising as a\n+ result of this License or out of the use or inability to use the\n+ Work (including but not limited to damages for loss of goodwill,\n+ work stoppage, computer failure or malfunction, or any and all\n+ other commercial damages or losses), even if such Contributor\n+ has been advised of the possibility of such damages.\n+\n+ 9. Accepting Warranty or Additional Liability. While redistributing\n+ the Work or Derivative Works thereof, You may choose to offer,\n+ and charge a fee for, acceptance of support, warranty, indemnity,\n+ or other liability obligations and/or rights consistent with this\n+ License. However, in accepting such obligations, You may act only\n+ on Your own behalf and on Your sole responsibility, not on behalf\n+ of any other Contributor, and only if You agree to indemnify,\n+ defend, and hold each Contributor harmless for any liability\n+ incurred by, or claims asserted against, such Contributor by reason\n+ of your accepting any such warranty or additional liability.\n+\n+ END OF TERMS AND CONDITIONS\n+\n+ APPENDIX: How to apply the Apache License to your work.\n+\n+ To apply the Apache License to your work, attach the following\n+ boilerplate notice, with the fields enclosed by brackets \"{}\"\n+ replaced with your own identifying information. (Don't include\n+ the brackets!) The text should be enclosed in the appropriate\n+ comment syntax for the file format. We also recommend that a\n+ file or class name and description of purpose be included on the\n+ same \"printed page\" as the copyright notice for easier\n+ identification within third-party archives.\n+\n+ Copyright {yyyy} {name of copyright owner}\n+\n+ Licensed under the Apache License, Version 2.0 (the \"License\");\n+ you may not use this file except in compliance with the License.\n+ You may obtain a copy of the License at\n+\n+ http://www.apache.org/licenses/LICENSE-2.0\n+\n+ Unless required by applicable law or agreed to in writing, software\n+ distributed under the License is distributed on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ See the License for the specific language governing permissions and\n+ limitations under the License.\n",
"new_path": "packages/equiv/LICENSE",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+# @thi.ng/equiv\n+\n+[](https://www.npmjs.com/package/@thi.ng/equiv)\n+\n+This project is part of the\n+[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.\n+\n+## About\n+\n+TODO...\n+\n+## Installation\n+\n+```\n+yarn add @thi.ng/equiv\n+```\n+\n+## Usage examples\n+\n+```typescript\n+import * as equiv from \"@thi.ng/equiv\";\n+```\n+\n+## Authors\n+\n+- Karsten Schmidt\n+\n+## License\n+\n+© 2018 Karsten Schmidt // Apache Software License 2.0\n",
"new_path": "packages/equiv/README.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"@thi.ng/equiv\",\n+ \"version\": \"0.0.1\",\n+ \"description\": \"TODO\",\n+ \"main\": \"./index.js\",\n+ \"typings\": \"./index.d.ts\",\n+ \"repository\": \"https://github.com/thi-ng/umbrella\",\n+ \"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n+ \"license\": \"Apache-2.0\",\n+ \"scripts\": {\n+ \"build\": \"yarn run clean && tsc --declaration\",\n+ \"clean\": \"rm -rf *.js *.d.ts .nyc_output build coverage doc\",\n+ \"cover\": \"yarn test && nyc report --reporter=lcov\",\n+ \"doc\": \"node_modules/.bin/typedoc --mode modules --out doc src\",\n+ \"pub\": \"yarn run build && yarn publish --access public\",\n+ \"test\": \"rm -rf build && tsc -p test && nyc mocha build/test/*.js\"\n+ },\n+ \"devDependencies\": {\n+ \"@types/mocha\": \"^5.2.0\",\n+ \"@types/node\": \"^10.0.6\",\n+ \"mocha\": \"^5.1.1\",\n+ \"nyc\": \"^11.7.1\",\n+ \"typedoc\": \"^0.11.1\",\n+ \"typescript\": \"^2.8.3\"\n+ },\n+ \"dependencies\": {\n+ \"@thi.ng/checks\": \"^1.5.2\"\n+ },\n+ \"keywords\": [\n+ \"ES6\",\n+ \"typescript\"\n+ ],\n+ \"publishConfig\": {\n+ \"access\": \"public\"\n+ }\n+}\n\\ No newline at end of file\n",
"new_path": "packages/equiv/package.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { isArrayLike } from \"@thi.ng/checks/is-arraylike\";\n+import { isDate } from \"@thi.ng/checks/is-date\";\n+import { isMap } from \"@thi.ng/checks/is-map\";\n+import { isPlainObject } from \"@thi.ng/checks/is-plain-object\";\n+import { isRegExp } from \"@thi.ng/checks/is-regexp\";\n+import { isSet } from \"@thi.ng/checks/is-set\";\n+\n+export const equiv = (a, b): boolean => {\n+ if (a === b) {\n+ return true;\n+ }\n+ if (a != null) {\n+ if (typeof a.equiv === \"function\") {\n+ return a.equiv(b);\n+ }\n+ } else {\n+ return a == b;\n+ }\n+ if (b != null) {\n+ if (typeof b.equiv === \"function\") {\n+ return b.equiv(a);\n+ }\n+ } else {\n+ return a == b;\n+ }\n+ if (typeof a === \"string\" || typeof b === \"string\") {\n+ return false;\n+ }\n+ if (isPlainObject(a) && isPlainObject(b)) {\n+ return equivObject(a, b);\n+ }\n+ if (isArrayLike(a) && isArrayLike(b)) {\n+ return equivArrayLike(a, b);\n+ }\n+ if (isSet(a) && isSet(b)) {\n+ return equivSet(a, b);\n+ }\n+ if (isMap(a) && isMap(b)) {\n+ return equivMap(a, b);\n+ }\n+ if (isDate(a) && isDate(b)) {\n+ return a.getTime() === b.getTime();\n+ }\n+ if (isRegExp(a) && isRegExp(b)) {\n+ return a.toString() === b.toString();\n+ }\n+ // NaN\n+ return (a !== a && b !== b);\n+};\n+\n+const equivArrayLike = (a: ArrayLike<any>, b: ArrayLike<any>) => {\n+ let l = a.length;\n+ if (b.length === l) {\n+ while (--l >= 0 && equiv(a[l], b[l]));\n+ }\n+ return l < 0;\n+};\n+\n+const equivSet = (a: Set<any>, b: Set<any>) =>\n+ (a.size === b.size) &&\n+ equiv([...a.keys()].sort(), [...b.keys()].sort());\n+\n+const equivMap = (a: Map<any, any>, b: Map<any, any>) =>\n+ (a.size === b.size) &&\n+ equiv([...a].sort(), [...b].sort());\n+\n+const equivObject = (a: any, b: any) => {\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])) {\n+ return false;\n+ }\n+ }\n+ return true;\n+};\n",
"new_path": "packages/equiv/src/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import * as assert from \"assert\";\n+\n+import { equiv } from \"../src/\";\n+\n+describe(\"equiv\", () => {\n+\n+ it(\"null\", () => {\n+ assert(equiv(null, null));\n+ assert(equiv(null, undefined));\n+ assert(equiv(undefined, null));\n+ });\n+\n+ it(\"boolean\", () => {\n+ assert(!equiv(null, false));\n+ assert(!equiv(false, null));\n+ assert(!equiv(undefined, false));\n+ assert(!equiv(false, undefined));\n+ });\n+\n+ it(\"number\", () => {\n+ assert(!equiv(null, 0));\n+ assert(!equiv(0, null));\n+ assert(!equiv(0, undefined));\n+ assert(!equiv(undefined, 0));\n+\n+ assert(equiv(0, 0));\n+ assert(equiv(0, 0.0));\n+ assert(!equiv(0, 1));\n+ assert(!equiv(1, 0));\n+ assert(!equiv(0, \"0\"));\n+ assert(!equiv(\"0\", 0));\n+ assert(!equiv(0, [0]));\n+ assert(!equiv([0], 0));\n+ });\n+\n+ it(\"string\", () => {\n+ assert(!equiv(null, \"\"));\n+ assert(!equiv(\"\", null));\n+ assert(equiv(\"a\", \"a\"));\n+ assert(!equiv(\"a\", \"ab\"));\n+ });\n+\n+ it(\"array\", () => {\n+ assert(equiv([], []));\n+ assert(equiv([], []));\n+ assert(equiv([], { length: 0 }));\n+ assert(equiv({ length: 0 }, []));\n+ assert(equiv([\"a\"], [\"a\"]));\n+ assert(!equiv([\"a\"], [\"b\"]));\n+ });\n+\n+ it(\"object\", () => {\n+ assert(!equiv(undefined, {}));\n+ assert(!equiv({}, undefined));\n+ assert(!equiv(null, {}));\n+ assert(!equiv({}, null));\n+\n+ assert(equiv({}, {}));\n+ assert(!equiv({}, []));\n+ assert(!equiv([], {}));\n+ assert(equiv({ a: 0 }, { a: 0 }));\n+ assert(equiv({ a: 0, b: { c: 1 } }, { a: 0, b: { c: 1 } }));\n+ assert(!equiv({ a: 0, b: { c: 1 } }, { a: 0, b: { c: 2 } }));\n+ assert(!equiv({ a: 0, b: { c: 1 } }, { a: 0, b: {} }));\n+ });\n+\n+ it(\"equiv impl\", () => {\n+ class A {\n+ a: any;\n+ constructor(a) {\n+ this.a = a;\n+ }\n+\n+ equiv(b) {\n+ return equiv(this.a, b);\n+ }\n+ }\n+\n+ assert(!equiv(new A(1), null));\n+ assert(!equiv(new A(1), undefined));\n+ assert(!equiv(null, new A(1)));\n+ assert(!equiv(undefined, new A(1)));\n+ assert(equiv(new A(1), new A(1)));\n+ assert(equiv(new A(1), 1));\n+ assert(equiv(1, new A(1)));\n+ assert(equiv(1, { equiv(x) { return x === 1; } }));\n+ assert(equiv({ equiv(x) { return x === 1; } }, 1));\n+ assert(!equiv(new A(1), new A(2)));\n+ assert(!equiv(new A(1), 2));\n+ });\n+\n+ it(\"set\", () => {\n+ const a = new Set([1, 2, 3]);\n+ assert(equiv(a, a));\n+ assert(equiv(a, new Set([3, 2, 1])));\n+ assert(equiv(new Set([{ a: 1 }, new Set([{ b: 2 }, [3]])]), new Set([new Set([[3], { b: 2 }]), { a: 1 }])));\n+ assert(!equiv(a, new Set([3, 2, 0])));\n+ assert(!equiv(a, [3, 2, 0]));\n+ assert(!equiv(a, new Map([[3, 3], [2, 2], [1, 1]])));\n+ assert(!equiv(a, null));\n+ assert(!equiv(null, a));\n+ });\n+\n+ it(\"date\", () => {\n+ const a = new Date(123456);\n+ assert(equiv(a, a));\n+ assert(equiv(a, new Date(123456)));\n+ assert(!equiv(a, new Date(123)));\n+ });\n+\n+ it(\"regexp\", () => {\n+ const a = /(\\w+)/g;\n+ assert(equiv(a, a));\n+ assert(equiv(a, /(\\w+)/g));\n+ assert(!equiv(a, /(\\w+)/));\n+ assert(!equiv(a, /(\\w*)/g));\n+ });\n+});\n",
"new_path": "packages/equiv/test/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \"../build\"\n+ },\n+ \"include\": [\n+ \"./**/*.ts\",\n+ \"../src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/equiv/test/tsconfig.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \".\"\n+ },\n+ \"include\": [\n+ \"./src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/equiv/tsconfig.json",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(equiv): add new package @thi.ng/equiv
| 1
|
feat
|
equiv
|
679,913
|
10.05.2018 14:56:07
| -3,600
|
1e97856f859f3da1d43795b978c1fe70d680573f
|
feat(errors): add new package
|
[
{
"change_type": "ADD",
"diff": "+build\n+coverage\n+dev\n+doc\n+src*\n+test\n+.nyc_output\n+tsconfig.json\n+*.tgz\n+*.html\n",
"new_path": "packages/errors/.npmignore",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+ Apache License\n+ Version 2.0, January 2004\n+ http://www.apache.org/licenses/\n+\n+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n+\n+ 1. Definitions.\n+\n+ \"License\" shall mean the terms and conditions for use, reproduction,\n+ and distribution as defined by Sections 1 through 9 of this document.\n+\n+ \"Licensor\" shall mean the copyright owner or entity authorized by\n+ the copyright owner that is granting the License.\n+\n+ \"Legal Entity\" shall mean the union of the acting entity and all\n+ other entities that control, are controlled by, or are under common\n+ control with that entity. For the purposes of this definition,\n+ \"control\" means (i) the power, direct or indirect, to cause the\n+ direction or management of such entity, whether by contract or\n+ otherwise, or (ii) ownership of fifty percent (50%) or more of the\n+ outstanding shares, or (iii) beneficial ownership of such entity.\n+\n+ \"You\" (or \"Your\") shall mean an individual or Legal Entity\n+ exercising permissions granted by this License.\n+\n+ \"Source\" form shall mean the preferred form for making modifications,\n+ including but not limited to software source code, documentation\n+ source, and configuration files.\n+\n+ \"Object\" form shall mean any form resulting from mechanical\n+ transformation or translation of a Source form, including but\n+ not limited to compiled object code, generated documentation,\n+ and conversions to other media types.\n+\n+ \"Work\" shall mean the work of authorship, whether in Source or\n+ Object form, made available under the License, as indicated by a\n+ copyright notice that is included in or attached to the work\n+ (an example is provided in the Appendix below).\n+\n+ \"Derivative Works\" shall mean any work, whether in Source or Object\n+ form, that is based on (or derived from) the Work and for which the\n+ editorial revisions, annotations, elaborations, or other modifications\n+ represent, as a whole, an original work of authorship. For the purposes\n+ of this License, Derivative Works shall not include works that remain\n+ separable from, or merely link (or bind by name) to the interfaces of,\n+ the Work and Derivative Works thereof.\n+\n+ \"Contribution\" shall mean any work of authorship, including\n+ the original version of the Work and any modifications or additions\n+ to that Work or Derivative Works thereof, that is intentionally\n+ submitted to Licensor for inclusion in the Work by the copyright owner\n+ or by an individual or Legal Entity authorized to submit on behalf of\n+ the copyright owner. For the purposes of this definition, \"submitted\"\n+ means any form of electronic, verbal, or written communication sent\n+ to the Licensor or its representatives, including but not limited to\n+ communication on electronic mailing lists, source code control systems,\n+ and issue tracking systems that are managed by, or on behalf of, the\n+ Licensor for the purpose of discussing and improving the Work, but\n+ excluding communication that is conspicuously marked or otherwise\n+ designated in writing by the copyright owner as \"Not a Contribution.\"\n+\n+ \"Contributor\" shall mean Licensor and any individual or Legal Entity\n+ on behalf of whom a Contribution has been received by Licensor and\n+ subsequently incorporated within the Work.\n+\n+ 2. Grant of Copyright License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ copyright license to reproduce, prepare Derivative Works of,\n+ publicly display, publicly perform, sublicense, and distribute the\n+ Work and such Derivative Works in Source or Object form.\n+\n+ 3. Grant of Patent License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ (except as stated in this section) patent license to make, have made,\n+ use, offer to sell, sell, import, and otherwise transfer the Work,\n+ where such license applies only to those patent claims licensable\n+ by such Contributor that are necessarily infringed by their\n+ Contribution(s) alone or by combination of their Contribution(s)\n+ with the Work to which such Contribution(s) was submitted. If You\n+ institute patent litigation against any entity (including a\n+ cross-claim or counterclaim in a lawsuit) alleging that the Work\n+ or a Contribution incorporated within the Work constitutes direct\n+ or contributory patent infringement, then any patent licenses\n+ granted to You under this License for that Work shall terminate\n+ as of the date such litigation is filed.\n+\n+ 4. Redistribution. You may reproduce and distribute copies of the\n+ Work or Derivative Works thereof in any medium, with or without\n+ modifications, and in Source or Object form, provided that You\n+ meet the following conditions:\n+\n+ (a) You must give any other recipients of the Work or\n+ Derivative Works a copy of this License; and\n+\n+ (b) You must cause any modified files to carry prominent notices\n+ stating that You changed the files; and\n+\n+ (c) You must retain, in the Source form of any Derivative Works\n+ that You distribute, all copyright, patent, trademark, and\n+ attribution notices from the Source form of the Work,\n+ excluding those notices that do not pertain to any part of\n+ the Derivative Works; and\n+\n+ (d) If the Work includes a \"NOTICE\" text file as part of its\n+ distribution, then any Derivative Works that You distribute must\n+ include a readable copy of the attribution notices contained\n+ within such NOTICE file, excluding those notices that do not\n+ pertain to any part of the Derivative Works, in at least one\n+ of the following places: within a NOTICE text file distributed\n+ as part of the Derivative Works; within the Source form or\n+ documentation, if provided along with the Derivative Works; or,\n+ within a display generated by the Derivative Works, if and\n+ wherever such third-party notices normally appear. The contents\n+ of the NOTICE file are for informational purposes only and\n+ do not modify the License. You may add Your own attribution\n+ notices within Derivative Works that You distribute, alongside\n+ or as an addendum to the NOTICE text from the Work, provided\n+ that such additional attribution notices cannot be construed\n+ as modifying the License.\n+\n+ You may add Your own copyright statement to Your modifications and\n+ may provide additional or different license terms and conditions\n+ for use, reproduction, or distribution of Your modifications, or\n+ for any such Derivative Works as a whole, provided Your use,\n+ reproduction, and distribution of the Work otherwise complies with\n+ the conditions stated in this License.\n+\n+ 5. Submission of Contributions. Unless You explicitly state otherwise,\n+ any Contribution intentionally submitted for inclusion in the Work\n+ by You to the Licensor shall be under the terms and conditions of\n+ this License, without any additional terms or conditions.\n+ Notwithstanding the above, nothing herein shall supersede or modify\n+ the terms of any separate license agreement you may have executed\n+ with Licensor regarding such Contributions.\n+\n+ 6. Trademarks. This License does not grant permission to use the trade\n+ names, trademarks, service marks, or product names of the Licensor,\n+ except as required for reasonable and customary use in describing the\n+ origin of the Work and reproducing the content of the NOTICE file.\n+\n+ 7. Disclaimer of Warranty. Unless required by applicable law or\n+ agreed to in writing, Licensor provides the Work (and each\n+ Contributor provides its Contributions) on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+ implied, including, without limitation, any warranties or conditions\n+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n+ PARTICULAR PURPOSE. You are solely responsible for determining the\n+ appropriateness of using or redistributing the Work and assume any\n+ risks associated with Your exercise of permissions under this License.\n+\n+ 8. Limitation of Liability. In no event and under no legal theory,\n+ whether in tort (including negligence), contract, or otherwise,\n+ unless required by applicable law (such as deliberate and grossly\n+ negligent acts) or agreed to in writing, shall any Contributor be\n+ liable to You for damages, including any direct, indirect, special,\n+ incidental, or consequential damages of any character arising as a\n+ result of this License or out of the use or inability to use the\n+ Work (including but not limited to damages for loss of goodwill,\n+ work stoppage, computer failure or malfunction, or any and all\n+ other commercial damages or losses), even if such Contributor\n+ has been advised of the possibility of such damages.\n+\n+ 9. Accepting Warranty or Additional Liability. While redistributing\n+ the Work or Derivative Works thereof, You may choose to offer,\n+ and charge a fee for, acceptance of support, warranty, indemnity,\n+ or other liability obligations and/or rights consistent with this\n+ License. However, in accepting such obligations, You may act only\n+ on Your own behalf and on Your sole responsibility, not on behalf\n+ of any other Contributor, and only if You agree to indemnify,\n+ defend, and hold each Contributor harmless for any liability\n+ incurred by, or claims asserted against, such Contributor by reason\n+ of your accepting any such warranty or additional liability.\n+\n+ END OF TERMS AND CONDITIONS\n+\n+ APPENDIX: How to apply the Apache License to your work.\n+\n+ To apply the Apache License to your work, attach the following\n+ boilerplate notice, with the fields enclosed by brackets \"{}\"\n+ replaced with your own identifying information. (Don't include\n+ the brackets!) The text should be enclosed in the appropriate\n+ comment syntax for the file format. We also recommend that a\n+ file or class name and description of purpose be included on the\n+ same \"printed page\" as the copyright notice for easier\n+ identification within third-party archives.\n+\n+ Copyright {yyyy} {name of copyright owner}\n+\n+ Licensed under the Apache License, Version 2.0 (the \"License\");\n+ you may not use this file except in compliance with the License.\n+ You may obtain a copy of the License at\n+\n+ http://www.apache.org/licenses/LICENSE-2.0\n+\n+ Unless required by applicable law or agreed to in writing, software\n+ distributed under the License is distributed on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ See the License for the specific language governing permissions and\n+ limitations under the License.\n",
"new_path": "packages/errors/LICENSE",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+# @thi.ng/errors\n+\n+[](https://www.npmjs.com/package/@thi.ng/errors)\n+\n+This project is part of the\n+[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.\n+\n+## About\n+\n+TODO...\n+\n+## Installation\n+\n+```\n+yarn add @thi.ng/errors\n+```\n+\n+## Usage examples\n+\n+```typescript\n+import * as errors from \"@thi.ng/errors\";\n+```\n+\n+## Authors\n+\n+- Karsten Schmidt\n+\n+## License\n+\n+© 2018 Karsten Schmidt // Apache Software License 2.0\n",
"new_path": "packages/errors/README.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"@thi.ng/errors\",\n+ \"version\": \"0.0.1\",\n+ \"description\": \"TODO\",\n+ \"main\": \"./index.js\",\n+ \"typings\": \"./index.d.ts\",\n+ \"repository\": \"https://github.com/thi-ng/umbrella\",\n+ \"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n+ \"license\": \"Apache-2.0\",\n+ \"scripts\": {\n+ \"build\": \"yarn run clean && tsc --declaration\",\n+ \"clean\": \"rm -rf *.js *.d.ts .nyc_output build coverage doc\",\n+ \"cover\": \"yarn test && nyc report --reporter=lcov\",\n+ \"doc\": \"node_modules/.bin/typedoc --mode modules --out doc src\",\n+ \"pub\": \"yarn run build && yarn publish --access public\",\n+ \"test\": \"rm -rf build && tsc -p test && nyc mocha build/test/*.js\"\n+ },\n+ \"devDependencies\": {\n+ \"@types/mocha\": \"^5.2.0\",\n+ \"@types/node\": \"^10.0.6\",\n+ \"mocha\": \"^5.1.1\",\n+ \"nyc\": \"^11.7.1\",\n+ \"typedoc\": \"^0.11.1\",\n+ \"typescript\": \"^2.8.3\"\n+ },\n+ \"dependencies\": {},\n+ \"keywords\": [\n+ \"ES6\",\n+ \"typescript\"\n+ ],\n+ \"publishConfig\": {\n+ \"access\": \"public\"\n+ }\n+}\n\\ No newline at end of file\n",
"new_path": "packages/errors/package.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export class IllegalArgumentError extends Error {\n+ constructor(msg?: any) {\n+ super(\"illegal argument(s)\" + (msg !== undefined ? \": \" + msg : \"\"));\n+ }\n+}\n+\n+export function illegalArgs(msg?: any) {\n+ throw new IllegalArgumentError(msg);\n+}\n",
"new_path": "packages/errors/src/illegal-arguments.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export class IllegalArityError extends Error {\n+ constructor(n: number) {\n+ super(`illegal arity: ${n}`);\n+ }\n+}\n+\n+export function illegalArity(n) {\n+ throw new IllegalArityError(n);\n+}\n",
"new_path": "packages/errors/src/illegal-arity.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export class IllegalStateError extends Error {\n+ constructor(msg?: any) {\n+ super(\"illegal state\" + (msg !== undefined ? \": \" + msg : \"\"));\n+ }\n+}\n+\n+export function illegalState(msg?: any) {\n+ throw new IllegalStateError(msg);\n+}\n",
"new_path": "packages/errors/src/illegal-state.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export * from \"./illegal-arguments\";\n+export * from \"./illegal-arity\";\n+export * from \"./illegal-state\";\n+export * from \"./unsupported\";\n",
"new_path": "packages/errors/src/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export class UnsupportedOperationError extends Error {\n+ constructor(msg?: any) {\n+ super(\"unsupported operation\" + (msg !== undefined ? \": \" + msg : \"\"));\n+ }\n+}\n+\n+export function unsupported(msg?: any) {\n+ throw new UnsupportedOperationError(msg);\n+}\n",
"new_path": "packages/errors/src/unsupported.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+// import * as assert from \"assert\";\n+// import * as errors from \"../src/index\";\n+\n+describe(\"errors\", () => {\n+ it(\"tests pending\");\n+});\n",
"new_path": "packages/errors/test/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \"../build\"\n+ },\n+ \"include\": [\n+ \"./**/*.ts\",\n+ \"../src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/errors/test/tsconfig.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \".\"\n+ },\n+ \"include\": [\n+ \"./src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/errors/tsconfig.json",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(errors): add new package @thi.ng/errors
| 1
|
feat
|
errors
|
679,913
|
10.05.2018 14:56:46
| -3,600
|
e4a87c414d3befaaf1e0d90f6e74b39014cc74f5
|
feat(compare): add new package
|
[
{
"change_type": "ADD",
"diff": "+build\n+coverage\n+dev\n+doc\n+src*\n+test\n+.nyc_output\n+tsconfig.json\n+*.tgz\n+*.html\n",
"new_path": "packages/compare/.npmignore",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+ Apache License\n+ Version 2.0, January 2004\n+ http://www.apache.org/licenses/\n+\n+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n+\n+ 1. Definitions.\n+\n+ \"License\" shall mean the terms and conditions for use, reproduction,\n+ and distribution as defined by Sections 1 through 9 of this document.\n+\n+ \"Licensor\" shall mean the copyright owner or entity authorized by\n+ the copyright owner that is granting the License.\n+\n+ \"Legal Entity\" shall mean the union of the acting entity and all\n+ other entities that control, are controlled by, or are under common\n+ control with that entity. For the purposes of this definition,\n+ \"control\" means (i) the power, direct or indirect, to cause the\n+ direction or management of such entity, whether by contract or\n+ otherwise, or (ii) ownership of fifty percent (50%) or more of the\n+ outstanding shares, or (iii) beneficial ownership of such entity.\n+\n+ \"You\" (or \"Your\") shall mean an individual or Legal Entity\n+ exercising permissions granted by this License.\n+\n+ \"Source\" form shall mean the preferred form for making modifications,\n+ including but not limited to software source code, documentation\n+ source, and configuration files.\n+\n+ \"Object\" form shall mean any form resulting from mechanical\n+ transformation or translation of a Source form, including but\n+ not limited to compiled object code, generated documentation,\n+ and conversions to other media types.\n+\n+ \"Work\" shall mean the work of authorship, whether in Source or\n+ Object form, made available under the License, as indicated by a\n+ copyright notice that is included in or attached to the work\n+ (an example is provided in the Appendix below).\n+\n+ \"Derivative Works\" shall mean any work, whether in Source or Object\n+ form, that is based on (or derived from) the Work and for which the\n+ editorial revisions, annotations, elaborations, or other modifications\n+ represent, as a whole, an original work of authorship. For the purposes\n+ of this License, Derivative Works shall not include works that remain\n+ separable from, or merely link (or bind by name) to the interfaces of,\n+ the Work and Derivative Works thereof.\n+\n+ \"Contribution\" shall mean any work of authorship, including\n+ the original version of the Work and any modifications or additions\n+ to that Work or Derivative Works thereof, that is intentionally\n+ submitted to Licensor for inclusion in the Work by the copyright owner\n+ or by an individual or Legal Entity authorized to submit on behalf of\n+ the copyright owner. For the purposes of this definition, \"submitted\"\n+ means any form of electronic, verbal, or written communication sent\n+ to the Licensor or its representatives, including but not limited to\n+ communication on electronic mailing lists, source code control systems,\n+ and issue tracking systems that are managed by, or on behalf of, the\n+ Licensor for the purpose of discussing and improving the Work, but\n+ excluding communication that is conspicuously marked or otherwise\n+ designated in writing by the copyright owner as \"Not a Contribution.\"\n+\n+ \"Contributor\" shall mean Licensor and any individual or Legal Entity\n+ on behalf of whom a Contribution has been received by Licensor and\n+ subsequently incorporated within the Work.\n+\n+ 2. Grant of Copyright License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ copyright license to reproduce, prepare Derivative Works of,\n+ publicly display, publicly perform, sublicense, and distribute the\n+ Work and such Derivative Works in Source or Object form.\n+\n+ 3. Grant of Patent License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ (except as stated in this section) patent license to make, have made,\n+ use, offer to sell, sell, import, and otherwise transfer the Work,\n+ where such license applies only to those patent claims licensable\n+ by such Contributor that are necessarily infringed by their\n+ Contribution(s) alone or by combination of their Contribution(s)\n+ with the Work to which such Contribution(s) was submitted. If You\n+ institute patent litigation against any entity (including a\n+ cross-claim or counterclaim in a lawsuit) alleging that the Work\n+ or a Contribution incorporated within the Work constitutes direct\n+ or contributory patent infringement, then any patent licenses\n+ granted to You under this License for that Work shall terminate\n+ as of the date such litigation is filed.\n+\n+ 4. Redistribution. You may reproduce and distribute copies of the\n+ Work or Derivative Works thereof in any medium, with or without\n+ modifications, and in Source or Object form, provided that You\n+ meet the following conditions:\n+\n+ (a) You must give any other recipients of the Work or\n+ Derivative Works a copy of this License; and\n+\n+ (b) You must cause any modified files to carry prominent notices\n+ stating that You changed the files; and\n+\n+ (c) You must retain, in the Source form of any Derivative Works\n+ that You distribute, all copyright, patent, trademark, and\n+ attribution notices from the Source form of the Work,\n+ excluding those notices that do not pertain to any part of\n+ the Derivative Works; and\n+\n+ (d) If the Work includes a \"NOTICE\" text file as part of its\n+ distribution, then any Derivative Works that You distribute must\n+ include a readable copy of the attribution notices contained\n+ within such NOTICE file, excluding those notices that do not\n+ pertain to any part of the Derivative Works, in at least one\n+ of the following places: within a NOTICE text file distributed\n+ as part of the Derivative Works; within the Source form or\n+ documentation, if provided along with the Derivative Works; or,\n+ within a display generated by the Derivative Works, if and\n+ wherever such third-party notices normally appear. The contents\n+ of the NOTICE file are for informational purposes only and\n+ do not modify the License. You may add Your own attribution\n+ notices within Derivative Works that You distribute, alongside\n+ or as an addendum to the NOTICE text from the Work, provided\n+ that such additional attribution notices cannot be construed\n+ as modifying the License.\n+\n+ You may add Your own copyright statement to Your modifications and\n+ may provide additional or different license terms and conditions\n+ for use, reproduction, or distribution of Your modifications, or\n+ for any such Derivative Works as a whole, provided Your use,\n+ reproduction, and distribution of the Work otherwise complies with\n+ the conditions stated in this License.\n+\n+ 5. Submission of Contributions. Unless You explicitly state otherwise,\n+ any Contribution intentionally submitted for inclusion in the Work\n+ by You to the Licensor shall be under the terms and conditions of\n+ this License, without any additional terms or conditions.\n+ Notwithstanding the above, nothing herein shall supersede or modify\n+ the terms of any separate license agreement you may have executed\n+ with Licensor regarding such Contributions.\n+\n+ 6. Trademarks. This License does not grant permission to use the trade\n+ names, trademarks, service marks, or product names of the Licensor,\n+ except as required for reasonable and customary use in describing the\n+ origin of the Work and reproducing the content of the NOTICE file.\n+\n+ 7. Disclaimer of Warranty. Unless required by applicable law or\n+ agreed to in writing, Licensor provides the Work (and each\n+ Contributor provides its Contributions) on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+ implied, including, without limitation, any warranties or conditions\n+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n+ PARTICULAR PURPOSE. You are solely responsible for determining the\n+ appropriateness of using or redistributing the Work and assume any\n+ risks associated with Your exercise of permissions under this License.\n+\n+ 8. Limitation of Liability. In no event and under no legal theory,\n+ whether in tort (including negligence), contract, or otherwise,\n+ unless required by applicable law (such as deliberate and grossly\n+ negligent acts) or agreed to in writing, shall any Contributor be\n+ liable to You for damages, including any direct, indirect, special,\n+ incidental, or consequential damages of any character arising as a\n+ result of this License or out of the use or inability to use the\n+ Work (including but not limited to damages for loss of goodwill,\n+ work stoppage, computer failure or malfunction, or any and all\n+ other commercial damages or losses), even if such Contributor\n+ has been advised of the possibility of such damages.\n+\n+ 9. Accepting Warranty or Additional Liability. While redistributing\n+ the Work or Derivative Works thereof, You may choose to offer,\n+ and charge a fee for, acceptance of support, warranty, indemnity,\n+ or other liability obligations and/or rights consistent with this\n+ License. However, in accepting such obligations, You may act only\n+ on Your own behalf and on Your sole responsibility, not on behalf\n+ of any other Contributor, and only if You agree to indemnify,\n+ defend, and hold each Contributor harmless for any liability\n+ incurred by, or claims asserted against, such Contributor by reason\n+ of your accepting any such warranty or additional liability.\n+\n+ END OF TERMS AND CONDITIONS\n+\n+ APPENDIX: How to apply the Apache License to your work.\n+\n+ To apply the Apache License to your work, attach the following\n+ boilerplate notice, with the fields enclosed by brackets \"{}\"\n+ replaced with your own identifying information. (Don't include\n+ the brackets!) The text should be enclosed in the appropriate\n+ comment syntax for the file format. We also recommend that a\n+ file or class name and description of purpose be included on the\n+ same \"printed page\" as the copyright notice for easier\n+ identification within third-party archives.\n+\n+ Copyright {yyyy} {name of copyright owner}\n+\n+ Licensed under the Apache License, Version 2.0 (the \"License\");\n+ you may not use this file except in compliance with the License.\n+ You may obtain a copy of the License at\n+\n+ http://www.apache.org/licenses/LICENSE-2.0\n+\n+ Unless required by applicable law or agreed to in writing, software\n+ distributed under the License is distributed on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ See the License for the specific language governing permissions and\n+ limitations under the License.\n",
"new_path": "packages/compare/LICENSE",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+# @thi.ng/compare\n+\n+[](https://www.npmjs.com/package/@thi.ng/compare)\n+\n+This project is part of the\n+[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.\n+\n+## About\n+\n+TODO...\n+\n+## Installation\n+\n+```\n+yarn add @thi.ng/compare\n+```\n+\n+## Usage examples\n+\n+```typescript\n+import * as compare from \"@thi.ng/compare\";\n+```\n+\n+## Authors\n+\n+- Karsten Schmidt\n+\n+## License\n+\n+© 2018 Karsten Schmidt // Apache Software License 2.0\n",
"new_path": "packages/compare/README.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"@thi.ng/compare\",\n+ \"version\": \"0.0.1\",\n+ \"description\": \"TODO\",\n+ \"main\": \"./index.js\",\n+ \"typings\": \"./index.d.ts\",\n+ \"repository\": \"https://github.com/thi-ng/umbrella\",\n+ \"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n+ \"license\": \"Apache-2.0\",\n+ \"scripts\": {\n+ \"build\": \"yarn run clean && tsc --declaration\",\n+ \"clean\": \"rm -rf *.js *.d.ts .nyc_output build coverage doc\",\n+ \"cover\": \"yarn test && nyc report --reporter=lcov\",\n+ \"doc\": \"node_modules/.bin/typedoc --mode modules --out doc src\",\n+ \"pub\": \"yarn run build && yarn publish --access public\",\n+ \"test\": \"rm -rf build && tsc -p test && nyc mocha build/test/*.js\"\n+ },\n+ \"devDependencies\": {\n+ \"@types/mocha\": \"^5.2.0\",\n+ \"@types/node\": \"^10.0.6\",\n+ \"mocha\": \"^5.1.1\",\n+ \"nyc\": \"^11.7.1\",\n+ \"typedoc\": \"^0.11.1\",\n+ \"typescript\": \"^2.8.3\"\n+ },\n+ \"dependencies\": {},\n+ \"keywords\": [\n+ \"ES6\",\n+ \"typescript\"\n+ ],\n+ \"publishConfig\": {\n+ \"access\": \"public\"\n+ }\n+}\n\\ No newline at end of file\n",
"new_path": "packages/compare/package.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export function compare(a: any, b: any): number {\n+ if (a === b) {\n+ return 0;\n+ }\n+ if (a == null) {\n+ return b == null ? 0 : -1;\n+ }\n+ if (b == null) {\n+ return a == null ? 0 : 1;\n+ }\n+ if (typeof a.compare === \"function\") {\n+ return a.compare(b);\n+ }\n+ if (typeof b.compare === \"function\") {\n+ return -b.compare(a);\n+ }\n+ return a < b ? -1 : a > b ? 1 : 0;\n+}\n",
"new_path": "packages/compare/src/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+// import * as assert from \"assert\";\n+// import * as compare from \"../src/index\";\n+\n+describe(\"compare\", () => {\n+ it(\"tests pending\");\n+});\n",
"new_path": "packages/compare/test/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \"../build\"\n+ },\n+ \"include\": [\n+ \"./**/*.ts\",\n+ \"../src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/compare/test/tsconfig.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \".\"\n+ },\n+ \"include\": [\n+ \"./src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/compare/tsconfig.json",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(compare): add new package @thi.ng/compare
| 1
|
feat
|
compare
|
679,913
|
10.05.2018 14:57:31
| -3,600
|
9466d4b221a57ecbed569e226d4a130b98363743
|
feat(bench): add new package
|
[
{
"change_type": "ADD",
"diff": "+build\n+coverage\n+dev\n+doc\n+src*\n+test\n+.nyc_output\n+tsconfig.json\n+*.tgz\n+*.html\n",
"new_path": "packages/bench/.npmignore",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+ Apache License\n+ Version 2.0, January 2004\n+ http://www.apache.org/licenses/\n+\n+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n+\n+ 1. Definitions.\n+\n+ \"License\" shall mean the terms and conditions for use, reproduction,\n+ and distribution as defined by Sections 1 through 9 of this document.\n+\n+ \"Licensor\" shall mean the copyright owner or entity authorized by\n+ the copyright owner that is granting the License.\n+\n+ \"Legal Entity\" shall mean the union of the acting entity and all\n+ other entities that control, are controlled by, or are under common\n+ control with that entity. For the purposes of this definition,\n+ \"control\" means (i) the power, direct or indirect, to cause the\n+ direction or management of such entity, whether by contract or\n+ otherwise, or (ii) ownership of fifty percent (50%) or more of the\n+ outstanding shares, or (iii) beneficial ownership of such entity.\n+\n+ \"You\" (or \"Your\") shall mean an individual or Legal Entity\n+ exercising permissions granted by this License.\n+\n+ \"Source\" form shall mean the preferred form for making modifications,\n+ including but not limited to software source code, documentation\n+ source, and configuration files.\n+\n+ \"Object\" form shall mean any form resulting from mechanical\n+ transformation or translation of a Source form, including but\n+ not limited to compiled object code, generated documentation,\n+ and conversions to other media types.\n+\n+ \"Work\" shall mean the work of authorship, whether in Source or\n+ Object form, made available under the License, as indicated by a\n+ copyright notice that is included in or attached to the work\n+ (an example is provided in the Appendix below).\n+\n+ \"Derivative Works\" shall mean any work, whether in Source or Object\n+ form, that is based on (or derived from) the Work and for which the\n+ editorial revisions, annotations, elaborations, or other modifications\n+ represent, as a whole, an original work of authorship. For the purposes\n+ of this License, Derivative Works shall not include works that remain\n+ separable from, or merely link (or bind by name) to the interfaces of,\n+ the Work and Derivative Works thereof.\n+\n+ \"Contribution\" shall mean any work of authorship, including\n+ the original version of the Work and any modifications or additions\n+ to that Work or Derivative Works thereof, that is intentionally\n+ submitted to Licensor for inclusion in the Work by the copyright owner\n+ or by an individual or Legal Entity authorized to submit on behalf of\n+ the copyright owner. For the purposes of this definition, \"submitted\"\n+ means any form of electronic, verbal, or written communication sent\n+ to the Licensor or its representatives, including but not limited to\n+ communication on electronic mailing lists, source code control systems,\n+ and issue tracking systems that are managed by, or on behalf of, the\n+ Licensor for the purpose of discussing and improving the Work, but\n+ excluding communication that is conspicuously marked or otherwise\n+ designated in writing by the copyright owner as \"Not a Contribution.\"\n+\n+ \"Contributor\" shall mean Licensor and any individual or Legal Entity\n+ on behalf of whom a Contribution has been received by Licensor and\n+ subsequently incorporated within the Work.\n+\n+ 2. Grant of Copyright License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ copyright license to reproduce, prepare Derivative Works of,\n+ publicly display, publicly perform, sublicense, and distribute the\n+ Work and such Derivative Works in Source or Object form.\n+\n+ 3. Grant of Patent License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ (except as stated in this section) patent license to make, have made,\n+ use, offer to sell, sell, import, and otherwise transfer the Work,\n+ where such license applies only to those patent claims licensable\n+ by such Contributor that are necessarily infringed by their\n+ Contribution(s) alone or by combination of their Contribution(s)\n+ with the Work to which such Contribution(s) was submitted. If You\n+ institute patent litigation against any entity (including a\n+ cross-claim or counterclaim in a lawsuit) alleging that the Work\n+ or a Contribution incorporated within the Work constitutes direct\n+ or contributory patent infringement, then any patent licenses\n+ granted to You under this License for that Work shall terminate\n+ as of the date such litigation is filed.\n+\n+ 4. Redistribution. You may reproduce and distribute copies of the\n+ Work or Derivative Works thereof in any medium, with or without\n+ modifications, and in Source or Object form, provided that You\n+ meet the following conditions:\n+\n+ (a) You must give any other recipients of the Work or\n+ Derivative Works a copy of this License; and\n+\n+ (b) You must cause any modified files to carry prominent notices\n+ stating that You changed the files; and\n+\n+ (c) You must retain, in the Source form of any Derivative Works\n+ that You distribute, all copyright, patent, trademark, and\n+ attribution notices from the Source form of the Work,\n+ excluding those notices that do not pertain to any part of\n+ the Derivative Works; and\n+\n+ (d) If the Work includes a \"NOTICE\" text file as part of its\n+ distribution, then any Derivative Works that You distribute must\n+ include a readable copy of the attribution notices contained\n+ within such NOTICE file, excluding those notices that do not\n+ pertain to any part of the Derivative Works, in at least one\n+ of the following places: within a NOTICE text file distributed\n+ as part of the Derivative Works; within the Source form or\n+ documentation, if provided along with the Derivative Works; or,\n+ within a display generated by the Derivative Works, if and\n+ wherever such third-party notices normally appear. The contents\n+ of the NOTICE file are for informational purposes only and\n+ do not modify the License. You may add Your own attribution\n+ notices within Derivative Works that You distribute, alongside\n+ or as an addendum to the NOTICE text from the Work, provided\n+ that such additional attribution notices cannot be construed\n+ as modifying the License.\n+\n+ You may add Your own copyright statement to Your modifications and\n+ may provide additional or different license terms and conditions\n+ for use, reproduction, or distribution of Your modifications, or\n+ for any such Derivative Works as a whole, provided Your use,\n+ reproduction, and distribution of the Work otherwise complies with\n+ the conditions stated in this License.\n+\n+ 5. Submission of Contributions. Unless You explicitly state otherwise,\n+ any Contribution intentionally submitted for inclusion in the Work\n+ by You to the Licensor shall be under the terms and conditions of\n+ this License, without any additional terms or conditions.\n+ Notwithstanding the above, nothing herein shall supersede or modify\n+ the terms of any separate license agreement you may have executed\n+ with Licensor regarding such Contributions.\n+\n+ 6. Trademarks. This License does not grant permission to use the trade\n+ names, trademarks, service marks, or product names of the Licensor,\n+ except as required for reasonable and customary use in describing the\n+ origin of the Work and reproducing the content of the NOTICE file.\n+\n+ 7. Disclaimer of Warranty. Unless required by applicable law or\n+ agreed to in writing, Licensor provides the Work (and each\n+ Contributor provides its Contributions) on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+ implied, including, without limitation, any warranties or conditions\n+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n+ PARTICULAR PURPOSE. You are solely responsible for determining the\n+ appropriateness of using or redistributing the Work and assume any\n+ risks associated with Your exercise of permissions under this License.\n+\n+ 8. Limitation of Liability. In no event and under no legal theory,\n+ whether in tort (including negligence), contract, or otherwise,\n+ unless required by applicable law (such as deliberate and grossly\n+ negligent acts) or agreed to in writing, shall any Contributor be\n+ liable to You for damages, including any direct, indirect, special,\n+ incidental, or consequential damages of any character arising as a\n+ result of this License or out of the use or inability to use the\n+ Work (including but not limited to damages for loss of goodwill,\n+ work stoppage, computer failure or malfunction, or any and all\n+ other commercial damages or losses), even if such Contributor\n+ has been advised of the possibility of such damages.\n+\n+ 9. Accepting Warranty or Additional Liability. While redistributing\n+ the Work or Derivative Works thereof, You may choose to offer,\n+ and charge a fee for, acceptance of support, warranty, indemnity,\n+ or other liability obligations and/or rights consistent with this\n+ License. However, in accepting such obligations, You may act only\n+ on Your own behalf and on Your sole responsibility, not on behalf\n+ of any other Contributor, and only if You agree to indemnify,\n+ defend, and hold each Contributor harmless for any liability\n+ incurred by, or claims asserted against, such Contributor by reason\n+ of your accepting any such warranty or additional liability.\n+\n+ END OF TERMS AND CONDITIONS\n+\n+ APPENDIX: How to apply the Apache License to your work.\n+\n+ To apply the Apache License to your work, attach the following\n+ boilerplate notice, with the fields enclosed by brackets \"{}\"\n+ replaced with your own identifying information. (Don't include\n+ the brackets!) The text should be enclosed in the appropriate\n+ comment syntax for the file format. We also recommend that a\n+ file or class name and description of purpose be included on the\n+ same \"printed page\" as the copyright notice for easier\n+ identification within third-party archives.\n+\n+ Copyright {yyyy} {name of copyright owner}\n+\n+ Licensed under the Apache License, Version 2.0 (the \"License\");\n+ you may not use this file except in compliance with the License.\n+ You may obtain a copy of the License at\n+\n+ http://www.apache.org/licenses/LICENSE-2.0\n+\n+ Unless required by applicable law or agreed to in writing, software\n+ distributed under the License is distributed on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ See the License for the specific language governing permissions and\n+ limitations under the License.\n",
"new_path": "packages/bench/LICENSE",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+# @thi.ng/bench\n+\n+[](https://www.npmjs.com/package/@thi.ng/bench)\n+\n+This project is part of the\n+[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.\n+\n+## About\n+\n+TODO...\n+\n+## Installation\n+\n+```\n+yarn add @thi.ng/bench\n+```\n+\n+## Usage examples\n+\n+```typescript\n+import * as bench from \"@thi.ng/bench\";\n+```\n+\n+## Authors\n+\n+- Karsten Schmidt\n+\n+## License\n+\n+© 2018 Karsten Schmidt // Apache Software License 2.0\n",
"new_path": "packages/bench/README.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"@thi.ng/bench\",\n+ \"version\": \"0.0.1\",\n+ \"description\": \"TODO\",\n+ \"main\": \"./index.js\",\n+ \"typings\": \"./index.d.ts\",\n+ \"repository\": \"https://github.com/thi-ng/umbrella\",\n+ \"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n+ \"license\": \"Apache-2.0\",\n+ \"scripts\": {\n+ \"build\": \"yarn run clean && tsc --declaration\",\n+ \"clean\": \"rm -rf *.js *.d.ts .nyc_output build coverage doc\",\n+ \"cover\": \"yarn test && nyc report --reporter=lcov\",\n+ \"doc\": \"node_modules/.bin/typedoc --mode modules --out doc src\",\n+ \"pub\": \"yarn run build && yarn publish --access public\",\n+ \"test\": \"rm -rf build && tsc -p test && nyc mocha build/test/*.js\"\n+ },\n+ \"devDependencies\": {\n+ \"@types/mocha\": \"^5.2.0\",\n+ \"@types/node\": \"^10.0.6\",\n+ \"mocha\": \"^5.1.1\",\n+ \"nyc\": \"^11.7.1\",\n+ \"typedoc\": \"^0.11.1\",\n+ \"typescript\": \"^2.8.3\"\n+ },\n+ \"dependencies\": {},\n+ \"keywords\": [\n+ \"benchmark\",\n+ \"ES6\",\n+ \"timing\",\n+ \"typescript\"\n+ ],\n+ \"publishConfig\": {\n+ \"access\": \"public\"\n+ }\n+}\n\\ No newline at end of file\n",
"new_path": "packages/bench/package.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+/**\n+ * Calls function `fn` without args, prints elapsed time and returns\n+ * fn's result.\n+ *\n+ * @param fn\n+ */\n+export function timed<T>(fn: () => T) {\n+ const t0 = Date.now();\n+ const res = fn();\n+ console.log(Date.now() - t0);\n+ return res;\n+}\n+\n+/**\n+ * Executes given function `n` times, prints elapsed time to console and\n+ * returns last result from fn.\n+ *\n+ * @param fn\n+ * @param n\n+ */\n+export function bench<T>(fn: () => T, n = 1e6) {\n+ let res: T;\n+ return timed(() => {\n+ while (n-- > 0) {\n+ res = fn();\n+ }\n+ return res;\n+ });\n+}\n",
"new_path": "packages/bench/src/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+// import * as assert from \"assert\";\n+// import * as bench from \"../src/index\";\n+\n+describe(\"bench\", () => {\n+ it(\"tests pending\");\n+});\n",
"new_path": "packages/bench/test/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \"../build\"\n+ },\n+ \"include\": [\n+ \"./**/*.ts\",\n+ \"../src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/bench/test/tsconfig.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \".\"\n+ },\n+ \"include\": [\n+ \"./src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/bench/tsconfig.json",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(bench): add new package @thi.ng/bench
| 1
|
feat
|
bench
|
679,913
|
10.05.2018 14:59:59
| -3,600
|
f051ca3c8ea8cc015750db4cb2712b7f030ff619
|
refactor(api): remove obsolete files from package
BREAKING CHANGE: now only contains type declarations,
decorators and mixins. All other features have been moved
to new dedicated packages:
|
[
{
"change_type": "MODIFY",
"diff": "\"typescript\": \"^2.8.3\"\n},\n\"dependencies\": {\n- \"@thi.ng/checks\": \"^1.5.2\"\n+ \"@thi.ng/errors\": \"^0.0.1\"\n},\n\"keywords\": [\n\"compare\",\n",
"new_path": "packages/api/package.json",
"old_path": "packages/api/package.json"
},
{
"change_type": "DELETE",
"diff": "-/**\n- * Calls function `fn` without args, prints elapsed time and returns\n- * fn's result.\n- *\n- * @param fn\n- */\n-export function timed<T>(fn: () => T) {\n- const t0 = Date.now();\n- const res = fn();\n- console.log(Date.now() - t0);\n- return res;\n-}\n-\n-/**\n- * Executes given function `n` times, prints elapsed time to console and\n- * returns last result from fn.\n- *\n- * @param fn\n- * @param n\n- */\n-export function bench<T>(fn: () => T, n = 1e6) {\n- let res: T;\n- return timed(() => {\n- while (n-- > 0) {\n- res = fn();\n- }\n- return res;\n- });\n-}\n",
"new_path": null,
"old_path": "packages/api/src/bench.ts"
},
{
"change_type": "DELETE",
"diff": "-export function compare(a: any, b: any): number {\n- if (a === b) {\n- return 0;\n- }\n- if (a == null) {\n- return b == null ? 0 : -1;\n- }\n- if (b == null) {\n- return a == null ? 0 : 1;\n- }\n- if (typeof a.compare === \"function\") {\n- return a.compare(b);\n- }\n- if (typeof b.compare === \"function\") {\n- return -b.compare(a);\n- }\n- return a < b ? -1 : a > b ? 1 : 0;\n-}\n",
"new_path": null,
"old_path": "packages/api/src/compare.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { illegalArgs } from \"../error\";\n+import { illegalArgs } from \"@thi.ng/errors\";\n/**\n* Method property decorator factory. Augments original method with\n",
"new_path": "packages/api/src/decorators/deprecated.ts",
"old_path": "packages/api/src/decorators/deprecated.ts"
},
{
"change_type": "DELETE",
"diff": "-import { isArrayLike } from \"@thi.ng/checks/is-arraylike\";\n-import { isDate } from \"@thi.ng/checks/is-date\";\n-import { isMap } from \"@thi.ng/checks/is-map\";\n-import { isPlainObject } from \"@thi.ng/checks/is-plain-object\";\n-import { isRegExp } from \"@thi.ng/checks/is-regexp\";\n-import { isSet } from \"@thi.ng/checks/is-set\";\n-\n-export function equiv(a, b): boolean {\n- if (a === b) {\n- return true;\n- }\n- if (a != null) {\n- if (typeof a.equiv === \"function\") {\n- return a.equiv(b);\n- }\n- } else {\n- return a == b;\n- }\n- if (b != null) {\n- if (typeof b.equiv === \"function\") {\n- return b.equiv(a);\n- }\n- } else {\n- return a == b;\n- }\n- if (typeof a === \"string\" || typeof b === \"string\") {\n- return false;\n- }\n- if (isPlainObject(a) && isPlainObject(b)) {\n- return equivObject(a, b);\n- }\n- if (isArrayLike(a) && isArrayLike(b)) {\n- return equivArrayLike(a, b);\n- }\n- if (isSet(a) && isSet(b)) {\n- return equivSet(a, b);\n- }\n- if (isMap(a) && isMap(b)) {\n- return equivMap(a, b);\n- }\n- if (isDate(a) && isDate(b)) {\n- return a.getTime() === b.getTime();\n- }\n- if (isRegExp(a) && isRegExp(b)) {\n- return a.toString() === b.toString();\n- }\n- // NaN\n- return (a !== a && b !== b);\n-}\n-\n-function equivArrayLike(a: ArrayLike<any>, b: ArrayLike<any>) {\n- let l = a.length;\n- if (b.length === l) {\n- while (--l >= 0 && equiv(a[l], b[l]));\n- }\n- return l < 0;\n-}\n-\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>) {\n- if (a.size !== b.size) return false;\n- return equiv([...a].sort(), [...b].sort());\n-}\n-\n-function equivObject(a, b) {\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])) {\n- return false;\n- }\n- }\n- return true;\n-}\n",
"new_path": null,
"old_path": "packages/api/src/equiv.ts"
},
{
"change_type": "DELETE",
"diff": "-export class IllegalArityError extends Error {\n- constructor(n: number) {\n- super(`illegal arity: ${n}`);\n- }\n-}\n-\n-export class IllegalArgumentError extends Error {\n- constructor(msg?: any) {\n- super(\"illegal argument(s)\" + (msg !== undefined ? \": \" + msg : \"\"));\n- }\n-}\n-\n-export class IllegalStateError extends Error {\n- constructor(msg?: any) {\n- super(\"illegal state\" + (msg !== undefined ? \": \" + msg : \"\"));\n- }\n-}\n-\n-export class UnsupportedOperationError extends Error {\n- constructor(msg?: any) {\n- super(\"unsupported operation\" + (msg !== undefined ? \": \" + msg : \"\"));\n- }\n-}\n-\n-export function illegalArity(n) {\n- throw new IllegalArityError(n);\n-}\n-\n-export function illegalArgs(msg?: any) {\n- throw new IllegalArgumentError(msg);\n-}\n-\n-export function illegalState(msg?: any) {\n- throw new IllegalStateError(msg);\n-}\n-\n-export function unsupported(msg?: any) {\n- throw new UnsupportedOperationError(msg);\n-}\n",
"new_path": null,
"old_path": "packages/api/src/error.ts"
},
{
"change_type": "MODIFY",
"diff": "import * as decorators from \"./decorators\";\nimport * as mixins from \"./mixins\";\n-\n-export * from \"./api\";\n-export * from \"./bench\";\n-export * from \"./compare\";\n-export * from \"./error\";\n-export * from \"./equiv\";\n-\nexport {\ndecorators,\nmixins,\n}\n+\n+export * from \"./api\";\n",
"new_path": "packages/api/src/index.ts",
"old_path": "packages/api/src/index.ts"
},
{
"change_type": "DELETE",
"diff": "-import * as assert from \"assert\";\n-\n-import { equiv } from \"../src/equiv\";\n-\n-describe(\"equiv\", () => {\n-\n- it(\"null\", () => {\n- assert(equiv(null, null));\n- assert(equiv(null, undefined));\n- assert(equiv(undefined, null));\n- });\n-\n- it(\"boolean\", () => {\n- assert(!equiv(null, false));\n- assert(!equiv(false, null));\n- assert(!equiv(undefined, false));\n- assert(!equiv(false, undefined));\n- });\n-\n- it(\"number\", () => {\n- assert(!equiv(null, 0));\n- assert(!equiv(0, null));\n- assert(!equiv(0, undefined));\n- assert(!equiv(undefined, 0));\n-\n- assert(equiv(0, 0));\n- assert(equiv(0, 0.0));\n- assert(!equiv(0, 1));\n- assert(!equiv(1, 0));\n- assert(!equiv(0, \"0\"));\n- assert(!equiv(\"0\", 0));\n- assert(!equiv(0, [0]));\n- assert(!equiv([0], 0));\n- });\n-\n- it(\"string\", () => {\n- assert(!equiv(null, \"\"));\n- assert(!equiv(\"\", null));\n- assert(equiv(\"a\", \"a\"));\n- assert(!equiv(\"a\", \"ab\"));\n- });\n-\n- it(\"array\", () => {\n- assert(equiv([], []));\n- assert(equiv([], []));\n- assert(equiv([], { length: 0 }));\n- assert(equiv({ length: 0 }, []));\n- assert(equiv([\"a\"], [\"a\"]));\n- assert(!equiv([\"a\"], [\"b\"]));\n- });\n-\n- it(\"object\", () => {\n- assert(!equiv(undefined, {}));\n- assert(!equiv({}, undefined));\n- assert(!equiv(null, {}));\n- assert(!equiv({}, null));\n-\n- assert(equiv({}, {}));\n- assert(!equiv({}, []));\n- assert(!equiv([], {}));\n- assert(equiv({ a: 0 }, { a: 0 }));\n- assert(equiv({ a: 0, b: { c: 1 } }, { a: 0, b: { c: 1 } }));\n- assert(!equiv({ a: 0, b: { c: 1 } }, { a: 0, b: { c: 2 } }));\n- assert(!equiv({ a: 0, b: { c: 1 } }, { a: 0, b: {} }));\n- });\n-\n- it(\"equiv impl\", () => {\n- class A {\n- a: any;\n- constructor(a) {\n- this.a = a;\n- }\n-\n- equiv(b) {\n- return equiv(this.a, b);\n- }\n- }\n-\n- assert(!equiv(new A(1), null));\n- assert(!equiv(new A(1), undefined));\n- assert(!equiv(null, new A(1)));\n- assert(!equiv(undefined, new A(1)));\n- assert(equiv(new A(1), new A(1)));\n- assert(equiv(new A(1), 1));\n- assert(equiv(1, new A(1)));\n- assert(equiv(1, { equiv(x) { return x === 1; } }));\n- assert(equiv({ equiv(x) { return x === 1; } }, 1));\n- assert(!equiv(new A(1), new A(2)));\n- assert(!equiv(new A(1), 2));\n- });\n-\n- it(\"set\", () => {\n- const a = new Set([1, 2, 3]);\n- assert(equiv(a, a));\n- assert(equiv(a, new Set([3, 2, 1])));\n- assert(equiv(new Set([{ a: 1 }, new Set([{ b: 2 }, [3]])]), new Set([new Set([[3], { b: 2 }]), { a: 1 }])));\n- assert(!equiv(a, new Set([3, 2, 0])));\n- assert(!equiv(a, [3, 2, 0]));\n- assert(!equiv(a, new Map([[3, 3], [2, 2], [1, 1]])));\n- assert(!equiv(a, null));\n- assert(!equiv(null, a));\n- });\n-\n- it(\"date\", () => {\n- const a = new Date(123456);\n- assert(equiv(a, a));\n- assert(equiv(a, new Date(123456)));\n- assert(!equiv(a, new Date(123)));\n- });\n-\n- it(\"regexp\", () => {\n- const a = /(\\w+)/g;\n- assert(equiv(a, a));\n- assert(equiv(a, /(\\w+)/g));\n- assert(!equiv(a, /(\\w+)/));\n- assert(!equiv(a, /(\\w*)/g));\n- });\n-});\n",
"new_path": null,
"old_path": "packages/api/test/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(api): remove obsolete files from package
BREAKING CHANGE: @thi.ng/api now only contains type declarations,
decorators and mixins. All other features have been moved
to new dedicated packages:
- @thi.ng/bench
- @thi.ng/compare
- @thi.ng/equiv
- @thi.ng/errors
| 1
|
refactor
|
api
|
815,745
|
10.05.2018 15:55:11
| -10,800
|
6e5cf501816391628e2a1974a09d3d2b2a168904
|
fix(style): add padding to individual disabled elements
fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -139,8 +139,8 @@ export class SelectMultiComponent {\nthis.githubUsers$ = this.dataService.getGithubAccounts('anjm');\nthis.selectedPeople3 = [\n- { id: '5a15b13c2340978ec3d2c0ea', name: 'Rochelle Estes' },\n- { id: '5a15b13c728cd3f43cc0fe8a', name: 'Marquez Nolan' }\n+ { id: '5a15b13c2340978ec3d2c0ea', name: 'Rochelle Estes', disabled: true },\n+ { id: '5a15b13c728cd3f43cc0fe8a', name: 'Marquez Nolan', disabled: true }\n];\n}\n",
"new_path": "demo/app/examples/multi.component.ts",
"old_path": "demo/app/examples/multi.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -68,6 +68,7 @@ function getMockPeople() {\n'picture': 'http://placehold.it/32x32',\n'age': 35,\n'name': 'Rochelle Estes',\n+ 'disabled': true,\n'gender': 'female',\n'company': 'EXTRAWEAR',\n'email': 'rochelleestes@extrawear.com',\n@@ -106,6 +107,7 @@ function getMockPeople() {\n'name': 'Marquez Nolan',\n'gender': 'male',\n'company': 'MIRACLIS',\n+ 'disabled': true,\n'email': 'marqueznolan@miraclis.com',\n'phone': '+1 (853) 571-3921'\n},\n",
"new_path": "demo/app/shared/data.service.ts",
"old_path": "demo/app/shared/data.service.ts"
},
{
"change_type": "MODIFY",
"diff": "}\n.ng-value {\nwhite-space: nowrap;\n- &.disabled {\n+ &.ng-value-disabled {\n.ng-value-icon {\ndisplay: none;\n}\n",
"new_path": "src/ng-select/ng-select.component.scss",
"old_path": "src/ng-select/ng-select.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -94,9 +94,12 @@ $color-selected: #f5faff;\nbackground-color: $color-selected;\nborder-radius: 2px;\nborder: 1px solid #c2e0ff;\n- &.ng-select-disabled {\n+ &.ng-value-disabled {\nbackground-color: #f9f9f9;\nborder: 1px solid #e3e3e3;\n+ .ng-value-label {\n+ padding-left: 5px;\n+ }\n}\n.ng-value-label {\ndisplay: inline-block;\n",
"new_path": "src/themes/default.theme.scss",
"old_path": "src/themes/default.theme.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -104,6 +104,10 @@ $highlight-color: #3f51b5;\nborder-radius: 2px;\ncolor: #fff;\npadding: 2px 5px;\n+ &.ng-value-disabled {\n+ background-color: rgba(0, 0, 0, .12);\n+ color: rgba(0, 0, 0, .26);\n+ }\n.ng-value-label {\nfont-size: 14px;\nfont-weight: 500\n",
"new_path": "src/themes/material.theme.scss",
"old_path": "src/themes/material.theme.scss"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix(style): add padding to individual disabled elements
fixes #406
| 1
|
fix
|
style
|
815,745
|
10.05.2018 16:06:04
| -10,800
|
eb6f9bddc33dae3fccf98accdfb655cbf2cda255
|
fix(material): set min height for ng-option
fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -26,7 +26,7 @@ import { distinctUntilChanged, debounceTime, switchMap } from 'rxjs/operators'\n<ng-select [items]=\"cities2\" [(ngModel)]=\"selectedCity2\" bindLabel=\"name\" bindValue=\"name\">\n<ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n<div *ngIf=\"item.name === 'Kaunas'\">{{item.name}}</div>\n- <div class=\"card\" *ngIf=\"item.name !== 'Kaunas'\">\n+ <div style=\"margin: 10px 0;\" class=\"card\" *ngIf=\"item.name !== 'Kaunas'\">\n<div class=\"card-body\">\n<h5 class=\"card-title\" [ngOptionHighlight]=\"search\">{{item.name}}</h5>\n<h6 class=\"card-subtitle mb-2 text-muted\">Card subtitle</h6>\n@@ -127,7 +127,7 @@ import { distinctUntilChanged, debounceTime, switchMap } from 'rxjs/operators'\n---html,true\n<ng-select #api [items]=\"cities\" [searchable]=\"false\" [(ngModel)]=\"selectedCity\" bindLabel=\"name\" bindValue=\"name\">\n<ng-template ng-header-tmp>\n- <input style=\"width: 100%\" type=\"text\" (input)=\"api.filter($event.target.value)\" />\n+ <input style=\"width: 100%; line-height: 24px\" type=\"text\" (input)=\"api.filter($event.target.value)\" />\n</ng-template>\n</ng-select>\n---\n",
"new_path": "demo/app/examples/custom-templates.component.ts",
"old_path": "demo/app/examples/custom-templates.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -181,13 +181,13 @@ $highlight-color: #3f51b5;\nborder-bottom: 1px solid rgba(0, 0, 0, .12);\npadding: 0 16px;\nline-height: 3em;\n- height: 3em;\n+ min-height: 3em;\n}\n.ng-dropdown-footer {\nborder-top: 1px solid rgba(0, 0, 0, .12);\npadding: 0 16px;\nline-height: 3em;\n- height: 3em;\n+ min-height: 3em;\n}\n.ng-dropdown-panel-items {\n.ng-optgroup {\n@@ -210,7 +210,7 @@ $highlight-color: #3f51b5;\n}\n.ng-option {\nline-height: 3em;\n- height: 3em;\n+ min-height: 3em;\nwhite-space: nowrap;\noverflow: hidden;\ntext-overflow: ellipsis;\n",
"new_path": "src/themes/material.theme.scss",
"old_path": "src/themes/material.theme.scss"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix(material): set min height for ng-option
fixes #520
| 1
|
fix
|
material
|
679,913
|
10.05.2018 17:45:27
| -3,600
|
55f29b8f0415da48a81c40368d9c884f6683f63d
|
feat(transducers): add normRange() iterator
|
[
{
"change_type": "MODIFY",
"diff": "@@ -111,6 +111,7 @@ export * from \"./iter/concat\";\nexport * from \"./iter/cycle\";\nexport * from \"./iter/iterate\";\nexport * from \"./iter/keys\";\n+export * from \"./iter/norm-range\";\nexport * from \"./iter/pairs\";\nexport * from \"./iter/permutations\";\nexport * from \"./iter/range\";\n",
"new_path": "packages/transducers/src/index.ts",
"old_path": "packages/transducers/src/index.ts"
},
{
"change_type": "ADD",
"diff": "+/**\n+ * Yields sequence of `n+1` monotonically increasing numbers in the\n+ * closed interval (0.0 .. 1.0). If `n <= 0`, yields nothing.\n+ *\n+ * ```\n+ * [...normRange(4)]\n+ * // [0, 0.25, 0.5, 0.75, 1.0]\n+ * ```\n+ *\n+ * @param n number of steps\n+ */\n+export function* normRange(n: number) {\n+ if (n > 0) {\n+ for (let i = 0; i <= n; i++) {\n+ yield i / n;\n+ }\n+ }\n+}\n",
"new_path": "packages/transducers/src/iter/norm-range.ts",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(transducers): add normRange() iterator
| 1
|
feat
|
transducers
|
730,412
|
10.05.2018 17:53:49
| 0
|
3bec06c2e65897dd98baf3cd5b2160b96384a14a
|
chore(release): 0.1.296
|
[
{
"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.296\"></a>\n+## [0.1.296](https://github.com/webex/react-ciscospark/compare/v0.1.295...v0.1.296) (2018-05-10)\n+\n+\n+### Bug Fixes\n+\n+* **react-container-notifications:** undefined browser notification for space widget messages ([c522f02](https://github.com/webex/react-ciscospark/commit/c522f02))\n+\n+\n+### Features\n+\n+* **react-container-notifications:** add support for muteNotifications parameter ([3e4ea6f](https://github.com/webex/react-ciscospark/commit/3e4ea6f))\n+\n+\n+\n<a name=\"0.1.295\"></a>\n## [0.1.295](https://github.com/webex/react-ciscospark/compare/v0.1.294...v0.1.295) (2018-05-08)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.295\",\n+ \"version\": \"0.1.296\",\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.296
| 1
|
chore
|
release
|
217,922
|
10.05.2018 20:19:41
| -7,200
|
caeac6bf72c60a37078eb945a23a164d53aafeed
|
style(simulator): hide dragged action from bar
|
[
{
"change_type": "MODIFY",
"diff": "@@ -209,6 +209,10 @@ mat-progress-bar {\n}\n}\n+.drag-border {\n+ display: none !important;\n+}\n+\n.actions {\ndisplay: flex;\njustify-content: flex-start;\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": "@@ -372,6 +372,9 @@ export class SimulatorComponent implements OnInit, OnDestroy {\n}\napplyStats(set: GearSet, markDirty = true): void {\n+ if (set === undefined) {\n+ return;\n+ }\nthis.crafterStats = new CrafterStats(\nset.jobId,\nset.craftsmanship + this.getBonusValue('Craftsmanship', set.craftsmanship),\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
|
style(simulator): hide dragged action from bar
| 1
|
style
|
simulator
|
730,412
|
10.05.2018 21:36:13
| 0
|
346005d9e6a3177b5777a407fd8fd164d9058c20
|
chore(release): 0.1.297
|
[
{
"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.297\"></a>\n+## [0.1.297](https://github.com/webex/react-ciscospark/compare/v0.1.296...v0.1.297) (2018-05-10)\n+\n+\n+### Bug Fixes\n+\n+* **react-component-activity-item-base:** avatar is not hidden for additional messages ([14cf216](https://github.com/webex/react-ciscospark/commit/14cf216))\n+\n+\n+\n<a name=\"0.1.296\"></a>\n## [0.1.296](https://github.com/webex/react-ciscospark/compare/v0.1.295...v0.1.296) (2018-05-10)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.296\",\n+ \"version\": \"0.1.297\",\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.297
| 1
|
chore
|
release
|
679,913
|
10.05.2018 23:03:15
| -3,600
|
edc66bf2e1a51f1a6c3c45fff1835b34c080d74d
|
feat(defmulti): add package
|
[
{
"change_type": "ADD",
"diff": "+build\n+coverage\n+dev\n+doc\n+src*\n+test\n+.nyc_output\n+tsconfig.json\n+*.tgz\n+*.html\n",
"new_path": "packages/defmulti/.npmignore",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+ Apache License\n+ Version 2.0, January 2004\n+ http://www.apache.org/licenses/\n+\n+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n+\n+ 1. Definitions.\n+\n+ \"License\" shall mean the terms and conditions for use, reproduction,\n+ and distribution as defined by Sections 1 through 9 of this document.\n+\n+ \"Licensor\" shall mean the copyright owner or entity authorized by\n+ the copyright owner that is granting the License.\n+\n+ \"Legal Entity\" shall mean the union of the acting entity and all\n+ other entities that control, are controlled by, or are under common\n+ control with that entity. For the purposes of this definition,\n+ \"control\" means (i) the power, direct or indirect, to cause the\n+ direction or management of such entity, whether by contract or\n+ otherwise, or (ii) ownership of fifty percent (50%) or more of the\n+ outstanding shares, or (iii) beneficial ownership of such entity.\n+\n+ \"You\" (or \"Your\") shall mean an individual or Legal Entity\n+ exercising permissions granted by this License.\n+\n+ \"Source\" form shall mean the preferred form for making modifications,\n+ including but not limited to software source code, documentation\n+ source, and configuration files.\n+\n+ \"Object\" form shall mean any form resulting from mechanical\n+ transformation or translation of a Source form, including but\n+ not limited to compiled object code, generated documentation,\n+ and conversions to other media types.\n+\n+ \"Work\" shall mean the work of authorship, whether in Source or\n+ Object form, made available under the License, as indicated by a\n+ copyright notice that is included in or attached to the work\n+ (an example is provided in the Appendix below).\n+\n+ \"Derivative Works\" shall mean any work, whether in Source or Object\n+ form, that is based on (or derived from) the Work and for which the\n+ editorial revisions, annotations, elaborations, or other modifications\n+ represent, as a whole, an original work of authorship. For the purposes\n+ of this License, Derivative Works shall not include works that remain\n+ separable from, or merely link (or bind by name) to the interfaces of,\n+ the Work and Derivative Works thereof.\n+\n+ \"Contribution\" shall mean any work of authorship, including\n+ the original version of the Work and any modifications or additions\n+ to that Work or Derivative Works thereof, that is intentionally\n+ submitted to Licensor for inclusion in the Work by the copyright owner\n+ or by an individual or Legal Entity authorized to submit on behalf of\n+ the copyright owner. For the purposes of this definition, \"submitted\"\n+ means any form of electronic, verbal, or written communication sent\n+ to the Licensor or its representatives, including but not limited to\n+ communication on electronic mailing lists, source code control systems,\n+ and issue tracking systems that are managed by, or on behalf of, the\n+ Licensor for the purpose of discussing and improving the Work, but\n+ excluding communication that is conspicuously marked or otherwise\n+ designated in writing by the copyright owner as \"Not a Contribution.\"\n+\n+ \"Contributor\" shall mean Licensor and any individual or Legal Entity\n+ on behalf of whom a Contribution has been received by Licensor and\n+ subsequently incorporated within the Work.\n+\n+ 2. Grant of Copyright License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ copyright license to reproduce, prepare Derivative Works of,\n+ publicly display, publicly perform, sublicense, and distribute the\n+ Work and such Derivative Works in Source or Object form.\n+\n+ 3. Grant of Patent License. Subject to the terms and conditions of\n+ this License, each Contributor hereby grants to You a perpetual,\n+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n+ (except as stated in this section) patent license to make, have made,\n+ use, offer to sell, sell, import, and otherwise transfer the Work,\n+ where such license applies only to those patent claims licensable\n+ by such Contributor that are necessarily infringed by their\n+ Contribution(s) alone or by combination of their Contribution(s)\n+ with the Work to which such Contribution(s) was submitted. If You\n+ institute patent litigation against any entity (including a\n+ cross-claim or counterclaim in a lawsuit) alleging that the Work\n+ or a Contribution incorporated within the Work constitutes direct\n+ or contributory patent infringement, then any patent licenses\n+ granted to You under this License for that Work shall terminate\n+ as of the date such litigation is filed.\n+\n+ 4. Redistribution. You may reproduce and distribute copies of the\n+ Work or Derivative Works thereof in any medium, with or without\n+ modifications, and in Source or Object form, provided that You\n+ meet the following conditions:\n+\n+ (a) You must give any other recipients of the Work or\n+ Derivative Works a copy of this License; and\n+\n+ (b) You must cause any modified files to carry prominent notices\n+ stating that You changed the files; and\n+\n+ (c) You must retain, in the Source form of any Derivative Works\n+ that You distribute, all copyright, patent, trademark, and\n+ attribution notices from the Source form of the Work,\n+ excluding those notices that do not pertain to any part of\n+ the Derivative Works; and\n+\n+ (d) If the Work includes a \"NOTICE\" text file as part of its\n+ distribution, then any Derivative Works that You distribute must\n+ include a readable copy of the attribution notices contained\n+ within such NOTICE file, excluding those notices that do not\n+ pertain to any part of the Derivative Works, in at least one\n+ of the following places: within a NOTICE text file distributed\n+ as part of the Derivative Works; within the Source form or\n+ documentation, if provided along with the Derivative Works; or,\n+ within a display generated by the Derivative Works, if and\n+ wherever such third-party notices normally appear. The contents\n+ of the NOTICE file are for informational purposes only and\n+ do not modify the License. You may add Your own attribution\n+ notices within Derivative Works that You distribute, alongside\n+ or as an addendum to the NOTICE text from the Work, provided\n+ that such additional attribution notices cannot be construed\n+ as modifying the License.\n+\n+ You may add Your own copyright statement to Your modifications and\n+ may provide additional or different license terms and conditions\n+ for use, reproduction, or distribution of Your modifications, or\n+ for any such Derivative Works as a whole, provided Your use,\n+ reproduction, and distribution of the Work otherwise complies with\n+ the conditions stated in this License.\n+\n+ 5. Submission of Contributions. Unless You explicitly state otherwise,\n+ any Contribution intentionally submitted for inclusion in the Work\n+ by You to the Licensor shall be under the terms and conditions of\n+ this License, without any additional terms or conditions.\n+ Notwithstanding the above, nothing herein shall supersede or modify\n+ the terms of any separate license agreement you may have executed\n+ with Licensor regarding such Contributions.\n+\n+ 6. Trademarks. This License does not grant permission to use the trade\n+ names, trademarks, service marks, or product names of the Licensor,\n+ except as required for reasonable and customary use in describing the\n+ origin of the Work and reproducing the content of the NOTICE file.\n+\n+ 7. Disclaimer of Warranty. Unless required by applicable law or\n+ agreed to in writing, Licensor provides the Work (and each\n+ Contributor provides its Contributions) on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+ implied, including, without limitation, any warranties or conditions\n+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n+ PARTICULAR PURPOSE. You are solely responsible for determining the\n+ appropriateness of using or redistributing the Work and assume any\n+ risks associated with Your exercise of permissions under this License.\n+\n+ 8. Limitation of Liability. In no event and under no legal theory,\n+ whether in tort (including negligence), contract, or otherwise,\n+ unless required by applicable law (such as deliberate and grossly\n+ negligent acts) or agreed to in writing, shall any Contributor be\n+ liable to You for damages, including any direct, indirect, special,\n+ incidental, or consequential damages of any character arising as a\n+ result of this License or out of the use or inability to use the\n+ Work (including but not limited to damages for loss of goodwill,\n+ work stoppage, computer failure or malfunction, or any and all\n+ other commercial damages or losses), even if such Contributor\n+ has been advised of the possibility of such damages.\n+\n+ 9. Accepting Warranty or Additional Liability. While redistributing\n+ the Work or Derivative Works thereof, You may choose to offer,\n+ and charge a fee for, acceptance of support, warranty, indemnity,\n+ or other liability obligations and/or rights consistent with this\n+ License. However, in accepting such obligations, You may act only\n+ on Your own behalf and on Your sole responsibility, not on behalf\n+ of any other Contributor, and only if You agree to indemnify,\n+ defend, and hold each Contributor harmless for any liability\n+ incurred by, or claims asserted against, such Contributor by reason\n+ of your accepting any such warranty or additional liability.\n+\n+ END OF TERMS AND CONDITIONS\n+\n+ APPENDIX: How to apply the Apache License to your work.\n+\n+ To apply the Apache License to your work, attach the following\n+ boilerplate notice, with the fields enclosed by brackets \"{}\"\n+ replaced with your own identifying information. (Don't include\n+ the brackets!) The text should be enclosed in the appropriate\n+ comment syntax for the file format. We also recommend that a\n+ file or class name and description of purpose be included on the\n+ same \"printed page\" as the copyright notice for easier\n+ identification within third-party archives.\n+\n+ Copyright {yyyy} {name of copyright owner}\n+\n+ Licensed under the Apache License, Version 2.0 (the \"License\");\n+ you may not use this file except in compliance with the License.\n+ You may obtain a copy of the License at\n+\n+ http://www.apache.org/licenses/LICENSE-2.0\n+\n+ Unless required by applicable law or agreed to in writing, software\n+ distributed under the License is distributed on an \"AS IS\" BASIS,\n+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ See the License for the specific language governing permissions and\n+ limitations under the License.\n",
"new_path": "packages/defmulti/LICENSE",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+# @thi.ng/defmulti\n+\n+[](https://www.npmjs.com/package/@thi.ng/defmulti)\n+\n+This project is part of the\n+[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.\n+\n+## About\n+\n+Dynamically extensible [multiple\n+dispatch](https://en.wikipedia.org/wiki/Multiple_dispatch) via user\n+supplied dispatch function, with minimal overhead.\n+\n+## Installation\n+\n+```\n+yarn add @thi.ng/defmulti\n+```\n+\n+## Usage examples\n+\n+`defmulti` returns a new multi-dispatch function using the provided\n+dispatcher function. The dispatcher can take any number of arguments and\n+must produce a dispatch value (string, number or symbol) used to lookup\n+an implementation. If found, the impl is called with the same args. If\n+no matching implementation is available, attempts to dispatch to\n+`DEFAULT` impl. If none is registered, an error is thrown.\n+\n+Implementations for different dispatch values can be added and removed\n+dynamically by calling `.add(id, fn)` or `.remove(id)` on the returned\n+function.\n+\n+```typescript\n+import { defmulti, DEFAULT } from \"@thi.ng/defmulti\";\n+\n+const visit = defmulti((x) => Object.prototype.toString.call(x));\n+\n+// register implementations for different dispatch types\n+// each dispatch value can only be registered once\n+visit.add(\"[object Array]\", (x) => x.forEach(visit));\n+visit.add(\"[object Object]\", (x) => { for(let k in x) visit([k, x[k]]); });\n+// ignore null values\n+visit.add(\"[object Null]\", (x) => { });\n+// DEFAULT matches all other dispatch values\n+visit.add(DEFAULT, (x) => console.log(\"visit\", x.toString()));\n+\n+// call like normal fn\n+visit([{a: 1, b: [\"foo\", \"bar\", null, 42]}])\n+// a\n+// 1\n+// b\n+// foo\n+// bar\n+```\n+\n+### Dynamic dispatch: Simple S-expression interpreter\n+\n+```ts\n+const exec = defmulti((x)=> Array.isArray(x) ? x[0] : typeof x);\n+exec.add(\"+\", ([_, ...args]) => args.reduce((acc, n) => acc + exec(n), 0));\n+exec.add(\"*\", ([_, ...args]) => args.reduce((acc, n) => acc * exec(n), 1));\n+exec.add(\"number\", (x) => x);\n+exec.add(DEFAULT, (x) => { throw new Error(`invalid expr: ${x}`); });\n+\n+// 10 * (1 + 2 + 3) + 6\n+exec([\"+\", [\"*\", 10, [\"+\", 1, 2, 3]], 6]);\n+// 66\n+```\n+\n+### True multiple arg dispatch\n+\n+```ts\n+// interest rate calculator based on account type & balance thresholds\n+const apr = defmulti(\n+ ({type, balance}) => `${type}-${balance < 1e4 ? \"low\" : balance < 5e4 ? \"med\" : \"high\"}`\n+);\n+\n+apr.add(\"current-low\", ({balance}) => balance * 0.005);\n+apr.add(\"current-med\", ({balance}) => balance * 0.01);\n+apr.add(\"current-high\", ({balance}) => balance * 0.01);\n+apr.add(\"savings-low\", ({balance}) => balance * 0.01);\n+apr.add(\"savings-med\", ({balance}) => balance * 0.025);\n+apr.add(\"savings-high\", ({balance}) => balance * 0.035);\n+apr.add(DEFAULT, (x) => { throw new Error(`invalid account type: ${x.type}`)});\n+\n+apr({type: \"current\", balance: 5000});\n+// 25\n+apr({type: \"current\", balance: 10000});\n+// 100\n+apr({type: \"savings\", balance: 10000});\n+// 250\n+apr({type: \"isa\", balance: 10000});\n+// Error: invalid account type: isa\n+```\n+\n+## Authors\n+\n+- Karsten Schmidt\n+\n+## License\n+\n+© 2018 Karsten Schmidt // Apache Software License 2.0\n",
"new_path": "packages/defmulti/README.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"@thi.ng/defmulti\",\n+ \"version\": \"0.0.1\",\n+ \"description\": \"Dynamically extensible multiple dispatch via user supplied dispatch function.\",\n+ \"main\": \"./index.js\",\n+ \"typings\": \"./index.d.ts\",\n+ \"repository\": \"https://github.com/thi-ng/umbrella\",\n+ \"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n+ \"license\": \"Apache-2.0\",\n+ \"scripts\": {\n+ \"build\": \"yarn run clean && tsc --declaration\",\n+ \"clean\": \"rm -rf *.js *.d.ts .nyc_output build coverage doc\",\n+ \"cover\": \"yarn test && nyc report --reporter=lcov\",\n+ \"doc\": \"node_modules/.bin/typedoc --mode modules --out doc src\",\n+ \"pub\": \"yarn run build && yarn publish --access public\",\n+ \"test\": \"rm -rf build && tsc -p test && nyc mocha build/test/*.js\"\n+ },\n+ \"devDependencies\": {\n+ \"@types/mocha\": \"^5.2.0\",\n+ \"@types/node\": \"^10.0.6\",\n+ \"mocha\": \"^5.1.1\",\n+ \"nyc\": \"^11.7.1\",\n+ \"typedoc\": \"^0.11.1\",\n+ \"typescript\": \"^2.8.3\"\n+ },\n+ \"dependencies\": {\n+ \"@thi.ng/api\": \"^3.0.0\",\n+ \"@thi.ng/errors\": \"^0.1.0\"\n+ },\n+ \"keywords\": [\n+ \"ES6\",\n+ \"typescript\"\n+ ],\n+ \"publishConfig\": {\n+ \"access\": \"public\"\n+ }\n+}\n\\ No newline at end of file\n",
"new_path": "packages/defmulti/package.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+import { illegalArgs } from \"@thi.ng/errors/illegal-arguments\";\n+\n+export const DEFAULT = Symbol(\"DEFAULT\");\n+\n+export type DispatchFn = (...args) => PropertyKey;\n+export type Implementation<T> = (...args: any[]) => T;\n+\n+export interface MultiFn<T> extends Implementation<T> {\n+ add: (id: PropertyKey, g: Implementation<T>) => boolean;\n+ remove: (id: PropertyKey) => boolean;\n+}\n+/**\n+ * Returns a new multi-dispatch function using the provided dispatcher.\n+ * The dispatcher can take any number of arguments and must produce a\n+ * dispatch value (string, number or symbol) used to lookup an\n+ * implementation. If found, the impl is called with the same args and\n+ * its return value used as own return value. If no matching\n+ * implementation is available, attempts to dispatch to DEFAULT impl. If\n+ * none is registered, an error is thrown.\n+ *\n+ * Implementations for different dispatch values can be added and\n+ * removed dynamically by calling `.add(id, fn)` or `.remove(id)` on the\n+ * returned function. Each returns `true` if the operation was\n+ * successful.\n+ */\n+export function defmulti<T>(f: DispatchFn): MultiFn<T> {\n+ let impls: IObjectOf<Implementation<T>> = {};\n+ let fn: any = (...args) => {\n+ const id = f(...args);\n+ const g = impls[id] || impls[DEFAULT];\n+ return g ? g(...args) : illegalArgs(`missing implementation for: \"${id}\"`);\n+ };\n+ fn.add = (id: PropertyKey, g: Implementation<T>) => {\n+ if (impls[id]) return false;\n+ impls[id] = g;\n+ return true;\n+ };\n+ fn.remove = (id: PropertyKey) => {\n+ if (!impls[id]) return false;\n+ delete impls[id];\n+ return true;\n+ };\n+ return fn;\n+};\n",
"new_path": "packages/defmulti/src/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+// import * as assert from \"assert\";\n+// import * as defmulti from \"../src/index\";\n+\n+describe(\"defmulti\", () => {\n+ it(\"tests pending\");\n+});\n",
"new_path": "packages/defmulti/test/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \"../build\"\n+ },\n+ \"include\": [\n+ \"./**/*.ts\",\n+ \"../src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/defmulti/test/tsconfig.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \".\"\n+ },\n+ \"include\": [\n+ \"./src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "packages/defmulti/tsconfig.json",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(defmulti): add @thi.ng/defmulti package
| 1
|
feat
|
defmulti
|
679,913
|
11.05.2018 00:15:54
| -3,600
|
790d0130f125b9eb018203aa01452167236d98eb
|
test(defmulti): add tests
|
[
{
"change_type": "MODIFY",
"diff": "-// import * as assert from \"assert\";\n-// import * as defmulti from \"../src/index\";\n+import * as assert from \"assert\";\n+import { DEFAULT, defmulti } from \"../src/index\";\ndescribe(\"defmulti\", () => {\n- it(\"tests pending\");\n+ it(\"flatten\", () => {\n+ const flatten = defmulti<any[]>((x) => Object.prototype.toString.call(x));\n+ assert(flatten.add(\"[object Array]\", (x, acc: any[]) => (x.forEach((y) => flatten(y, acc)), acc)));\n+ assert(flatten.add(\"[object Object]\", (x, acc: any[]) => { for (let k in x) flatten([k, x[k]], acc); return acc; }));\n+ assert(flatten.add(\"[object Null]\", (_, acc) => acc));\n+ assert(flatten.add(DEFAULT, (x, acc: any[]) => (acc.push(x.toString()), acc)));\n+\n+ assert.deepEqual(flatten([{ a: 1, b: [\"foo\", \"bar\", null, 42] }], []), ['a', '1', 'b', 'foo', 'bar', '42']);\n+ assert(flatten.remove(DEFAULT));\n+ assert(!flatten.remove(DEFAULT));\n+ assert.throws(() => flatten([{ a: 1, b: [\"foo\", \"bar\", null, 42] }], []));\n+ });\n+\n+ it(\"sexpr\", () => {\n+ const exec = defmulti<number>((x) => Array.isArray(x) ? x[0] : typeof x);\n+ assert(exec.add(\"+\", ([_, ...args]) => args.reduce((acc, n) => acc + exec(n), 0)));\n+ assert(exec.add(\"*\", ([_, ...args]) => args.reduce((acc, n) => acc * exec(n), 1)));\n+ assert(exec.add(\"number\", (x) => x));\n+ assert(!exec.add(\"number\", (x) => x));\n+ assert(exec.add(DEFAULT, (x) => { throw new Error(`invalid expr: ${x}`); }));\n+\n+ assert.equal(exec([\"+\", [\"*\", 10, [\"+\", 1, 2, 3]], 6]), 66);\n+ assert.throws(() => exec(\"\"));\n+ });\n+\n+ it(\"apr\", () => {\n+ const apr = defmulti(\n+ ({ type, balance }) => `${type}-${balance < 1e4 ? \"low\" : balance < 5e4 ? \"med\" : \"high\"}`\n+ );\n+ apr.add(\"current-low\", ({ balance }) => balance * 0.005);\n+ apr.add(\"current-med\", ({ balance }) => balance * 0.01);\n+ apr.add(\"current-high\", ({ balance }) => balance * 0.01);\n+ apr.add(\"savings-low\", ({ balance }) => balance * 0.01);\n+ apr.add(\"savings-med\", ({ balance }) => balance * 0.025);\n+ apr.add(\"savings-high\", ({ balance }) => balance * 0.035);\n+ apr.add(DEFAULT, (x) => { throw new Error(`invalid account type: ${x.type}`) });\n+\n+ assert.equal(~~apr({ type: \"current\", balance: 5000 }), 25);\n+ assert.equal(~~apr({ type: \"current\", balance: 10000 }), 100);\n+ assert.equal(~~apr({ type: \"current\", balance: 50000 }), 500);\n+ assert.equal(~~apr({ type: \"savings\", balance: 5000 }), 50);\n+ assert.equal(~~apr({ type: \"savings\", balance: 10000 }), 250);\n+ assert.equal(~~apr({ type: \"savings\", balance: 100000 }), 3500);\n+ assert.throws(() => apr({ type: \"isa\", balance: 10000 }));\n+ });\n});\n",
"new_path": "packages/defmulti/test/index.ts",
"old_path": "packages/defmulti/test/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
test(defmulti): add tests
| 1
|
test
|
defmulti
|
679,913
|
11.05.2018 00:16:38
| -3,600
|
5227dd1fccdf51389a81ee400952e3d514d7b892
|
refactor(errors): update return types (`never`)
|
[
{
"change_type": "MODIFY",
"diff": "@@ -4,6 +4,6 @@ export class IllegalArgumentError extends Error {\n}\n}\n-export function illegalArgs(msg?: any) {\n+export function illegalArgs(msg?: any): never {\nthrow new IllegalArgumentError(msg);\n}\n",
"new_path": "packages/errors/src/illegal-arguments.ts",
"old_path": "packages/errors/src/illegal-arguments.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -4,6 +4,6 @@ export class IllegalArityError extends Error {\n}\n}\n-export function illegalArity(n) {\n+export function illegalArity(n): never {\nthrow new IllegalArityError(n);\n}\n",
"new_path": "packages/errors/src/illegal-arity.ts",
"old_path": "packages/errors/src/illegal-arity.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -4,6 +4,6 @@ export class IllegalStateError extends Error {\n}\n}\n-export function illegalState(msg?: any) {\n+export function illegalState(msg?: any): never {\nthrow new IllegalStateError(msg);\n}\n",
"new_path": "packages/errors/src/illegal-state.ts",
"old_path": "packages/errors/src/illegal-state.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -4,6 +4,6 @@ export class UnsupportedOperationError extends Error {\n}\n}\n-export function unsupported(msg?: any) {\n+export function unsupported(msg?: any): never {\nthrow new UnsupportedOperationError(msg);\n}\n",
"new_path": "packages/errors/src/unsupported.ts",
"old_path": "packages/errors/src/unsupported.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(errors): update return types (`never`)
| 1
|
refactor
|
errors
|
679,913
|
11.05.2018 00:17:04
| -3,600
|
5391d986e1e3863cd34f28809bfa6e40ca7691c6
|
fix(pointfree): minor update error handling
|
[
{
"change_type": "MODIFY",
"diff": "@@ -77,7 +77,7 @@ export const ctx = (stack: Stack = [], env: StackEnv = {}): StackContext =>\n[stack, [], env];\nconst $n = SAFE ?\n- (m: number, n: number) => (m < n) && illegalState(`stack underflow`) :\n+ (m: number, n: number) => (m < n) && <any>illegalState(`stack underflow`) :\n() => { };\nconst $ = SAFE ?\n",
"new_path": "packages/pointfree/src/index.ts",
"old_path": "packages/pointfree/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
fix(pointfree): minor update error handling
| 1
|
fix
|
pointfree
|
679,913
|
11.05.2018 00:35:26
| -3,600
|
126ecf36a6ded85afb701912855a78c324c521d6
|
feat(defmulti): add defmultiN(), update readme, add tests
|
[
{
"change_type": "MODIFY",
"diff": "@@ -19,6 +19,8 @@ yarn add @thi.ng/defmulti\n## Usage examples\n+### defmulti\n+\n`defmulti` returns a new multi-dispatch function using the provided\ndispatcher function. The dispatcher can take any number of arguments and\nmust produce a dispatch value (string, number or symbol) used to lookup\n@@ -53,7 +55,11 @@ visit([{a: 1, b: [\"foo\", \"bar\", null, 42]}])\n// bar\n```\n-### Dynamic dispatch: Simple S-expression interpreter\n+See\n+[/test/index.ts](https://github.com/thi-ng/umbrella/tree/master/packages/defmulti/test/index.ts)\n+for a variation of this example.\n+\n+#### Dynamic dispatch: Simple S-expression interpreter\n```ts\nconst exec = defmulti((x)=> Array.isArray(x) ? x[0] : typeof x);\n@@ -67,7 +73,7 @@ exec([\"+\", [\"*\", 10, [\"+\", 1, 2, 3]], 6]);\n// 66\n```\n-### True multiple arg dispatch\n+#### True multiple arg dispatch\n```ts\n// interest rate calculator based on account type & balance thresholds\n@@ -93,6 +99,32 @@ apr({type: \"isa\", balance: 10000});\n// Error: invalid account type: isa\n```\n+### defmultiN\n+\n+Returns a multi-dispatch function which delegates to one of the provided\n+implementations, based on the arity (number of args) when the function\n+is called. Internally uses `defmulti`, so new arities can be dynamically\n+added (or removed) at a later time. `defmultiN` also registers a\n+`DEFAULT` implementation which simply throws an `IllegalArityError` when\n+invoked.\n+\n+```ts\n+const foo = defmultiN({\n+ 0: () => \"zero\",\n+ 1: (x) => `one: ${x}`,\n+ 3: (x, y, z) => `three: ${x}, ${y}, ${z}`\n+});\n+\n+foo();\n+// zero\n+foo(23);\n+// one: 23\n+foo(1, 2, 3);\n+// three: 1, 2, 3\n+foo(1, 2);\n+// Error: illegal arity: 2\n+```\n+\n## Authors\n- Karsten Schmidt\n",
"new_path": "packages/defmulti/README.md",
"old_path": "packages/defmulti/README.md"
},
{
"change_type": "MODIFY",
"diff": "import { IObjectOf } from \"@thi.ng/api/api\";\nimport { illegalArgs } from \"@thi.ng/errors/illegal-arguments\";\n+import { illegalArity } from \"@thi.ng/errors/illegal-arity\";\nexport const DEFAULT = Symbol(\"DEFAULT\");\n@@ -10,6 +11,7 @@ export interface MultiFn<T> extends Implementation<T> {\nadd: (id: PropertyKey, g: Implementation<T>) => boolean;\nremove: (id: PropertyKey) => boolean;\n}\n+\n/**\n* Returns a new multi-dispatch function using the provided dispatcher.\n* The dispatcher can take any number of arguments and must produce a\n@@ -43,3 +45,39 @@ export function defmulti<T>(f: DispatchFn): MultiFn<T> {\n};\nreturn fn;\n};\n+\n+/**\n+ * Returns a multi-dispatch function which delegates to one of the\n+ * provided implementations, based on the arity (number of args) when\n+ * the function is called. Internally uses `defmulti`, so new arities\n+ * can be dynamically added (or removed) at a later time. `defmultiN`\n+ * also registers a `DEFAULT` implementation which simply throws an\n+ * `IllegalArityError` when invoked.\n+ *\n+ * ```\n+ * const foo = defmultiN({\n+ * 0: () => \"zero\",\n+ * 1: (x) => `one: ${x}`,\n+ * 3: (x, y, z) => `three: ${x}, ${y}, ${z}`\n+ * });\n+ *\n+ * foo();\n+ * // zero\n+ * foo(23);\n+ * // one: 23\n+ * foo(1, 2, 3);\n+ * // three: 1, 2, 3\n+ * foo(1, 2);\n+ * // Error: illegal arity: 2\n+ * ```\n+ *\n+ * @param impls\n+ */\n+export function defmultiN<T>(impls: { [id: number]: Implementation<T> }) {\n+ const fn = defmulti((...args: any[]) => args.length);\n+ fn.add(DEFAULT, (...args) => illegalArity(args.length));\n+ for (let id in impls) {\n+ fn.add(id, impls[id]);\n+ }\n+ return fn;\n+}\n",
"new_path": "packages/defmulti/src/index.ts",
"old_path": "packages/defmulti/src/index.ts"
},
{
"change_type": "MODIFY",
"diff": "import * as assert from \"assert\";\n-import { DEFAULT, defmulti } from \"../src/index\";\n+import { DEFAULT, defmulti, defmultiN } from \"../src/index\";\ndescribe(\"defmulti\", () => {\nit(\"flatten\", () => {\n@@ -47,4 +47,17 @@ describe(\"defmulti\", () => {\nassert.equal(~~apr({ type: \"savings\", balance: 100000 }), 3500);\nassert.throws(() => apr({ type: \"isa\", balance: 10000 }));\n});\n+\n+ it(\"defmultiN\", () => {\n+ const foo = defmultiN({\n+ 0: () => \"zero\",\n+ 1: (x) => `one: ${x}`,\n+ 3: (x, y, z) => `three: ${x}, ${y}, ${z}`\n+ });\n+\n+ assert.equal(foo(), \"zero\");\n+ assert.equal(foo(23), \"one: 23\");\n+ assert.equal(foo(1, 2, 3), \"three: 1, 2, 3\");\n+ assert.throws(() => foo(1, 2));\n+ });\n});\n",
"new_path": "packages/defmulti/test/index.ts",
"old_path": "packages/defmulti/test/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(defmulti): add defmultiN(), update readme, add tests
| 1
|
feat
|
defmulti
|
749,547
|
11.05.2018 01:30:51
| -36,000
|
6bd1c8248ebaded6ad708f61a42321a557902c5c
|
fix(docs): use correct build:demo script
|
[
{
"change_type": "MODIFY",
"diff": "\"main\": \"./index.js\",\n\"scripts\": {\n\"build\": \"../../utils/scripts/build.sh\",\n- \"build:styleguide\": \"../../utils/scripts/build-styleguide.sh\",\n+ \"build:demo\": \"../../utils/scripts/build-demo.sh\",\n\"start\": \"../../utils/scripts/start.sh\"\n},\n\"dependencies\": {\n",
"new_path": "packages/tags/package.json",
"old_path": "packages/tags/package.json"
}
] |
TypeScript
|
Apache License 2.0
|
zendeskgarden/react-components
|
fix(docs): use correct build:demo script (#7)
| 1
|
fix
|
docs
|
724,000
|
11.05.2018 08:04:42
| -3,600
|
7f2fa66ea200b7a1442c30ca2325fba1d1e39753
|
release: test-utils 1.0.0-beta.16
|
[
{
"change_type": "MODIFY",
"diff": "\"vue\": \"2.x\",\n\"vue-server-renderer\": \"2.x\",\n\"vue-template-compiler\": \"^2.x\",\n- \"@vue/test-utils\": \"1.0.0-beta.15\"\n+ \"@vue/test-utils\": \"1.0.0-beta.16\"\n}\n}\n",
"new_path": "packages/server-test-utils/package.json",
"old_path": "packages/server-test-utils/package.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@vue/test-utils\",\n- \"version\": \"1.0.0-beta.15\",\n+ \"version\": \"1.0.0-beta.16\",\n\"description\": \"Utilities for testing Vue components.\",\n\"main\": \"dist/vue-test-utils.js\",\n\"types\": \"types/index.d.ts\",\n",
"new_path": "packages/test-utils/package.json",
"old_path": "packages/test-utils/package.json"
}
] |
JavaScript
|
MIT License
|
vuejs/vue-test-utils
|
release: test-utils 1.0.0-beta.16
| 1
|
release
| null |
724,000
|
11.05.2018 08:06:00
| -3,600
|
14595abdfb60175efce58dee048f39fcfcd65a17
|
build: server-test-utils 1.0.0-beta.16
|
[
{
"change_type": "MODIFY",
"diff": "@@ -56,9 +56,27 @@ function validateSlots (slots) {\n//\n-function addSlotToVm (vm, slotName, slotValue) {\n- var elem;\n- if (typeof slotValue === 'string') {\n+function isSingleElement (slotValue) {\n+ var _slotValue = slotValue.trim();\n+ if (_slotValue[0] !== '<' || _slotValue[_slotValue.length - 1] !== '>') {\n+ return false\n+ }\n+ var domParser = new window.DOMParser();\n+ var _document = domParser.parseFromString(slotValue, 'text/html');\n+ return _document.body.childElementCount === 1\n+}\n+\n+// see https://github.com/vuejs/vue-test-utils/pull/274\n+function createVNodes (vm, slotValue) {\n+ var compiledResult = vueTemplateCompiler.compileToFunctions((\"<div>\" + slotValue + \"{{ }}</div>\"));\n+ var _staticRenderFns = vm._renderProxy.$options.staticRenderFns;\n+ vm._renderProxy.$options.staticRenderFns = compiledResult.staticRenderFns;\n+ var elem = compiledResult.render.call(vm._renderProxy, vm.$createElement).children;\n+ vm._renderProxy.$options.staticRenderFns = _staticRenderFns;\n+ return elem\n+}\n+\n+function validateEnvironment () {\nif (!vueTemplateCompiler.compileToFunctions) {\nthrowError('vueTemplateCompiler is undefined, you must pass components explicitly if vue-template-compiler is undefined');\n}\n@@ -68,17 +86,16 @@ function addSlotToVm (vm, slotName, slotValue) {\nif (window.navigator.userAgent.match(/PhantomJS/i)) {\nthrowError('the slots option does not support strings in PhantomJS. Please use Puppeteer, or pass a component.');\n}\n- var domParser = new window.DOMParser();\n- var _document = domParser.parseFromString(slotValue, 'text/html');\n- var _slotValue = slotValue.trim();\n- if (_slotValue[0] === '<' && _slotValue[_slotValue.length - 1] === '>' && _document.body.childElementCount === 1) {\n+}\n+\n+function addSlotToVm (vm, slotName, slotValue) {\n+ var elem;\n+ if (typeof slotValue === 'string') {\n+ validateEnvironment();\n+ if (isSingleElement(slotValue)) {\nelem = vm.$createElement(vueTemplateCompiler.compileToFunctions(slotValue));\n} else {\n- var compiledResult = vueTemplateCompiler.compileToFunctions((\"<div>\" + slotValue + \"{{ }}</div>\"));\n- var _staticRenderFns = vm._renderProxy.$options.staticRenderFns;\n- vm._renderProxy.$options.staticRenderFns = compiledResult.staticRenderFns;\n- elem = compiledResult.render.call(vm._renderProxy, vm.$createElement).children;\n- vm._renderProxy.$options.staticRenderFns = _staticRenderFns;\n+ elem = createVNodes(vm, slotValue);\n}\n} else {\nelem = vm.$createElement(slotValue);\n@@ -217,9 +234,15 @@ function compileTemplate (component) {\n}\n});\n}\n+\nif (component.extends) {\ncompileTemplate(component.extends);\n}\n+\n+ if (component.extendOptions && !component.options.render) {\n+ compileTemplate(component.options);\n+ }\n+\nif (component.template) {\nObject.assign(component, vueTemplateCompiler.compileToFunctions(component.template));\n}\n@@ -339,25 +362,6 @@ function createComponentStubs (originalComponents, stubs) {\nreturn components\n}\n-//\n-\n-function compileTemplate$1 (component) {\n- if (component.components) {\n- Object.keys(component.components).forEach(function (c) {\n- var cmp = component.components[c];\n- if (!cmp.render) {\n- compileTemplate$1(cmp);\n- }\n- });\n- }\n- if (component.extends) {\n- compileTemplate$1(component.extends);\n- }\n- if (component.template) {\n- Object.assign(component, vueTemplateCompiler.compileToFunctions(component.template));\n- }\n-}\n-\nfunction deleteMountingOptions (options) {\ndelete options.attachToDocument;\ndelete options.mocks;\n@@ -459,7 +463,7 @@ function createInstance (\n}\nif (componentNeedsCompiling(component)) {\n- compileTemplate$1(component);\n+ compileTemplate(component);\n}\naddEventLogger(vue);\n@@ -468,11 +472,28 @@ function createInstance (\nvar instanceOptions = Object.assign({}, options);\ndeleteMountingOptions(instanceOptions);\n+ // $FlowIgnore\n+ var stubComponents = createComponentStubs(component.components, options.stubs);\n+\nif (options.stubs) {\ninstanceOptions.components = Object.assign({}, instanceOptions.components,\n// $FlowIgnore\n- createComponentStubs(component.components, options.stubs));\n+ stubComponents);\n+ }\n+\n+ Object.keys(component.components || {}).forEach(function (c) {\n+ if (component.components[c].extendOptions &&\n+ !instanceOptions.components[c]) {\n+ if (options.logModifiedComponents) {\n+ warn((\"an extended child component \" + c + \" has been modified to ensure it has the correct instance properties. This means it is not possible to find the component with a component selector. To find the component, you must stub it manually using the mocks mounting option.\"));\n+ }\n+ instanceOptions.components[c] = vue.extend(component.components[c]);\n}\n+ });\n+\n+ Object.keys(stubComponents).forEach(function (c) {\n+ vue.component(c, stubComponents[c]);\n+ });\nvar vm = new Constructor(instanceOptions);\n@@ -526,11 +547,15 @@ function createInstance (\nfunction getOptions (key, options, config) {\nif (options ||\n(config[key] && Object.keys(config[key]).length > 0)) {\n- if (Array.isArray(options)) {\n+ if (options instanceof Function) {\n+ return options\n+ } else if (Array.isArray(options)) {\nreturn options.concat( Object.keys(config[key] || {}))\n- } else {\n+ } else if (!(config[key] instanceof Function)) {\nreturn Object.assign({}, config[key],\noptions)\n+ } else {\n+ throw new Error(\"Config can't be a Function.\")\n}\n}\n}\n@@ -540,9 +565,11 @@ function mergeOptions (\nconfig\n) {\nreturn Object.assign({}, options,\n- {stubs: getOptions('stubs', options.stubs, config),\n+ {logModifiedComponents: config.logModifiedComponents,\n+ stubs: getOptions('stubs', options.stubs, config),\nmocks: getOptions('mocks', options.mocks, config),\n- methods: getOptions('methods', options.methods, config)})\n+ methods: getOptions('methods', options.methods, config),\n+ provide: getOptions('provide', options.provide, config)})\n}\nvar config = testUtils.config\n",
"new_path": "packages/server-test-utils/dist/vue-server-test-utils.js",
"old_path": "packages/server-test-utils/dist/vue-server-test-utils.js"
}
] |
JavaScript
|
MIT License
|
vuejs/vue-test-utils
|
build: server-test-utils 1.0.0-beta.16
| 1
|
build
| null |
217,922
|
11.05.2018 10:13:07
| -7,200
|
593545edb5d7d36d8c280f5e97f28cf2171a3bb8
|
style: changed compact alarm delete button for a simple icon button
|
[
{
"change_type": "MODIFY",
"diff": "class=\"map-marker\"\n[marker]=\"{x:alarm.coords[0], y:alarm.coords[1]}\"></app-map-position>\n<span>{{alarmService.getAlarmTimerString(alarm, time)}}</span>\n- <button mat-button (click)=\"deleteAlarm(alarm)\" color=\"warn\">\n+ <button mat-icon-button (click)=\"deleteAlarm(alarm)\" color=\"warn\">\n<mat-icon>delete</mat-icon>\n- {{'Delete' | translate}}\n</button>\n</mat-list-item>\n</mat-list>\n",
"new_path": "src/app/pages/alarms/alarms/alarms.component.html",
"old_path": "src/app/pages/alarms/alarms/alarms.component.html"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
style: changed compact alarm delete button for a simple icon button
| 1
|
style
| null |
217,922
|
11.05.2018 11:41:59
| -7,200
|
b3e6b5fa324781540d3fab89f7e4f0c46839bb98
|
fix: slot is now shown
|
[
{
"change_type": "MODIFY",
"diff": "<mat-list-item [ngClass]=\"{'primary-background': spawned, 'accent-background': !spawned && alerted}\">\n<img mat-list-avatar src=\"{{alarm.icon | icon}}\" alt=\"\">\n- <b mat-line>{{alarm.itemId | itemName | i18n}} <span *ngIf=\"alarm.slot\">({{alarm.slot}})</span> </b>\n+ <b mat-line>{{alarm.itemId | itemName | i18n}}</b>\n+ <span *ngIf=\"alarm.slot\">Slot {{alarm.slot}}</span>\n<p mat-line>{{timer}}</p>\n<button mat-icon-button (click)=\"openMap()\"\nmatTooltipPosition=\"above\"\n",
"new_path": "src/app/modules/alarms-sidebar/alarm-sidebar-row/alarm-sidebar-row.component.html",
"old_path": "src/app/modules/alarms-sidebar/alarm-sidebar-row/alarm-sidebar-row.component.html"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix: slot is now shown
| 1
|
fix
| null |
679,913
|
11.05.2018 11:44:33
| -3,600
|
eeed25ede077434669aa8160a5a371dab3a2100a
|
feat(defmulti): add generics, update docs & readme
|
[
{
"change_type": "MODIFY",
"diff": "@@ -9,7 +9,9 @@ This project is part of the\nDynamically extensible [multiple\ndispatch](https://en.wikipedia.org/wiki/Multiple_dispatch) via user\n-supplied dispatch function, with minimal overhead.\n+supplied dispatch function, with minimal overhead. Provides generics for\n+type checking up to 8 args, but generally works with any number of\n+arguments.\n## Installation\n@@ -22,11 +24,17 @@ yarn add @thi.ng/defmulti\n### defmulti\n`defmulti` returns a new multi-dispatch function using the provided\n-dispatcher function. The dispatcher can take any number of arguments and\n-must produce a dispatch value (string, number or symbol) used to lookup\n-an implementation. If found, the impl is called with the same args. If\n-no matching implementation is available, attempts to dispatch to\n-`DEFAULT` impl. If none is registered, an error is thrown.\n+dispatcher function. The dispatcher acts as a mapping function, can take\n+any number of arguments and must produce a dispatch value (string,\n+number or symbol) used to lookup an implementation. If found, the impl\n+is called with the same args. If no matching implementation is\n+available, attempts to dispatch to `DEFAULT` impl. If none is\n+registered, an error is thrown.\n+\n+`defmulti` provides generics for type checking up to 8 args (plus the\n+return type) and the generics will also apply to all implementations. If\n+more than 8 args are required, `defmulti` will fall back to an untyped\n+varargs solution.\nImplementations for different dispatch values can be added and removed\ndynamically by calling `.add(id, fn)` or `.remove(id)` on the returned\n@@ -35,7 +43,7 @@ function.\n```typescript\nimport { defmulti, DEFAULT } from \"@thi.ng/defmulti\";\n-const visit = defmulti((x) => Object.prototype.toString.call(x));\n+const visit = defmulti<any, void>((x) => Object.prototype.toString.call(x));\n// register implementations for different dispatch types\n// each dispatch value can only be registered once\n@@ -78,7 +86,8 @@ exec([\"+\", [\"*\", 10, [\"+\", 1, 2, 3]], 6]);\n```ts\n// interest rate calculator based on account type & balance thresholds\nconst apr = defmulti(\n- ({type, balance}) => `${type}-${balance < 1e4 ? \"low\" : balance < 5e4 ? \"med\" : \"high\"}`\n+ ({type, balance}) =>\n+ `${type}-${balance < 1e4 ? \"low\" : balance < 5e4 ? \"med\" : \"high\"}`\n);\napr.add(\"current-low\", ({ balance }) => balance * 0.005);\n@@ -108,8 +117,11 @@ added (or removed) at a later time. `defmultiN` also registers a\n`DEFAULT` implementation which simply throws an `IllegalArityError` when\ninvoked.\n+**Note:** Unlike `defmulti` no argument type checking is supported,\n+however you can specify the return type for the generated function.\n+\n```ts\n-const foo = defmultiN({\n+const foo = defmultiN<string>({\n0: () => \"zero\",\n1: (x) => `one: ${x}`,\n3: (x, y, z) => `three: ${x}, ${y}, ${z}`\n",
"new_path": "packages/defmulti/README.md",
"old_path": "packages/defmulti/README.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,13 +5,70 @@ import { illegalArity } from \"@thi.ng/errors/illegal-arity\";\nexport const DEFAULT = Symbol(\"DEFAULT\");\nexport type DispatchFn = (...args) => PropertyKey;\n+export type DispatchFn1<A> = (a: A) => PropertyKey;\n+export type DispatchFn2<A, B> = (a: A, b: B) => PropertyKey;\n+export type DispatchFn3<A, B, C> = (a: A, b: B, c: C) => PropertyKey;\n+export type DispatchFn4<A, B, C, D> = (a: A, b: B, c: C, d: D) => PropertyKey;\n+export type DispatchFn5<A, B, C, D, E> = (a: A, b: B, c: C, d: D, e: E) => PropertyKey;\n+export type DispatchFn6<A, B, C, D, E, F> = (a: A, b: B, c: C, d: D, e: E, f: F) => PropertyKey;\n+export type DispatchFn7<A, B, C, D, E, F, G> = (a: A, b: B, c: C, d: D, e: E, f: F, g: G) => PropertyKey;\n+export type DispatchFn8<A, B, C, D, E, F, G, H> = (a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H) => PropertyKey;\n+\nexport type Implementation<T> = (...args: any[]) => T;\n+export type Implementation1<A, T> = (a: A) => T;\n+export type Implementation2<A, B, T> = (a: A, b: B) => T;\n+export type Implementation3<A, B, C, T> = (a: A, b: B, c: C) => T;\n+export type Implementation4<A, B, C, D, T> = (a: A, b: B, c: C, d: D) => T;\n+export type Implementation5<A, B, C, D, E, T> = (a: A, b: B, c: C, d: D, e: E) => T;\n+export type Implementation6<A, B, C, D, E, F, T> = (a: A, b: B, c: C, d: D, e: E, f: F) => T;\n+export type Implementation7<A, B, C, D, E, F, G, T> = (a: A, b: B, c: C, d: D, e: E, f: F, g: G) => T;\n+export type Implementation8<A, B, C, D, E, F, G, H, T> = (a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H) => T;\nexport interface MultiFn<T> extends Implementation<T> {\nadd: (id: PropertyKey, g: Implementation<T>) => boolean;\nremove: (id: PropertyKey) => boolean;\n}\n+export interface MultiFn1<A, T> extends Implementation1<A, T> {\n+ add: (id: PropertyKey, g: Implementation1<A, T>) => boolean;\n+ remove: (id: PropertyKey) => boolean;\n+}\n+\n+export interface MultiFn2<A, B, T> extends Implementation2<A, B, T> {\n+ add: (id: PropertyKey, g: Implementation2<A, B, T>) => boolean;\n+ remove: (id: PropertyKey) => boolean;\n+}\n+\n+export interface MultiFn3<A, B, C, T> extends Implementation3<A, B, C, T> {\n+ add: (id: PropertyKey, g: Implementation3<A, B, C, T>) => boolean;\n+ remove: (id: PropertyKey) => boolean;\n+}\n+\n+export interface MultiFn4<A, B, C, D, T> extends Implementation4<A, B, C, D, T> {\n+ add: (id: PropertyKey, g: Implementation4<A, B, C, D, T>) => boolean;\n+ remove: (id: PropertyKey) => boolean;\n+}\n+\n+export interface MultiFn5<A, B, C, D, E, T> extends Implementation5<A, B, C, D, E, T> {\n+ add: (id: PropertyKey, g: Implementation5<A, B, C, D, E, T>) => boolean;\n+ remove: (id: PropertyKey) => boolean;\n+}\n+\n+export interface MultiFn6<A, B, C, D, E, F, T> extends Implementation6<A, B, C, D, E, F, T> {\n+ add: (id: PropertyKey, g: Implementation6<A, B, C, D, E, F, T>) => boolean;\n+ remove: (id: PropertyKey) => boolean;\n+}\n+\n+export interface MultiFn7<A, B, C, D, E, F, G, T> extends Implementation7<A, B, C, D, E, F, G, T> {\n+ add: (id: PropertyKey, g: Implementation7<A, B, C, D, E, F, G, T>) => boolean;\n+ remove: (id: PropertyKey) => boolean;\n+}\n+\n+export interface MultiFn8<A, B, C, D, E, F, G, H, T> extends Implementation8<A, B, C, D, E, F, G, H, T> {\n+ add: (id: PropertyKey, g: Implementation8<A, B, C, D, E, F, G, H, T>) => boolean;\n+ remove: (id: PropertyKey) => boolean;\n+}\n+\n/**\n* Returns a new multi-dispatch function using the provided dispatcher.\n* The dispatcher can take any number of arguments and must produce a\n@@ -21,12 +78,26 @@ export interface MultiFn<T> extends Implementation<T> {\n* implementation is available, attempts to dispatch to DEFAULT impl. If\n* none is registered, an error is thrown.\n*\n+ * `defmulti` provides generics for type checking up to 8 args (plus the\n+ * return type) and the generics will also apply to all implementations.\n+ * If more than 8 args are required, `defmulti` will fall back to an\n+ * untyped varargs solution.\n+ *\n* Implementations for different dispatch values can be added and\n* removed dynamically by calling `.add(id, fn)` or `.remove(id)` on the\n* returned function. Each returns `true` if the operation was\n* successful.\n*/\n-export function defmulti<T>(f: DispatchFn): MultiFn<T> {\n+export function defmulti<T>(f: DispatchFn): MultiFn<T>;\n+export function defmulti<A, T>(f: DispatchFn1<A>): MultiFn1<A, T>;\n+export function defmulti<A, B, T>(f: DispatchFn2<A, B>): MultiFn2<A, B, T>;\n+export function defmulti<A, B, C, T>(f: DispatchFn3<A, B, C>): MultiFn3<A, B, C, T>;\n+export function defmulti<A, B, C, D, T>(f: DispatchFn4<A, B, C, D>): MultiFn4<A, B, C, D, T>;\n+export function defmulti<A, B, C, D, E, T>(f: DispatchFn5<A, B, C, D, E>): MultiFn5<A, B, C, D, E, T>;\n+export function defmulti<A, B, C, D, E, F, T>(f: DispatchFn6<A, B, C, D, E, F>): MultiFn6<A, B, C, D, E, F, T>;\n+export function defmulti<A, B, C, D, E, F, G, T>(f: DispatchFn7<A, B, C, D, E, F, G>): MultiFn7<A, B, C, D, E, F, G, T>;\n+export function defmulti<A, B, C, D, E, F, G, H, T>(f: DispatchFn8<A, B, C, D, E, F, G, H>): MultiFn8<A, B, C, D, E, F, G, H, T>;\n+export function defmulti<T>(f: any): MultiFn<T> {\nlet impls: IObjectOf<Implementation<T>> = {};\nlet fn: any = (...args) => {\nconst id = f(...args);\n@@ -54,8 +125,11 @@ export function defmulti<T>(f: DispatchFn): MultiFn<T> {\n* also registers a `DEFAULT` implementation which simply throws an\n* `IllegalArityError` when invoked.\n*\n+ * **Note:** Unlike `defmulti` no argument type checking is supported,\n+ * however you can specify the return type for the generated function.\n+ *\n* ```\n- * const foo = defmultiN({\n+ * const foo = defmultiN<string>({\n* 0: () => \"zero\",\n* 1: (x) => `one: ${x}`,\n* 3: (x, y, z) => `three: ${x}, ${y}, ${z}`\n@@ -69,12 +143,16 @@ export function defmulti<T>(f: DispatchFn): MultiFn<T> {\n* // three: 1, 2, 3\n* foo(1, 2);\n* // Error: illegal arity: 2\n+ *\n+ * foo.add(2, (x, y) => `two: ${x}, ${y}`);\n+ * foo(1, 2);\n+ * // two: 1, 2\n* ```\n*\n* @param impls\n*/\nexport function defmultiN<T>(impls: { [id: number]: Implementation<T> }) {\n- const fn = defmulti((...args: any[]) => args.length);\n+ const fn = defmulti<T>((...args: any[]) => args.length);\nfn.add(DEFAULT, (...args) => illegalArity(args.length));\nfor (let id in impls) {\nfn.add(id, impls[id]);\n",
"new_path": "packages/defmulti/src/index.ts",
"old_path": "packages/defmulti/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(defmulti): add generics, update docs & readme
| 1
|
feat
|
defmulti
|
679,913
|
11.05.2018 11:49:32
| -3,600
|
fbb721f87342434bac496ed3c4bbc35aa974dc4a
|
docs: remove dep graph from main readme, update package
|
[
{
"change_type": "MODIFY",
"diff": "@@ -73,9 +73,7 @@ difficulties, many combining functionality from several packages) in the\n## Dependency graph\n-(This graph is updated automatically after each version update)\n-\n-\n+(The graph has been temporarily removed to save repo space)\n## Building\n",
"new_path": "README.md",
"old_path": "README.md"
},
{
"change_type": "DELETE",
"diff": "Binary files a/assets/deps.png and /dev/null differ\n",
"new_path": "assets/deps.png",
"old_path": "assets/deps.png"
},
{
"change_type": "MODIFY",
"diff": "\"depgraph\": \"scripts/depgraph && git add assets/deps.png && git commit -m 'docs: update dep graph' && git push\",\n\"doc\": \"lerna run doc\",\n\"examples\": \"ex=\\\"examples/*\\\"; for e in $ex; do (cd $e && yarn build); done\",\n- \"pub\": \"lerna publish && yarn depgraph && yarn doc && scripts/upload-docs\",\n+ \"pub\": \"lerna publish && yarn doc && scripts/upload-docs\",\n\"test\": \"yarn build && lerna run test\"\n}\n}\n\\ No newline at end of file\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
docs: remove dep graph from main readme, update package
| 1
|
docs
| null |
730,413
|
11.05.2018 13:13:09
| 14,400
|
c05b7bf2f36e8311d114ec132dcf0eff5d8b8f37
|
fix(widget-recents): recent widget crash on undefined lastActivity
|
[
{
"change_type": "MODIFY",
"diff": "@@ -519,7 +519,7 @@ export class RecentsWidget extends Component {\n// Get Activity Text for space\nlet activityText;\n- const {isDecrypting, latestActivity} = space;\n+ const {isDecrypting, latestActivity = {}} = space;\nif (!isDecrypting) {\nconst {actorName: actorName = '', type: activityType = 'unknown'} = latestActivity;\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
|
fix(widget-recents): recent widget crash on undefined lastActivity
| 1
|
fix
|
widget-recents
|
448,074
|
11.05.2018 16:13:03
| -7,200
|
dfa83f96bad1405f94bc431028544e1cfc47666c
|
fix: do not disable fullTemplateTypeCheck when ES5 downleveling
In the option was enabled in tsconfig.ngc.json and then
in the option was disabled again when downleveling to ES5.
This then causes to resurface again, which was supposedly
fixed by
|
[
{
"change_type": "MODIFY",
"diff": "@@ -61,8 +61,7 @@ export const compileNgcTransform: Transform = transformFromPromise(async graph =\n// the options are here, to improve the build time\ndeclaration: false,\ndeclarationDir: undefined,\n- skipMetadataEmit: true,\n- fullTemplateTypeCheck: false\n+ skipMetadataEmit: true\n})\n]);\n",
"new_path": "src/lib/ng-v5/entry-point/ts/compile-ngc.transform.ts",
"old_path": "src/lib/ng-v5/entry-point/ts/compile-ngc.transform.ts"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
fix: do not disable fullTemplateTypeCheck when ES5 downleveling (#860)
In #826 the option was enabled in tsconfig.ngc.json and then
in #812 the option was disabled again when downleveling to ES5.
This then causes #822 to resurface again, which was supposedly
fixed by #826.
| 1
|
fix
| null |
821,196
|
11.05.2018 16:14:45
| 25,200
|
2b28a35d2ab39bf3410dcf9bf65f35c564827e39
|
fix: use author for license
|
[
{
"change_type": "MODIFY",
"diff": "\"bugs\": \"https://github.com/oclif/oclif/issues\",\n\"dependencies\": {\n\"@oclif/command\": \"^1.4.21\",\n- \"@oclif/config\": \"^1.6.17\",\n- \"@oclif/errors\": \"^1.0.11\",\n+ \"@oclif/config\": \"^1.6.18\",\n+ \"@oclif/errors\": \"^1.0.12\",\n\"@oclif/plugin-help\": \"^1.2.10\",\n\"@oclif/plugin-not-found\": \"^1.0.9\",\n- \"@oclif/plugin-warn-if-update-available\": \"^1.3.8\",\n+ \"@oclif/plugin-warn-if-update-available\": \"^1.3.9\",\n\"debug\": \"^3.1.0\",\n\"fixpack\": \"^2.3.1\",\n\"lodash\": \"^4.17.10\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "MIT License\n-Copyright (c) 2018 Salesforce.com\n+Copyright (c) 2018 <%- pjson.author %>\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\n",
"new_path": "templates/LICENSE.mit",
"old_path": "templates/LICENSE.mit"
},
{
"change_type": "MODIFY",
"diff": "dependencies:\ndebug \"^3.1.0\"\n+\"@oclif/config@^1.6.18\":\n+ version \"1.6.18\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/config/-/config-1.6.18.tgz#25693cb4badb81489a8c5f846761630dca8c516c\"\n+ dependencies:\n+ debug \"^3.1.0\"\n+\n\"@oclif/dev-cli@^1.13.20\":\nversion \"1.13.20\"\nresolved \"https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.13.20.tgz#176d78a2b3b7f937f68d418ddf86dddc8c48fb2f\"\nstrip-ansi \"^4.0.0\"\nwrap-ansi \"^3.0.1\"\n+\"@oclif/errors@^1.0.12\":\n+ version \"1.0.12\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.12.tgz#6c8ea932d3fcfc26f5b3bc77e45da8f33189f188\"\n+ dependencies:\n+ clean-stack \"^1.3.0\"\n+ fs-extra \"^6.0.1\"\n+ indent-string \"^3.2.0\"\n+ strip-ansi \"^4.0.0\"\n+ wrap-ansi \"^3.0.1\"\n+\n\"@oclif/errors@^1.0.6\":\nversion \"1.0.6\"\nresolved \"https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.6.tgz#76b17906ac1beea252add52e8e8ed78229c33a7b\"\n\"@oclif/command\" \"^1.4.19\"\nstring-similarity \"^1.2.0\"\n-\"@oclif/plugin-warn-if-update-available@^1.3.8\":\n- version \"1.3.8\"\n- resolved \"https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-1.3.8.tgz#bc42e86b83a29a138c8b7ee4e8c38ac066f9adf3\"\n+\"@oclif/plugin-warn-if-update-available@^1.3.9\":\n+ version \"1.3.9\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-1.3.9.tgz#ed1f55eea994b0e2bd918b4353daa0d937e84ad6\"\ndependencies:\n- \"@oclif/command\" \"^1.4.19\"\n+ \"@oclif/command\" \"^1.4.21\"\n\"@oclif/config\" \"^1.6.17\"\n- \"@oclif/errors\" \"^1.0.8\"\n+ \"@oclif/errors\" \"^1.0.11\"\nchalk \"^2.4.1\"\ndebug \"^3.1.0\"\n- fs-extra \"^6.0.0\"\n- http-call \"^5.1.1\"\n+ fs-extra \"^6.0.1\"\n+ http-call \"^5.1.2\"\nsemver \"^5.5.0\"\n\"@oclif/screen@^1.0.2\":\n@@ -1692,6 +1708,16 @@ http-call@^5.1.1:\nis-stream \"^1.1.0\"\ntunnel-agent \"^0.6.0\"\n+http-call@^5.1.2:\n+ version \"5.1.2\"\n+ resolved \"https://registry.yarnpkg.com/http-call/-/http-call-5.1.2.tgz#2320e1aef65f01574723a697aca31748ce578f9d\"\n+ dependencies:\n+ content-type \"^1.0.4\"\n+ debug \"^3.1.0\"\n+ is-retry-allowed \"^1.1.0\"\n+ is-stream \"^1.1.0\"\n+ tunnel-agent \"^0.6.0\"\n+\nhyperlinker@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
TypeScript
|
MIT License
|
oclif/oclif
|
fix: use author for license
| 1
|
fix
| null |
821,196
|
11.05.2018 16:24:21
| 25,200
|
2e35528a7e0f32a67230c78029772deca760a07d
|
fix: move tslib to dependencies
|
[
{
"change_type": "MODIFY",
"diff": "@@ -422,13 +422,15 @@ class App extends Generator {\n)\n}\nif (this.ts) {\n+ dependencies.push(\n+ 'tslib@^1',\n+ )\ndevDependencies.push(\n'@types/chai@^4',\n'@types/mocha@^5',\n'@types/node@^10',\n'typescript@^2.8',\n'ts-node@^6',\n- 'tslib@^1',\n)\nif (this.tslint) {\ndevDependencies.push(\n",
"new_path": "src/generators/app.ts",
"old_path": "src/generators/app.ts"
}
] |
TypeScript
|
MIT License
|
oclif/oclif
|
fix: move tslib to dependencies
| 1
|
fix
| null |
791,690
|
11.05.2018 16:44:06
| 25,200
|
d3f1b3ad354cbafbeac8b93e0ada7ca7223fa5bd
|
report: minimum time scale for opportunities & filmstrip
|
[
{
"change_type": "MODIFY",
"diff": "@@ -19,7 +19,7 @@ class UnusedCSSRules extends ByteEfficiencyAudit {\nstatic get meta() {\nreturn {\nname: 'unused-css-rules',\n- description: 'Unused CSS rules',\n+ description: 'Defer unused CSS',\nscoreDisplayMode: ByteEfficiencyAudit.SCORING_MODES.NUMERIC,\nhelpText: 'Remove unused rules from stylesheets to reduce unnecessary ' +\n'bytes consumed by network activity. ' +\n",
"new_path": "lighthouse-core/audits/byte-efficiency/unused-css-rules.js",
"old_path": "lighthouse-core/audits/byte-efficiency/unused-css-rules.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -76,17 +76,16 @@ class ScreenshotThumbnails extends Audit {\nconst speedline = await artifacts.requestSpeedline(trace);\n- let minimumTimelineDuration = 0;\n+ // Make the minimum time range 3s so sites that load super quickly don't get a single screenshot\n+ let minimumTimelineDuration = context.options.minimumTimelineDuration || 3000;\n// Ensure thumbnails cover the full range of the trace (TTI can be later than visually complete)\nif (context.settings.throttlingMethod !== 'simulate') {\nconst devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];\nconst metricComputationData = {trace, devtoolsLog, settings: context.settings};\nconst tti = artifacts.requestInteractive(metricComputationData);\ntry {\n- minimumTimelineDuration = (await tti).timing;\n- } catch (_) {\n- minimumTimelineDuration = 0;\n- }\n+ minimumTimelineDuration = Math.max((await tti).timing, minimumTimelineDuration);\n+ } catch (_) {}\n}\nconst thumbnails = [];\n",
"new_path": "lighthouse-core/audits/screenshot-thumbnails.js",
"old_path": "lighthouse-core/audits/screenshot-thumbnails.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -157,9 +157,11 @@ class PerformanceCategoryRenderer extends CategoryRenderer {\n.sort((auditA, auditB) => this._getWastedMs(auditB) - this._getWastedMs(auditA));\nif (opportunityAudits.length) {\n+ // Scale the sparklines relative to savings, minimum 2s to not overstate small savings\n+ const minimumScale = 2000;\nconst wastedMsValues = opportunityAudits.map(audit => this._getWastedMs(audit));\nconst maxWaste = Math.max(...wastedMsValues);\n- const scale = Math.ceil(maxWaste / 1000) * 1000;\n+ const scale = Math.max(Math.ceil(maxWaste / 1000) * 1000, minimumScale);\nconst groupEl = this.renderAuditGroup(groups['load-opportunities'], {expandable: false});\nconst tmpl = this.dom.cloneTemplate('#tmpl-lh-opportunity-header', this.templateContext);\nconst headerEl = this.dom.find('.lh-load-opportunity__header', tmpl);\n",
"new_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js",
"old_path": "lighthouse-core/report/html/renderer/performance-category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -24,13 +24,14 @@ describe('Screenshot thumbnails', () => {\n});\nit('should extract thumbnails from a trace', () => {\n+ const options = {minimumTimelineDuration: 500};\nconst settings = {throttlingMethod: 'provided'};\nconst artifacts = Object.assign({\ntraces: {defaultPass: pwaTrace},\ndevtoolsLogs: {}, // empty devtools logs to test just thumbnails without TTI behavior\n}, computedArtifacts);\n- return ScreenshotThumbnailsAudit.audit(artifacts, {settings}).then(results => {\n+ return ScreenshotThumbnailsAudit.audit(artifacts, {settings, options}).then(results => {\nresults.details.items.forEach((result, index) => {\nconst framePath = path.join(__dirname,\n`../fixtures/traces/screenshots/progressive-app-frame-${index}.jpg`);\n@@ -47,13 +48,14 @@ describe('Screenshot thumbnails', () => {\n}).timeout(10000);\nit('should scale the timeline to TTI when observed', () => {\n+ const options = {minimumTimelineDuration: 500};\nconst settings = {throttlingMethod: 'devtools'};\nconst artifacts = Object.assign({\ntraces: {defaultPass: pwaTrace},\ndevtoolsLogs: {defaultPass: pwaDevtoolsLog},\n}, computedArtifacts);\n- return ScreenshotThumbnailsAudit.audit(artifacts, {settings}).then(results => {\n+ return ScreenshotThumbnailsAudit.audit(artifacts, {settings, options}).then(results => {\nassert.equal(results.details.items[0].timing, 158);\nassert.equal(results.details.items[9].timing, 1582);\n@@ -65,18 +67,31 @@ describe('Screenshot thumbnails', () => {\n});\nit('should not scale the timeline to TTI when simulate', () => {\n+ const options = {minimumTimelineDuration: 500};\nconst settings = {throttlingMethod: 'simulate'};\nconst artifacts = Object.assign({\ntraces: {defaultPass: pwaTrace},\n}, computedArtifacts);\ncomputedArtifacts.requestInteractive = () => ({timing: 20000});\n- return ScreenshotThumbnailsAudit.audit(artifacts, {settings}).then(results => {\n+ return ScreenshotThumbnailsAudit.audit(artifacts, {settings, options}).then(results => {\nassert.equal(results.details.items[0].timing, 82);\nassert.equal(results.details.items[9].timing, 818);\n});\n});\n+ it('should scale the timeline to minimumTimelineDuration', () => {\n+ const settings = {throttlingMethod: 'simulate'};\n+ const artifacts = Object.assign({\n+ traces: {defaultPass: pwaTrace},\n+ }, computedArtifacts);\n+\n+ return ScreenshotThumbnailsAudit.audit(artifacts, {settings, options: {}}).then(results => {\n+ assert.equal(results.details.items[0].timing, 300);\n+ assert.equal(results.details.items[9].timing, 3000);\n+ });\n+ });\n+\nit('should handle nonsense times', async () => {\nconst settings = {throttlingMethod: 'simulate'};\nconst artifacts = {\n@@ -86,7 +101,7 @@ describe('Screenshot thumbnails', () => {\n};\ntry {\n- await ScreenshotThumbnailsAudit.audit(artifacts, {settings});\n+ await ScreenshotThumbnailsAudit.audit(artifacts, {settings, options: {}});\nassert.fail('should have thrown');\n} catch (err) {\nassert.equal(err.message, 'INVALID_SPEEDLINE');\n",
"new_path": "lighthouse-core/test/audits/screenshot-thumbnails-test.js",
"old_path": "lighthouse-core/test/audits/screenshot-thumbnails-test.js"
},
{
"change_type": "MODIFY",
"diff": "\"displayValue\": \"\",\n\"scoreDisplayMode\": \"numeric\",\n\"name\": \"unused-css-rules\",\n- \"description\": \"Unused CSS rules\",\n+ \"description\": \"Defer unused CSS\",\n\"helpText\": \"Remove unused rules from stylesheets to reduce unnecessary bytes consumed by network activity. [Learn more](https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery).\",\n\"details\": {\n\"type\": \"table\",\n",
"new_path": "lighthouse-core/test/results/sample_v2.json",
"old_path": "lighthouse-core/test/results/sample_v2.json"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report: minimum time scale for opportunities & filmstrip (#5183)
| 1
|
report
| null |
791,834
|
11.05.2018 17:07:52
| 25,200
|
d8c26be83f01ac7cfe4fb2e3b0863f137203b296
|
tests(viewer): upgrade pptr to handle new CSSOM use in the report
|
[
{
"change_type": "MODIFY",
"diff": "@@ -49,6 +49,12 @@ class Logger {\n*/\nerror(msg) {\nthis.log(msg);\n+\n+ // Rethrow to make sure it's auditable as an error, but in a setTimeout so page\n+ // recovers gracefully and user can try loading a report again.\n+ setTimeout(_ => {\n+ throw new Error(msg);\n+ }, 0);\n}\n/**\n",
"new_path": "lighthouse-core/report/html/renderer/logger.js",
"old_path": "lighthouse-core/report/html/renderer/logger.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -66,6 +66,10 @@ describe('Lighthouse Viewer', function() {\n});\nafter(async function() {\n+ // Log any page load errors encountered in case before() failed.\n+ // eslint-disable-next-line no-console\n+ console.error(pageErrors);\n+\nawait Promise.all([\nnew Promise(resolve => server.close(resolve)),\nbrowser && browser.close(),\n",
"new_path": "lighthouse-viewer/test/viewer-test-pptr.js",
"old_path": "lighthouse-viewer/test/viewer-test-pptr.js"
},
{
"change_type": "MODIFY",
"diff": "\"npm-run-posix-or-windows\": \"^2.0.2\",\n\"nyc\": \"^11.6.0\",\n\"postinstall-prepare\": \"^1.0.1\",\n- \"puppeteer\": \"^1.1.1\",\n+ \"puppeteer\": \"1.4.0\",\n\"sinon\": \"^2.3.5\",\n\"typescript\": \"2.9.0-dev.20180323\",\n\"vscode-chrome-debug-core\": \"^3.23.8\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -3481,9 +3481,9 @@ mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7:\ndependencies:\nmime-db \"~1.24.0\"\n-mime@^1.3.4:\n- version \"1.6.0\"\n- resolved \"https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1\"\n+mime@^2.0.3:\n+ version \"2.3.1\"\n+ resolved \"https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369\"\nmimic-fn@^1.0.0:\nversion \"1.1.0\"\n@@ -4043,14 +4043,14 @@ punycode@^1.4.1:\nversion \"1.4.1\"\nresolved \"https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e\"\n-puppeteer@^1.1.1:\n- version \"1.1.1\"\n- resolved \"https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.1.1.tgz#adbf25e49f5ef03443c10ab8e09a954ca0c7bfee\"\n+puppeteer@1.4.0:\n+ version \"1.4.0\"\n+ resolved \"https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.4.0.tgz#437f0f3450d76e437185c0bf06f446e80f184692\"\ndependencies:\n- debug \"^2.6.8\"\n+ debug \"^3.1.0\"\nextract-zip \"^1.6.5\"\nhttps-proxy-agent \"^2.1.0\"\n- mime \"^1.3.4\"\n+ mime \"^2.0.3\"\nprogress \"^2.0.0\"\nproxy-from-env \"^1.0.0\"\nrimraf \"^2.6.1\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
tests(viewer): upgrade pptr to handle new CSSOM use in the report (#5191)
| 1
|
tests
|
viewer
|
791,690
|
11.05.2018 18:16:09
| 25,200
|
61e3403153012ec9a7b1612753ae625a78b05be4
|
core(uses-preload): prevent infinite loop
|
[
{
"change_type": "MODIFY",
"diff": "@@ -62,10 +62,9 @@ class UsesRelPreloadAudit extends Audit {\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+ static computeWasteWithGraph(urls, graph, simulator) {\nif (!urls.size) {\nreturn {wastedMs: 0, results: []};\n}\n@@ -73,7 +72,6 @@ class UsesRelPreloadAudit extends Audit {\n// Preload changes the ordering of requests, simulate the original graph with flexible ordering\n// to have a reasonable baseline for comparison.\nconst simulationBeforeChanges = simulator.simulate(graph, {flexibleOrdering: true});\n-\nconst modifiedGraph = graph.cloneWithRelationships();\n/** @type {Array<LH.Gatherer.Simulation.GraphNetworkNode>} */\n@@ -84,12 +82,10 @@ class UsesRelPreloadAudit extends Audit {\nif (node.type !== 'network') return;\nconst 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+ if (node.isMainDocument()) {\nmainDocumentNode = networkNode;\n+ } else if (networkNode.record && urls.has(networkNode.record.url)) {\n+ nodesToPreload.push(networkNode);\n}\n});\n@@ -167,8 +163,7 @@ class UsesRelPreloadAudit extends Audit {\n}\n}\n- const {results, wastedMs} = UsesRelPreloadAudit.computeWasteWithGraph(urls, graph, simulator,\n- mainResource);\n+ const {results, wastedMs} = UsesRelPreloadAudit.computeWasteWithGraph(urls, graph, simulator);\n// sort results by wastedTime DESC\nresults.sort((a, b) => b.wastedMs - a.wastedMs);\n",
"new_path": "lighthouse-core/audits/uses-rel-preload.js",
"old_path": "lighthouse-core/audits/uses-rel-preload.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -68,7 +68,9 @@ class NetworkNode extends Node {\n* @return {NetworkNode}\n*/\ncloneWithoutRelationships() {\n- return new NetworkNode(this._record);\n+ const node = new NetworkNode(this._record);\n+ node.setIsMainDocument(this._isMainDocument);\n+ return node;\n}\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": "@@ -155,7 +155,9 @@ class Node {\n* @return {Node}\n*/\ncloneWithoutRelationships() {\n- return new Node(this.id);\n+ const node = new Node(this.id);\n+ node.setIsMainDocument(this._isMainDocument);\n+ return node;\n}\n/**\n@@ -256,9 +258,15 @@ class Node {\n/**\n* Returns whether the given node has a cycle in its dependent graph by performing a DFS.\n* @param {Node} node\n+ * @param {'dependents'|'dependencies'|'both'} [direction]\n* @return {boolean}\n*/\n- static hasCycle(node) {\n+ static hasCycle(node, direction = 'both') {\n+ // Checking 'both' is the default entrypoint to recursively check both directions\n+ if (direction === 'both') {\n+ return Node.hasCycle(node, 'dependents') || Node.hasCycle(node, 'dependencies');\n+ }\n+\nconst visited = new Set();\n/** @type {Node[]} */\nconst currentPath = [];\n@@ -286,10 +294,13 @@ class Node {\ncurrentPath.push(currentNode);\n// Add all of its dependents to our toVisit stack\n- for (const dependent of currentNode._dependents) {\n- if (toVisit.includes(dependent)) continue;\n- toVisit.push(dependent);\n- depthAdded.set(dependent, currentPath.length);\n+ const nodesToExplore = direction === 'dependents' ?\n+ currentNode._dependents :\n+ currentNode._dependencies;\n+ for (const nextNode of nodesToExplore) {\n+ if (toVisit.includes(nextNode)) continue;\n+ toVisit.push(nextNode);\n+ depthAdded.set(nextNode, currentPath.length);\n}\n}\n",
"new_path": "lighthouse-core/lib/dependency-graph/node.js",
"old_path": "lighthouse-core/lib/dependency-graph/node.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -315,6 +315,10 @@ class Simulator {\n* @return {LH.Gatherer.Simulation.Result}\n*/\nsimulate(graph, options) {\n+ if (Node.hasCycle(graph)) {\n+ throw new Error('Cannot simulate graph with cycle');\n+ }\n+\noptions = Object.assign({flexibleOrdering: false}, options);\n// initialize the necessary data containers\nthis._flexibleOrdering = options.flexibleOrdering;\n@@ -327,7 +331,6 @@ class Simulator {\nconst rootNode = graph.getRootNode();\nrootNode.traverse(node => nodesNotReadyToStart.add(node));\n-\nlet totalElapsedTime = 0;\nlet iteration = 0;\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": "@@ -54,6 +54,7 @@ describe('Performance: uses-rel-preload audit', () => {\nconst scriptNode = buildNode(3, 'http://www.example.com/script.js');\nconst scriptAddedNode = buildNode(4, 'http://www.example.com/script-added.js');\n+ mainDocumentNode.setIsMainDocument(true);\nmainDocumentNode.addDependency(rootNode);\nscriptNode.addDependency(mainDocumentNode);\nscriptAddedNode.addDependency(scriptNode);\n@@ -195,7 +196,7 @@ describe('Performance: uses-rel-preload audit', () => {\n});\n});\n- it('does no throw on a real trace/devtools log', async () => {\n+ it('does not throw on a real trace/devtools log', async () => {\nconst artifacts = Object.assign({\nURL: {finalUrl: 'https://pwa.rocks/'},\ntraces: {\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": "MODIFY",
"diff": "'use strict';\nconst Node = require('../../../lib/dependency-graph/node');\n+const NetworkNode = require('../../../lib/dependency-graph/network-node');\nconst assert = require('assert');\n@@ -103,6 +104,16 @@ describe('DependencyGraph/Node', () => {\nassert.notEqual(node, clone);\nassert.equal(clone.getDependencies().length, 0);\n});\n+\n+ it('should copy isMainDocument', () => {\n+ const node = new Node(1);\n+ node.setIsMainDocument(true);\n+ const networkNode = new NetworkNode({});\n+ networkNode.setIsMainDocument(true);\n+\n+ assert.ok(node.cloneWithoutRelationships().isMainDocument());\n+ assert.ok(networkNode.cloneWithoutRelationships().isMainDocument());\n+ });\n});\ndescribe('.cloneWithRelationships', () => {\n@@ -241,6 +252,7 @@ describe('DependencyGraph/Node', () => {\n});\nit('should return true for basic cycles', () => {\n+ // A - B - C - A!\nconst nodeA = new Node('A');\nconst nodeB = new Node('B');\nconst nodeC = new Node('C');\n@@ -252,6 +264,21 @@ describe('DependencyGraph/Node', () => {\nassert.equal(Node.hasCycle(nodeA), true);\n});\n+ it('should return true for children', () => {\n+ // A!\n+ // /\n+ // A - B - C\n+ const nodeA = new Node('A');\n+ const nodeB = new Node('B');\n+ const nodeC = new Node('C');\n+\n+ nodeA.addDependent(nodeB);\n+ nodeB.addDependent(nodeC);\n+ nodeB.addDependent(nodeA);\n+\n+ assert.equal(Node.hasCycle(nodeC), true);\n+ });\n+\nit('should return true for complex cycles', () => {\n// B - D - F - G - C!\n// / /\n@@ -276,6 +303,13 @@ describe('DependencyGraph/Node', () => {\nnodeG.addDependent(nodeC);\nassert.equal(Node.hasCycle(nodeA), true);\n+ assert.equal(Node.hasCycle(nodeB), true);\n+ assert.equal(Node.hasCycle(nodeC), true);\n+ assert.equal(Node.hasCycle(nodeD), true);\n+ assert.equal(Node.hasCycle(nodeE), true);\n+ assert.equal(Node.hasCycle(nodeF), true);\n+ assert.equal(Node.hasCycle(nodeG), true);\n+ assert.equal(Node.hasCycle(nodeH), true);\n});\nit('works for very large graphs', () => {\n",
"new_path": "lighthouse-core/test/lib/dependency-graph/node-test.js",
"old_path": "lighthouse-core/test/lib/dependency-graph/node-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -212,5 +212,15 @@ describe('DependencyGraph/Simulator', () => {\n// should be 800ms for E and 800ms for F/G\nassert.equal(resultB.timeInMs, 800 + 800);\n});\n+\n+ it('should throw (not hang) on graphs with cycles', () => {\n+ const rootNode = new NetworkNode(request({}));\n+ const depNode = new NetworkNode(request({}));\n+ rootNode.addDependency(depNode);\n+ depNode.addDependency(rootNode);\n+\n+ const simulator = new Simulator({serverResponseTimeByOrigin});\n+ assert.throws(() => simulator.simulate(rootNode), /cycle/);\n+ });\n});\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"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(uses-preload): prevent infinite loop (#5184)
| 1
|
core
|
uses-preload
|
730,412
|
11.05.2018 21:20:13
| 0
|
a7577a08a9d72362346291c52b20e1c0f6c656e9
|
chore(release): 0.1.298
|
[
{
"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.298\"></a>\n+## [0.1.298](https://github.com/webex/react-ciscospark/compare/v0.1.297...v0.1.298) (2018-05-11)\n+\n+\n+### Bug Fixes\n+\n+* **widget-recents:** recent widget crash on undefined lastActivity ([c05b7bf](https://github.com/webex/react-ciscospark/commit/c05b7bf))\n+\n+\n+\n<a name=\"0.1.297\"></a>\n## [0.1.297](https://github.com/webex/react-ciscospark/compare/v0.1.296...v0.1.297) (2018-05-10)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.297\",\n+ \"version\": \"0.1.298\",\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.298
| 1
|
chore
|
release
|
217,922
|
11.05.2018 22:15:46
| -7,200
|
32df513383216fbd5913e7f90d487297c75d236e
|
chore: swapped default Craftsmanship and default Control
|
[
{
"change_type": "MODIFY",
"diff": "@@ -233,8 +233,8 @@ export class SimulatorComponent implements OnInit, OnDestroy {\nif (userSet === undefined && this.selectedSet === undefined) {\nuserSet = {\nilvl: 0,\n- control: 1500,\n- craftsmanship: 1350,\n+ control: 1350,\n+ craftsmanship: 1500,\ncp: 474,\njobId: 8,\nlevel: 70,\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: swapped default Craftsmanship and default Control
| 1
|
chore
| null |
217,922
|
11.05.2018 23:22:10
| -7,200
|
1a9b989c63fa2fec5a7714c6ed4c8024ca46bd43
|
fix(mobile): fixed a bug with sidebar not scrollable on mobile view
|
[
{
"change_type": "MODIFY",
"diff": "}\nmat-sidenav-container {\nheight: calc(100vh - 64px);\n+ mat-list-item {\n+ touch-action: auto !important;\n+ }\n.mat-sidenav {\ntransition: all .4s cubic-bezier(0.25, 0.8, 0.25, 1);\n&.compact {\n",
"new_path": "src/app/app.component.scss",
"old_path": "src/app/app.component.scss"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix(mobile): fixed a bug with sidebar not scrollable on mobile view
| 1
|
fix
|
mobile
|
679,913
|
11.05.2018 23:50:06
| -3,600
|
9b38860468e7fefe98593a424a1e16dca1237968
|
refactor(api): update interfaces, add docs
BREAKING CHANGE: IBind, IEnable now include generics,
update IIndexed, IMeta, ISet, IStack
add IInto
add IImmutableSet
add IImmutableStack
minor update IEnabled mixin
|
[
{
"change_type": "MODIFY",
"diff": "+export const DEFAULT_EPS = 1e-6;\n+\n+export const EVENT_ALL = \"*\";\n+export const EVENT_ENABLE = \"enable\";\n+export const EVENT_DISABLE = \"disable\";\n+\n+/**\n+ * Generic 2-element comparator function type alias. Must follow this\n+ * contract and return:\n+ *\n+ * - negative if `a < b`\n+ * - zero if `a == b`\n+ * - positive if `a > b`\n+ */\n+export type Comparator<T> = (a: T, b: T) => number;\n+\n+/**\n+ * Event listener.\n+ */\n+export type Listener = (e: Event) => void;\n+\n+/**\n+ * Lookup path for nested data structures.\n+ */\n+export type Path = PropertyKey | PropertyKey[];\n+\n+/**\n+ * Predicate function mapping given value to true/false.\n+ */\n+export type Predicate<T> = (a: T) => boolean;\n+\n+/**\n+ * Predicate function mapping given args to true/false.\n+ */\n+export type Predicate2<T> = (a: T, b: T) => boolean;\n+\n+/**\n+ * Higher order `Predicate` builder. Possibly stateful.\n+ */\n+export type StatefulPredicate<T> = () => Predicate<T>;\n+\n+/**\n+ * Higher order `Predicate2` builder. Possibly stateful.\n+ */\n+export type StatefulPredicate2<T> = () => Predicate2<T>;\n+\n+/**\n+ * Observer function for `IWatch` implementations.\n+ */\n+export type Watch<T> = (id: string, oldState: T, newState: T) => void;\n+\n/**\n* @param K key type\n* @param V value type\n- * @param T imlementation type\n+ * @param T implementation type\n*/\nexport interface IAssociative<K, V, T> {\nassoc(key: K, val: V): T;\n@@ -10,15 +61,18 @@ export interface IAssociative<K, V, T> {\nupdateIn(key: K[], f: (v: V) => V): T;\n}\n-export interface IBind {\n+/**\n+ * Generic resource binding methods.\n+ */\n+export interface IBind<T> {\n/**\n* @returns true, if successful\n*/\n- bind(opt?: any): boolean;\n+ bind(opt: T): boolean;\n/**\n* @returns true, if successful\n*/\n- unbind(opt?: any): boolean;\n+ unbind(opt: T): boolean;\n}\n/**\n@@ -26,8 +80,8 @@ export interface IBind {\n*/\nexport interface IBuffered<T> {\n/**\n- * An implementation's publically accessible backing array / ArrayBuffer\n- * (usually a typed array instance).\n+ * An implementation's publicly accessible backing array /\n+ * ArrayBuffer (usually a typed array instance).\n*/\nbuffer: T;\n/**\n@@ -50,18 +104,8 @@ export interface ICompare<T> {\n}\n/**\n- * Generic 2-element comparator function type alias.\n- * Must follow this contract and return:\n- *\n- * - negative if `a < b`\n- * - zero if `a == b`\n- * - positive if `a > b`\n- */\n-export type Comparator<T> = (a: T, b: T) => number;\n-\n-/**\n- * Generic interface for collection types to check if a given value\n- * is part of the collection.\n+ * Generic interface for collection types to check if a given value is\n+ * part of the collection.\n*/\nexport interface IContains<T> {\n/**\n@@ -77,8 +121,8 @@ export interface IContains<T> {\n*/\nexport interface ICopy<T> {\n/**\n- * Returns a copy of this instance.\n- * Shallow or deep copies are implementation specific.\n+ * Returns a copy of this instance. Shallow or deep copies are\n+ * implementation specific.\n*/\ncopy(): T;\n}\n@@ -106,42 +150,41 @@ export interface IDissoc<K, V, T> extends IAssociative<K, V, T> {\nexport interface IEmpty<T> {\n/**\n- * Returns an empty collection of same type (and possibly same config).\n+ * Returns an empty collection of same type (and possibly same\n+ * config).\n*/\nempty(): T;\n}\n/**\n- * Interface to provide enabled/disabled functionality.\n- * Also see `@IEnable` decorator mixin\n+ * Interface to provide enabled/disabled functionality. Also see\n+ * `@IEnable` decorator mixin\n*/\n-export interface IEnable {\n+export interface IEnable<T> {\nisEnabled(): boolean;\n/**\n* Disables this entity.\n* @param opts optional implementation specific arg\n*/\n- disable(opts?: any);\n+ disable(opts: T);\n/**\n* Enables this entity.\n* @param opts optional implementation specific arg\n*/\n- enable(opts?: any);\n+ enable(opts: T);\ntoggle?(): boolean;\n}\nexport interface IEquiv {\n/**\n- * Returns `true` if this *value* is equivalent to `o`.\n- * Also see `ICompare.compare` and `IHash.hash`.\n+ * Returns `true` if this *value* is equivalent to `o`. Also see\n+ * `ICompare.compare` and `IHash.hash`.\n*\n* @param o\n*/\nequiv(o: any): boolean;\n}\n-export const DEFAULT_EPS = 1e-6;\n-\nexport interface IEqualsDelta<T> {\n/**\n* Returns `true` if this value equals `o` with optional allowance\n@@ -159,15 +202,9 @@ export interface Event extends IID<PropertyKey> {\nvalue?: any;\n}\n-export const EVENT_ALL = \"*\";\n-export const EVENT_ENABLE = \"enable\";\n-export const EVENT_DISABLE = \"disable\";\n-\n-export type Listener = (e: Event) => void;\n-\n/**\n- * Interface to provide event emitter functionality.\n- * Also see `@INotify` decorator mixin\n+ * Interface to provide event emitter functionality. Also see `@INotify`\n+ * decorator mixin\n*/\nexport interface INotify {\naddListener(id: string, fn: Listener, scope?: any): boolean;\n@@ -180,8 +217,8 @@ export interface INotify {\n* @param V value type\n*/\nexport interface IGet<K, V> {\n- get(key: K, notfound?: any): V;\n- getIn(key: K[], notfound?: any): V;\n+ get(key: K, notfound?: V): V;\n+ getIn(key: K[], notfound?: V): V;\n}\n/**\n@@ -189,38 +226,53 @@ export interface IGet<K, V> {\n*/\nexport interface IHash<T> {\n/**\n- * Returns a value's hash code.\n- * The contract of this function is: If\n- * `IEquiv.equiv` returns `true` two values,\n- * their hash codes MUST also be equal.\n+ * Returns a value's hash code. The contract of this function is: If\n+ * `IEquiv.equiv` returns `true` for two values, their hash codes\n+ * MUST also be equal.\n*/\nhash(): T;\n}\n+/**\n+ * `id` property declaration.\n+ */\nexport interface IID<T> {\nreadonly id: T;\n}\n+/**\n+ * Interface for collection types which can be accessed via numeric\n+ * index.\n+ */\nexport interface IIndexed<T> {\n- nth(i: number): T;\n+ nth(i: number, notfound: T): T;\n+}\n+\n+/**\n+ * Interface for collection types supporting addition of multiple\n+ * values.\n+ */\n+export interface IInto<T> {\n+ into(coll: Iterable<T>): this;\n}\n/**\n- * Interface for collections to obtain their element count.\n+ * `length` property declaration for collections to obtain their element\n+ * count.\n*/\nexport interface ILength {\nreadonly length: number;\n}\n/**\n- * Generic interface for types supporting metadata.\n- * Implementations MUST exclude metadata from any comparisons,\n- * equality checks & hashing.\n+ * Generic interface for types supporting metadata. Implementations MUST\n+ * exclude metadata from any comparisons, equality checks & hashing.\n*/\nexport interface IMeta<T> {\n- __meta: any;\n+ meta(): any;\n/**\n- * Returns a copy of the original value with given metadata attached.\n+ * Returns a copy of the original value with given metadata\n+ * attached.\n*\n* @param meta\n*/\n@@ -234,33 +286,50 @@ export interface IObjectOf<T> {\n[id: string]: T;\n}\n-export type Predicate<T> = (a: T) => boolean;\n-export type Predicate2<T> = (a: T, b: T) => boolean;\n-\n-export type StatefulPredicate<T> = () => Predicate<T>;\n-export type StatefulPredicate2<T> = () => Predicate2<T>;\n-\n+/**\n+ * Interface for types supported the release of internal resources.\n+ */\nexport interface IRelease {\nrelease(opt?: any): boolean;\n}\n/**\n- * Generic interface for set collection types.\n+ * Generic interface for MUTABLE set collection types.\n+ *\n+ * @param T value type\n+ */\n+export interface ISet<T> extends IInto<T> {\n+ /**\n+ * Conjoins/adds value `x` to set and returns true if `x` has been\n+ * added.\n+ *\n+ * @param x\n+ */\n+ conj(x: T): boolean;\n+ /**\n+ * Disjoins/removes value `x` from set and returns true if `x` has\n+ * been removed.\n+ *\n+ * @param x\n+ */\n+ disj(x: T): boolean;\n+}\n+\n+/**\n+ * Generic interface for IMMUTABLE set collection types.\n*\n* @param V value type\n- * @param T return or container type\n+ * @param T implementation type\n*/\n-export interface ISet<V, T> {\n+export interface IImmutableSet<V, T> extends IInto<V> {\n/**\n- * Conjoins/adds value `x` to set and returns updated set\n- * (possibly mutable operation).\n+ * Conjoins/adds value `x` to set and returns updated set.\n*\n* @param x\n*/\nconj(x: V): T;\n/**\n- * Disjoins/removes value `x` from set and returns updated set\n- * (possibly mutable operation).\n+ * Disjoins/removes value `x` from set and returns updated set.\n*\n* @param x\n*/\n@@ -268,28 +337,47 @@ export interface ISet<V, T> {\n}\n/**\n- * Generic interface for sequential collections implementing stack\n- * functionality.\n+ * Generic interface for MUTABLE sequential collections implementing\n+ * stack functionality.\n*\n* @param V value type\n* @param T return/container type\n*/\nexport interface IStack<V, T> {\n+ /**\n+ * Returns top-of-stack item.\n+ */\n+ peek(): V;\n+ /**\n+ * Removes top-of-stack item and returns it.\n+ */\n+ pop(): V;\n+ push(x: V): T;\n+}\n+\n+/**\n+ * Generic interface for IMMUTABLE sequential collections implementing\n+ * stack functionality.\n+ *\n+ * @param V value type\n+ * @param T return/container type\n+ */\n+export interface IImmutableStack<V, T> {\n/**\n* Returns top-of-stack item.\n*/\npeek(): V;\n/**\n* Returns collection w/ top-of-stack item removed.\n- * It's implementation specific if this operation is\n- * mutable or not.\n*/\npop(): T;\npush(x: V): T;\n}\n-export type Watch<T> = (id: string, oldState: T, newState: T) => void;\n-\n+/**\n+ * Interface for types offering observers of internal value changes.\n+ * Also see `@IWatch` decorator mixin.\n+ */\nexport interface IWatch<T> {\naddWatch(id: string, fn: Watch<T>): boolean;\nremoveWatch(id: string): boolean;\n",
"new_path": "packages/api/src/api.ts",
"old_path": "packages/api/src/api.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -7,7 +7,7 @@ import { mixin } from \"../mixin\";\n* interface, `enable()` and `disable()` will automatically emit the\n* respective events.\n*/\n-export const IEnable = mixin(<api.IEnable>{\n+export const IEnable = mixin(<api.IEnable<any>>{\n_enabled: true,\n",
"new_path": "packages/api/src/mixins/ienable.ts",
"old_path": "packages/api/src/mixins/ienable.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(api): update interfaces, add docs
BREAKING CHANGE: IBind, IEnable now include generics,
update IIndexed, IMeta, ISet, IStack
- add IInto
- add IImmutableSet
- add IImmutableStack
- minor update IEnabled mixin
| 1
|
refactor
|
api
|
679,913
|
12.05.2018 00:03:18
| -3,600
|
67f0e546174261122a082346711106fff9fa485a
|
refactor(dcons): update pop()
BREAKING CHANGE: due to update, pop() now returns
popped value instead of the list itself
minor other refactoring
|
[
{
"change_type": "MODIFY",
"diff": "@@ -316,9 +316,9 @@ export class DCons<T> implements\n}\n}\n- pop(): DCons<T> {\n+ pop() {\nconst cell = this.tail;\n- if (cell) {\n+ !cell && illegalState(\"can't pop, empty\");\nthis.tail = cell.prev;\nif (this.tail) {\ndelete this.tail.next;\n@@ -326,18 +326,15 @@ export class DCons<T> implements\ndelete this.head;\n}\nthis._length--;\n- } else {\n- illegalState(\"can't pop, empty\");\n- }\n- return this;\n+ return cell.value;\n}\nfirst() {\n- return this.head ? this.head.value : undefined;\n+ return this.head && this.head.value;\n}\npeek() {\n- return this.tail ? this.tail.value : undefined;\n+ return this.tail && this.tail.value;\n}\nsetHead(v: T) {\n@@ -358,9 +355,7 @@ export class DCons<T> implements\nsetNth(n: number, v: T) {\nconst cell = this.nthCell(n);\n- if (!cell) {\n- illegalArgs(`index out of bounds: ${n}`);\n- }\n+ !cell && illegalArgs(`index out of bounds: ${n}`);\ncell.value = v;\nreturn this;\n}\n@@ -413,7 +408,8 @@ export class DCons<T> implements\nreturn this.swap(this.head, this.tail);\ndefault:\nconst x = this.peek();\n- return this.pop().cons(x);\n+ this.pop()\n+ return this.cons(x);\n}\n}\n",
"new_path": "packages/dcons/src/index.ts",
"old_path": "packages/dcons/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(dcons): update pop()
BREAKING CHANGE: due to @thi.ng/api/IStack update, pop() now returns
popped value instead of the list itself
- minor other refactoring
| 1
|
refactor
|
dcons
|
791,921
|
12.05.2018 00:52:12
| -7,200
|
9a50955b120d8f895564cbf53fbb0cad3dc7fa90
|
report(dom-size): use correct learn more link
|
[
{
"change_type": "MODIFY",
"diff": "@@ -37,7 +37,7 @@ class DOMSize extends Audit {\n`depth < ${MAX_DOM_TREE_DEPTH} elements and fewer than ${MAX_DOM_TREE_WIDTH} ` +\n'children/parent element. A large DOM can increase memory usage, cause longer ' +\n'[style calculations](https://developers.google.com/web/fundamentals/performance/rendering/reduce-the-scope-and-complexity-of-style-calculations), ' +\n- 'and produce costly [layout reflows](https://developers.google.com/speed/articles/reflow). [Learn more](https://developers.google.com/web/fundamentals/performance/rendering/).',\n+ 'and produce costly [layout reflows](https://developers.google.com/speed/articles/reflow). [Learn more](https://developers.google.com/web/tools/lighthouse/audits/dom-size).',\nscoreDisplayMode: Audit.SCORING_MODES.NUMERIC,\nrequiredArtifacts: ['DOMStats'],\n};\n",
"new_path": "lighthouse-core/audits/dobetterweb/dom-size.js",
"old_path": "lighthouse-core/audits/dobetterweb/dom-size.js"
},
{
"change_type": "MODIFY",
"diff": "\"scoreDisplayMode\": \"numeric\",\n\"name\": \"dom-size\",\n\"description\": \"Avoids an excessive DOM size\",\n- \"helpText\": \"Browser engineers recommend pages contain fewer than ~1,500 DOM nodes. The sweet spot is a tree depth < 32 elements and fewer than 60 children/parent element. A large DOM can increase memory usage, cause longer [style calculations](https://developers.google.com/web/fundamentals/performance/rendering/reduce-the-scope-and-complexity-of-style-calculations), and produce costly [layout reflows](https://developers.google.com/speed/articles/reflow). [Learn more](https://developers.google.com/web/fundamentals/performance/rendering/).\",\n+ \"helpText\": \"Browser engineers recommend pages contain fewer than ~1,500 DOM nodes. The sweet spot is a tree depth < 32 elements and fewer than 60 children/parent element. A large DOM can increase memory usage, cause longer [style calculations](https://developers.google.com/web/fundamentals/performance/rendering/reduce-the-scope-and-complexity-of-style-calculations), and produce costly [layout reflows](https://developers.google.com/speed/articles/reflow). [Learn more](https://developers.google.com/web/tools/lighthouse/audits/dom-size).\",\n\"details\": {\n\"type\": \"table\",\n\"headings\": [\n",
"new_path": "lighthouse-core/test/results/sample_v2.json",
"old_path": "lighthouse-core/test/results/sample_v2.json"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report(dom-size): use correct learn more link (#5192)
| 1
|
report
|
dom-size
|
791,676
|
12.05.2018 01:36:40
| -7,200
|
ba713e4b8024a426befea9bc001e5bdcdc118a4f
|
report(header): fix stacking contexts within header
|
[
{
"change_type": "MODIFY",
"diff": "@@ -234,6 +234,8 @@ class ReportUIFeatures {\nscoresContainer.style.marginBottom = `${delta}px`;\nthis.toolbar.style.transform = `translateY(${headerTransitionHeightDiff *\nanimateScrollPercentage}px)`;\n+ this.exportButton.parentElement.style.transform = `translateY(${headerTransitionHeightDiff *\n+ animateScrollPercentage}px)`;\nthis.exportButton.style.transform = `scale(${1 - 0.2 * animateScrollPercentage})`;\n// start showing the productinfo when we are at the 50% mark of our animation\nthis.productInfo.style.opacity = this.toolbarMetadata.style.opacity =\n",
"new_path": "lighthouse-core/report/html/renderer/report-ui-features.js",
"old_path": "lighthouse-core/report/html/renderer/report-ui-features.js"
},
{
"change_type": "MODIFY",
"diff": "z-index: 2;\nwill-change: transform;\n}\n+.lh-header-container {\n+ display: block;\n+ margin: 0 auto;\n+ max-width: var(--report-content-width);\n+ position: relative;\n+ word-wrap: break-word;\n+}\n.lh-report {\nbackground-color: #fff;\n",
"new_path": "lighthouse-core/report/html/report-styles.css",
"old_path": "lighthouse-core/report/html/report-styles.css"
},
{
"change_type": "MODIFY",
"diff": "margin-right: var(--default-padding);\n}\n.lh-toolbar {\n+ height: 50px;\nposition: absolute;\ntop: 0;\nwidth: 100%;\nwill-change: transform;\n}\n- .lh-toolbar .lh-container {\n- position: relative;\n- height: 50px;\n- }\n.lh-toolbar__metadata {\nleft: 50%;\ntransform: translate(-50%, -50%);\ndisplay: block;\nwhite-space: nowrap;\nfont-size: 14px;\n+ margin-right: 2px;\n}\n.lh-export {\nposition: absolute;\nright: var(--section-indent);\n- transform: translateY(-50%) scale3d(1, 1, 1);\n- top: 50%;\n+ transform: translateY(0);\n+ top: calc(var(--section-padding) / 2);\nwill-change: transform;\n+ z-index: 2;\n}\n.lh-export__button {\nbackground-color: #fff;\nbackground-repeat: no-repeat;\nbackground-size: 20px;\nbackground-position: 50% 50%;\n+ will-change: transform;\n}\n.lh-export__button:focus,\n.lh-export__button.active {\n<div class=\"lh-header-bg\"></div>\n<div class=\"lh-lighthouse\"><svg width=\"217\" height=\"189\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><defs><path id=\"a\" d=\"M0 0h284v202H0z\"/><linearGradient x1=\"0%\" y1=\"50%\" x2=\"93.17%\" y2=\"50%\" id=\"c\"><stop stop-color=\"#F1F3F4\" offset=\"0%\"/><stop stop-color=\"#FFF\" offset=\"100%\"/></linearGradient></defs><g transform=\"translate(-56 -13)\" fill=\"none\" fill-rule=\"evenodd\"><mask id=\"b\" fill=\"#fff\"><use xlink:href=\"#a\"/></mask><g mask=\"url(#b)\"><g transform=\"translate(56 70)\"><path fill=\"#EC5548\" d=\"M95 31h24v2H95z\"/><path fill=\"#FBC21B\" d=\"M98 33h18v11H98z\"/><path fill=\"#EC5548\" d=\"M95 43h24v7H95z\"/><path fill=\"#FFF\" d=\"M97.63 50h19.74L120 97H95z\"/><path d=\"M107 22a10 10 0 0 1 10 10v1H97v-1a10 10 0 0 1 10-10zM96.77 66.23l20.97-10.7.63 11.87-22.28 11.87zM95 94.8L119.1 82l.9 14H95z\" fill=\"#EC5548\"/><path d=\"M0 132a177.07 177.07 0 0 1 108.5-37c40.78 0 78.38 13.78 108.5 37H0z\" fill=\"#E8EAED\"/><rect fill=\"#FEF0C8\" x=\"98\" y=\"33\" width=\"10\" height=\"10\" rx=\"5\"/><path fill=\"url(#c)\" d=\"M7 0l91 33.18v10.05L7 77z\"/></g></g><g mask=\"url(#b)\" fill=\"#FFF\"><g transform=\"translate(96 86)\"><circle cx=\"87.5\" cy=\".5\" r=\"1\"/><circle cx=\"86\" cy=\"20\" r=\"1\"/><circle cx=\"96\" cy=\"40\" r=\"1\"/><circle cx=\"27\" cy=\"68\" r=\"1\"/><circle cx=\"15\" cy=\"44\" r=\"1\"/><circle cx=\"127\" cy=\"64\" r=\"1\"/><circle cx=\"109.5\" cy=\"44.5\" r=\"1\"/><circle cx=\"14.5\" cy=\"54.5\" r=\"1\"/><circle cx=\"8.5\" cy=\"57.5\" r=\"1\"/><circle cx=\".5\" cy=\"78.5\" r=\"1\"/><circle cx=\"27.5\" cy=\"39.5\" r=\"1\"/><circle cx=\"134.5\" cy=\"41.5\" r=\"1\"/><circle cx=\"97.5\" cy=\"65.5\" r=\"1\"/><circle cx=\"161.5\" cy=\"69.5\" r=\"1\"/></g></g><g mask=\"url(#b)\" fill=\"#FFF\"><path d=\"M101.2 34H70.21A7.42 7.42 0 0 1 69 29.91a7.31 7.31 0 0 1 8.54-7.26v-.11c0-5.27 4.2-9.54 9.39-9.54a9.44 9.44 0 0 1 9.24 7.83 7.24 7.24 0 0 1 7.83 7.35 7.4 7.4 0 0 1-2.8 5.82zM193.53 54h-17.9a4.3 4.3 0 0 1-.63-2.25 4.2 4.2 0 0 1 4.88-4.18v-.07c0-3.04 2.4-5.5 5.36-5.5a5.4 5.4 0 0 1 5.28 4.51l.33-.01a4.2 4.2 0 0 1 4.15 4.25c0 1.3-.57 2.47-1.47 3.25zM219.01 116h-24.16a5.1 5.1 0 0 1-.85-2.81c0-2.94 2.5-5.31 5.6-5.31.33 0 .67.02.99.08v-.08c0-3.8 3.24-6.88 7.24-6.88a7.15 7.15 0 0 1 7.13 5.64l.44-.02c3.1 0 5.6 2.38 5.6 5.32a5.2 5.2 0 0 1-1.99 4.06z\"/></g></g></svg></div>\n+ <div class=\"lh-header-container\">\n<div class=\"lh-header\">\n- <div class=\"lh-container\">\n<div class=\"lh-metadata\">\n<div class=\"lh-metadata__results\"><a href=\"\" class=\"lh-metadata__url\" target=\"_blank\" rel=\"noopener\"></a></div>\n<div class=\"lh-config\">\n</div>\n</div>\n</div>\n- </div>\n<div class=\"lh-scores-wrapper\">\n- <div class=\"lh-container\">\n<div class=\"lh-scores-container\">\n<div class=\"lh-scores-wrapper__shadow\"></div>\n</div>\n</div>\n- </div>\n<div class=\"lh-toolbar\">\n- <div class=\"lh-container\">\n<div class=\"lh-product-info\">\n<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAADjklEQVR4AWI08P/HQEvAQrxSQKvlECfLFYXx75xCY2qmh89GbNvOMjb3v9jOOlxnFWxj206ebQ3b7q6q+z1rNagu8/zvPSZACAABpeUAA0miMgU7SA7JjCraFGwZwECOwvL75dWjsKgWBKtx0jvWo+vkBAFbACCkByMP6nMn48+AVgXB2fzSCwsv22/lMGlUhmJ0AE7BH8dyUUDbUEgN6RzJRSeaPxhdRYR0Inel+7Hd5lBiFpkMAxACc0394//9C4voFHDiAAGLpuOXebdfdHfctgwJKaZRLRKy6ItrSis6RBnVBgGtbHyKTEmJHQoEXoBCE5BCrDeA2ogMUIGDAKEBDEhUqwgMqBYDjW4DQzmuffVdqff42/ZQYYqVcMXGZsMPyCsH3lyJSetxvEaxAQXdjR1HjfwCdIS7lo2DZke26Qe+MXO12OWkGT0O6oE7vMGkMnkYw4aN1KQgMKExhXqswfiov4+a7MQ11XPnbr/5qpKlgACAAQj94Lu271bN9DUecQasIZlNzG72llRAAKJiAi+/BSHrSFjRvQhg3DEKEqJh08tsmLTx597+f6enr4cc2Zpk57pihfX24dW7RHcOLLUbJYhJSl0ErQCI9BVXH/XrO97QasuvQQSiECa0BrQCIIJp6X9T/r8QG6L71WYSqCoIIGo2BZDUBnS/D9EA9Nun1iYvbM0MFExIDQRoKFatc1Z6zrm5uWeObJotq0BGV9FuQBWq5a4Fw3PPz848rZHstZSuA5FWAFSMP2nOppOOGpl6qh9PCSg0IFyHKjSQyDNQHTru2t75NOEe0fsf246oAmFkI6vCdnWvbQFQFCKx8vCswV8TrDLiDLgH4Nr7RAtNsrC9d8sfk7b8ls4igdNy8CQKAISlsB0FjZfd3Lfp155tf8fKI4BxZZIj/oTdVEAIAcJFOCmzauHG71I7/rdreUAgAqpDP05fDARCAQQARwEIBQSVxq0FyaLvZZtevpHa8WHw8cft6cpxlq8eAJtIhnSbWDf951yx3y13OqUuu5qyGgkxCgGFh9cDihDGbTa6BqvT1lWmrav3bmt2ZMJ4mU6TGgIC4DBzcv/JqAau1WhzSt3x9Ixk/4Jk/8J4ZrrViFMA4W6A7+WK8xcVjvyrOmVD0FbAXokcT48r+xVqLKvuJYbmpNadnlp3mpufJHOe/GXktM+r09bT8kEdq9BRYAbGSgzP7ll82U71Mc+ZFooXgwAAAABJRU5ErkJggg==\" alt=\"\" class=\"lh-product-info__icon\" />\n<span class=\"lh-product-info__name\">Lighthouse</span> \n<a href=\"\" class=\"lh-toolbar__url\" target=\"_blank\" rel=\"noopener\"></a>\n<span class=\"lh-toggle-arrow\" title=\"See report's runtime settings\"></span>\n</div>\n+ </div>\n<div class=\"lh-export\">\n<button class=\"report-icon report-icon--share lh-export__button\" title=\"Export report\"></button>\n<a href=\"#\" class=\"report-icon report-icon--open lh-export--gist\" data-action=\"save-gist\">Save as Gist</a>\n</div>\n</div>\n- </div>\n- </div>\n</template>\n<!-- Lighthouse footer -->\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(header): fix stacking contexts within header (#5185)
| 1
|
report
|
header
|
679,913
|
12.05.2018 20:03:38
| -3,600
|
6ff48a415104206df083e467dc9d91ec0c7b6b69
|
docs(defmulti): update readme
|
[
{
"change_type": "MODIFY",
"diff": "@@ -11,7 +11,11 @@ Dynamically extensible [multiple\ndispatch](https://en.wikipedia.org/wiki/Multiple_dispatch) via user\nsupplied dispatch function, with minimal overhead. Provides generics for\ntype checking up to 8 args, but generally works with any number of\n-arguments.\n+arguments. Why \"only\" 8?\n+\n+> \"If you have a procedure with ten parameters, you probably missed some.\"\n+>\n+> -- Alan Perlis\n## Installation\n@@ -61,6 +65,7 @@ visit([{a: 1, b: [\"foo\", \"bar\", null, 42]}])\n// b\n// foo\n// bar\n+// 42\n```\nSee\n",
"new_path": "packages/defmulti/README.md",
"old_path": "packages/defmulti/README.md"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
docs(defmulti): update readme
| 1
|
docs
|
defmulti
|
679,913
|
12.05.2018 23:03:43
| -3,600
|
feca566632d0ce5aa16e9729050e6f756515a1f8
|
refactor(hiccup): fix add support for context object
BREAKING CHANGE: component functions now take a global context object as
first argument (like w/
update serialize() to accept & pass optional context
add support for component objects
add/update tests
|
[
{
"change_type": "MODIFY",
"diff": "@@ -8,9 +8,10 @@ import { TAG_REGEXP, VOID_TAGS } from \"./api\";\nimport { css } from \"./css\";\n/**\n- * Recursively normalizes and serializes given tree as HTML/SVG/XML string.\n- * Expands any embedded component functions with their results. Each node of the\n- * input tree can have one of the following input forms:\n+ * Recursively normalizes and serializes given tree as HTML/SVG/XML\n+ * string. Expands any embedded component functions with their results.\n+ * Each node of the input tree can have one of the following input\n+ * forms:\n*\n* ```js\n* [\"tag\", ...]\n@@ -18,7 +19,8 @@ import { css } from \"./css\";\n* [\"tag\", {other: \"attrib\"}, ...]\n* [\"tag\", {...}, \"body\", function, ...]\n* [function, arg1, arg2, ...]\n- * [iterable]\n+ * [{render: (ctx,...) => [...]}, args...]\n+ * iterable\n* ```\n*\n* Tags can be defined in \"Zencoding\" convention, e.g.\n@@ -28,10 +30,12 @@ import { css } from \"./css\";\n* ```\n*\n* The presence of the attributes object (2nd array index) is optional.\n- * Any attribute values, incl. functions are allowed. If the latter,\n- * the function is called with the full attribs object as argument and\n- * MUST return a string. This allows for the dynamic creation of attrib\n- * values based on other attribs.\n+ * Any attribute values, incl. functions are allowed. If the latter, the\n+ * function is called with the full attribs object as argument and the\n+ * return value is used for the attribute. This allows for the dynamic\n+ * creation of attrib values based on other attribs. The only exception\n+ * to this are event attributes, i.e. attribute names starting with\n+ * \"on\".\n*\n* ```js\n* [\"div#foo\", {bar: (attribs) => attribs.id + \"-bar\"}]\n@@ -51,30 +55,31 @@ import { css } from \"./css\";\n* Any `null` or `undefined` array values (other than in head position)\n* will be removed, unless a function is in head position.\n*\n- * A function in head position of a node acts as composition & delayed\n- * execution mechanism and the function will only be executed at\n- * serialization time. In this case all other elements of that node /\n- * array are passed as arguments when that function is called.\n- * The return value the function MUST be a valid new tree\n- * (or `undefined`).\n+ * A function in head position of a node acts as a mechanism for\n+ * component composition & delayed execution. The function will only be\n+ * executed at serialization time. In this case the optional global\n+ * context object and all other elements of that node / array are passed\n+ * as arguments when that function is called. The return value the\n+ * function MUST be a valid new tree (or `undefined`).\n*\n* ```js\n- * const foo = (a, b) => [\"div#\" + a, b];\n+ * const foo = (ctx, a, b) => [\"div#\" + a, ctx.foo, b];\n*\n- * [foo, \"id\", \"body\"] // <div id=\"id\">body</div>\n+ * serialize([foo, \"id\", \"body\"], {foo: {class: \"black\"}})\n+ * // <div id=\"id\" class=\"black\">body</div>\n* ```\n*\n- * Functions located in other positions are called **without** args\n- * and can return any (serializable) value (i.e. new trees, strings,\n- * numbers, iterables or any type with a suitable `.toString()`\n+ * Functions located in other positions are called ONLY with the global\n+ * context arg and can return any (serializable) value (i.e. new trees,\n+ * strings, numbers, iterables or any type with a suitable `.toString()`\n* implementation).\n*\n* @param tree elements / component tree\n* @param escape auto-escape entities\n*/\n-export const serialize = (tree: any[], escape = false) => _serialize(tree, escape);\n+export const serialize = (tree: any[], ctx?: any, escape = false) => _serialize(tree, ctx, escape);\n-const _serialize = (tree: any, esc: boolean) => {\n+const _serialize = (tree: any, ctx: any, esc: boolean) => {\nif (tree == null) {\nreturn \"\";\n}\n@@ -84,7 +89,10 @@ const _serialize = (tree: any, esc: boolean) => {\n}\nlet tag = tree[0];\nif (isFunction(tag)) {\n- return _serialize(tag.apply(null, tree.slice(1)), esc);\n+ return _serialize(tag.apply(null, [ctx, ...tree.slice(1)]), ctx, esc);\n+ }\n+ if (implementsFunction(tag, \"render\")) {\n+ return _serialize(tag.render.apply(null, [ctx, ...tree.slice(1)]), ctx, esc);\n}\nif (isString(tag)) {\ntree = normalize(tree);\n@@ -118,7 +126,7 @@ const _serialize = (tree: any, esc: boolean) => {\n}\nres += \">\";\nfor (let i = 0, n = body.length; i < n; i++) {\n- res += _serialize(body[i], esc);\n+ res += _serialize(body[i], ctx, esc);\n}\nreturn res += `</${tag}>`;\n} else if (!VOID_TAGS[tag]) {\n@@ -127,26 +135,26 @@ const _serialize = (tree: any, esc: boolean) => {\nreturn res += \"/>\";\n}\nif (iter(tree)) {\n- return _serializeIter(tree, esc);\n+ return _serializeIter(tree, ctx, esc);\n}\nillegalArgs(`invalid tree node: ${tree}`);\n}\nif (isFunction(tree)) {\n- return _serialize(tree(), esc);\n+ return _serialize(tree(ctx), ctx, esc);\n}\nif (implementsFunction(tree, \"deref\")) {\n- return _serialize(tree.deref(), esc);\n+ return _serialize(tree.deref(), ctx, esc);\n}\nif (iter(tree)) {\n- return _serializeIter(tree, esc);\n+ return _serializeIter(tree, ctx, esc);\n}\nreturn esc ? escape(tree.toString()) : tree;\n};\n-const _serializeIter = (iter: Iterable<any>, esc: boolean) => {\n+const _serializeIter = (iter: Iterable<any>, ctx: any, esc: boolean) => {\nconst res = [];\nfor (let i of iter) {\n- res.push(_serialize(i, esc));\n+ res.push(_serialize(i, ctx, esc));\n}\nreturn res.join(\"\");\n}\n",
"new_path": "packages/hiccup/src/serialize.ts",
"old_path": "packages/hiccup/src/serialize.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -107,6 +107,12 @@ describe(\"serialize\", () => {\n`<div foo=\"23\"></div>`\n);\n+ check(\n+ \"attr fn (derived)\",\n+ [\"div\", { foo: (attribs) => `${attribs.x}px`, x: 42 }],\n+ `<div foo=\"42px\" x=\"42\"></div>`\n+ );\n+\ncheck(\n\"attr fn (null)\",\n[\"div\", { foo: () => null }],\n@@ -169,7 +175,7 @@ describe(\"serialize\", () => {\ncheck(\n\"comp fn args\",\n- [(id, body) => [\"div#\" + id, body], \"foo\", \"bar\"],\n+ [(_, id, body) => [\"div#\" + id, body], \"foo\", \"bar\"],\n`<div id=\"foo\">bar</div>`\n);\n@@ -181,13 +187,13 @@ describe(\"serialize\", () => {\ncheck(\n\"comp fn in body w/ args\",\n- [\"div\", [(id, body) => [\"div#\" + id, body], \"foo\", \"bar\"], \"bar2\"],\n+ [\"div\", [(_, id, body) => [\"div#\" + id, body], \"foo\", \"bar\"], \"bar2\"],\n`<div><div id=\"foo\">bar</div>bar2</div>`\n);\ncheck(\n\"comp fn in body apply\",\n- [\"div\", [([id, body]) => [\"div#\" + id, body], [\"foo\", \"bar\"]], \"bar2\"],\n+ [\"div\", [(_, [id, body]) => [\"div#\" + id, body], [\"foo\", \"bar\"]], \"bar2\"],\n`<div><div id=\"foo\">bar</div>bar2</div>`\n);\n@@ -200,9 +206,9 @@ describe(\"serialize\", () => {\nit(\"components nested\", () => {\nconst dlItem = ([def, desc]) => [[\"dt\", def], [\"dd\", desc]];\nconst ulItem = (i) => [\"li\", i];\n- const list = (f, items) => items.map(f);\n- const dlList = (attribs, items) => [\"dl\", attribs, [list, dlItem, items]];\n- const ulList = (attribs, items) => [\"ul\", attribs, [list, ulItem, items]];\n+ const list = (_, f, items) => items.map(f);\n+ const dlList = (_, attribs, items) => [\"dl\", attribs, [list, dlItem, items]];\n+ const ulList = (_, attribs, items) => [\"ul\", attribs, [list, ulItem, items]];\nconst items = [[\"a\", \"foo\"], [\"b\", \"bar\"]];\n@@ -213,9 +219,18 @@ describe(\"serialize\", () => {\n_check(widget2, `<ul id=\"foo\"><li>foo</li><li>bar</li></ul>`);\n});\n+ it(\"comp object\", () => {\n+ const foo = (ctx, body) => [\"div\", ctx.foo, body];\n+ const bar = { render: (_, id) => [foo, id] };\n+ assert.equal(\n+ serialize([\"section\", [bar, \"a\"], [bar, \"b\"]], { foo: { class: \"foo\" } }),\n+ `<section><div class=\"foo\">a</div><div class=\"foo\">b</div></section>`\n+ );\n+ });\n+\ncheck(\n\"iterators\",\n- [\"ul\", [(items) => items.map((i) => [\"li\", i]), [\"a\", \"b\"]]],\n+ [\"ul\", [(_, items) => items.map((i) => [\"li\", i]), [\"a\", \"b\"]]],\n`<ul><li>a</li><li>b</li></ul>`\n);\n",
"new_path": "packages/hiccup/test/index.ts",
"old_path": "packages/hiccup/test/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(hiccup): fix #19, add support for context object
BREAKING CHANGE: component functions now take a global context object as
first argument (like w/ @thi.ng/hdom)
- update serialize() to accept & pass optional context
- add support for component objects
- add/update tests
| 1
|
refactor
|
hiccup
|
679,913
|
12.05.2018 23:05:07
| -3,600
|
b1cb7d9a2192558ebc1f083ca0781d78882eba70
|
perf(hiccup): update css()
use string concat (~2.5x faster)
skip null values
|
[
{
"change_type": "MODIFY",
"diff": "import { isFunction } from \"@thi.ng/checks/is-function\";\nexport const css = (rules: any) => {\n- const css = [];\n+ let css = \"\", v;\nfor (let r in rules) {\n- if (rules.hasOwnProperty(r)) {\n- let v = rules[r];\n+ v = rules[r];\nif (isFunction(v)) {\nv = v(rules);\n}\n- css.push(r + \":\" + v + \";\");\n+ v != null && (css += `${r}:${v};`);\n}\n- }\n- return css.join(\"\");\n+ return css;\n};\n",
"new_path": "packages/hiccup/src/css.ts",
"old_path": "packages/hiccup/src/css.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
perf(hiccup): update css()
- use string concat (~2.5x faster)
- skip null values
| 1
|
perf
|
hiccup
|
679,913
|
13.05.2018 02:17:01
| -3,600
|
396faec8884159e2621431341e6356a4d404e0ba
|
refactor(hiccup-svg): rename svgdoc => svg
BREAKING CHANGE: rename svgdoc => svg
|
[
{
"change_type": "MODIFY",
"diff": "@@ -35,7 +35,8 @@ import * as fs from \"fs\";\nfs.writeFileSync(\"hello.svg\",\nserialize(\n- svg.svgdoc({width: 100, height: 100},\n+ svg.svg(\n+ {width: 100, height: 100},\nsvg.defs(svg.linearGradient(\"grad\", 0, 0, 0, 1, [[0, \"red\"], [1, \"blue\"]])),\nsvg.circle([50, 50], 50, {fill: \"url(#grad)\"}),\nsvg.text(\"Hello\", [50, 55], { fill: \"white\", \"text-anchor\": \"middle\"})\n",
"new_path": "packages/hiccup-svg/README.md",
"old_path": "packages/hiccup-svg/README.md"
},
{
"change_type": "MODIFY",
"diff": "-export const group = (attr, ...body) => [\"g\", attr, ...body];\n+export const group = (attr, ...body) =>\n+ [\"g\", attr, ...body];\n",
"new_path": "packages/hiccup-svg/src/group.ts",
"old_path": "packages/hiccup-svg/src/group.ts"
},
{
"change_type": "MODIFY",
"diff": "export * from \"./api\";\nexport * from \"./circle\";\nexport * from \"./defs\";\n-export * from \"./doc\";\nexport * from \"./gradients\";\nexport * from \"./group\";\nexport * from \"./line\";\n@@ -9,6 +8,7 @@ export * from \"./path\";\nexport * from \"./polygon\";\nexport * from \"./polyline\";\nexport * from \"./rect\";\n+export * from \"./svg\";\nexport * from \"./text\";\nexport * from \"./format\";\n",
"new_path": "packages/hiccup-svg/src/index.ts",
"old_path": "packages/hiccup-svg/src/index.ts"
},
{
"change_type": "RENAME",
"diff": "import { SVG_NS } from \"@thi.ng/hiccup/api\";\n-export const svgdoc = (attr, ...body) => [\n+export const svg = (attr, ...body) => [\n\"svg\",\nObject.assign(attr, { xmlns: SVG_NS }),\n...body\n",
"new_path": "packages/hiccup-svg/src/svg.ts",
"old_path": "packages/hiccup-svg/src/doc.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(hiccup-svg): rename svgdoc => svg
BREAKING CHANGE: rename svgdoc => svg
| 1
|
refactor
|
hiccup-svg
|
821,196
|
13.05.2018 10:38:10
| 25,200
|
69c0e3e4532b10e27f8c13a3075673a2a6aa2a1b
|
fix: flush stdout on exit
|
[
{
"change_type": "MODIFY",
"diff": "\"bin\": \"./bin/run\",\n\"bugs\": \"https://github.com/oclif/oclif/issues\",\n\"dependencies\": {\n- \"@oclif/command\": \"^1.4.21\",\n+ \"@oclif/command\": \"^1.4.28\",\n\"@oclif/config\": \"^1.6.18\",\n- \"@oclif/errors\": \"^1.0.12\",\n+ \"@oclif/errors\": \"^1.1.1\",\n\"@oclif/plugin-help\": \"^1.2.10\",\n\"@oclif/plugin-not-found\": \"^1.0.9\",\n\"@oclif/plugin-warn-if-update-available\": \"^1.3.9\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "#!/usr/bin/env node\nrequire('@oclif/command').run()\n+.then(require('@oclif/command/flush'))\n.catch(require('@oclif/errors/handle'))\n",
"new_path": "templates/bin/run",
"old_path": "templates/bin/run"
},
{
"change_type": "MODIFY",
"diff": "# yarn lockfile v1\n-\"@fimbul/bifrost@^0.5.0\":\n- version \"0.5.0\"\n- resolved \"https://registry.yarnpkg.com/@fimbul/bifrost/-/bifrost-0.5.0.tgz#60e96911fa61c5552eebfc1fbf1738e3afeecf23\"\n+\"@fimbul/bifrost@^0.6.0\":\n+ version \"0.6.0\"\n+ resolved \"https://registry.yarnpkg.com/@fimbul/bifrost/-/bifrost-0.6.0.tgz#5150302b63e1bd37ff95f561c3605949cb7e3770\"\ndependencies:\n- \"@fimbul/ymir\" \"^0.4.0\"\n+ \"@fimbul/ymir\" \"^0.6.0\"\nget-caller-file \"^1.0.2\"\ntslib \"^1.8.1\"\n-\"@fimbul/ymir@^0.4.0\":\n- version \"0.4.0\"\n- resolved \"https://registry.yarnpkg.com/@fimbul/ymir/-/ymir-0.4.0.tgz#5d2aeb86f1b257f778d501bbf3b811d2ba3dd3bc\"\n+\"@fimbul/ymir@^0.6.0\":\n+ version \"0.6.0\"\n+ resolved \"https://registry.yarnpkg.com/@fimbul/ymir/-/ymir-0.6.0.tgz#537cb15d361b7c993fe953b48c898ecdf4f671b8\"\ndependencies:\ninversify \"^4.10.0\"\nreflect-metadata \"^0.1.12\"\ncall-me-maybe \"^1.0.1\"\nglob-to-regexp \"^0.3.0\"\n-\"@oclif/command@^1.4.19\":\n- version \"1.4.19\"\n- resolved \"https://registry.yarnpkg.com/@oclif/command/-/command-1.4.19.tgz#7158eec97d9b4c4a109181e6a71bd83d34757254\"\n- dependencies:\n- \"@oclif/errors\" \"^1.0.6\"\n- \"@oclif/parser\" \"^3.3.3\"\n- debug \"^3.1.0\"\n- semver \"^5.5.0\"\n-\n-\"@oclif/command@^1.4.20\":\n- version \"1.4.20\"\n- resolved \"https://registry.yarnpkg.com/@oclif/command/-/command-1.4.20.tgz#7368c9c9f7f596fc8efffd7ec89118feed5203d8\"\n- dependencies:\n- \"@oclif/errors\" \"^1.0.8\"\n- \"@oclif/parser\" \"^3.3.3\"\n- debug \"^3.1.0\"\n- semver \"^5.5.0\"\n-\n-\"@oclif/command@^1.4.21\":\n- version \"1.4.21\"\n- resolved \"https://registry.yarnpkg.com/@oclif/command/-/command-1.4.21.tgz#e45f252f8c375ad6e24a0a5f908e6aa692c5c56a\"\n+\"@oclif/command@^1.4.19\", \"@oclif/command@^1.4.20\", \"@oclif/command@^1.4.21\", \"@oclif/command@^1.4.28\":\n+ version \"1.4.28\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/command/-/command-1.4.28.tgz#6fd405188846b7e1aa5767c9161a097077f84704\"\ndependencies:\n- \"@oclif/errors\" \"^1.0.9\"\n- \"@oclif/parser\" \"^3.3.3\"\n+ \"@oclif/errors\" \"^1.1.1\"\n+ \"@oclif/parser\" \"^3.4.0\"\ndebug \"^3.1.0\"\nsemver \"^5.5.0\"\n-\"@oclif/config@^1.6.17\":\n- version \"1.6.17\"\n- resolved \"https://registry.yarnpkg.com/@oclif/config/-/config-1.6.17.tgz#e9608f56e5acd49fcaf3bbfcc3e8818d81b1ba12\"\n- dependencies:\n- debug \"^3.1.0\"\n-\n-\"@oclif/config@^1.6.18\":\n+\"@oclif/config@^1.6.17\", \"@oclif/config@^1.6.18\":\nversion \"1.6.18\"\nresolved \"https://registry.yarnpkg.com/@oclif/config/-/config-1.6.18.tgz#25693cb4badb81489a8c5f846761630dca8c516c\"\ndependencies:\nrequire-resolve \"^0.0.2\"\ntslib \"^1.9.0\"\n-\"@oclif/errors@^1.0.11\":\n- version \"1.0.11\"\n- resolved \"https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.11.tgz#567785e311cb076b8e323ebec377d4fa7146d53d\"\n- dependencies:\n- clean-stack \"^1.3.0\"\n- fs-extra \"^6.0.0\"\n- indent-string \"^3.2.0\"\n- strip-ansi \"^4.0.0\"\n- wrap-ansi \"^3.0.1\"\n-\n-\"@oclif/errors@^1.0.12\":\n- version \"1.0.12\"\n- resolved \"https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.12.tgz#6c8ea932d3fcfc26f5b3bc77e45da8f33189f188\"\n+\"@oclif/errors@^1.0.11\", \"@oclif/errors@^1.1.1\":\n+ version \"1.1.1\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/errors/-/errors-1.1.1.tgz#2ff4ea9043491ae548e0c8545b91e260c6c0d64f\"\ndependencies:\nclean-stack \"^1.3.0\"\nfs-extra \"^6.0.1\"\nstrip-ansi \"^4.0.0\"\nwrap-ansi \"^3.0.1\"\n-\"@oclif/errors@^1.0.6\":\n- version \"1.0.6\"\n- resolved \"https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.6.tgz#76b17906ac1beea252add52e8e8ed78229c33a7b\"\n- dependencies:\n- clean-stack \"^1.3.0\"\n- fs-extra \"^5.0.0\"\n- indent-string \"^3.2.0\"\n- strip-ansi \"^4.0.0\"\n- wrap-ansi \"^3.0.1\"\n-\n-\"@oclif/errors@^1.0.8\":\n- version \"1.0.8\"\n- resolved \"https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.8.tgz#2f8239267506bb7c3f5fd776144c2686e5b7fff7\"\n- dependencies:\n- clean-stack \"^1.3.0\"\n- fs-extra \"^6.0.0\"\n- indent-string \"^3.2.0\"\n- strip-ansi \"^4.0.0\"\n- wrap-ansi \"^3.0.1\"\n-\n-\"@oclif/errors@^1.0.9\":\n- version \"1.0.9\"\n- resolved \"https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.9.tgz#6fe3afd8e7683c436df63674550899adec10c81c\"\n- dependencies:\n- clean-stack \"^1.3.0\"\n- fs-extra \"^6.0.0\"\n- indent-string \"^3.2.0\"\n- strip-ansi \"^4.0.0\"\n- wrap-ansi \"^3.0.1\"\n-\n\"@oclif/linewrap@^1.0.0\":\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/@oclif/linewrap/-/linewrap-1.0.0.tgz#aedcb64b479d4db7be24196384897b5000901d91\"\n-\"@oclif/parser@^3.3.3\":\n- version \"3.3.3\"\n- resolved \"https://registry.yarnpkg.com/@oclif/parser/-/parser-3.3.3.tgz#bfde499b836178eee2b6b29ccb7fb3f95851d3c6\"\n+\"@oclif/parser@^3.4.0\":\n+ version \"3.4.0\"\n+ resolved \"https://registry.yarnpkg.com/@oclif/parser/-/parser-3.4.0.tgz#bf61399c70f75a96070153df2fcbb7e7115c7fd9\"\ndependencies:\n\"@oclif/linewrap\" \"^1.0.0\"\n- chalk \"^2.4.0\"\n+ chalk \"^2.4.1\"\n\"@oclif/plugin-help@^1.2.10\":\nversion \"1.2.10\"\n\"@types/node\" \"*\"\n\"@types/inquirer@*\":\n- version \"0.0.38\"\n- resolved \"https://registry.yarnpkg.com/@types/inquirer/-/inquirer-0.0.38.tgz#5c682b87152ebe8d759c875f2edbc56d787c6b99\"\n+ version \"0.0.41\"\n+ resolved \"https://registry.yarnpkg.com/@types/inquirer/-/inquirer-0.0.41.tgz#0c33027dcd0b0dde234e22afa454f2c75d8b30d2\"\ndependencies:\n\"@types/rx\" \"*\"\n\"@types/through\" \"*\"\nresolved \"https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d\"\n\"@types/node@*\":\n- version \"9.6.0\"\n- resolved \"https://registry.yarnpkg.com/@types/node/-/node-9.6.0.tgz#d3480ee666df9784b1001a1872a2f6ccefb6c2d7\"\n+ version \"10.0.8\"\n+ resolved \"https://registry.yarnpkg.com/@types/node/-/node-10.0.8.tgz#37b4d91d4e958e4c2ba0be2b86e7ed4ff19b0858\"\n\"@types/normalize-package-data@*\":\nversion \"2.4.0\"\n@@ -381,11 +317,7 @@ alce@1.0.0:\nesprima \"~1.0.4\"\nestraverse \"~1.3.0\"\n-ansi-escapes@^3.0.0:\n- version \"3.0.0\"\n- resolved \"https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92\"\n-\n-ansi-escapes@^3.1.0:\n+ansi-escapes@^3.0.0, ansi-escapes@^3.1.0:\nversion \"3.1.0\"\nresolved \"https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30\"\n@@ -481,9 +413,9 @@ async@^2.6.0:\ndependencies:\nlodash \"^4.14.0\"\n-atob@^2.0.0:\n- version \"2.0.3\"\n- resolved \"https://registry.yarnpkg.com/atob/-/atob-2.0.3.tgz#19c7a760473774468f20b2d2d03372ad7d4cbf5d\"\n+atob@^2.1.1:\n+ version \"2.1.1\"\n+ resolved \"https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a\"\nbabel-code-frame@^6.22.0:\nversion \"6.26.0\"\n@@ -535,16 +467,14 @@ brace-expansion@^1.1.7:\nconcat-map \"0.0.1\"\nbraces@^2.3.1:\n- version \"2.3.1\"\n- resolved \"https://registry.yarnpkg.com/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb\"\n+ version \"2.3.2\"\n+ resolved \"https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729\"\ndependencies:\narr-flatten \"^1.1.0\"\narray-unique \"^0.3.2\"\n- define-property \"^1.0.0\"\nextend-shallow \"^2.0.1\"\nfill-range \"^4.0.0\"\nisobject \"^3.0.1\"\n- kind-of \"^6.0.2\"\nrepeat-element \"^1.1.2\"\nsnapdragon \"^0.8.1\"\nsnapdragon-node \"^2.0.1\"\n@@ -555,6 +485,21 @@ browser-stdout@1.3.1:\nversion \"1.3.1\"\nresolved \"https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60\"\n+buffer-alloc-unsafe@^0.1.0:\n+ version \"0.1.1\"\n+ resolved \"https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-0.1.1.tgz#ffe1f67551dd055737de253337bfe853dfab1a6a\"\n+\n+buffer-alloc@^1.1.0:\n+ version \"1.1.0\"\n+ resolved \"https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.1.0.tgz#05514d33bf1656d3540c684f65b1202e90eca303\"\n+ dependencies:\n+ buffer-alloc-unsafe \"^0.1.0\"\n+ buffer-fill \"^0.1.0\"\n+\n+buffer-fill@^0.1.0:\n+ version \"0.1.1\"\n+ resolved \"https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-0.1.1.tgz#76d825c4d6e50e06b7a31eb520c04d08cc235071\"\n+\nbuffer-from@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531\"\n@@ -644,23 +589,7 @@ chalk@^1.0.0, chalk@^1.1.3:\nstrip-ansi \"^3.0.0\"\nsupports-color \"^2.0.0\"\n-chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0:\n- version \"2.3.2\"\n- resolved \"https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65\"\n- dependencies:\n- ansi-styles \"^3.2.1\"\n- escape-string-regexp \"^1.0.5\"\n- supports-color \"^5.3.0\"\n-\n-chalk@^2.4.0:\n- version \"2.4.0\"\n- resolved \"https://registry.yarnpkg.com/chalk/-/chalk-2.4.0.tgz#a060a297a6b57e15b61ca63ce84995daa0fe6e52\"\n- dependencies:\n- ansi-styles \"^3.2.1\"\n- escape-string-regexp \"^1.0.5\"\n- supports-color \"^5.3.0\"\n-\n-chalk@^2.4.1:\n+chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1:\nversion \"2.4.1\"\nresolved \"https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e\"\ndependencies:\n@@ -720,8 +649,8 @@ cli-table@^0.3.1:\ncolors \"1.0.3\"\ncli-ux@^4.2.0:\n- version \"4.2.0\"\n- resolved \"https://registry.yarnpkg.com/cli-ux/-/cli-ux-4.2.0.tgz#b25bb5a646cad9bb99494e189c9cf052d0732065\"\n+ version \"4.3.0\"\n+ resolved \"https://registry.yarnpkg.com/cli-ux/-/cli-ux-4.3.0.tgz#048f6334ef50cc5ab7cc0d51725c3888c75cbc41\"\ndependencies:\n\"@oclif/linewrap\" \"^1.0.0\"\n\"@oclif/screen\" \"^1.0.2\"\n@@ -730,11 +659,11 @@ cli-ux@^4.2.0:\nchalk \"^2.4.1\"\nclean-stack \"^1.3.0\"\nextract-stack \"^1.0.0\"\n- fs-extra \"^6.0.0\"\n+ fs-extra \"^6.0.1\"\nhyperlinker \"^1.0.0\"\nindent-string \"^3.2.0\"\nlodash \"^4.17.10\"\n- password-prompt \"^1.0.5\"\n+ password-prompt \"^1.0.6\"\nsemver \"^5.5.0\"\nstrip-ansi \"^4.0.0\"\nsupports-color \"^5.4.0\"\n@@ -769,8 +698,8 @@ clone@^1.0.0:\nresolved \"https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e\"\nclone@^2.1.1:\n- version \"2.1.2\"\n- resolved \"https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f\"\n+ version \"2.1.1\"\n+ resolved \"https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb\"\ncloneable-readable@^1.0.0:\nversion \"1.1.2\"\n@@ -806,8 +735,8 @@ color-name@^1.1.1:\nresolved \"https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25\"\ncolors@*:\n- version \"1.2.1\"\n- resolved \"https://registry.yarnpkg.com/colors/-/colors-1.2.1.tgz#f4a3d302976aaf042356ba1ade3b1a2c62d9d794\"\n+ version \"1.2.5\"\n+ resolved \"https://registry.yarnpkg.com/colors/-/colors-1.2.5.tgz#89c7ad9a374bc030df8013241f68136ed8835afc\"\ncolors@1.0.3:\nversion \"1.0.3\"\n@@ -874,8 +803,8 @@ copy-descriptor@^0.1.0:\nresolved \"https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d\"\ncore-js@^2.4.0:\n- version \"2.5.3\"\n- resolved \"https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e\"\n+ version \"2.5.6\"\n+ resolved \"https://registry.yarnpkg.com/core-js/-/core-js-2.5.6.tgz#0fe6d45bf3cac3ac364a9d72de7576f4eb221b9d\"\ncore-util-is@~1.0.0:\nversion \"1.0.2\"\n@@ -1074,8 +1003,8 @@ editions@^1.3.3:\nresolved \"https://registry.yarnpkg.com/editions/-/editions-1.3.4.tgz#3662cb592347c3168eb8e498a0ff73271d67f50b\"\nejs@^2.5.9:\n- version \"2.5.9\"\n- resolved \"https://registry.yarnpkg.com/ejs/-/ejs-2.5.9.tgz#7ba254582a560d267437109a68354112475b0ce5\"\n+ version \"2.6.1\"\n+ resolved \"https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0\"\nend-of-stream@^1.0.0, end-of-stream@^1.1.0:\nversion \"1.4.1\"\n@@ -1142,8 +1071,8 @@ eslint-plugin-node@^6.0.1:\nsemver \"^5.4.1\"\neslint-plugin-unicorn@^4.0.2:\n- version \"4.0.2\"\n- resolved \"https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-4.0.2.tgz#845de915e7a975f15779466fc92cc01973bbf103\"\n+ version \"4.0.3\"\n+ resolved \"https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-4.0.3.tgz#7e9998711bf237809ed1881a51a77000b2f40586\"\ndependencies:\nclean-regexp \"^1.0.0\"\neslint-ast-utils \"^1.0.0\"\n@@ -1224,8 +1153,8 @@ esprima@~1.0.4:\nresolved \"https://registry.yarnpkg.com/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad\"\nesquery@^1.0.0:\n- version \"1.0.0\"\n- resolved \"https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa\"\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708\"\ndependencies:\nestraverse \"^4.0.0\"\n@@ -1317,8 +1246,8 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2:\nis-extendable \"^1.0.1\"\nexternal-editor@^2.0.4:\n- version \"2.1.0\"\n- resolved \"https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48\"\n+ version \"2.2.0\"\n+ resolved \"https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5\"\ndependencies:\nchardet \"^0.4.0\"\niconv-lite \"^0.4.17\"\n@@ -1353,14 +1282,14 @@ fast-deep-equal@^1.0.0:\nresolved \"https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614\"\nfast-glob@^2.0.2:\n- version \"2.2.0\"\n- resolved \"https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.0.tgz#e9d032a69b86bef46fc03d935408f02fb211d9fc\"\n+ version \"2.2.1\"\n+ resolved \"https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.1.tgz#686c2345be88f3741e174add0be6f2e5b6078889\"\ndependencies:\n\"@mrmlnc/readdir-enhanced\" \"^2.2.1\"\nglob-parent \"^3.1.0\"\nis-glob \"^4.0.0\"\nmerge2 \"^1.2.1\"\n- micromatch \"^3.1.8\"\n+ micromatch \"^3.1.10\"\nfast-json-stable-stringify@^2.0.0:\nversion \"2.0.0\"\n@@ -1447,21 +1376,9 @@ from@~0:\nversion \"0.1.7\"\nresolved \"https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe\"\n-fs-extra@^5.0.0:\n- version \"5.0.0\"\n- resolved \"https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd\"\n- dependencies:\n- graceful-fs \"^4.1.2\"\n- jsonfile \"^4.0.0\"\n- universalify \"^0.1.0\"\n-\n-fs-extra@^6.0.0:\n- version \"6.0.0\"\n- resolved \"https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.0.tgz#0f0afb290bb3deb87978da816fcd3c7797f3a817\"\n- dependencies:\n- graceful-fs \"^4.1.2\"\n- jsonfile \"^4.0.0\"\n- universalify \"^0.1.0\"\n+fs-constants@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad\"\nfs-extra@^6.0.1:\nversion \"6.0.1\"\n@@ -1549,8 +1466,8 @@ glob@^6.0.1:\npath-is-absolute \"^1.0.0\"\nglobals@^11.0.1:\n- version \"11.4.0\"\n- resolved \"https://registry.yarnpkg.com/globals/-/globals-11.4.0.tgz#b85c793349561c16076a3c13549238a27945f1bc\"\n+ version \"11.5.0\"\n+ resolved \"https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642\"\nglobby@^4.0.0:\nversion \"4.1.0\"\n@@ -1698,16 +1615,6 @@ hosted-git-info@^2.1.4:\nversion \"2.6.0\"\nresolved \"https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222\"\n-http-call@^5.1.1:\n- version \"5.1.1\"\n- resolved \"https://registry.yarnpkg.com/http-call/-/http-call-5.1.1.tgz#0110095d455b876c64cc9fe820b3f836cc552ea7\"\n- dependencies:\n- content-type \"^1.0.4\"\n- debug \"^3.1.0\"\n- is-retry-allowed \"^1.1.0\"\n- is-stream \"^1.1.0\"\n- tunnel-agent \"^0.6.0\"\n-\nhttp-call@^5.1.2:\nversion \"5.1.2\"\nresolved \"https://registry.yarnpkg.com/http-call/-/http-call-5.1.2.tgz#2320e1aef65f01574723a697aca31748ce578f9d\"\n@@ -1723,12 +1630,14 @@ hyperlinker@^1.0.0:\nresolved \"https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e\"\niconv-lite@^0.4.17:\n- version \"0.4.19\"\n- resolved \"https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b\"\n+ version \"0.4.23\"\n+ resolved \"https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63\"\n+ dependencies:\n+ safer-buffer \">= 2.1.2 < 3\"\nignore@^3.3.3, ignore@^3.3.5, ignore@^3.3.6:\n- version \"3.3.7\"\n- resolved \"https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021\"\n+ version \"3.3.8\"\n+ resolved \"https://registry.yarnpkg.com/ignore/-/ignore-3.3.8.tgz#3f8e9c35d38708a3a7e0e9abb6c73e7ee7707b2b\"\nimport-modules@^1.1.0:\nversion \"1.1.0\"\n@@ -1787,8 +1696,8 @@ interpret@^1.0.0:\nresolved \"https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614\"\ninversify@^4.10.0:\n- version \"4.11.1\"\n- resolved \"https://registry.yarnpkg.com/inversify/-/inversify-4.11.1.tgz#9a10635d1fd347da11da96475b3608babd5945a6\"\n+ version \"4.13.0\"\n+ resolved \"https://registry.yarnpkg.com/inversify/-/inversify-4.13.0.tgz#0ab40570bfa4474b04d5b919bbab3a4f682a72f5\"\ninvert-kv@^1.0.0:\nversion \"1.0.0\"\n@@ -2019,8 +1928,8 @@ js-yaml@^3.7.0, js-yaml@^3.9.0, js-yaml@^3.9.1:\nesprima \"^4.0.0\"\njson-parse-better-errors@^1.0.1:\n- version \"1.0.1\"\n- resolved \"https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz#50183cd1b2d25275de069e9e71b467ac9eab973a\"\n+ version \"1.0.2\"\n+ resolved \"https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9\"\njson-schema-traverse@^0.3.0:\nversion \"0.3.1\"\n@@ -2097,6 +2006,15 @@ load-json-file@^4.0.0:\npify \"^3.0.0\"\nstrip-bom \"^3.0.0\"\n+load-json-file@^5.0.0:\n+ version \"5.0.0\"\n+ resolved \"https://registry.yarnpkg.com/load-json-file/-/load-json-file-5.0.0.tgz#5b5ef7cb6e1e337408e02fe01fe679ccc0cd18d5\"\n+ dependencies:\n+ graceful-fs \"^4.1.2\"\n+ parse-json \"^4.0.0\"\n+ pify \"^3.0.0\"\n+ strip-bom \"^3.0.0\"\n+\nlocate-path@^2.0.0:\nversion \"2.0.0\"\nresolved \"https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e\"\n@@ -2145,11 +2063,7 @@ lodash.zip@^4.2.0:\nversion \"4.2.0\"\nresolved \"https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020\"\n-lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.3.0, lodash@^4.5.1:\n- version \"4.17.5\"\n- resolved \"https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511\"\n-\n-lodash@^4.17.10:\n+lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.10, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.3.0, lodash@^4.5.1:\nversion \"4.17.10\"\nresolved \"https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7\"\n@@ -2171,15 +2085,15 @@ lowercase-keys@^1.0.0:\nresolved \"https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f\"\nlru-cache@^4.0.1:\n- version \"4.1.2\"\n- resolved \"https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f\"\n+ version \"4.1.3\"\n+ resolved \"https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c\"\ndependencies:\npseudomap \"^1.0.2\"\nyallist \"^2.1.2\"\nmake-dir@^1.0.0, make-dir@^1.1.0:\n- version \"1.2.0\"\n- resolved \"https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b\"\n+ version \"1.3.0\"\n+ resolved \"https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c\"\ndependencies:\npify \"^3.0.0\"\n@@ -2210,8 +2124,8 @@ map-visit@^1.0.0:\nobject-visit \"^1.0.0\"\nmem-fs-editor@^4.0.0:\n- version \"4.0.1\"\n- resolved \"https://registry.yarnpkg.com/mem-fs-editor/-/mem-fs-editor-4.0.1.tgz#27e6b59df91b37248e9be2145b1bea84695103ed\"\n+ version \"4.0.2\"\n+ resolved \"https://registry.yarnpkg.com/mem-fs-editor/-/mem-fs-editor-4.0.2.tgz#55a79b1e824da631254c4c95ba6366602c77af90\"\ndependencies:\ncommondir \"^1.0.1\"\ndeep-extend \"^0.5.1\"\n@@ -2255,10 +2169,10 @@ meow@^3.6.0, meow@^3.7.0:\ntrim-newlines \"^1.0.0\"\nmerge2@^1.2.1:\n- version \"1.2.1\"\n- resolved \"https://registry.yarnpkg.com/merge2/-/merge2-1.2.1.tgz#271d2516ff52d4af7f7b710b8bf3e16e183fef66\"\n+ version \"1.2.2\"\n+ resolved \"https://registry.yarnpkg.com/merge2/-/merge2-1.2.2.tgz#03212e3da8d86c4d8523cebd6318193414f94e34\"\n-micromatch@^3.1.8:\n+micromatch@^3.1.10:\nversion \"3.1.10\"\nresolved \"https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23\"\ndependencies:\n@@ -2561,7 +2475,7 @@ pascalcase@^0.1.1:\nversion \"0.1.1\"\nresolved \"https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14\"\n-password-prompt@^1.0.5:\n+password-prompt@^1.0.6:\nversion \"1.0.6\"\nresolved \"https://registry.yarnpkg.com/password-prompt/-/password-prompt-1.0.6.tgz#d657a16c80ae3932f55f38a51fee9f872a8e9b17\"\ndependencies:\n@@ -2709,20 +2623,20 @@ pump@^1.0.0:\nonce \"^1.3.1\"\nqqjs@^0.3.8:\n- version \"0.3.8\"\n- resolved \"https://registry.yarnpkg.com/qqjs/-/qqjs-0.3.8.tgz#8374d5cb53a2fa51104a3abd2e7371708b7ad913\"\n+ version \"0.3.9\"\n+ resolved \"https://registry.yarnpkg.com/qqjs/-/qqjs-0.3.9.tgz#8993e0be58aaf2e5b842a732b33de991d7edb625\"\ndependencies:\nchalk \"^2.4.1\"\ndebug \"^3.1.0\"\nexeca \"^0.10.0\"\n- fs-extra \"^5.0.0\"\n+ fs-extra \"^6.0.1\"\nget-stream \"^3.0.0\"\nglob \"^7.1.2\"\nglobby \"^8.0.1\"\n- http-call \"^5.1.1\"\n- load-json-file \"^4.0.0\"\n+ http-call \"^5.1.2\"\n+ load-json-file \"^5.0.0\"\npkg-dir \"^2.0.0\"\n- tar-fs \"^1.16.0\"\n+ tar-fs \"^1.16.2\"\ntmp \"^0.0.33\"\nwrite-json-file \"^2.3.0\"\n@@ -2791,7 +2705,7 @@ read-pkg@^3.0.0:\nnormalize-package-data \"^2.3.2\"\npath-type \"^3.0.0\"\n-readable-stream@^2.0.0:\n+readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.5:\nversion \"2.3.6\"\nresolved \"https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf\"\ndependencies:\n@@ -2803,18 +2717,6 @@ readable-stream@^2.0.0:\nstring_decoder \"~1.1.1\"\nutil-deprecate \"~1.0.1\"\n-readable-stream@^2.0.2, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.5:\n- version \"2.3.5\"\n- resolved \"https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d\"\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.0.3\"\n- util-deprecate \"~1.0.1\"\n-\nreadline-sync@^1.4.7:\nversion \"1.4.9\"\nresolved \"https://registry.yarnpkg.com/readline-sync/-/readline-sync-1.4.9.tgz#3eda8e65f23cd2a17e61301b1f0003396af5ecda\"\n@@ -2854,8 +2756,8 @@ regex-not@^1.0.0, regex-not@^1.0.2:\nsafe-regex \"^1.1.0\"\nregexpp@^1.0.1:\n- version \"1.0.1\"\n- resolved \"https://registry.yarnpkg.com/regexpp/-/regexpp-1.0.1.tgz#d857c3a741dce075c2848dcb019a0a975b190d43\"\n+ version \"1.1.0\"\n+ resolved \"https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab\"\nremove-trailing-separator@^1.0.1:\nversion \"1.1.0\"\n@@ -2913,8 +2815,8 @@ resolve-url@^0.2.1:\nresolved \"https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a\"\nresolve@^1.1.6, resolve@^1.3.2, resolve@^1.3.3:\n- version \"1.6.0\"\n- resolved \"https://registry.yarnpkg.com/resolve/-/resolve-1.6.0.tgz#0fbd21278b27b4004481c395349e7aba60a9ff5c\"\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@@ -2956,8 +2858,8 @@ rx@2.3.24:\nresolved \"https://registry.yarnpkg.com/rx/-/rx-2.3.24.tgz#14f950a4217d7e35daa71bbcbe58eff68ea4b2b7\"\nsafe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:\n- version \"5.1.1\"\n- resolved \"https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853\"\n+ version \"5.1.2\"\n+ resolved \"https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d\"\nsafe-regex@^1.1.0:\nversion \"1.1.0\"\n@@ -2965,6 +2867,10 @@ safe-regex@^1.1.0:\ndependencies:\nret \"~0.1.10\"\n+\"safer-buffer@>= 2.1.2 < 3\":\n+ version \"2.1.2\"\n+ resolved \"https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a\"\n+\nscoped-regex@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-1.0.0.tgz#a346bb1acd4207ae70bd7c0c7ca9e566b6baddb8\"\n@@ -3005,15 +2911,7 @@ shebang-regex@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3\"\n-shelljs@^0.8.0:\n- version \"0.8.1\"\n- resolved \"https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.1.tgz#729e038c413a2254c4078b95ed46e0397154a9f1\"\n- dependencies:\n- glob \"^7.0.0\"\n- interpret \"^1.0.0\"\n- rechoir \"^0.6.2\"\n-\n-shelljs@^0.8.2:\n+shelljs@^0.8.0, shelljs@^0.8.2:\nversion \"0.8.2\"\nresolved \"https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35\"\ndependencies:\n@@ -3075,19 +2973,20 @@ sort-pjson@^1.0.2:\nfixpack \"^2.3.1\"\nsource-map-resolve@^0.5.0:\n- version \"0.5.1\"\n- resolved \"https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a\"\n+ version \"0.5.2\"\n+ resolved \"https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259\"\ndependencies:\n- atob \"^2.0.0\"\n+ atob \"^2.1.1\"\ndecode-uri-component \"^0.2.0\"\nresolve-url \"^0.2.1\"\nsource-map-url \"^0.4.0\"\nurix \"^0.1.0\"\nsource-map-support@^0.5.3:\n- version \"0.5.4\"\n- resolved \"https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.4.tgz#54456efa89caa9270af7cd624cc2f123e51fbae8\"\n+ version \"0.5.6\"\n+ resolved \"https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13\"\ndependencies:\n+ buffer-from \"^1.0.0\"\nsource-map \"^0.6.0\"\nsource-map-url@^0.4.0:\n@@ -3200,12 +3099,6 @@ string-width@^2.0.0, 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.0.3:\n- version \"1.0.3\"\n- resolved \"https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab\"\n- dependencies:\n- safe-buffer \"~5.1.0\"\n-\nstring_decoder@~1.1.1:\nversion \"1.1.1\"\nresolved \"https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8\"\n@@ -3285,18 +3178,12 @@ supports-color@^3.2.3:\ndependencies:\nhas-flag \"^1.0.0\"\n-supports-color@^5.0.0, supports-color@^5.4.0:\n+supports-color@^5.0.0, supports-color@^5.1.0, supports-color@^5.3.0, supports-color@^5.4.0:\nversion \"5.4.0\"\nresolved \"https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54\"\ndependencies:\nhas-flag \"^3.0.0\"\n-supports-color@^5.1.0, supports-color@^5.3.0:\n- version \"5.3.0\"\n- resolved \"https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0\"\n- dependencies:\n- has-flag \"^3.0.0\"\n-\nsupports-hyperlinks@^1.0.1:\nversion \"1.0.1\"\nresolved \"https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz#71daedf36cc1060ac5100c351bb3da48c29c0ef7\"\n@@ -3322,9 +3209,9 @@ taketalk@^1.0.0:\nget-stdin \"^4.0.1\"\nminimist \"^1.1.0\"\n-tar-fs@^1.16.0:\n- version \"1.16.0\"\n- resolved \"https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.0.tgz#e877a25acbcc51d8c790da1c57c9cf439817b896\"\n+tar-fs@^1.16.2:\n+ version \"1.16.2\"\n+ resolved \"https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.2.tgz#17e5239747e399f7e77344f5f53365f04af53577\"\ndependencies:\nchownr \"^1.0.1\"\nmkdirp \"^0.5.1\"\n@@ -3332,12 +3219,15 @@ tar-fs@^1.16.0:\ntar-stream \"^1.1.2\"\ntar-stream@^1.1.2:\n- version \"1.5.5\"\n- resolved \"https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.5.5.tgz#5cad84779f45c83b1f2508d96b09d88c7218af55\"\n+ version \"1.6.0\"\n+ resolved \"https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.0.tgz#a50efaa7b17760b82c27b3cae4a301a8254a5715\"\ndependencies:\nbl \"^1.0.0\"\n+ buffer-alloc \"^1.1.0\"\nend-of-stream \"^1.0.0\"\n+ fs-constants \"^1.0.0\"\nreadable-stream \"^2.0.0\"\n+ to-buffer \"^1.1.0\"\nxtend \"^4.0.0\"\ntemp-write@^2.1.0:\n@@ -3380,6 +3270,10 @@ tmp@^0.0.33:\ndependencies:\nos-tmpdir \"~1.0.2\"\n+to-buffer@^1.1.0:\n+ version \"1.1.1\"\n+ resolved \"https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80\"\n+\nto-object-path@^0.3.0:\nversion \"0.3.0\"\nresolved \"https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af\"\n@@ -3428,16 +3322,16 @@ tslib@1.9.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:\nresolved \"https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8\"\ntslint-consistent-codestyle@^1.11.0:\n- version \"1.12.2\"\n- resolved \"https://registry.yarnpkg.com/tslint-consistent-codestyle/-/tslint-consistent-codestyle-1.12.2.tgz#a7ecb531ec7c03873e82039472259fab797e3d15\"\n+ version \"1.13.0\"\n+ resolved \"https://registry.yarnpkg.com/tslint-consistent-codestyle/-/tslint-consistent-codestyle-1.13.0.tgz#82abf230bf39e01159b4e9af721d489dd5ae0e6c\"\ndependencies:\n- \"@fimbul/bifrost\" \"^0.5.0\"\n+ \"@fimbul/bifrost\" \"^0.6.0\"\ntslib \"^1.7.1\"\n- tsutils \"^2.22.2\"\n+ tsutils \"^2.24.0\"\ntslint-eslint-rules@^5.1.0:\n- version \"5.1.0\"\n- resolved \"https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-5.1.0.tgz#3232b318da55dbb5a83e3f5d657c1ddbb27b9ff2\"\n+ version \"5.2.0\"\n+ resolved \"https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-5.2.0.tgz#3e767e7e9cc7877497a2bde5bcb6184dee9b28c4\"\ndependencies:\ndoctrine \"0.7.2\"\ntslib \"1.9.0\"\n@@ -3480,9 +3374,9 @@ tsutils@2.8.0:\ndependencies:\ntslib \"^1.7.1\"\n-tsutils@^2.12.1, tsutils@^2.22.2:\n- version \"2.22.2\"\n- resolved \"https://registry.yarnpkg.com/tsutils/-/tsutils-2.22.2.tgz#0b9f3d87aa3eb95bd32d26ce2b88aa329a657951\"\n+tsutils@^2.12.1, tsutils@^2.24.0:\n+ version \"2.27.0\"\n+ resolved \"https://registry.yarnpkg.com/tsutils/-/tsutils-2.27.0.tgz#9efb252b188eaa0ca3ade41dc410d6ce7eaab816\"\ndependencies:\ntslib \"^1.8.1\"\n@@ -3704,25 +3598,7 @@ yargs@^8.0.2:\ny18n \"^3.2.1\"\nyargs-parser \"^7.0.0\"\n-yeoman-environment@^2.0.5:\n- version \"2.0.5\"\n- resolved \"https://registry.yarnpkg.com/yeoman-environment/-/yeoman-environment-2.0.5.tgz#84f22bafa84088971fe99ea85f654a3a3dd2b693\"\n- dependencies:\n- chalk \"^2.1.0\"\n- debug \"^3.1.0\"\n- diff \"^3.3.1\"\n- escape-string-regexp \"^1.0.2\"\n- globby \"^6.1.0\"\n- grouped-queue \"^0.3.3\"\n- inquirer \"^3.3.0\"\n- is-scoped \"^1.0.0\"\n- lodash \"^4.17.4\"\n- log-symbols \"^2.1.0\"\n- mem-fs \"^1.1.0\"\n- text-table \"^0.2.0\"\n- untildify \"^3.0.2\"\n-\n-yeoman-environment@^2.0.6:\n+yeoman-environment@^2.0.5, yeoman-environment@^2.0.6:\nversion \"2.0.6\"\nresolved \"https://registry.yarnpkg.com/yeoman-environment/-/yeoman-environment-2.0.6.tgz#ae1b21d826b363f3d637f88a7fc9ea7414cb5377\"\ndependencies:\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
TypeScript
|
MIT License
|
oclif/oclif
|
fix: flush stdout on exit
| 1
|
fix
| null |
217,922
|
13.05.2018 12:01:13
| -7,200
|
cb718aa768630cbc6664e3299b601ab671b09dab
|
fix(simulator): fixed an issue with users having no gearsets
|
[
{
"change_type": "MODIFY",
"diff": "@@ -186,7 +186,7 @@ export class SimulatorComponent implements OnInit, OnDestroy {\n.do(user => this.userData = user)\n.mergeMap(user => {\nif (user.anonymous) {\n- return Observable.of(user.gearSets)\n+ return Observable.of([])\n}\nreturn this.dataService.getGearsets(user.lodestoneId)\n.map(gearsets => {\n",
"new_path": "src/app/pages/simulator/components/simulator/simulator.component.ts",
"old_path": "src/app/pages/simulator/components/simulator/simulator.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix(simulator): fixed an issue with users having no gearsets
| 1
|
fix
|
simulator
|
679,913
|
13.05.2018 12:47:31
| -3,600
|
373701b0a9593d2094e5cf644f0a5efc2641e478
|
feat(pointfree): add execjs for host calls, update readme
|
[
{
"change_type": "MODIFY",
"diff": "@@ -334,6 +334,25 @@ pf.runU(\n// 100\n```\n+#### Quotations as vanilla JS function calls\n+\n+Quoations can be used to define (or dynamically construct) JS function\n+calls. For that a quotation needs to take the form of an\n+[S-expression](https://en.wikipedia.org/wiki/S-expression), i.e. the\n+first element of the quotation is the actual function to be called and\n+all other values in the quotation are passed as arguments. The result of\n+the function call is placed back on the stack.\n+\n+```ts\n+pf.runU(\n+ [\n+ [(a,b) => a + b, 1, 2],\n+ pf.execjs\n+ ]\n+);\n+// 3\n+```\n+\n#### Currying & composing quotations\nSince quoatations are just arrays, we can treat them as data, i.e. **the\n",
"new_path": "packages/pointfree/README.md",
"old_path": "packages/pointfree/README.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -176,6 +176,25 @@ export const wordU = (prog: StackProgram, n = 1, env?: StackEnv, mergeEnv = true\nexport const exec = (ctx: StackContext) =>\n($(ctx[0], 1), $stackFn(ctx[0].pop())(ctx));\n+//////////////////// JS host calls ////////////////////\n+\n+/**\n+ * Expects TOS to be a quotation with a vanilla JS function as first\n+ * element. Calls fn with all remaining items in quot as arguments and\n+ * pushes result back on d-stack (even if fn returned `undefined`).\n+ *\n+ * ( [f ...] -- f(...) )\n+ *\n+ * @param ctx\n+ */\n+export const execjs = (ctx: StackContext) => {\n+ const stack = ctx[0];\n+ $(stack, 1);\n+ const [fn, ...args] = stack.pop();\n+ stack.push(fn(...args));\n+ return ctx;\n+};\n+\n//////////////////// Operator generators ////////////////////\n/**\n",
"new_path": "packages/pointfree/src/index.ts",
"old_path": "packages/pointfree/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(pointfree): add execjs for host calls, update readme
| 1
|
feat
|
pointfree
|
679,913
|
13.05.2018 13:03:37
| -3,600
|
dc775404b364faff02b1ad0f57885b8291adfef4
|
docs(hiccup-svg): resolve update readme, add invocation notes
BREAKING CHANGE: technically identical to previous version, however
due to breaking changes and new context support in
SVG functions MUST be invoked directly now and do not support lazy
evaluation anymore. see notice in readme.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -16,6 +16,21 @@ This package's functionality was formerly part of\n[@thi.ng/hdom-components](https://github.com/thi-ng/umbrella/tree/master/packages/hdom),\nbut has been extracted to remain more focused.\n+### Important\n+\n+The functions provided here do produce valid hiccup elements, but\n+since none of them make use of (or support) the global hiccup / hdom\n+context object, they can ONLY be invoked directly, i.e. they MUST be\n+called like:\n+\n+```ts\n+// correct (direct invocation)\n+svg.svg(svg.circle([0, 0], 100, { fill: \"red\" }));\n+\n+// incorrect / unsupported (lazy evaluation)\n+[svg.svg, [svg.circle, [0, 0], 100, { fill: \"red\" }]]\n+```\n+\n## Installation\n```\n",
"new_path": "packages/hiccup-svg/README.md",
"old_path": "packages/hiccup-svg/README.md"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
docs(hiccup-svg): resolve #19, update readme, add invocation notes
BREAKING CHANGE: technically identical to previous version, however
due to breaking changes and new context support in @thi.ng/hiccup,
SVG functions MUST be invoked directly now and do not support lazy
evaluation anymore. see notice in readme.
| 1
|
docs
|
hiccup-svg
|
679,913
|
13.05.2018 13:10:00
| -3,600
|
67015ce96ac86198dcc29911b84c539faf5bdc09
|
refactor(examples): update svg examples
|
[
{
"change_type": "MODIFY",
"diff": "\"@thi.ng/hiccup-svg\": \"latest\",\n\"@thi.ng/pointfree\": \"latest\",\n\"@thi.ng/pointfree-lang\": \"latest\"\n+ },\n+ \"devDependencies\": {\n+ \"typescript\": \"^2.8.3\"\n}\n}\n\\ No newline at end of file\n",
"new_path": "examples/pointfree-svg/package.json",
"old_path": "examples/pointfree-svg/package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,7 +15,7 @@ const libsrc = `\n: addshape ( s -- ) @shapes pushl drop ;\n( creates hiccup element with 2 args & shape type )\n-: shape2 ( a b type -- ) -rot vec3 addshape;\n+: shape2 ( a b type -- ) -rot vec3 execjs addshape;\n( transforms 2 points into a svg line )\n: line ( a b -- ) @svg.line shape2 ;\n@@ -57,9 +57,17 @@ const usersrc = `\ngrid circlegrid\n( create SVG root element in hiccup format )\n-[@svg.svgdoc {width: 200, height: 200, stroke: \"#f04\", fill: \"none\"}]\n-( concat with generated shapes )\n+[@svg.svg {width: 200, height: 200, stroke: \"#f04\", fill: \"none\"}]\n+\n+( concat generated shapes )\n@shapes cat\n+\n+(\n+ execute entire quotation as JS function,\n+ i.e call @svg.svg with all remaining values in quot / array\n+)\n+execjs\n+\n( serialize hiccup format to SVG and write to disk )\nserialize swap write-file\n`;\n@@ -70,7 +78,7 @@ const env = ffi(\n{\n\"svg.line\": svg.line,\n\"svg.circle\": svg.circle,\n- \"svg.svgdoc\": svg.svgdoc,\n+ \"svg.svg\": svg.svg,\nshapes: [],\n},\n// foreign function interface (FFI)\n",
"new_path": "examples/pointfree-svg/src/index.ts",
"old_path": "examples/pointfree-svg/src/index.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { svgdoc } from \"@thi.ng/hiccup-svg/doc\";\n+import { svg } from \"@thi.ng/hiccup-svg/svg\";\nimport { group } from \"@thi.ng/hiccup-svg/group\";\nimport { rect } from \"@thi.ng/hiccup-svg/rect\";\nimport { EventBus } from \"@thi.ng/interceptors/event-bus\";\n@@ -80,7 +80,7 @@ const rotate = node(map(\n*/\nconst createSVG = node(map(\n({ shapes, cols, rows, stroke }) =>\n- svgdoc(\n+ svg(\n{\nclass: \"w-100 h-100\",\npreserveAspectRatio: \"xMidYMid\",\n",
"new_path": "examples/rstream-grid/src/dataflow.ts",
"old_path": "examples/rstream-grid/src/dataflow.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { svgdoc } from \"@thi.ng/hiccup-svg/doc\";\n+import { svg } from \"@thi.ng/hiccup-svg/svg\";\nimport { defs } from \"@thi.ng/hiccup-svg/defs\";\nimport { linearGradient } from \"@thi.ng/hiccup-svg/gradients\";\nimport { polyline } from \"@thi.ng/hiccup-svg/polyline\";\n@@ -31,7 +31,7 @@ export function waveform(ctx: AppContext, opts: WaveformOpts) {\nconst phase = opts.phase * Math.PI / 180;\nconst amp = opts.amp * 50;\nconst fscale = 1 / opts.res * TAU * opts.freq;\n- return svgdoc(\n+ return svg(\n{ ...ctx.ui.waveform, viewBox: `0 -5 ${opts.res} 10` },\ndefs(\nlinearGradient(\n",
"new_path": "examples/svg-waveform/src/components/waveform.ts",
"old_path": "examples/svg-waveform/src/components/waveform.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(examples): update svg examples
| 1
|
refactor
|
examples
|
679,913
|
13.05.2018 15:30:49
| -3,600
|
644d1ffe61bf3200e0b2c6fefca6d777cc8f6bf9
|
docs(hdom): update readme example
|
[
{
"change_type": "MODIFY",
"diff": "-import { start } from \"@thi.ng/hdom\";\n+import * as hdom from \"@thi.ng/hdom\";\n// stateless component w/ params\n// the first arg is an auto-injected context object\n@@ -17,4 +17,9 @@ const app = () => {\nreturn [\"div#app\", [greeter, \"world\"], counter(), counter(100)];\n};\n-start(document.body, app());\n+// start update loop (browser only, see diagram below)\n+hdom.start(document.body, app());\n+\n+// alternatively apply DOM tree only once\n+// (stateful components won't update though)\n+// hdom.createDOM(document.body, hdom.normalizeTree(app()));\n",
"new_path": "examples/hdom-basics/src/index.ts",
"old_path": "examples/hdom-basics/src/index.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -8,6 +8,7 @@ This project is part of the\n<!-- TOC depthFrom:2 depthTo:3 -->\n- [About](#about)\n+ - [Minimal example](#minimal-example)\n- [Component tree translation](#component-tree-translation)\n- [Event & state handling options](#event--state-handling-options)\n- [Reusable components](#reusable-components)\n@@ -48,7 +49,8 @@ closures, iterators), based on\ndocument components\n- Clean, functional component composition and reuse\n- No pre-processing / pre-compilation steps\n-- [Supports SVG](https://github.com/thi-ng/umbrella/treeSupports SVG),\n+- [Supports\n+ SVG](https://github.com/thi-ng/umbrella/tree/master/packages/hiccup-svg),\narbitrary elements, attributes, events\n- Less verbose than HTML / JSX, resulting in smaller file sizes\n- Static components can be distributed as JSON (or [transform JSON\n@@ -72,11 +74,15 @@ Also see the [work-in-progress\nADRs](https://github.com/thi-ng/umbrella/tree/master/packages/hdom-components/adr/)\nfor component configuration.\n+### Minimal example\n+\n```typescript\nimport * as hdom from \"@thi.ng/hdom\";\n// stateless component w/ params\n-const greeter = (name) => [\"h1.title\", \"hello \", name];\n+// the first arg is an auto-injected context object\n+// (not used here, see `hdom-context-basics` example for details)\n+const greeter = (_, name) => [\"h1.title\", \"hello \", name];\n// component w/ local state\nconst counter = (i = 0) => {\n@@ -84,8 +90,9 @@ const counter = (i = 0) => {\n};\nconst app = () => {\n+ // initialization steps\n+ // ...\n// root component is just a static array\n- // instantiate counters w/ different start offsets\nreturn [\"div#app\", [greeter, \"world\"], counter(), counter(100)];\n};\n",
"new_path": "packages/hdom/README.md",
"old_path": "packages/hdom/README.md"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
docs(hdom): update readme example
| 1
|
docs
|
hdom
|
679,913
|
14.05.2018 02:05:28
| -3,600
|
5e72970170e28e39574bf2aa503db418d62759d0
|
feat(interceptors): update dispatch() / dispatchNow()
add support for mutliple events to be dispatched
update doc strings
|
[
{
"change_type": "MODIFY",
"diff": "@@ -46,8 +46,8 @@ export interface Event extends Array<any> {\nexport interface IDispatch {\nreadonly state: ReadonlyAtom<any>;\n- dispatch(event: Event);\n- dispatchNow(event: Event);\n+ dispatch(...event: Event[]);\n+ dispatchNow(...event: Event[]);\ndispatchLater(event: Event, delay?: number);\n}\n",
"new_path": "packages/interceptors/src/api.ts",
"old_path": "packages/interceptors/src/api.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -303,30 +303,36 @@ export class StatelessEventBus implements\n}\n/**\n- * Adds given event to event queue to be processed by\n- * `processQueue()` later on.\n+ * Adds given events to event queue to be processed by\n+ * `processQueue()` later on. It's the user's responsibility to call\n+ * that latter function repeatedly in a timely manner, preferably\n+ * via `requestAnimationFrame()` or similar.\n*\n* @param e\n*/\n- dispatch(e: api.Event) {\n- this.eventQueue.push(e);\n+ dispatch(...e: api.Event[]) {\n+ this.eventQueue.push(...e);\n}\n/**\n- * Adds given event to whatever is the current event queue. If\n- * triggered via the `FX_DISPATCH_NOW` side effect the event will\n- * still be executed in the currently active batch. If called from\n- * elsewhere, the result is the same as calling `dispatch()`.\n+ * Adds given events to whatever is the current event queue. If\n+ * triggered via the `FX_DISPATCH_NOW` side effect from an event\n+ * handler / interceptor, the event will still be executed in the\n+ * currently active batch / frame. If called from elsewhere, the\n+ * result is the same as calling `dispatch()`.\n*\n* @param e\n*/\n- dispatchNow(e: api.Event) {\n- (this.currQueue || this.eventQueue).push(e);\n+ dispatchNow(...e: api.Event[]) {\n+ (this.currQueue || this.eventQueue).push(...e);\n}\n/**\n- * Dispatches given event after `delay` milliseconds\n- * (by default 17).\n+ * Dispatches given event after `delay` milliseconds (by default\n+ * 17). Note: Since events are only processed by calling\n+ * `processQueue()`, it's the user's responsibility to call that\n+ * latter function repeatedly in a timely manner, preferably via\n+ * `requestAnimationFrame()` or similar.\n*\n* @param e\n* @param delay\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): update dispatch() / dispatchNow()
- add support for mutliple events to be dispatched
- update doc strings
| 1
|
feat
|
interceptors
|
679,913
|
14.05.2018 02:22:12
| -3,600
|
6661fc3ae2b2666121477576234b80f2534ee7b8
|
feat(examples): add hdom-dropdown example
|
[
{
"change_type": "ADD",
"diff": "+node_modules\n+yarn.lock\n+*.js\n",
"new_path": "examples/hdom-dropdown/.gitignore",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+# hdom-dropdown\n+\n+[Live demo](http://demo.thi.ng/umbrella/hdom-dropdown/)\n+\n+```\n+git clone https://github.com/thi-ng/umbrella.git\n+cd umbrella/examples/hdom-dropdown\n+yarn install\n+yarn start\n+```\n+\n+## Authors\n+\n+- Karsten Schmidt\n+\n+## License\n+\n+© 2018 Karsten Schmidt // Apache Software License 2.0\n",
"new_path": "examples/hdom-dropdown/README.md",
"old_path": null
},
{
"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>hdom-dropdown</title>\n+ <link href=\"https://unpkg.com/tachyons@4.9.1/css/tachyons.min.css\" rel=\"stylesheet\">\n+ <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.0.12/css/all.css\" integrity=\"sha384-G0fIWCsCzJIMAVNQPfjH08cyYaUtMwjJwqiRKxxE/rx96Uroj1BtIQ6MLJuheaO9\"\n+ crossorigin=\"anonymous\">\n+ <style>\n+ </style>\n+</head>\n+\n+<body>\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/hdom-dropdown/index.html",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"hdom-dropdown\",\n+ \"version\": \"0.0.1\",\n+ \"repository\": \"https://github.com/thi-ng/umbrella\",\n+ \"author\": \"Karsten Schmidt <k+npm@thi.ng>\",\n+ \"license\": \"Apache-2.0\",\n+ \"scripts\": {\n+ \"build\": \"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.3.0\",\n+ \"typescript\": \"^2.8.3\",\n+ \"webpack\": \"^4.8.1\",\n+ \"webpack-cli\": \"^2.1.3\",\n+ \"webpack-dev-server\": \"^3.1.4\"\n+ },\n+ \"dependencies\": {\n+ \"@thi.ng/api\": \"latest\",\n+ \"@thi.ng/hdom\": \"latest\",\n+ \"@thi.ng/hdom-components\": \"latest\",\n+ \"@thi.ng/interceptors\": \"latest\",\n+ \"@thi.ng/paths\": \"latest\"\n+ }\n+}\n\\ No newline at end of file\n",
"new_path": "examples/hdom-dropdown/package.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export const state = {\n+ foo: {\n+ open: false,\n+ items: [\n+ \"Action\", \"Animation\", \"Comedy\", \"Crime\", \"Documentary\",\n+ \"Drama\", \"Fantasy\", \"Horror\", \"Kids\", \"Romance\",\n+ \"Sci-Fi\", \"Sport\", \"Thriller\", \"War\", \"Western\"\n+ ].map((x, i) => [i, x])\n+ },\n+ bar: {\n+ open: false,\n+ items: [\n+ \"Africa\",\n+ \"Asia\",\n+ \"Caribbean\",\n+ \"Central America\",\n+ \"Europe\",\n+ \"Middle East\",\n+ \"North America\",\n+ \"Oceania\",\n+ \"South America\"\n+ ].map((x, i) => [i, x])\n+ }\n+};\n+\n+export const theme = {\n+ root: {\n+ class: \"sans-serif\"\n+ },\n+ column: {\n+ class: \"fl w-100 w-50-ns w-33-l pa2\"\n+ },\n+ dd: {\n+ root: { class: \"\" },\n+ bodyClosed: {\n+ style: {\n+ \"max-height\": 0,\n+ \"overflow-y\": \"hidden\",\n+ opacity: 0\n+ }\n+ },\n+ bodyOpen: {\n+ style: {\n+ \"max-height\": \"calc(11 * 1.8rem)\",\n+ \"overflow-y\": \"scroll\",\n+ opacity: 1,\n+ transition: \"all 100ms ease-in\"\n+ }\n+ },\n+ item: { class: \"pointer link db w-100 ph3 pv2 black hover-bg-washed-green bg-animate bb b--moon-gray\" },\n+ itemSelected: { class: \"pointer link db w-100 ph3 pv2 black hover-bg-light-gray bg-animate bb b--moon-gray b\" },\n+ }\n+};\n",
"new_path": "examples/hdom-dropdown/src/config.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { IObjectOf } from \"@thi.ng/api/api\";\n+import { ReadonlyAtom } from \"@thi.ng/atom/api\";\n+import { appLink } from \"@thi.ng/hdom-components/link\";\n+import { EV_SET_VALUE, EV_TOGGLE_VALUE } from \"@thi.ng/interceptors/api\";\n+import { EventBus } from \"@thi.ng/interceptors/event-bus\";\n+import { getIn, Path } from \"@thi.ng/paths\";\n+\n+export interface BaseContext {\n+ bus: EventBus;\n+ state: ReadonlyAtom<any>;\n+}\n+\n+export interface DropdownArgs {\n+ state: DropdownState;\n+ statePath: Path;\n+ ontoggle: EventListener;\n+ onchange: (id: any) => EventListener;\n+ attribs: IObjectOf<any>;\n+ hoverLabel: any;\n+ onmouseover: EventListener;\n+ onmouseleave: EventListener;\n+}\n+\n+export interface DropdownState {\n+ open: boolean;\n+ hover: boolean;\n+ selected: any;\n+ items: [any, any][];\n+}\n+\n+export interface DropdownTheme {\n+ root: IObjectOf<any>;\n+ bodyOpen: IObjectOf<any>;\n+ bodyClosed: IObjectOf<any>;\n+ item: IObjectOf<any>;\n+ itemSelected: IObjectOf<any>;\n+}\n+\n+export function dropdown(themeCtxPath: Path) {\n+ return (ctx: any, opts: Partial<DropdownArgs>) => {\n+ const ui: DropdownTheme = getIn(ctx, themeCtxPath);\n+ const state = opts.statePath ? getIn(ctx, opts.statePath) : opts.state;\n+ const hattribs = {\n+ onmouseover: opts.onmouseover,\n+ onmouseleave: opts.onmouseleave,\n+ };\n+ return state.open ?\n+ [\"div\", ui.root,\n+ [appLink, { ...hattribs, ...ui.itemSelected }, opts.ontoggle, opts.hoverLabel],\n+ [\"div\", ui.bodyOpen,\n+ state.items.map(\n+ (x) => appLink(null, x[0] === state.selected ? ui.itemSelected : ui.item, opts.onchange(x[0]), x[1])\n+ )]] :\n+ [\"div\", ui.root,\n+ [appLink, { ...hattribs, ...ui.item }, opts.ontoggle,\n+ state.hover ?\n+ opts.hoverLabel :\n+ (state.items.find((x) => x[0] === state.selected) ||\n+ [, opts.hoverLabel])[1]],\n+ [\"div\", ui.bodyClosed]];\n+ };\n+}\n+\n+export const dropdownListeners = (ctx: BaseContext, basePath: PropertyKey[]) => ({\n+ onmouseover: () => ctx.bus.dispatch([EV_SET_VALUE, [[...basePath, \"hover\"], true]]),\n+ onmouseleave: () => ctx.bus.dispatch([EV_SET_VALUE, [[...basePath, \"hover\"], false]]),\n+ ontoggle: () => ctx.bus.dispatch([EV_TOGGLE_VALUE, [...basePath, \"open\"]]),\n+ onchange: (x) => () => {\n+ ctx.bus.dispatch(\n+ [EV_SET_VALUE, [[...basePath, \"selected\"], x]],\n+ [EV_SET_VALUE, [[...basePath, \"open\"], false]]\n+ );\n+ }\n+});\n",
"new_path": "examples/hdom-dropdown/src/dropdown.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { Atom } from \"@thi.ng/atom/atom\";\n+import { start } from \"@thi.ng/hdom/start\";\n+import { EventBus } from \"@thi.ng/interceptors/event-bus\";\n+import { trace } from \"@thi.ng/interceptors/interceptors\";\n+\n+import { state, theme } from \"./config\";\n+import { dropdown, dropdownListeners } from \"./dropdown\";\n+\n+const bus = new EventBus(new Atom(state));\n+bus.instrumentWith([trace]);\n+\n+const dd = dropdown(\"theme.dd\");\n+\n+start(\"app\",\n+ (ctx) => {\n+ bus.processQueue();\n+ return [\"div\", ctx.theme.root,\n+ [\"div\", ctx.theme.column,\n+ [dd, {\n+ ...dropdownListeners(ctx, [\"foo\"]),\n+ state: ctx.bus.state.deref().foo,\n+ hoverLabel: [[\"span\", \"Choose a genre...\"], [\"i.fr.fas.fa-angle-down\"]]\n+ }]],\n+ [\"div\", ctx.theme.column,\n+ [dd, {\n+ ...dropdownListeners(ctx, [\"bar\"]),\n+ state: ctx.bus.state.deref().bar,\n+ hoverLabel: [[\"span\", \"Region...\"], [\"i.fr.fas.fa-angle-down\"]]\n+ }]],\n+ ];\n+ },\n+ { bus, theme });\n",
"new_path": "examples/hdom-dropdown/src/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"extends\": \"../../tsconfig.json\",\n+ \"compilerOptions\": {\n+ \"outDir\": \".\"\n+ },\n+ \"include\": [\n+ \"./src/**/*.ts\"\n+ ]\n+}\n",
"new_path": "examples/hdom-dropdown/tsconfig.json",
"old_path": null
},
{
"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/hdom-dropdown/webpack.config.js",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(examples): add hdom-dropdown example
| 1
|
feat
|
examples
|
807,849
|
14.05.2018 09:41:50
| 25,200
|
8b04c723c97c873ad4604d300d22ef22965f49b4
|
chore: bump runtime versions
|
[
{
"change_type": "MODIFY",
"diff": "}\n},\n\"clone\": {\n- \"version\": \"1.0.3\",\n- \"resolved\": \"https://registry.npmjs.org/clone/-/clone-1.0.3.tgz\",\n- \"integrity\": \"sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=\"\n+ \"version\": \"1.0.4\",\n+ \"resolved\": \"https://registry.npmjs.org/clone/-/clone-1.0.4.tgz\",\n+ \"integrity\": \"sha1-2jCcwmPfFZlMaIypAheco8fNfH4=\"\n},\n\"cmd-shim\": {\n\"version\": \"2.0.2\",\n}\n},\n\"conventional-changelog-core\": {\n- \"version\": \"2.0.5\",\n- \"resolved\": \"https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-2.0.5.tgz\",\n- \"integrity\": \"sha512-lP1s7Z3NyEFcG78bWy7GG7nXsq9OpAJgo2xbyAlVBDweLSL5ghvyEZlkEamnAQpIUVK0CAVhs8nPvCiQuXT/VA==\",\n+ \"version\": \"2.0.11\",\n+ \"resolved\": \"https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-2.0.11.tgz\",\n+ \"integrity\": \"sha512-HvTE6RlqeEZ/NFPtQeFLsIDOLrGP3bXYr7lFLMhCVsbduF1MXIe8OODkwMFyo1i9ku9NWBwVnVn0jDmIFXjDRg==\",\n\"requires\": {\n- \"conventional-changelog-writer\": \"^3.0.4\",\n- \"conventional-commits-parser\": \"^2.1.5\",\n+ \"conventional-changelog-writer\": \"^3.0.9\",\n+ \"conventional-commits-parser\": \"^2.1.7\",\n\"dateformat\": \"^3.0.0\",\n\"get-pkg-repo\": \"^1.0.0\",\n- \"git-raw-commits\": \"^1.3.4\",\n+ \"git-raw-commits\": \"^1.3.6\",\n\"git-remote-origin-url\": \"^2.0.0\",\n- \"git-semver-tags\": \"^1.3.4\",\n+ \"git-semver-tags\": \"^1.3.6\",\n\"lodash\": \"^4.2.1\",\n\"normalize-package-data\": \"^2.3.5\",\n\"q\": \"^1.5.1\",\n}\n},\n\"conventional-changelog-preset-loader\": {\n- \"version\": \"1.1.6\",\n- \"resolved\": \"https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.6.tgz\",\n- \"integrity\": \"sha512-yWPIP9wwsCKeUSPYApnApWhKIDjWRIX/uHejGS1tYfEsQR/bwpDFET7LYiHT+ujNbrlf6h1s3NlPGheOd4yJRQ==\"\n+ \"version\": \"1.1.8\",\n+ \"resolved\": \"https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.8.tgz\",\n+ \"integrity\": \"sha512-MkksM4G4YdrMlT2MbTsV2F6LXu/hZR0Tc/yenRrDIKRwBl/SP7ER4ZDlglqJsCzLJi4UonBc52Bkm5hzrOVCcw==\"\n},\n\"conventional-changelog-writer\": {\n- \"version\": \"3.0.4\",\n- \"resolved\": \"https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-3.0.4.tgz\",\n- \"integrity\": \"sha512-EUf/hWiEj3IOa5Jk8XDzM6oS0WgijlYGkUfLc+mDnLH9RwpZqhYIBwgJHWHzEB4My013wx2FhmUu45P6tQrucw==\",\n+ \"version\": \"3.0.9\",\n+ \"resolved\": \"https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz\",\n+ \"integrity\": \"sha512-n9KbsxlJxRQsUnK6wIBRnARacvNnN4C/nxnxCkH+B/R1JS2Fa+DiP1dU4I59mEDEjgnFaN2+9wr1P1s7GYB5/Q==\",\n\"requires\": {\n\"compare-func\": \"^1.3.1\",\n- \"conventional-commits-filter\": \"^1.1.5\",\n+ \"conventional-commits-filter\": \"^1.1.6\",\n\"dateformat\": \"^3.0.0\",\n\"handlebars\": \"^4.0.2\",\n\"json-stringify-safe\": \"^5.0.1\",\n}\n},\n\"conventional-commits-filter\": {\n- \"version\": \"1.1.5\",\n- \"resolved\": \"https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.5.tgz\",\n- \"integrity\": \"sha512-mj3+WLj8UZE72zO9jocZjx8+W4Bwnx/KHoIz1vb4F8XUXj0XSjp8Y3MFkpRyIpsRiCBX+DkDjxGKF/nfeu7BGw==\",\n+ \"version\": \"1.1.6\",\n+ \"resolved\": \"https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz\",\n+ \"integrity\": \"sha512-KcDgtCRKJCQhyk6VLT7zR+ZOyCnerfemE/CsR3iQpzRRFbLEs0Y6rwk3mpDvtOh04X223z+1xyJ582Stfct/0Q==\",\n\"requires\": {\n\"is-subset\": \"^0.1.1\",\n\"modify-values\": \"^1.0.0\"\n}\n},\n\"conventional-commits-parser\": {\n- \"version\": \"2.1.5\",\n- \"resolved\": \"https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.5.tgz\",\n- \"integrity\": \"sha512-jaAP61py+ISMF3/n3yIiIuY5h6mJlucOqawu5mLB1HaQADLvg/y5UB3pT7HSucZJan34lp7+7ylQPfbKEGmxrA==\",\n+ \"version\": \"2.1.7\",\n+ \"resolved\": \"https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz\",\n+ \"integrity\": \"sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==\",\n\"requires\": {\n\"JSONStream\": \"^1.0.4\",\n\"is-text-path\": \"^1.0.0\",\n}\n},\n\"conventional-recommended-bump\": {\n- \"version\": \"2.0.6\",\n- \"resolved\": \"https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-2.0.6.tgz\",\n- \"integrity\": \"sha512-deb55+yFNqNjWvIU8Xe6EJZnp09/Q014rmJmGX3VtnIczyb8rD+RhGXpV5Mene6BFrlGuyHRlsn5e6kYXoIyOw==\",\n+ \"version\": \"2.0.9\",\n+ \"resolved\": \"https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-2.0.9.tgz\",\n+ \"integrity\": \"sha512-YE6/o+648qkX3fTNvfBsvPW3tSnbZ6ec3gF0aBahCPgyoVHU2Mw0nUAZ1h1UN65GazpORngrgRC8QCltNYHPpQ==\",\n\"requires\": {\n\"concat-stream\": \"^1.6.0\",\n- \"conventional-changelog-preset-loader\": \"^1.1.6\",\n- \"conventional-commits-filter\": \"^1.1.5\",\n- \"conventional-commits-parser\": \"^2.1.5\",\n- \"git-raw-commits\": \"^1.3.4\",\n- \"git-semver-tags\": \"^1.3.4\",\n+ \"conventional-changelog-preset-loader\": \"^1.1.8\",\n+ \"conventional-commits-filter\": \"^1.1.6\",\n+ \"conventional-commits-parser\": \"^2.1.7\",\n+ \"git-raw-commits\": \"^1.3.6\",\n+ \"git-semver-tags\": \"^1.3.6\",\n\"meow\": \"^4.0.0\",\n\"q\": \"^1.5.1\"\n}\n\"integrity\": \"sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=\"\n},\n\"deep-extend\": {\n- \"version\": \"0.4.2\",\n- \"resolved\": \"https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz\",\n- \"integrity\": \"sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=\"\n+ \"version\": \"0.5.1\",\n+ \"resolved\": \"https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz\",\n+ \"integrity\": \"sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==\"\n},\n\"deep-is\": {\n\"version\": \"0.1.3\",\n}\n},\n\"git-raw-commits\": {\n- \"version\": \"1.3.4\",\n- \"resolved\": \"https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.4.tgz\",\n- \"integrity\": \"sha512-G3O+41xHbscpgL5nA0DUkbFVgaAz5rd57AMSIMew8p7C8SyFwZDyn08MoXHkTl9zcD0LmxsLFPxbqFY4YPbpPA==\",\n+ \"version\": \"1.3.6\",\n+ \"resolved\": \"https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz\",\n+ \"integrity\": \"sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==\",\n\"requires\": {\n\"dargs\": \"^4.0.1\",\n\"lodash.template\": \"^4.0.2\",\n}\n},\n\"git-semver-tags\": {\n- \"version\": \"1.3.4\",\n- \"resolved\": \"https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.3.4.tgz\",\n- \"integrity\": \"sha512-Xe2Z74MwXZfAezuaO6e6cA4nsgeCiARPzaBp23gma325c/OXdt//PhrknptIaynNeUp2yWtmikV7k5RIicgGIQ==\",\n+ \"version\": \"1.3.6\",\n+ \"resolved\": \"https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.3.6.tgz\",\n+ \"integrity\": \"sha512-2jHlJnln4D/ECk9FxGEBh3k44wgYdWjWDtMmJPaecjoRmxKo3Y1Lh8GMYuOPu04CHw86NTAODchYjC5pnpMQig==\",\n\"requires\": {\n\"meow\": \"^4.0.0\",\n\"semver\": \"^5.5.0\"\n}\n},\n\"inquirer\": {\n- \"version\": \"5.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/inquirer/-/inquirer-5.1.0.tgz\",\n- \"integrity\": \"sha512-kn7N70US1MSZHZHSGJLiZ7iCwwncc7b0gc68YtlX29OjI3Mp0tSVV+snVXpZ1G+ONS3Ac9zd1m6hve2ibLDYfA==\",\n+ \"version\": \"5.2.0\",\n+ \"resolved\": \"https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz\",\n+ \"integrity\": \"sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==\",\n\"requires\": {\n\"ansi-escapes\": \"^3.0.0\",\n\"chalk\": \"^2.0.0\",\n}\n},\n\"lowercase-keys\": {\n- \"version\": \"1.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz\",\n- \"integrity\": \"sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=\"\n+ \"version\": \"1.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz\",\n+ \"integrity\": \"sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==\"\n},\n\"lru-cache\": {\n\"version\": \"4.1.1\",\n}\n},\n\"meow\": {\n- \"version\": \"4.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/meow/-/meow-4.0.0.tgz\",\n- \"integrity\": \"sha512-Me/kel335m6vMKmEmA6c87Z6DUFW3JqkINRnxkbC+A/PUm0D5Fl2dEBQrPKnqCL9Te/CIa1MUt/0InMJhuC/sw==\",\n+ \"version\": \"4.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/meow/-/meow-4.0.1.tgz\",\n+ \"integrity\": \"sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==\",\n\"requires\": {\n\"camelcase-keys\": \"^4.0.0\",\n\"decamelize-keys\": \"^1.0.0\",\n}\n},\n\"modify-values\": {\n- \"version\": \"1.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/modify-values/-/modify-values-1.0.0.tgz\",\n- \"integrity\": \"sha1-4rbN65zhn5kxelNyLz2/XfXqqrI=\"\n+ \"version\": \"1.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz\",\n+ \"integrity\": \"sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==\"\n},\n\"moment\": {\n\"version\": \"2.22.1\",\n}\n},\n\"npm-lifecycle\": {\n- \"version\": \"2.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-2.0.0.tgz\",\n- \"integrity\": \"sha512-aE7H012O01GKXT9BWnsGMLVci+MOgkhpSwq02ok20aXcNHxFs7enfampNMkiOV1DJEU0LynzemwdjbtXahXKcw==\",\n+ \"version\": \"2.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-2.0.1.tgz\",\n+ \"integrity\": \"sha512-6CypRO6iNsSfrWOUajeQnesouUgkeh7clByYDORUV6AhwRaGfHYh+5rFdDCIqzmMqomGlyDsSpazthNPG2BAOA==\",\n\"requires\": {\n\"byline\": \"^5.0.0\",\n\"graceful-fs\": \"^4.1.11\",\n\"uid-number\": \"0.0.6\",\n\"umask\": \"^1.1.0\",\n\"which\": \"^1.3.0\"\n- },\n- \"dependencies\": {\n- \"resolve-from\": {\n- \"version\": \"4.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz\",\n- \"integrity\": \"sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==\"\n- }\n}\n},\n\"npm-package-arg\": {\n- \"version\": \"6.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.0.0.tgz\",\n- \"integrity\": \"sha512-hwC7g81KLgRmchv9ol6f3Fx4Yyc9ARX5X5niDHVILgpuvf08JRIgOZcEfpFXli3BgESoTrkauqorXm6UbvSgSg==\",\n+ \"version\": \"6.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz\",\n+ \"integrity\": \"sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==\",\n\"requires\": {\n- \"hosted-git-info\": \"^2.5.0\",\n- \"osenv\": \"^0.1.4\",\n- \"semver\": \"^5.4.1\",\n+ \"hosted-git-info\": \"^2.6.0\",\n+ \"osenv\": \"^0.1.5\",\n+ \"semver\": \"^5.5.0\",\n\"validate-npm-package-name\": \"^3.0.0\"\n+ },\n+ \"dependencies\": {\n+ \"hosted-git-info\": {\n+ \"version\": \"2.6.0\",\n+ \"resolved\": \"https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz\",\n+ \"integrity\": \"sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==\"\n+ }\n}\n},\n\"npm-run-path\": {\n\"integrity\": \"sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=\"\n},\n\"osenv\": {\n- \"version\": \"0.1.4\",\n- \"resolved\": \"https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz\",\n- \"integrity\": \"sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=\",\n+ \"version\": \"0.1.5\",\n+ \"resolved\": \"https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz\",\n+ \"integrity\": \"sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==\",\n\"requires\": {\n\"os-homedir\": \"^1.0.0\",\n\"os-tmpdir\": \"^1.0.0\"\n}\n},\n\"rc\": {\n- \"version\": \"1.2.5\",\n- \"resolved\": \"https://registry.npmjs.org/rc/-/rc-1.2.5.tgz\",\n- \"integrity\": \"sha1-J1zWh/bjs2zHVrqibf7oCnkDAf0=\",\n+ \"version\": \"1.2.7\",\n+ \"resolved\": \"https://registry.npmjs.org/rc/-/rc-1.2.7.tgz\",\n+ \"integrity\": \"sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==\",\n\"requires\": {\n- \"deep-extend\": \"~0.4.0\",\n+ \"deep-extend\": \"^0.5.1\",\n\"ini\": \"~1.3.0\",\n\"minimist\": \"^1.2.0\",\n\"strip-json-comments\": \"~2.0.1\"\n}\n},\n\"read-package-tree\": {\n- \"version\": \"5.1.6\",\n- \"resolved\": \"https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.6.tgz\",\n- \"integrity\": \"sha512-FCX1aT3GWyY658wzDICef4p+n0dB+ENRct8E/Qyvppj6xVpOYerBHfUu7OP5Rt1/393Tdglguf5ju5DEX4wZNg==\",\n+ \"version\": \"5.2.1\",\n+ \"resolved\": \"https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.2.1.tgz\",\n+ \"integrity\": \"sha512-2CNoRoh95LxY47LvqrehIAfUVda2JbuFE/HaGYs42bNrGG+ojbw1h3zOcPcQ+1GQ3+rkzNndZn85u1XyZ3UsIA==\",\n\"requires\": {\n\"debuglog\": \"^1.0.1\",\n\"dezalgo\": \"^1.0.0\",\n}\n},\n\"rxjs\": {\n- \"version\": \"5.5.6\",\n- \"resolved\": \"https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz\",\n- \"integrity\": \"sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==\",\n+ \"version\": \"5.5.10\",\n+ \"resolved\": \"https://registry.npmjs.org/rxjs/-/rxjs-5.5.10.tgz\",\n+ \"integrity\": \"sha512-SRjimIDUHJkon+2hFo7xnvNC4ZEHGzCRwh9P7nzX3zPkCGFEg/tuElrNR7L/rZMagnK2JeH2jQwPRpmyXyLB6A==\",\n\"requires\": {\n\"symbol-observable\": \"1.0.1\"\n}\n",
"new_path": "package-lock.json",
"old_path": "package-lock.json"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
chore: bump runtime versions
| 1
|
chore
| null |
730,413
|
14.05.2018 10:29:53
| 14,400
|
7a290590a6fc879bff58294b10daaa090745075b
|
test(journeys): update recents tests for new list classes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -4,7 +4,8 @@ import waitForPromise from '../../wait-for-promise';\nexport const elements = {\nrecentsWidget: '.ciscospark-spaces-list-wrapper',\n- firstSpace: '.space-item:first-child',\n+ listContainer: '.ciscospark-spaces-list',\n+ firstSpace: '.ciscospark-spaces-list-item-0',\ntitle: '.space-title',\nunreadIndicator: '.space-unread-indicator',\nlastActivity: '.space-last-activity',\n@@ -29,9 +30,9 @@ export function displayIncomingMessage(aBrowser, sender, conversation, message,\nwaitForPromise(sender.spark.internal.conversation.post(conversation, {\ndisplayName: message\n}));\n- aBrowser.waitUntil(() => aBrowser.getText(`${elements.firstSpace} ${elements.title}`) === spaceTitle);\n- aBrowser.waitUntil(() => aBrowser.getText(`${elements.firstSpace} ${elements.lastActivity}`).includes(message));\n- assert.isTrue(aBrowser.isVisible(`${elements.firstSpace} ${elements.unreadIndicator}`), 'does not have unread indicator');\n+ aBrowser.waitUntil(() => aBrowser.element(`${elements.firstSpace} ${elements.title}`).getText() === spaceTitle);\n+ aBrowser.waitUntil(() => aBrowser.element(`${elements.firstSpace} ${elements.lastActivity}`).getText().includes(message));\n+ assert.isTrue(aBrowser.element(`${elements.firstSpace} ${elements.unreadIndicator}`).isVisible(), 'does not have unread indicator');\n}\n/**\n@@ -53,11 +54,11 @@ export function displayAndReadIncomingMessage(aBrowser, sender, receiver, conver\n}).then((a) => {\nactivity = a;\n}));\n- aBrowser.waitUntil(() => aBrowser.getText(`${elements.firstSpace} ${elements.lastActivity}`).includes(message));\n+ aBrowser.waitUntil(() => aBrowser.element(`${elements.firstSpace} ${elements.lastActivity}`).getText().includes(message));\nassert.isTrue(aBrowser.element(`${elements.firstSpace} ${elements.unreadIndicator}`).isVisible(), 'does not have unread indicator');\n// Acknowledge the activity to mark it read\nwaitForPromise(receiver.spark.internal.conversation.acknowledge(conversation, activity));\n- aBrowser.waitUntil(() => !aBrowser.isVisible(`${elements.firstSpace} ${elements.unreadIndicator}`));\n+ aBrowser.waitUntil(() => !aBrowser.element(`${elements.firstSpace} ${elements.unreadIndicator}`).isVisible());\n}\n/**\n@@ -89,7 +90,7 @@ export function createSpaceAndPost(aBrowser, sender, participants, roomTitle, fi\ndisplayName: firstPost\n});\n}));\n- aBrowser.waitUntil(() => aBrowser.getText(`${elements.firstSpace} ${elements.title}`).includes(spaceTitle));\n- aBrowser.waitUntil(() => aBrowser.getText(`${elements.firstSpace} ${elements.lastActivity}`).includes(firstPost));\n+ aBrowser.waitUntil(() => aBrowser.element(`${elements.firstSpace} ${elements.title}`).getText().includes(spaceTitle));\n+ aBrowser.waitUntil(() => aBrowser.element(`${elements.firstSpace} ${elements.lastActivity}`).getText().includes(firstPost));\nreturn conversation;\n}\n",
"new_path": "test/journeys/lib/test-helpers/recents-widget/index.js",
"old_path": "test/journeys/lib/test-helpers/recents-widget/index.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
test(journeys): update recents tests for new list classes
| 1
|
test
|
journeys
|
807,849
|
14.05.2018 11:26:18
| 25,200
|
079d87371a14938122fe271d780c591c759fbbcd
|
feat: Upgrade to fs-extra 6
|
[
{
"change_type": "MODIFY",
"diff": "\"@lerna/validation-error\": \"file:../../core/validation-error\",\n\"camelcase\": \"^4.1.0\",\n\"dedent\": \"^0.7.0\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"globby\": \"^8.0.1\",\n\"init-package-json\": \"^1.10.3\",\n\"npm-package-arg\": \"^6.0.0\",\n",
"new_path": "commands/create/package.json",
"old_path": "commands/create/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"@lerna/prompt\": \"file:../../core/prompt\",\n\"@lerna/validation-error\": \"file:../../core/validation-error\",\n\"dedent\": \"^0.7.0\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"p-map-series\": \"^1.0.0\"\n}\n}\n",
"new_path": "commands/import/package.json",
"old_path": "commands/import/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"dependencies\": {\n\"@lerna/child-process\": \"file:../../core/child-process\",\n\"@lerna/command\": \"file:../../core/command\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"p-map\": \"^1.2.0\",\n\"write-json-file\": \"^2.3.0\"\n}\n",
"new_path": "commands/init/package.json",
"old_path": "commands/init/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"conventional-changelog-core\": \"^2.0.5\",\n\"conventional-recommended-bump\": \"^2.0.6\",\n\"dedent\": \"^0.7.0\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"get-stream\": \"^3.0.0\",\n\"npm-package-arg\": \"^6.0.0\",\n\"npmlog\": \"^4.1.2\",\n",
"new_path": "core/conventional-commits/package.json",
"old_path": "core/conventional-commits/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"license\": \"MIT\",\n\"dependencies\": {\n\"@lerna-test/find-fixture\": \"file:../find-fixture\",\n- \"fs-extra\": \"^5.0.0\"\n+ \"fs-extra\": \"^6.0.1\"\n}\n}\n",
"new_path": "helpers/copy-fixture/package.json",
"old_path": "helpers/copy-fixture/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"private\": true,\n\"license\": \"MIT\",\n\"dependencies\": {\n- \"fs-extra\": \"^5.0.0\"\n+ \"fs-extra\": \"^6.0.1\"\n}\n}\n",
"new_path": "helpers/update-lerna-config/package.json",
"old_path": "helpers/update-lerna-config/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"dev\": true,\n\"requires\": {\n\"@lerna-test/find-fixture\": \"file:helpers/find-fixture\",\n- \"fs-extra\": \"^5.0.0\"\n+ \"fs-extra\": \"^6.0.1\"\n}\n},\n\"@lerna-test/find-fixture\": {\n\"version\": \"file:helpers/update-lerna-config\",\n\"dev\": true,\n\"requires\": {\n- \"fs-extra\": \"^5.0.0\"\n+ \"fs-extra\": \"^6.0.1\"\n}\n},\n\"@lerna/add\": {\n\"conventional-changelog-core\": \"^2.0.5\",\n\"conventional-recommended-bump\": \"^2.0.6\",\n\"dedent\": \"^0.7.0\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"get-stream\": \"^3.0.0\",\n\"npm-package-arg\": \"^6.0.0\",\n\"npmlog\": \"^4.1.2\",\n\"@lerna/validation-error\": \"file:core/validation-error\",\n\"camelcase\": \"^4.1.0\",\n\"dedent\": \"^0.7.0\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"globby\": \"^8.0.1\",\n\"init-package-json\": \"^1.10.3\",\n\"npm-package-arg\": \"^6.0.0\",\n\"version\": \"file:utils/create-symlink\",\n\"requires\": {\n\"cmd-shim\": \"^2.0.2\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"npmlog\": \"^4.1.2\"\n}\n},\n\"@lerna/prompt\": \"file:core/prompt\",\n\"@lerna/validation-error\": \"file:core/validation-error\",\n\"dedent\": \"^0.7.0\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"p-map-series\": \"^1.0.0\"\n}\n},\n\"requires\": {\n\"@lerna/child-process\": \"file:core/child-process\",\n\"@lerna/command\": \"file:core/command\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"p-map\": \"^1.2.0\",\n\"write-json-file\": \"^2.3.0\"\n}\n\"requires\": {\n\"@lerna/child-process\": \"file:core/child-process\",\n\"@lerna/get-npm-exec-opts\": \"file:utils/get-npm-exec-opts\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"npm-package-arg\": \"^6.0.0\",\n\"npmlog\": \"^4.1.2\",\n\"signal-exit\": \"^3.0.2\",\n\"@lerna/resolve-symlink\": {\n\"version\": \"file:utils/resolve-symlink\",\n\"requires\": {\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"npmlog\": \"^4.1.2\",\n\"read-cmd-shim\": \"^1.0.1\"\n}\n\"requires\": {\n\"@lerna/create-symlink\": \"file:utils/create-symlink\",\n\"@lerna/package\": \"file:core/package\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"p-map\": \"^1.2.0\",\n\"read-pkg\": \"^3.0.0\"\n}\n\"@lerna/create-symlink\": \"file:utils/create-symlink\",\n\"@lerna/resolve-symlink\": \"file:utils/resolve-symlink\",\n\"@lerna/symlink-binary\": \"file:utils/symlink-binary\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"p-finally\": \"^1.0.0\",\n\"p-map\": \"^1.2.0\",\n\"p-map-series\": \"^1.0.0\"\n}\n},\n\"fs-extra\": {\n- \"version\": \"5.0.0\",\n- \"resolved\": \"https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz\",\n- \"integrity\": \"sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==\",\n+ \"version\": \"6.0.1\",\n+ \"resolved\": \"https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz\",\n+ \"integrity\": \"sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==\",\n\"requires\": {\n\"graceful-fs\": \"^4.1.2\",\n\"jsonfile\": \"^4.0.0\",\n",
"new_path": "package-lock.json",
"old_path": "package-lock.json"
},
{
"change_type": "MODIFY",
"diff": "},\n\"dependencies\": {\n\"cmd-shim\": \"^2.0.2\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"npmlog\": \"^4.1.2\"\n}\n}\n",
"new_path": "utils/create-symlink/package.json",
"old_path": "utils/create-symlink/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"dependencies\": {\n\"@lerna/child-process\": \"file:../../core/child-process\",\n\"@lerna/get-npm-exec-opts\": \"file:../get-npm-exec-opts\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"npm-package-arg\": \"^6.0.0\",\n\"npmlog\": \"^4.1.2\",\n\"signal-exit\": \"^3.0.2\",\n",
"new_path": "utils/npm-install/package.json",
"old_path": "utils/npm-install/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"test\": \"echo \\\"Run tests from root\\\" && exit 1\"\n},\n\"dependencies\": {\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"npmlog\": \"^4.1.2\",\n\"read-cmd-shim\": \"^1.0.1\"\n}\n",
"new_path": "utils/resolve-symlink/package.json",
"old_path": "utils/resolve-symlink/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"dependencies\": {\n\"@lerna/create-symlink\": \"file:../create-symlink\",\n\"@lerna/package\": \"file:../../core/package\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"p-map\": \"^1.2.0\",\n\"read-pkg\": \"^3.0.0\"\n}\n",
"new_path": "utils/symlink-binary/package.json",
"old_path": "utils/symlink-binary/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"@lerna/create-symlink\": \"file:../create-symlink\",\n\"@lerna/resolve-symlink\": \"file:../resolve-symlink\",\n\"@lerna/symlink-binary\": \"file:../symlink-binary\",\n- \"fs-extra\": \"^5.0.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"p-finally\": \"^1.0.0\",\n\"p-map\": \"^1.2.0\",\n\"p-map-series\": \"^1.0.0\"\n",
"new_path": "utils/symlink-dependencies/package.json",
"old_path": "utils/symlink-dependencies/package.json"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
feat: Upgrade to fs-extra 6
| 1
|
feat
| null |
679,913
|
14.05.2018 12:46:33
| -3,600
|
2076d25b84bddb96fcb5a9d6104fda834597918a
|
docs(resolve-map): add readme example
|
[
{
"change_type": "MODIFY",
"diff": "@@ -8,7 +8,9 @@ This project is part of the\n## About\nDAG resolution of vanilla objects & arrays with internally linked\n-values.\n+values. This is useful for expressing complex configurations with\n+derived values or computing interrelated values without having to\n+specify the order of computations.\nIt's common practice to use nested JS objects for configuration\npurposes. Frequently some values in the object are copies or derivatives\n@@ -16,7 +18,7 @@ of other values, which can lead to mistakes during refactoring and / or\nduplication of effort.\nTo avoid these issues, this library provides the ability to define\n-single sources of truth, create references (links) to these values and a\n+single sources of truth, create references (links) to these values and\nprovide a resolution mechanism to recursively expand their real values\nand / or compute derived values. Both absolute & relative references are\nsupported.\n@@ -87,6 +89,61 @@ yarn add @thi.ng/resolve-map\n## Usage examples\n+### Statistical analysis\n+\n+In this example we construct a graph to compute a number of statistical\n+properties of some numeric input array. The graph is a plain object of\n+possibly dependent functions, which can be specified in any order. Each\n+function accepts a \"resolver\" function as argument (`$`) to look up and\n+execute other computations. Each computation is only executed once.\n+\n+```ts\n+import { resolveMap } from \"@thi.ng/resolve-map\";\n+import * as tx from \"@thi.ng/transducers\";\n+\n+// define object of interrelated computations\n+// the `$` arg passed to each fn is the resolver\n+// the `src` key is still missing here and will be\n+// provided later\n+const stats = {\n+ // sequence average\n+ mean: ($) => tx.reduce(tx.mean(), $(\"src\")),\n+ // sequence range\n+ range: ($) => $(\"max\") - $(\"min\"),\n+ // computes sequence min val\n+ min: ($) => tx.reduce(tx.min(), $(\"src\")),\n+ // computes sequence max val\n+ max: ($) => tx.reduce(tx.max(), $(\"src\")),\n+ // standard deviation\n+ sd: ($)=> {\n+ const src = $(\"src\");\n+ const mean = $(\"mean\");\n+ return Math.sqrt(\n+ tx.transduce(tx.map((x) => Math.pow(x - mean, 2)), tx.add(), src) /\n+ (src.length - 1)\n+ );\n+ }\n+};\n+\n+// inject some source data to analyze\n+// Note: we wrap the data as function to avoid `resolveMap` attempting\n+// to resolve each array item\n+// Note 2: If the `stats` graph is meant to be re-usable in the future\n+// you MUST use the spread operator to create a shallow copy.\n+// this is because `resolveMap` mutates the given object\n+resolveMap({...stats, src: () => [ 1, 6, 7, 2, 4, 11, -3 ]})\n+// {\n+// mean: 4,\n+// range: 14,\n+// min: -3,\n+// max: 11,\n+// sd: 4.546060565661952,\n+// src: [ 1, 6, 7, 2, 4, 11, -3 ]\n+// }\n+```\n+\n+### Theme configuration\n+\n```typescript\nimport { resolveMap } from \"@thi.ng/resolve-map\";\n",
"new_path": "packages/resolve-map/README.md",
"old_path": "packages/resolve-map/README.md"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
docs(resolve-map): add readme example
| 1
|
docs
|
resolve-map
|
679,913
|
14.05.2018 12:47:13
| -3,600
|
4591d5d56b9b8215cb1d40569cb7daceca2e137a
|
minor(examples): update dropdown html
|
[
{
"change_type": "MODIFY",
"diff": "</head>\n<body>\n+ <div class=\"sans-serif ma2 pa3 bg-light-gray\">WIP customizable & scrollable stateless dropdown component.\n+ <a href=\"https://github.com/thi-ng/umbrella/tree/master/examples/hdom-dropdown\">Source</a>\n+ </div>\n<div id=\"app\"></div>\n<script type=\"text/javascript\" src=\"bundle.js\"></script>\n</body>\n",
"new_path": "examples/hdom-dropdown/index.html",
"old_path": "examples/hdom-dropdown/index.html"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
minor(examples): update dropdown html
| 1
|
minor
|
examples
|
724,167
|
14.05.2018 13:28:51
| 14,400
|
934745b7bb89c60d926622250d450bee0fdbf598
|
fix: do not deep merge array data
|
[
{
"change_type": "MODIFY",
"diff": "@@ -421,7 +421,8 @@ export default class Wrapper implements BaseWrapper {\n}\nObject.keys(data).forEach((key) => {\n- if (typeof data[key] === 'object' && data[key] !== null) {\n+ if (typeof data[key] === 'object' && data[key] !== null &&\n+ !Array.isArray(data[key])) {\n// $FlowIgnore : Problem with possibly null this.vm\nconst newObj = merge(this.vm[key], data[key])\n// $FlowIgnore : Problem with possibly null this.vm\n",
"new_path": "packages/test-utils/src/wrapper.js",
"old_path": "packages/test-utils/src/wrapper.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -178,4 +178,17 @@ describeWithShallowAndMount('setData', (mountingMethod) => {\nexpect(wrapper.vm.anObject.propA.prop1).to.equal('a')\nexpect(wrapper.vm.anObject.propA.prop2).to.equal('b')\n})\n+\n+ it('sets array data properly', () => {\n+ const TestComponent = {\n+ data: () => ({\n+ items: [1, 2]\n+ })\n+ }\n+ const wrapper = mountingMethod(TestComponent)\n+ wrapper.setData({\n+ items: [3]\n+ })\n+ expect(wrapper.vm.items).to.deep.equal([3])\n+ })\n})\n",
"new_path": "test/specs/wrapper/setData.spec.js",
"old_path": "test/specs/wrapper/setData.spec.js"
}
] |
JavaScript
|
MIT License
|
vuejs/vue-test-utils
|
fix: do not deep merge array data (#604)
| 1
|
fix
| null |
679,913
|
14.05.2018 14:39:03
| -3,600
|
306625df654f61f240eacdfe6f664c853487843c
|
feat(transducers): add wrap*() iterators
add wrapBoth()
add wrapLeft()
add wrapRight()
|
[
{
"change_type": "ADD",
"diff": "+import { illegalArgs } from \"@thi.ng/errors/illegal-arguments\";\n+\n+/**\n+ * Combination of `wrapLeft()` and `wrapRight()`. Yields iterator of\n+ * `src` with the last `n` values of `src` prepended at the beginning\n+ * and the first `n` values appended at the end. Throws error if `n` < 0\n+ * or larger than `src.length`.\n+ *\n+ * @param src\n+ * @param n\n+ */\n+export function* wrapBoth<T>(src: T[], n = 1) {\n+ (n < 0 || n > src.length) && illegalArgs(`wrong number of wrap items: got ${n} max: ${src.length}`);\n+ for (let m = src.length, i = m - n; i < m; i++) {\n+ yield src[i];\n+ }\n+ yield* src;\n+ for (let i = 0; i < n; i++) {\n+ yield src[i];\n+ }\n+}\n",
"new_path": "packages/transducers/src/iter/wrap-both.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { illegalArgs } from \"@thi.ng/errors/illegal-arguments\";\n+\n+/**\n+ * Yields iterator of `src` with the last `n` values of `src` prepended\n+ * at the beginning. Throws error if `n` < 0 or larger than\n+ * `src.length`.\n+ *\n+ * @param src\n+ * @param n\n+ */\n+export function* wrapLeft<T>(src: T[], n = 1) {\n+ (n < 0 || n > src.length) && illegalArgs(`wrong number of wrap items: got ${n} max: ${src.length}`);\n+ for (let m = src.length, i = m - n; i < m; i++) {\n+ yield src[i];\n+ }\n+ yield* src;\n+}\n",
"new_path": "packages/transducers/src/iter/wrap-left.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { illegalArgs } from \"@thi.ng/errors/illegal-arguments\";\n+\n+/**\n+ * Yields iterator of `src` with the first `n` values of `src` appended\n+ * at the end. Throws error if `n` < 0 or larger than `src.length`.\n+ *\n+ * @param src\n+ * @param n\n+ */\n+export function* wrapRight<T>(src: T[], n = 1) {\n+ (n < 0 || n > src.length) && illegalArgs(`wrong number of wrap items: got ${n} max: ${src.length}`);\n+ yield* src;\n+ for (let i = 0; i < n; i++) {\n+ yield src[i];\n+ }\n+}\n",
"new_path": "packages/transducers/src/iter/wrap-right.ts",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(transducers): add wrap*() iterators
- add wrapBoth()
- add wrapLeft()
- add wrapRight()
| 1
|
feat
|
transducers
|
679,913
|
14.05.2018 14:40:01
| -3,600
|
2bebba287afd0e7bdd5283b1c61042ca3a316dd3
|
feat(transducers): add filterFuzzy() xform
add fuzzyMatch() predicate
|
[
{
"change_type": "ADD",
"diff": "+import { Predicate2 } from \"@thi.ng/api/api\";\n+import { equiv } from \"@thi.ng/equiv\";\n+\n+/**\n+ * Performs a fuzzy search of `query` in `domain` and returns `true` if\n+ * successful. The optional `eq` predicate can be used to customize item\n+ * equality checking. Uses @thi.ng/equiv by default.\n+ *\n+ * Related transducer: `filterFuzzy()` (/xform/filter-fuzzy.ts)\n+ *\n+ * Adapted and generalized from:\n+ * https://github.com/bevacqua/fufuzzyzzysearch (MIT)\n+ *\n+ * @param domain\n+ * @param query\n+ * @param eq\n+ */\n+export function fuzzyMatch<T>(domain: ArrayLike<T>, query: ArrayLike<T>, eq: Predicate2<any> = equiv) {\n+ const nd = domain.length;\n+ const nq = query.length;\n+ if (nq > nd) {\n+ return false;\n+ }\n+ if (nq === nd) {\n+ return eq(query, domain);\n+ }\n+ next:\n+ for (let i = 0, j = 0; i < nq; i++) {\n+ const q = query[i];\n+ while (j < nd) {\n+ if (eq(domain[j++], q)) {\n+ continue next;\n+ }\n+ }\n+ return false;\n+ }\n+ return true;\n+}\n",
"new_path": "packages/transducers/src/func/fuzzy-match.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { Predicate2 } from \"@thi.ng/api/api\";\n+\n+import { Transducer } from \"../api\";\n+import { fuzzyMatch } from \"../func/fuzzy-match\";\n+import { filter } from \"./filter\";\n+\n+/**\n+ * Returns transducer which calls `fuzzyMatch()` for each value and\n+ * discards all non-matching values. The optional `key` fn can be used\n+ * to extract/produce the actual value used for the search. The optional\n+ * `eq` predicate can be used to customize item equality checking. Uses\n+ * @thi.ng/equiv by default.\n+ *\n+ * ```\n+ * [...iterator(filterFuzzy(\"ho\"), [\"hello\", \"hallo\", \"hey\", \"heyoka\"])]\n+ * // [\"hello\", \"hallo\", \"heyoka\"]\n+ * ```\n+ *\n+ * @param query\n+ * @param key\n+ * @param eq\n+ */\n+export function filterFuzzy<A, B>(query: ArrayLike<B>, key?: (x: A) => ArrayLike<B>, eq?: Predicate2<any>): Transducer<A, A> {\n+ return filter(\n+ key ?\n+ (x: A) => fuzzyMatch(key(x), query, eq) :\n+ (x: A) => fuzzyMatch(<any>x, query, eq)\n+ );\n+}\n",
"new_path": "packages/transducers/src/xform/filter-fuzzy.ts",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
feat(transducers): add filterFuzzy() xform
- add fuzzyMatch() predicate
| 1
|
feat
|
transducers
|
679,913
|
14.05.2018 14:41:05
| -3,600
|
fc6acd1681b7927e62817ad468b2e8abaca918b6
|
chore(transducers): update deps, readme, re-exports
|
[
{
"change_type": "MODIFY",
"diff": "@@ -7,8 +7,8 @@ This project is part of the\n## About\n-Lightweight transducer implementations for ES6 / TypeScript (~24KB\n-minified, full lib).\n+Lightweight transducer and supporting generators / iterator\n+implementations for ES6 / TypeScript (~8.4KB gzipped, full lib).\n## TOC\n@@ -24,14 +24,15 @@ minified, full lib).\n## About\n-This library provides altogether 90+ transducers, reducers and sequence\n-generators (iterators) for composing data transformation pipelines.\n+This library provides altogether 130+ transducers, reducers, sequence\n+generators (iterators) and other supporting functions for composing data\n+transformation pipelines.\nThe overall concept and many of the core functions offered here are\ndirectly inspired by the original Clojure implementation by Rich Hickey,\n-though the implementation does differ (also in contrast to some other JS\n-based implementations) and dozens of less common, but generally highly\n-useful operators have been added. See full list below.\n+though the implementation does heavily differ (also in contrast to some\n+other JS based implementations) and dozens of less common, but generally\n+highly useful operators have been added. See full list below.\nThe\n[@thi.ng/rstream](https://github.com/thi-ng/umbrella/tree/master/packages/rstream)\n@@ -617,6 +618,8 @@ itself. Returns nothing.\n#### `filter<T>(pred: Predicate<T>): Transducer<T, T>`\n+#### `filterFuzzy<A, B>(query: ArrayLike<B>, key?: (x: A) => ArrayLike<B>, eq?: Predicate2<any>): Transducer<A, A>`\n+\n#### `flatten<T>(): Transducer<T | Iterable<T>, T>`\n#### `flattenWith<T>(fn: (x: T) => Iterable<T>): Transducer<T | Iterable<T>, T>`\n@@ -787,6 +790,12 @@ itself. Returns nothing.\n#### `vals<T>(x: IObjectOf<T>): IterableIterator<T>`\n+#### `wrapBoth<T>(src: T[], n?: number): IterableIterator<T>`\n+\n+#### `wrapLeft<T>(src: T[], n?: number): IterableIterator<T>`\n+\n+#### `wrapRight<T>(src: T[], n?: number): IterableIterator<T>`\n+\n## Authors\n- Karsten Schmidt\n",
"new_path": "packages/transducers/README.md",
"old_path": "packages/transducers/README.md"
},
{
"change_type": "MODIFY",
"diff": "\"@thi.ng/api\": \"^4.0.1\",\n\"@thi.ng/checks\": \"^1.5.3\",\n\"@thi.ng/compare\": \"^0.1.1\",\n+ \"@thi.ng/equiv\": \"^0.1.1\",\n\"@thi.ng/errors\": \"^0.1.2\"\n},\n\"keywords\": [\n",
"new_path": "packages/transducers/package.json",
"old_path": "packages/transducers/package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -42,6 +42,7 @@ export * from \"./xform/drop-while\";\nexport * from \"./xform/drop\";\nexport * from \"./xform/duplicate\";\nexport * from \"./xform/filter\";\n+export * from \"./xform/filter-fuzzy\";\nexport * from \"./xform/flatten-with\";\nexport * from \"./xform/flatten\";\nexport * from \"./xform/hex-dump\";\n@@ -96,6 +97,7 @@ export * from \"./func/deep-transform\";\nexport * from \"./func/delay\";\nexport * from \"./func/ensure-iterable\";\nexport * from \"./func/even\";\n+export * from \"./func/fuzzy-match\";\nexport * from \"./func/hex\";\nexport * from \"./func/identity\";\nexport * from \"./func/juxt\";\n@@ -122,3 +124,6 @@ export * from \"./iter/repeatedly\";\nexport * from \"./iter/reverse\";\nexport * from \"./iter/tuples\";\nexport * from \"./iter/vals\";\n+export * from \"./iter/wrap-both\";\n+export * from \"./iter/wrap-left\";\n+export * from \"./iter/wrap-right\";\n",
"new_path": "packages/transducers/src/index.ts",
"old_path": "packages/transducers/src/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
chore(transducers): update deps, readme, re-exports
| 1
|
chore
|
transducers
|
679,913
|
14.05.2018 14:41:48
| -3,600
|
37362dd292bd760ff7caf4ed0f84815f0ce82dab
|
test(transducers): add fuzzy tests
|
[
{
"change_type": "ADD",
"diff": "+import * as tx from \"../src\";\n+\n+import * as assert from \"assert\";\n+\n+describe(\"fuzzy\", () => {\n+ it(\"strings\", () => {\n+ const opts = [\"hello\", \"hallo\", \"hey\", \"heyoka\"];\n+ assert.deepEqual(tx.transduce(tx.filterFuzzy(\"hl\"), tx.push(), opts), [\"hello\", \"hallo\"]);\n+ assert.deepEqual(tx.transduce(tx.filterFuzzy(\"he\"), tx.push(), opts), [\"hello\", \"hey\", \"heyoka\"]);\n+ assert.deepEqual(tx.transduce(tx.filterFuzzy(\"ho\"), tx.push(), opts), [\"hello\", \"hallo\", \"heyoka\"]);\n+ assert.deepEqual(tx.transduce(tx.filterFuzzy(\"hey\"), tx.push(), opts), [\"hey\", \"heyoka\"]);\n+ assert.deepEqual(tx.transduce(tx.filterFuzzy(\"hk\"), tx.push(), opts), [\"heyoka\"]);\n+ });\n+ it(\"arrays\", () => {\n+ const opts = [[1, 2, 3], [1, 3, 4], [4, 5, 6], [1, 3, 6]];\n+ assert.deepEqual(tx.transduce(tx.filterFuzzy([1, 3]), tx.push(), opts), [[1, 2, 3], [1, 3, 4], [1, 3, 6]]);\n+ assert.deepEqual(tx.transduce(tx.filterFuzzy([4]), tx.push(), opts), [[1, 3, 4], [4, 5, 6]]);\n+ assert.deepEqual(tx.transduce(tx.filterFuzzy([3, 6]), tx.push(), opts), [[1, 3, 6]]);\n+ assert.deepEqual(tx.transduce(tx.filterFuzzy([]), tx.push(), opts), opts);\n+ });\n+});\n",
"new_path": "packages/transducers/test/fuzzy.ts",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
test(transducers): add fuzzy tests
| 1
|
test
|
transducers
|
679,913
|
14.05.2018 16:07:17
| -3,600
|
e238541fd94071b742705668284698502d588bf1
|
refactor(transducers): replace wrapBoth/Left/Right w/ wrap()
deprecate existing wrap*() iters
update docs & readme
|
[
{
"change_type": "MODIFY",
"diff": "@@ -813,11 +813,7 @@ itself. Returns nothing.\n#### `vals<T>(x: IObjectOf<T>): IterableIterator<T>`\n-#### `wrapBoth<T>(src: T[], n?: number): IterableIterator<T>`\n-\n-#### `wrapLeft<T>(src: T[], n?: number): IterableIterator<T>`\n-\n-#### `wrapRight<T>(src: T[], n?: number): IterableIterator<T>`\n+#### `wrap<T>(src: T[], n = 1, left = true, right = true): IterableIterator<T>`\n## Authors\n",
"new_path": "packages/transducers/README.md",
"old_path": "packages/transducers/README.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -124,6 +124,4 @@ export * from \"./iter/repeatedly\";\nexport * from \"./iter/reverse\";\nexport * from \"./iter/tuples\";\nexport * from \"./iter/vals\";\n-export * from \"./iter/wrap-both\";\n-export * from \"./iter/wrap-left\";\n-export * from \"./iter/wrap-right\";\n+export * from \"./iter/wrap\";\n",
"new_path": "packages/transducers/src/index.ts",
"old_path": "packages/transducers/src/index.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { illegalArgs } from \"@thi.ng/errors/illegal-arguments\";\n+import { wrap } from \"./wrap\";\n/**\n- * Combination of `wrapLeft()` and `wrapRight()`. Yields iterator of\n- * `src` with the last `n` values of `src` prepended at the beginning\n- * and the first `n` values appended at the end. Throws error if `n` < 0\n- * or larger than `src.length`.\n+ * See `wrap()`.\n*\n+ * @deprecated superceded by `wrap()`\n* @param src\n* @param n\n*/\n-export function* wrapBoth<T>(src: T[], n = 1) {\n- (n < 0 || n > src.length) && illegalArgs(`wrong number of wrap items: got ${n} max: ${src.length}`);\n- for (let m = src.length, i = m - n; i < m; i++) {\n- yield src[i];\n- }\n- yield* src;\n- for (let i = 0; i < n; i++) {\n- yield src[i];\n- }\n+export function wrapBoth<T>(src: T[], n = 1) {\n+ return wrap(src, n);\n}\n",
"new_path": "packages/transducers/src/iter/wrap-both.ts",
"old_path": "packages/transducers/src/iter/wrap-both.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { illegalArgs } from \"@thi.ng/errors/illegal-arguments\";\n+import { wrap } from \"./wrap\";\n/**\n- * Yields iterator of `src` with the last `n` values of `src` prepended\n- * at the beginning. Throws error if `n` < 0 or larger than\n- * `src.length`.\n+ * See `wrap()`.\n*\n+ * @deprecated superceded by `wrap()`\n* @param src\n* @param n\n*/\n-export function* wrapLeft<T>(src: T[], n = 1) {\n- (n < 0 || n > src.length) && illegalArgs(`wrong number of wrap items: got ${n} max: ${src.length}`);\n- for (let m = src.length, i = m - n; i < m; i++) {\n- yield src[i];\n- }\n- yield* src;\n+export function wrapLeft<T>(src: T[], n = 1) {\n+ return wrap(src, n, true, false);\n}\n",
"new_path": "packages/transducers/src/iter/wrap-left.ts",
"old_path": "packages/transducers/src/iter/wrap-left.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { illegalArgs } from \"@thi.ng/errors/illegal-arguments\";\n+import { wrap } from \"./wrap\";\n/**\n- * Yields iterator of `src` with the first `n` values of `src` appended\n- * at the end. Throws error if `n` < 0 or larger than `src.length`.\n+ * See `wrap()`.\n*\n+ * @deprecated superceded by `wrap()`\n* @param src\n* @param n\n*/\n-export function* wrapRight<T>(src: T[], n = 1) {\n- (n < 0 || n > src.length) && illegalArgs(`wrong number of wrap items: got ${n} max: ${src.length}`);\n- yield* src;\n- for (let i = 0; i < n; i++) {\n- yield src[i];\n- }\n+export function wrapRight<T>(src: T[], n = 1) {\n+ return wrap(src, n, false, true);\n}\n",
"new_path": "packages/transducers/src/iter/wrap-right.ts",
"old_path": "packages/transducers/src/iter/wrap-right.ts"
},
{
"change_type": "ADD",
"diff": "+import { illegalArgs } from \"@thi.ng/errors/illegal-arguments\";\n+\n+/**\n+ * Yields iterator of `src` with the last `n` values of `src` prepended\n+ * at the beginning (if `left` is truthy) and/or the first `n` values\n+ * appended at the end (if `right` is truthy). Wraps both sides by\n+ * default and throws error if `n` < 0 or larger than `src.length`.\n+ *\n+ * @param src\n+ * @param n\n+ * @param left\n+ * @param right\n+ */\n+export function* wrap<T>(src: T[], n = 1, left = true, right = true) {\n+ (n < 0 || n > src.length) && illegalArgs(`wrong number of wrap items: got ${n} max: ${src.length}`);\n+ if (left) {\n+ for (let m = src.length, i = m - n; i < m; i++) {\n+ yield src[i];\n+ }\n+ }\n+ yield* src;\n+ if (right) {\n+ for (let i = 0; i < n; i++) {\n+ yield src[i];\n+ }\n+ }\n+}\n",
"new_path": "packages/transducers/src/iter/wrap.ts",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
refactor(transducers): replace wrapBoth/Left/Right w/ wrap()
- deprecate existing wrap*() iters
- update docs & readme
| 1
|
refactor
|
transducers
|
730,429
|
14.05.2018 17:21:02
| 14,400
|
6661a2f794a7bd14c83bc0fc4414fb5c151c812e
|
fix(call-data-activity): add support for missing actor
|
[
{
"change_type": "MODIFY",
"diff": "@@ -84,7 +84,7 @@ export function parseActivityCallData(callData, currentUser) {\nconst callees = participants.filter((p) => !p.isInitiator);\nconst noBodyJoined = callees.every((p) => p.state !== 'LEFT');\n- const actorWasMe = actor.id === currentUser.id;\n+ const actorWasMe = actor && actor.id === currentUser.id;\nconst {arg, status} = isGroupCall\n? getCallDataGroup({\n",
"new_path": "packages/node_modules/@ciscospark/react-component-call-data-activity/src/helpers.js",
"old_path": "packages/node_modules/@ciscospark/react-component-call-data-activity/src/helpers.js"
}
] |
JavaScript
|
MIT License
|
webex/react-widgets
|
fix(call-data-activity): add support for missing actor
| 1
|
fix
|
call-data-activity
|
217,922
|
14.05.2018 17:33:48
| -7,200
|
33bc01a04858af548d80d8bf2c17c245eb22165a
|
fix: gathering location search broken with some strange nodes
|
[
{
"change_type": "MODIFY",
"diff": "\"firebase\": \"4.10.1\",\n\"grpc\": \"^1.11.3\",\n\"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",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -52,6 +52,7 @@ export class GatheringLocationComponent implements OnInit {\nnode.itemId = item.obj.i;\nreturn node;\n})\n+ .filter(row => row.items !== undefined)\n.filter(row => {\nreturn row.items.indexOf(item.obj.i) > -1;\n});\n",
"new_path": "src/app/pages/gathering-location/gathering-location/gathering-location.component.ts",
"old_path": "src/app/pages/gathering-location/gathering-location/gathering-location.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix: gathering location search broken with some strange nodes
| 1
|
fix
| null |
217,922
|
14.05.2018 17:37:17
| -7,200
|
2095a7cefd644e958aaecbc9531cd19edef226f8
|
chore: small typing fix
|
[
{
"change_type": "MODIFY",
"diff": "@@ -88,7 +88,7 @@ export class UserService extends FirebaseStorage<AppUser> {\nreturn this.af.authState\n.pipe(\nfirst(),\n- mergeMap((user: firebase.User) => {\n+ mergeMap((user) => {\nif ((user === null && !this.loggingIn) || user.uid === undefined) {\nthis.af.auth.signInAnonymously();\nreturn of(<AppUser>{name: 'Anonymous', anonymous: true});\n@@ -99,11 +99,13 @@ export class UserService extends FirebaseStorage<AppUser> {\nreturn of(<AppUser>{$key: user.uid, name: 'Anonymous', anonymous: true});\n}));\n} else {\n- return this.get(user.uid).pipe(\n+ return this.get(user.uid)\n+ .pipe(\nmap(u => {\nu.providerId = user.providerId;\nreturn u;\n- }));\n+ })\n+ );\n}\n})\n);\n",
"new_path": "src/app/core/database/user.service.ts",
"old_path": "src/app/core/database/user.service.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore: small typing fix
| 1
|
chore
| null |
217,922
|
14.05.2018 17:41:06
| -7,200
|
b4112c094cc7c7edb29c55e9f8247121a9c5b081
|
chore: aligning fix with master
|
[
{
"change_type": "MODIFY",
"diff": "@@ -187,7 +187,7 @@ export class SimulatorComponent implements OnInit, OnDestroy {\ntap(user => this.userData = user),\nmergeMap(user => {\nif (user.anonymous) {\n- return of(user.gearSets)\n+ return of(user.gearSets || [])\n}\nreturn this.dataService.getGearsets(user.lodestoneId)\n.pipe(\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: aligning fix with master
| 1
|
chore
| null |
730,412
|
14.05.2018 19:42:11
| 0
|
104cd2b5e6cd421a96a999d107503cd5c46e2a9a
|
chore(release): 0.1.299
|
[
{
"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.299\"></a>\n+## [0.1.299](https://github.com/webex/react-ciscospark/compare/v0.1.298...v0.1.299) (2018-05-14)\n+\n+\n+\n<a name=\"0.1.298\"></a>\n## [0.1.298](https://github.com/webex/react-ciscospark/compare/v0.1.297...v0.1.298) (2018-05-11)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@ciscospark/react-ciscospark\",\n- \"version\": \"0.1.298\",\n+ \"version\": \"0.1.299\",\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.299
| 1
|
chore
|
release
|
448,063
|
14.05.2018 20:35:56
| -7,200
|
c03d6f88feb5daed6172569e83deb6a7ed4d7c8f
|
fix: analyse exported imports
|
[
{
"change_type": "ADD",
"diff": "+import { tags } from '@angular-devkit/core';\n+import { expect } from 'chai';\n+import * as ts from 'typescript';\n+import { analyseDependencies, DependencyAnalyser } from './analyse-dependencies-transformer';\n+import { createSourceFile, createSourceText } from '../../testing/typescript.testing';\n+\n+describe(`analyseDependencies()`, () => {\n+ it('should detect imported dependencies', () => {\n+ const fooSourceFile = createSourceFile(\n+ createSourceText`\n+ import { CommonModule } from '@angular/common';\n+ import { NgModule } from '@angular/core';\n+\n+ import { SecondaryModule } from '@foo/secondary';\n+\n+ import { SomeComponent } from './some.component';\n+\n+ @NgModule({\n+ imports: [\n+ CommonModule,\n+ SecondaryModule\n+ ],\n+ declarations: [SomeComponent],\n+ exports: [SomeComponent]\n+ })\n+ export class FooModule { }\n+ `,\n+ '/foo-bar/foo.module.ts'\n+ );\n+\n+ const dependencies = [];\n+\n+ const analyser: DependencyAnalyser = (sourceFile, moduleId) => {\n+ dependencies.push(moduleId);\n+ };\n+\n+ const fooSourceTransformed = ts.transform(fooSourceFile, [analyseDependencies(analyser)]);\n+\n+ expect(dependencies).to.deep.equal(['@angular/common', '@angular/core', '@foo/secondary', './some.component']);\n+ });\n+\n+ it('should detect exported imports', () => {\n+ const fooSourceFile = createSourceFile(\n+ createSourceText`\n+ export * from '@foo';\n+ export * from '@foo/secondary';\n+ `,\n+ '/foo-bar/public-api.ts'\n+ );\n+\n+ const dependencies = [];\n+\n+ const analyser: DependencyAnalyser = (sourceFile, moduleId) => {\n+ dependencies.push(moduleId);\n+ };\n+\n+ const fooSourceTransformed = ts.transform(fooSourceFile, [analyseDependencies(analyser)]);\n+\n+ expect(dependencies).to.deep.equal(['@foo', '@foo/secondary']);\n+ });\n+});\n",
"new_path": "src/lib/ts/analyse-dependencies-transformer.spec.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -19,11 +19,25 @@ export const analyseDependencies = (analyser: DependencyAnalyser) => (context: t\nreturn text.substring(1, text.length - 1);\n};\n+ const findModuleIdFromExport = (node: ts.ExportDeclaration) => {\n+ if (!node.moduleSpecifier) {\n+ return undefined;\n+ }\n+\n+ const text = node.moduleSpecifier.getText();\n+\n+ return text.substring(1, text.length - 1);\n+ };\n+\nconst visitImports: ts.Visitor = node => {\nif (ts.isImportDeclaration(node)) {\n// Found an 'import ...' declaration\nconst importedModuleId: string = findModuleIdFromImport(node);\nanalyser(node.getSourceFile(), importedModuleId);\n+ } else if (ts.isExportDeclaration(node) && node.moduleSpecifier) {\n+ // Found an 'export ... from ...' declaration\n+ const importedModuleId: string = findModuleIdFromExport(node);\n+ analyser(node.getSourceFile(), importedModuleId);\n} else {\nreturn ts.visitEachChild(node, visitImports, context);\n}\n",
"new_path": "src/lib/ts/analyse-dependencies-transformer.ts",
"old_path": "src/lib/ts/analyse-dependencies-transformer.ts"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
fix: analyse exported imports (#873)
| 1
|
fix
| null |
217,922
|
14.05.2018 20:56:13
| -7,200
|
d81755e3e9437dad61b2e04e9a53bf2b17df3025
|
chore: more fixes for last angular6 merge
|
[
{
"change_type": "MODIFY",
"diff": "@@ -313,7 +313,7 @@ export class ItemComponent extends ComponentWithSubscriptions implements OnInit,\n}\ngetCraft(recipeId: string): CraftedBy {\n- if (this.item.craftedBy === undefined) {\n+ if (this.item.craftedBy === undefined || this.item.craftedBy[0].icon === '') {\nreturn undefined;\n}\nreturn this.item.craftedBy.find(craft => {\n",
"new_path": "src/app/modules/item/item/item.component.ts",
"old_path": "src/app/modules/item/item/item.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -322,8 +322,8 @@ export class ListsComponent extends ComponentWithSubscriptions implements OnInit\n})\n);\n})).pipe(\n- map(workshops => workshops.filter(w => w !== null)),\n- filter((row: any) => row.workshop.getPermissions(user.$key).write === true)\n+ map(workshops => workshops.filter(w => w !== null && w !== undefined)\n+ .filter(row => row.workshop.getPermissions(user.$key).write === true))\n);\n})\n);\n",
"new_path": "src/app/pages/lists/lists/lists.component.ts",
"old_path": "src/app/pages/lists/lists/lists.component.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
chore: more fixes for last angular6 merge
| 1
|
chore
| null |
679,913
|
14.05.2018 21:45:12
| -3,600
|
ade96f862a0a82e8c69363867ae5d89aa4cfa7d9
|
fix(hdom): component obj lifecycle method thisArg handling
|
[
{
"change_type": "MODIFY",
"diff": "@@ -32,7 +32,7 @@ export function createDOM(parent: Element, tag: any, insert?: number) {\n}\nconst el = createElement(parent, t, tag[1], insert);\nif ((<any>tag).__init) {\n- (<any>tag).__init.apply(tag, [el, ...(<any>tag).__args]);\n+ (<any>tag).__init.apply((<any>tag).__this, [el, ...(<any>tag).__args]);\n}\nif (tag[2]) {\nconst n = tag.length;\n",
"new_path": "packages/hdom/src/dom.ts",
"old_path": "packages/hdom/src/dom.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -130,8 +130,9 @@ export function normalizeTree(tree: any, ctx?: any, path = [0], keys = true, spa\n// (render() is the only required hook)\nif (implementsFunction(tag, \"render\")) {\nconst args = [ctx, ...tree.slice(1)];\n- norm = normalizeTree(tag.render.apply(null, args), ctx, path, keys, span);\n+ norm = normalizeTree(tag.render.apply(tag, args), ctx, path, keys, span);\nif (isArray(norm)) {\n+ (<any>norm).__this = tag;\n(<any>norm).__init = tag.init;\n(<any>norm).__release = tag.release;\n(<any>norm).__args = args;\n",
"new_path": "packages/hdom/src/normalize.ts",
"old_path": "packages/hdom/src/normalize.ts"
}
] |
TypeScript
|
Apache License 2.0
|
thi-ng/umbrella
|
fix(hdom): component obj lifecycle method thisArg handling
| 1
|
fix
|
hdom
|
217,922
|
14.05.2018 21:49:46
| -7,200
|
010e76ccb1cc39bf28bb417277a1c7af2c3b9e74
|
fix: crafter levels are now taken from lodestone profile, will be more reactive to changes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -9,7 +9,7 @@ import {NgSerializerService} from '@kaiu/ng-serializer';\nimport {SearchFilter} from '../../model/search/search-filter.interface';\nimport {GearSet} from '../../pages/simulator/model/gear-set';\n-import {map, publishReplay, refCount, take} from 'rxjs/operators';\n+import {map, mergeMap, publishReplay, refCount, take} from 'rxjs/operators';\n@Injectable()\nexport class DataService {\n@@ -27,6 +27,9 @@ export class DataService {\n}\npublic getGearsets(lodestoneId: number): Observable<GearSet[]> {\n+ return this.getCharacter(lodestoneId)\n+ .pipe(\n+ mergeMap(character => {\nreturn this.http.get(`https://api.xivdb.com/character/${lodestoneId}?data=gearsets`)\n.pipe(\nmap((response: any[]) => {\n@@ -34,10 +37,15 @@ export class DataService {\n// We want only crafter sets\n.filter(row => row.classjob_id >= 8 && row.classjob_id <= 15)\n.map(set => {\n+ // Get real level from lodestone profile as it's way more accurate and up to date, if not found,\n+ // default to set level.\n+ const setLevel = Object.keys(character.classjobs)\n+ .map(key => character.classjobs[key])\n+ .find(job => job.name === set.role.name) || set.level;\nreturn {\nilvl: set.item_level_avg,\njobId: set.classjob_id,\n- level: set.level,\n+ level: setLevel,\ncontrol: set.stats.mental !== undefined ? set.stats.mental.Control : 0,\ncraftsmanship: set.stats.mental !== undefined ? set.stats.mental.Craftsmanship : 0,\ncp: set.stats.core !== undefined ? set.stats.core.CP : 0,\n@@ -46,6 +54,9 @@ export class DataService {\n});\n})\n);\n+ })\n+ )\n+\n}\n/**\n",
"new_path": "src/app/core/api/data.service.ts",
"old_path": "src/app/core/api/data.service.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix: crafter levels are now taken from lodestone profile, will be more reactive to changes
| 1
|
fix
| null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.