Skip to content

Commit 9c587aa

Browse files
chore(release): 1.1.0 [skip ci]
# [1.1.0](v1.0.1...v1.1.0) (2020-04-12) ### Bug Fixes * update dependencies and fix vulnerabilities ([c3ff5d2](c3ff5d2)) ### Features * add merge function ([f06a217](f06a217)), closes [#5](#5) * **jsonfilehandlererror:** return the file path that caused the error ([e940743](e940743))
1 parent ac6b4e5 commit 9c587aa

15 files changed

+650
-328
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
# [1.1.0](https://github.com/sebastian-altamirano/json-file-handler/compare/v1.0.1...v1.1.0) (2020-04-12)
2+
3+
### Bug Fixes
4+
5+
- update dependencies and fix vulnerabilities ([c3ff5d2](https://github.com/sebastian-altamirano/json-file-handler/commit/c3ff5d24361fc157f97a894c274c99fd74c49537))
6+
7+
### Features
8+
9+
- add merge function ([f06a217](https://github.com/sebastian-altamirano/json-file-handler/commit/f06a217fe2029dd101b67dfb7550d3a3337e162c)), closes [#5](https://github.com/sebastian-altamirano/json-file-handler/issues/5)
10+
- **jsonfilehandlererror:** return the file path that caused the error ([e940743](https://github.com/sebastian-altamirano/json-file-handler/commit/e940743e1ab1d939f85fe86dcfaf4e502f814cef))
11+
112
## [1.0.1](https://github.com/sebastian-altamirano/json-file-handler/compare/v1.0.0...v1.0.1) (2020-03-31)

docs/assets/css/main.css

+1
Original file line numberDiff line numberDiff line change
@@ -2653,6 +2653,7 @@ footer .tsd-legend {
26532653
border: 1px solid #eee;
26542654
font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
26552655
font-size: 14px;
2656+
overflow-x: auto;
26562657
}
26572658
.tsd-signature.tsd-kind-icon {
26582659
padding-left: 30px;

docs/assets/js/main.js

+42-84
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,8 @@
15261526
return e;
15271527
});
15281528
})();
1529-
var __extends =
1529+
var typedoc,
1530+
__extends =
15301531
(this && this.__extends) ||
15311532
(function () {
15321533
var extendStatics = function (d, b) {
@@ -1550,19 +1551,7 @@ var __extends =
15501551
? Object.create(b)
15511552
: ((__.prototype = b.prototype), new __()));
15521553
};
1553-
})(),
1554-
typedoc,
1555-
typedoc,
1556-
typedoc,
1557-
typedoc,
1558-
typedoc,
1559-
typedoc,
1560-
typedoc,
1561-
typedoc,
1562-
typedoc,
1563-
typedoc,
1564-
typedoc,
1565-
typedoc;
1554+
})();
15661555
!(function (typedoc) {
15671556
var services = [],
15681557
components = [];
@@ -2035,7 +2024,6 @@ var __extends =
20352024
typedoc.registerComponent(MenuHighlight, '.menu-highlight');
20362025
})(typedoc || (typedoc = {})),
20372026
(function (typedoc) {
2038-
var search;
20392027
!(function (search) {
20402028
var SearchLoadingState;
20412029
!(function (SearchLoadingState) {
@@ -2070,56 +2058,32 @@ var __extends =
20702058
}
20712059
return (
20722060
__extends(Search, _super),
2073-
(Search.prototype.createIndex = function (data) {
2074-
var _this = this,
2075-
builder = new lunr.Builder();
2076-
builder.pipeline.add(lunr.trimmer),
2077-
builder.field('name', { boost: 10 }),
2078-
builder.field('parent'),
2079-
builder.ref('id');
2080-
var rows = data.rows,
2081-
pos = 0,
2082-
length = rows.length,
2083-
batch = function () {
2084-
for (var cycles = 0; cycles++ < 100; )
2085-
if ((builder.add(rows[pos]), ++pos == length))
2086-
return (
2087-
(_this.index = builder.build()),
2088-
_this.setLoadingState(SearchLoadingState.Ready)
2089-
);
2090-
setTimeout(batch, 10);
2091-
};
2092-
batch();
2093-
}),
20942061
(Search.prototype.loadIndex = function () {
20952062
var _this = this;
2096-
if (this.loadingState == SearchLoadingState.Idle)
2097-
if (
2098-
(setTimeout(function () {
2099-
_this.loadingState == SearchLoadingState.Idle &&
2100-
_this.setLoadingState(SearchLoadingState.Loading);
2101-
}, 500),
2102-
this.data)
2103-
)
2104-
this.createIndex(this.data);
2105-
else {
2106-
var url = this.el.dataset.index;
2107-
if (!url)
2108-
return void this.setLoadingState(SearchLoadingState.Failure);
2109-
fetch(url)
2110-
.then(function (response) {
2111-
if (!response.ok)
2112-
throw new Error('The source is not found');
2113-
return response.text();
2114-
})
2115-
.then(function (source) {
2116-
(_this.data = eval(source)),
2117-
_this.data && _this.createIndex(_this.data);
2118-
})
2119-
.catch(function () {
2120-
_this.setLoadingState(SearchLoadingState.Failure);
2121-
});
2122-
}
2063+
if (this.loadingState == SearchLoadingState.Idle && !this.data) {
2064+
setTimeout(function () {
2065+
_this.loadingState == SearchLoadingState.Idle &&
2066+
_this.setLoadingState(SearchLoadingState.Loading);
2067+
}, 500);
2068+
var url = this.el.dataset.index;
2069+
url
2070+
? fetch(url)
2071+
.then(function (response) {
2072+
if (!response.ok)
2073+
throw new Error('The search index is missing');
2074+
return response.json();
2075+
})
2076+
.then(function (source) {
2077+
(_this.data = source),
2078+
(_this.index = lunr.Index.load(source.index)),
2079+
_this.setLoadingState(SearchLoadingState.Ready);
2080+
})
2081+
.catch(function (error) {
2082+
console.error(error),
2083+
_this.setLoadingState(SearchLoadingState.Failure);
2084+
})
2085+
: this.setLoadingState(SearchLoadingState.Failure);
2086+
}
21232087
}),
21242088
(Search.prototype.updateResults = function () {
21252089
if (
@@ -2260,7 +2224,7 @@ var __extends =
22602224
})(typedoc.Component);
22612225
(search.Search = Search),
22622226
typedoc.registerComponent(Search, '#tsd-search');
2263-
})((search = typedoc.search || (typedoc.search = {})));
2227+
})(typedoc.search || (typedoc.search = {}));
22642228
})(typedoc || (typedoc = {})),
22652229
(function (typedoc) {
22662230
var SignatureGroup = (function () {
@@ -2294,16 +2258,14 @@ var __extends =
22942258
_this.createGroups(),
22952259
_this.container &&
22962260
(_this.el.classList.add('active'),
2297-
_this.el
2298-
.querySelectorAll('.tsd-signature')
2299-
.forEach(function (signature) {
2300-
signature.addEventListener('touchstart', function (event) {
2301-
return _this.onClick(event);
2302-
}),
2303-
signature.addEventListener('click', function (event) {
2304-
return _this.onClick(event);
2305-
});
2261+
Array.from(_this.el.children).forEach(function (signature) {
2262+
signature.addEventListener('touchstart', function (event) {
2263+
return _this.onClick(event);
23062264
}),
2265+
signature.addEventListener('click', function (event) {
2266+
return _this.onClick(event);
2267+
});
2268+
}),
23072269
_this.container.classList.add('active'),
23082270
_this.setIndex(0)),
23092271
_this
@@ -2333,19 +2295,15 @@ var __extends =
23332295
}
23342296
}),
23352297
(Signature.prototype.createGroups = function () {
2336-
var _this = this,
2337-
signatures = this.el.querySelectorAll('.tsd-signature');
2298+
var signatures = this.el.children;
23382299
if (!(signatures.length < 2)) {
23392300
this.container = this.el.nextElementSibling;
2340-
var descriptions = this.container.querySelectorAll(
2341-
'.tsd-description'
2342-
);
2343-
(this.groups = []),
2344-
signatures.forEach(function (el, index) {
2345-
_this.groups.push(
2346-
new SignatureGroup(el, descriptions[index])
2347-
);
2348-
});
2301+
var descriptions = this.container.children;
2302+
this.groups = [];
2303+
for (var index = 0; index < signatures.length; index++)
2304+
this.groups.push(
2305+
new SignatureGroup(signatures[index], descriptions[index])
2306+
);
23492307
}
23502308
}),
23512309
(Signature.prototype.onClick = function (e) {

docs/assets/js/search.js

-196
This file was deleted.

0 commit comments

Comments
 (0)