diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000000..47967151a5
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - "node"
\ No newline at end of file
diff --git a/README.md b/README.md
index 60392c5195..5b37082d0f 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,43 @@
# @thi.ng/umbrella
-Mono-repository for thi.ng TypeScript/ES6 projects.
+[![Travis status](https://api.travis-ci.org/thi-ng/umbrella.svg?branch=master)](https://travis-ci.org/thi-ng/umbrella)
+[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org/)
+
+Mono-repository for thi.ng TypeScript/ES6 projects, a collection of largely
+data / transformation oriented packages.
+
+All packages are:
+
+- distributed as ES6 modules with bundled TypeScript typings & changelogs
+- highly modular with largely only a single exported function / class per file
+- provide re-exports of all their publics (`src/index.ts`)
+- have either none or only @thi.ng internal runtime dependencies (see graph below)
+- declare public interfaces, enums & types in an `src/api.ts` file (larger packages only)
+- licensed under Apache Software License 2.0
## Projects
-| Projects | Version |
-|----|----|
-| [`@thi.ng/api`](./packages/api) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/api.svg)](https://www.npmjs.com/package/@thi.ng/api) |
-| [`@thi.ng/bitstream`](./packages/bitstream) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/bitstream.svg)](https://www.npmjs.com/package/@thi.ng/bitstream) |
-| [`@thi.ng/checks`](./packages/checks) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/checks.svg)](https://www.npmjs.com/package/@thi.ng/checks) |
-| [`@thi.ng/csp`](./packages/csp) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/csp.svg)](https://www.npmjs.com/package/@thi.ng/csp) |
-| [`@thi.ng/dcons`](./packages/dcons) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/dcons.svg)](https://www.npmjs.com/package/@thi.ng/dcons) |
-| [`@thi.ng/hiccup`](./packages/hiccup) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/hiccup.svg)](https://www.npmjs.com/package/@thi.ng/hiccup) |
-| [`@thi.ng/iterators`](./packages/iterators) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/iterators.svg)](https://www.npmjs.com/package/@thi.ng/iterators) |
-| [`@thi.ng/rle-pack`](./packages/rle-pack) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/rle-pack.svg)](https://www.npmjs.com/package/@thi.ng/rle-pack) |
-| [`@thi.ng/rstream`](./packages/rstream) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/rstream.svg)](https://www.npmjs.com/package/@thi.ng/rstream) |
-| [`@thi.ng/rstream-csp`](./packages/rstream-csp) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/rstream-csp.svg)](https://www.npmjs.com/package/@thi.ng/rstream-csp) |
-| [`@thi.ng/rstream-log`](./packages/rstream-log) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/rstream-log.svg)](https://www.npmjs.com/package/@thi.ng/rstream-log) |
-| [`@thi.ng/transducers`](./packages/transducers) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/transducers.svg)](https://www.npmjs.com/package/@thi.ng/transducers) |
-| [`@thi.ng/unionstruct`](./packages/unionstruct) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/unionstruct.svg)](https://www.npmjs.com/package/@thi.ng/unionstruct) |
+| Projects | Version | |
+|----|----|----|
+| [`@thi.ng/api`](./packages/api) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/api.svg)](https://www.npmjs.com/package/@thi.ng/api) | [changelog](./packages/api/CHANGELOG.md) |
+| [`@thi.ng/atom`](./packages/atom) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/atom.svg)](https://www.npmjs.com/package/@thi.ng/atom) | [changelog](./packages/atom/CHANGELOG.md) |
+| [`@thi.ng/bitstream`](./packages/bitstream) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/bitstream.svg)](https://www.npmjs.com/package/@thi.ng/bitstream) | [changelog](./packages/bitstream/CHANGELOG.md) |
+| [`@thi.ng/checks`](./packages/checks) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/checks.svg)](https://www.npmjs.com/package/@thi.ng/checks) | [changelog](./packages/checks/CHANGELOG.md) |
+| [`@thi.ng/csp`](./packages/csp) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/csp.svg)](https://www.npmjs.com/package/@thi.ng/csp) | [changelog](./packages/csp/CHANGELOG.md) |
+| [`@thi.ng/dcons`](./packages/dcons) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/dcons.svg)](https://www.npmjs.com/package/@thi.ng/dcons) | [changelog](./packages/dcons/CHANGELOG.md) |
+| [`@thi.ng/hiccup`](./packages/hiccup) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/hiccup.svg)](https://www.npmjs.com/package/@thi.ng/hiccup) | [changelog](./packages/hiccup/CHANGELOG.md) |
+| [`@thi.ng/iterators`](./packages/iterators) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/iterators.svg)](https://www.npmjs.com/package/@thi.ng/iterators) | [changelog](./packages/iterators/CHANGELOG.md) |
+| [`@thi.ng/rle-pack`](./packages/rle-pack) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/rle-pack.svg)](https://www.npmjs.com/package/@thi.ng/rle-pack) | [changelog](./packages/rle-pack/CHANGELOG.md) |
+| [`@thi.ng/rstream`](./packages/rstream) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/rstream.svg)](https://www.npmjs.com/package/@thi.ng/rstream) | [changelog](./packages/rstream/CHANGELOG.md) |
+| [`@thi.ng/rstream-csp`](./packages/rstream-csp) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/rstream-csp.svg)](https://www.npmjs.com/package/@thi.ng/rstream-csp) | [changelog](./packages/rstream-csp/CHANGELOG.md) |
+| [`@thi.ng/rstream-log`](./packages/rstream-log) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/rstream-log.svg)](https://www.npmjs.com/package/@thi.ng/rstream-log) | [changelog](./packages/rstream-log/CHANGELOG.md) |
+| [`@thi.ng/transducers`](./packages/transducers) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/transducers.svg)](https://www.npmjs.com/package/@thi.ng/transducers) | [changelog](./packages/transducers/CHANGELOG.md) |
+| [`@thi.ng/unionstruct`](./packages/unionstruct) | [![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/unionstruct.svg)](https://www.npmjs.com/package/@thi.ng/unionstruct) | [changelog](./packages/unionstruct/CHANGELOG.md) |
## Dependency graph
+(This graph is updated automatically after each version update)
+
![internal dependencies](./assets/deps.png)
## Building
@@ -29,15 +45,15 @@ Mono-repository for thi.ng TypeScript/ES6 projects.
```
git clone https://github.com/thi-ng/umbrella.git
cd umbrella
-yarn install
-lerna bootstrap
-lerna exec yarn build --sort
+yarn build
```
-### Testing
+## Testing
+
+(TODO not all packages have tests yet)
```
-lerna exec yarn test
+yarn test
# or individually
-lerna exec yarn test --scope @thi.ng/checks
+lerna run test --scope @thi.ng/rstream
```
diff --git a/assets/deps.png b/assets/deps.png
index 39fc6bc3c4..5d25f794f1 100644
Binary files a/assets/deps.png and b/assets/deps.png differ
diff --git a/package.json b/package.json
index afd7bb129f..287ea50fea 100644
--- a/package.json
+++ b/package.json
@@ -4,9 +4,14 @@
"packages/*"
],
"devDependencies": {
- "lerna": "^2.8.0"
+ "lerna": "^2.8.0",
+ "tslint": "^5.9.1",
+ "typescript": "^2.6.2"
},
"scripts": {
- "depgraph": "scripts/depgraph && git add assets/deps.png && git commit -m 'update dep graph` && git push"
+ "build": "yarn install && lerna bootstrap && lerna run build --sort",
+ "depgraph": "scripts/depgraph && git add assets/deps.png && git commit -m 'docs: update dep graph' && git push",
+ "pub": "lerna publish && yarn depgraph",
+ "test": "yarn build && lerna run test"
}
}
\ No newline at end of file
diff --git a/packages/api/CHANGELOG.md b/packages/api/CHANGELOG.md
index 8c487fbb34..e1f9a9f631 100644
--- a/packages/api/CHANGELOG.md
+++ b/packages/api/CHANGELOG.md
@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [1.4.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/api@1.4.0...@thi.ng/api@1.4.1) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/api
+
+
+# [1.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/api@1.3.0...@thi.ng/api@1.4.0) (2018-01-29)
+
+
+### Features
+
+* **api:** update IWatch & mixin, boolean returns ([bddd5ce](https://github.com/thi-ng/umbrella/commit/bddd5ce))
+
+
+
+
# [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/api@1.2.1...@thi.ng/api@1.3.0) (2018-01-28)
diff --git a/packages/api/package.json b/packages/api/package.json
index ff115a22b1..8e80105eb7 100644
--- a/packages/api/package.json
+++ b/packages/api/package.json
@@ -1,6 +1,6 @@
{
"name": "@thi.ng/api",
- "version": "1.3.0",
+ "version": "1.4.1",
"description": "Common, generic types & interfaces for thi.ng projects",
"main": "./index.js",
"typings": "./index.d.ts",
@@ -8,10 +8,11 @@
"author": "Karsten Schmidt ",
"license": "Apache-2.0",
"scripts": {
- "build": "yarn run clean && tsc --declaration",
- "test": "yarn run clean && tsc -p test && mocha build/test/*.js",
+ "build": "yarn clean && tsc --declaration",
"clean": "rm -rf *.js *.d.ts build doc decorators mixins",
- "pub": "yarn run build && yarn publish --access public"
+ "doc": "node_modules/.bin/typedoc --mode modules --out doc src",
+ "pub": "yarn build && yarn publish --access public",
+ "test": "rm -rf build && tsc -p test && mocha build/test/*.js"
},
"devDependencies": {
"@types/mocha": "^2.2.46",
@@ -23,7 +24,7 @@
"webpack": "^3.10.0"
},
"dependencies": {
- "@thi.ng/checks": "^1.1.2"
+ "@thi.ng/checks": "^1.1.3"
},
"keywords": [
"ES6",
diff --git a/packages/api/src/api.ts b/packages/api/src/api.ts
index 3aca9908ff..e5320aab4e 100644
--- a/packages/api/src/api.ts
+++ b/packages/api/src/api.ts
@@ -289,7 +289,7 @@ export interface IStack {
export type Watch = (id: string, oldState: T, newState: T) => void;
export interface IWatch {
- addWatch(id: string, fn: Watch);
- removeWatch(id: string);
+ addWatch(id: string, fn: Watch): boolean;
+ removeWatch(id: string): boolean;
notifyWatches(oldState: T, newState: T);
}
diff --git a/packages/api/src/mixins/iwatch.ts b/packages/api/src/mixins/iwatch.ts
index 0acb6b036a..e6ee395dcb 100644
--- a/packages/api/src/mixins/iwatch.ts
+++ b/packages/api/src/mixins/iwatch.ts
@@ -4,11 +4,19 @@ import { mixin } from "../mixin";
export const IWatch = mixin({
addWatch(id: string, fn: (id: string, oldState: any, newState: any) => void) {
this._watches = this._watches || {};
+ if (this._watches[id]) {
+ return false;
+ }
this._watches[id] = fn;
+ return true;
},
removeWatch(id: string) {
this._watches = this._watches || {};
- delete this._watches[id];
+ if (this._watches[id]) {
+ delete this._watches[id];
+ return true;
+ }
+ return false;
},
notifyWatches(oldState: any, newState: any) {
const w = (this._watches = this._watches || {}),
diff --git a/packages/api/test/index.ts b/packages/api/test/index.ts
new file mode 100644
index 0000000000..be0596bd60
--- /dev/null
+++ b/packages/api/test/index.ts
@@ -0,0 +1,3 @@
+describe("api", () => {
+ it("tests pending");
+});
diff --git a/packages/api/test/tsconfig.json b/packages/api/test/tsconfig.json
index 15f6b2a4f3..13d45669e5 100644
--- a/packages/api/test/tsconfig.json
+++ b/packages/api/test/tsconfig.json
@@ -1,7 +1,7 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
- "outDir": "../build",
+ "outDir": "../build"
},
"include": [
"./**/*.ts",
diff --git a/packages/api/tsconfig.json b/packages/api/tsconfig.json
index fe4ca75067..f6c291a0a0 100644
--- a/packages/api/tsconfig.json
+++ b/packages/api/tsconfig.json
@@ -4,6 +4,6 @@
"outDir": "."
},
"include": [
- "./src/**/*.ts",
+ "./src/**/*.ts"
]
}
\ No newline at end of file
diff --git a/packages/atom/.gitignore b/packages/atom/.gitignore
new file mode 100644
index 0000000000..c84d20084f
--- /dev/null
+++ b/packages/atom/.gitignore
@@ -0,0 +1,11 @@
+/bench
+/build
+/dev
+/doc
+/node_modules
+.DS_Store
+/bundle.*
+*.log
+*.tgz
+*.js
+*.d.ts
diff --git a/packages/atom/.npmignore b/packages/atom/.npmignore
new file mode 100644
index 0000000000..538f8b608d
--- /dev/null
+++ b/packages/atom/.npmignore
@@ -0,0 +1,14 @@
+bench/*
+build/*
+dev/*
+node_modules
+src*
+test*
+bundle.*
+tsconfig.json
+webpack.config.js
+*.html
+*.tgz
+!doc/*
+!*.d.ts
+!*.js
diff --git a/packages/atom/CHANGELOG.md b/packages/atom/CHANGELOG.md
new file mode 100644
index 0000000000..51915b823c
--- /dev/null
+++ b/packages/atom/CHANGELOG.md
@@ -0,0 +1,51 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+
+## [0.2.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/atom@0.2.0...@thi.ng/atom@0.2.1) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/atom
+
+
+# [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/atom@0.1.2...@thi.ng/atom@0.2.0) (2018-01-29)
+
+
+### Features
+
+* **atom:** add nested path getter / setter compilers ([5dce8a2](https://github.com/thi-ng/umbrella/commit/5dce8a2))
+
+
+
+
+
+## [0.1.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/atom@0.1.1...@thi.ng/atom@0.1.2) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/atom
+
+
+## [0.1.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/atom@0.1.0...@thi.ng/atom@0.1.1) (2018-01-29)
+
+
+### Bug Fixes
+
+* **atom:** cursor IWatch impls (replace stubs) ([cca801b](https://github.com/thi-ng/umbrella/commit/cca801b))
+
+
+
+
+
+# 0.1.0 (2018-01-29)
+
+
+### Features
+
+* **atom:** add Cursor, update interfaces, types, readme ([04c3d59](https://github.com/thi-ng/umbrella/commit/04c3d59))
+* **atom:** re-import atom package from MBP2010, update main readme ([fefc283](https://github.com/thi-ng/umbrella/commit/fefc283))
diff --git a/packages/atom/LICENSE b/packages/atom/LICENSE
new file mode 100644
index 0000000000..8dada3edaf
--- /dev/null
+++ b/packages/atom/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/packages/atom/README.md b/packages/atom/README.md
new file mode 100644
index 0000000000..5a9d9c83e9
--- /dev/null
+++ b/packages/atom/README.md
@@ -0,0 +1,81 @@
+# @thi.ng/atom
+
+[![npm (scoped)](https://img.shields.io/npm/v/@thi.ng/atom.svg)](https://www.npmjs.com/package/@thi.ng/atom)
+
+## About
+
+Clojure inspired mutable wrappers for (usually) immutable values, with support for watches.
+
+TODO
+
+## Installation
+
+```
+yarn add @thi.ng/atom
+```
+
+## Usage examples
+
+### Atom
+
+```typescript
+import * as atom from "@thi.ng/atom";
+
+const a = new atom.Atom(23);
+
+// obtain value via deref()
+a.deref();
+// 23
+
+// add watch to observe value changes
+a.addWatch("foo", (id, prev, curr) => console.log(`${id}: ${prev} -> ${curr}`));
+// true
+
+a.swap((val)=> val + 1);
+// foo: 23 -> 24
+
+a.reset(42);
+// foo: 24 -> 42
+```
+
+### Cursor
+
+```typescript
+// main state
+main = new atom.Atom({ a: { b: { c: 23 }, d: { e: 42 } }, f: 66 });
+
+// cursor to `c` value
+cursor = new atom.Cursor(main, "a.b.c");
+// or
+cursor = new atom.Cursor(main, ["a","b","c"]);
+
+// alternatively provide path implicitly via lookup & update functions
+// both fns will be called with cursor's parent state
+// this allows the cursor implementation to work with any data structure
+// as long as the updater DOES NOT mutate in place
+cursor = new atom.Cursor(
+ main,
+ (s) => s.a.b.c,
+ (s, x) => ({...s, a: {...s.a, b: {...s.a.b, c: x}}})
+);
+
+// add watch just as with Atom
+cursor.addWatch("foo", console.log);
+
+cursor.deref()
+// 23
+
+cursor.swap(x => x + 1);
+// foo 23 24
+
+main.deref()
+// { a: 24, b: 42 }
+```
+
+## Authors
+
+- Karsten Schmidt
+
+## License
+
+© 2018 Karsten Schmidt // Apache Software License 2.0
diff --git a/packages/atom/package.json b/packages/atom/package.json
new file mode 100644
index 0000000000..5d8ae785e2
--- /dev/null
+++ b/packages/atom/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "@thi.ng/atom",
+ "version": "0.2.1",
+ "description": "Mutable wrapper for a immutable values",
+ "main": "./index.js",
+ "typings": "./index.d.ts",
+ "repository": "https://github.com/thi-ng/umbrella",
+ "author": "Karsten Schmidt ",
+ "license": "Apache-2.0",
+ "scripts": {
+ "build": "yarn clean && tsc --declaration",
+ "clean": "rm -rf *.js *.d.ts build doc",
+ "doc": "node_modules/.bin/typedoc --mode modules --out doc src",
+ "pub": "yarn build && yarn publish --access public",
+ "test": "rm -rf build && tsc -p test && mocha build/test/*.js"
+ },
+ "devDependencies": {
+ "@types/mocha": "^2.2.46",
+ "@types/node": "^9.3.0",
+ "mocha": "^5.0.0",
+ "ts-loader": "^3.3.1",
+ "typedoc": "^0.9.0",
+ "typescript": "^2.6.2",
+ "webpack": "^3.10.0"
+ },
+ "dependencies": {
+ "@thi.ng/api": "^1.4.1"
+ },
+ "keywords": [
+ "ES6",
+ "typescript"
+ ],
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/packages/atom/src/api.ts b/packages/atom/src/api.ts
new file mode 100644
index 0000000000..75ad5ab202
--- /dev/null
+++ b/packages/atom/src/api.ts
@@ -0,0 +1,13 @@
+import * as api from "@thi.ng/api/api";
+
+export type SwapFn = (curr: T, ...args: any[]) => T;
+
+export interface ReadonlyAtom extends
+ api.IDeref,
+ api.IWatch {
+}
+
+export interface IAtom extends ReadonlyAtom {
+ reset(val: T): T;
+ swap(fn: SwapFn, ...args: any[]): T;
+}
diff --git a/packages/atom/src/atom.ts b/packages/atom/src/atom.ts
new file mode 100644
index 0000000000..de4f27b744
--- /dev/null
+++ b/packages/atom/src/atom.ts
@@ -0,0 +1,56 @@
+import { IEquiv, Watch } from "@thi.ng/api/api";
+import { IWatch } from "@thi.ng/api/mixins/iwatch";
+
+import { IAtom, SwapFn } from "./api";
+
+/**
+ * Mutable wrapper for an (usually) immutable value.
+ * Support for watches.
+ */
+@IWatch
+export class Atom implements
+ IAtom,
+ IEquiv {
+
+ protected value: T;
+
+ constructor(val?: T) {
+ this.value = val;
+ }
+
+ deref() {
+ return this.value;
+ }
+
+ equiv(o: any) {
+ return this === o;
+ }
+
+ reset(val: T) {
+ const old = this.value;
+ this.value = val;
+ this.notifyWatches(old, val);
+ return this.value;
+ }
+
+ swap(fn: SwapFn, ...args: any[]) {
+ const old = this.value;
+ args.unshift(old);
+ this.value = fn.apply(null, args);
+ this.notifyWatches(old, this.value);
+ return this.value;
+ }
+
+ // mixin stub
+ addWatch(id: string, fn: Watch) {
+ return false;
+ }
+
+ // mixin stub
+ removeWatch(id: string) {
+ return false;
+ }
+
+ // mixin stub
+ notifyWatches(oldState: T, newState: T) { }
+}
diff --git a/packages/atom/src/cursor.ts b/packages/atom/src/cursor.ts
new file mode 100644
index 0000000000..eae193312a
--- /dev/null
+++ b/packages/atom/src/cursor.ts
@@ -0,0 +1,87 @@
+import { IID, IRelease, Watch } from "@thi.ng/api/api";
+import { isArray } from "@thi.ng/checks/is-array";
+import { isFunction } from "@thi.ng/checks/is-function";
+import { isString } from "@thi.ng/checks/is-string";
+
+import { IAtom, SwapFn } from "./api";
+import { Atom } from "./atom";
+import { getter, setter } from "./path";
+
+export class Cursor implements
+ IAtom,
+ IID,
+ IRelease {
+
+ static NEXT_ID = 0;
+
+ readonly id: string;
+ parent: IAtom;
+
+ protected local: Atom;
+ protected lookup: (s: any) => T;
+ protected selfUpdate: boolean;
+
+ constructor(parent: IAtom, path: PropertyKey | PropertyKey[]);
+ constructor(parent: IAtom, lookup: (s: any) => T, update: (s: any, v: T) => any);
+ constructor(parent: IAtom, ...opts: any[]) {
+ this.parent = parent;
+ this.id = `cursor-${Cursor.NEXT_ID++}`;
+ this.selfUpdate = false;
+ let lookup, update;
+ if (isString(opts[0]) || isArray(opts[0])) {
+ lookup = getter(opts[0]);
+ update = setter(opts[0]);
+ } else if (isFunction(opts[0]) && isFunction(opts[1])) {
+ [lookup, update] = opts;
+ } else {
+ throw new Error("illegal args");
+ }
+ this.local = new Atom(lookup(parent.deref()));
+ this.local.addWatch(this.id, (_, prev, curr) => {
+ if (prev !== curr) {
+ this.selfUpdate = true;
+ parent.swap((state) => update(state, curr));
+ this.selfUpdate = false;
+ }
+ });
+ parent.addWatch(this.id, (_, prev, curr) => {
+ if (!this.selfUpdate) {
+ const cval = lookup(curr);
+ if (cval !== lookup(prev)) {
+ this.local.reset(cval);
+ }
+ }
+ });
+ }
+
+ deref() {
+ return this.local.deref();
+ }
+
+ release() {
+ this.local.removeWatch(this.id);
+ this.parent.removeWatch(this.id);
+ delete this.local;
+ return true;
+ }
+
+ reset(val: T) {
+ return this.local.reset(val);
+ }
+
+ swap(fn: SwapFn, ...args: any[]) {
+ return this.local.swap.apply(this.local, [fn, ...args]);
+ }
+
+ addWatch(id: string, fn: Watch) {
+ return this.local.addWatch(id, fn);
+ }
+
+ removeWatch(id: string): boolean {
+ return this.local.removeWatch(id);
+ }
+
+ notifyWatches(oldState: T, newState: T) {
+ return this.local.notifyWatches(oldState, newState);
+ }
+}
diff --git a/packages/atom/src/index.ts b/packages/atom/src/index.ts
new file mode 100644
index 0000000000..1c481343f2
--- /dev/null
+++ b/packages/atom/src/index.ts
@@ -0,0 +1,3 @@
+export * from "./atom";
+export * from "./cursor";
+export * from "./path";
\ No newline at end of file
diff --git a/packages/atom/src/path.ts b/packages/atom/src/path.ts
new file mode 100644
index 0000000000..6e085c7279
--- /dev/null
+++ b/packages/atom/src/path.ts
@@ -0,0 +1,30 @@
+import { isArray } from "@thi.ng/checks/is-array";
+import { isString } from "@thi.ng/checks/is-string";
+
+function compS(k, f) {
+ return (s, v) => ({ ...s, [k]: f((s || {})[k], v) });
+}
+
+function compG(k, f) {
+ return (s) => s ? f(s[k]) : undefined;
+}
+
+export function getter(path: PropertyKey | PropertyKey[]) {
+ const ks = isArray(path) ? path : isString(path) ? path.split(".") : [path],
+ kl = ks.pop();
+ let f = (s) => s ? s[kl] : undefined;
+ for (let i = ks.length - 1; i >= 0; i--) {
+ f = compG(ks[i], f);
+ }
+ return f;
+}
+
+export function setter(path: PropertyKey | PropertyKey[]) {
+ const ks = isArray(path) ? path : isString(path) ? path.split(".") : [path],
+ kl = ks.pop();
+ let f = (s, v) => ({ ...(s || {}), [kl]: v });
+ for (let i = ks.length - 1; i >= 0; i--) {
+ f = compS(ks[i], f);
+ }
+ return f;
+}
diff --git a/packages/atom/test/atom.ts b/packages/atom/test/atom.ts
new file mode 100644
index 0000000000..996c8c1a57
--- /dev/null
+++ b/packages/atom/test/atom.ts
@@ -0,0 +1,42 @@
+import * as assert from "assert";
+import { Atom } from "../src/index";
+
+describe("atom", function () {
+
+ let a: Atom;
+
+ beforeEach(() => {
+ a = new Atom(23);
+ });
+
+ it("can be deref'd", () => {
+ assert.equal(a.deref(), 23);
+ });
+
+ it("can be reset", () => {
+ assert.equal(a.reset(24), 24);
+ assert.equal(a.deref(), 24);
+ });
+
+ it("can be swapped", () => {
+ assert.equal(a.swap((x) => x + 1), 24);
+ assert.equal(a.deref(), 24);
+ });
+
+ it("can add & remove watch", () => {
+ assert(a.addWatch("foo", () => { }), "can't add watch");
+ assert((a)._watches && (a)._watches.foo, "watch missing");
+ assert(a.removeWatch("foo"), "can't remove watch");
+ assert(!a.removeWatch("foo"), "should fail to remove invalid watch id");
+ });
+
+ it("can be watched", () => {
+ a.addWatch("foo", (id, prev, curr) => {
+ assert.equal(id, "foo", "wrong id");
+ assert.equal(prev, 23, "wrong prev");
+ assert.equal(curr, 24, "wrong curr");
+ });
+ a.swap((x) => x + 1);
+ });
+
+});
diff --git a/packages/atom/test/cursor.ts b/packages/atom/test/cursor.ts
new file mode 100644
index 0000000000..773d72da8e
--- /dev/null
+++ b/packages/atom/test/cursor.ts
@@ -0,0 +1,64 @@
+import * as assert from "assert";
+import { Atom, Cursor } from "../src/index";
+
+describe("cursor w/ path", function () {
+
+ let a: Atom;
+ let c: Cursor;
+ let src;
+
+ beforeEach(() => {
+ src = { a: { b: { c: 23 }, d: { e: 42 } }, f: 66 };
+ a = new Atom(src);
+ });
+
+ it("can be deref'd (a)", () => {
+ c = new Cursor(a, "a");
+ assert.deepStrictEqual(c.deref(), src.a);
+ });
+
+ it("can be deref'd (a.b)", () => {
+ c = new Cursor(a, "a.b");
+ assert.deepStrictEqual(c.deref(), src.a.b);
+ });
+
+ it("can be deref'd (a.b.c)", () => {
+ c = new Cursor(a, "a.b.c");
+ assert.equal(c.deref(), src.a.b.c);
+ });
+
+ it("doesn't fail w/ invalid path", () => {
+ c = new Cursor(a, "a.b.x.y.z");
+ assert.strictEqual(c.deref(), undefined);
+ });
+
+ it("can be swapped'd (a.b.c)", () => {
+ c = new Cursor(a, "a.b.c");
+ assert.equal(c.swap(x => x + 1), src.a.b.c + 1);
+ assert.equal(c.deref(), src.a.b.c + 1);
+ assert.equal(a.deref().a.b.c, src.a.b.c + 1);
+ assert.strictEqual(a.deref().a.d, src.a.d);
+ assert.strictEqual(a.deref().f, src.f);
+ });
+
+ it("can be reset (a.b.c)", () => {
+ c = new Cursor(a, "a.b.c");
+ assert.equal(c.reset(100), 100);
+ assert.equal(c.deref(), 100);
+ assert.equal(a.deref().a.b.c, 100);
+ assert.strictEqual(a.deref().a.d, src.a.d);
+ assert.strictEqual(a.deref().f, src.f);
+ });
+
+ it("can update invalid path (x.y.z)", () => {
+ c = new Cursor(a, "x.y.z");
+ assert.equal(c.swap(x => x != null ? x + 1 : 0), 0);
+ assert.equal(c.deref(), 0);
+ assert.equal(c.swap(x => x != null ? x + 1 : 0), 1);
+ assert.equal(c.deref(), 1);
+ assert.equal(c.reset(100), 100);
+ assert.equal(c.deref(), 100);
+ assert.equal(a.deref().x.y.z, 100);
+ assert.strictEqual(src.x, undefined);
+ });
+});
diff --git a/packages/atom/test/tsconfig.json b/packages/atom/test/tsconfig.json
new file mode 100644
index 0000000000..e077d51a4c
--- /dev/null
+++ b/packages/atom/test/tsconfig.json
@@ -0,0 +1,11 @@
+{
+ "extends": "../../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../build",
+ "noUnusedParameters": false
+ },
+ "include": [
+ "./**/*.ts",
+ "../src/**/*.ts"
+ ]
+}
\ No newline at end of file
diff --git a/packages/atom/tsconfig.json b/packages/atom/tsconfig.json
new file mode 100644
index 0000000000..7e59425303
--- /dev/null
+++ b/packages/atom/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": ".",
+ "noUnusedParameters": false
+ },
+ "include": [
+ "./src/**/*.ts"
+ ]
+}
\ No newline at end of file
diff --git a/packages/bitstream/CHANGELOG.md b/packages/bitstream/CHANGELOG.md
index 5d3663bdbf..35199b3c60 100644
--- a/packages/bitstream/CHANGELOG.md
+++ b/packages/bitstream/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [0.3.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/bitstream@0.3.2...@thi.ng/bitstream@0.3.3) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/bitstream
+
## [0.3.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/bitstream@0.3.1...@thi.ng/bitstream@0.3.2) (2018-01-28)
diff --git a/packages/bitstream/package.json b/packages/bitstream/package.json
index b92cab0380..dd7022e673 100644
--- a/packages/bitstream/package.json
+++ b/packages/bitstream/package.json
@@ -1,6 +1,6 @@
{
"name": "@thi.ng/bitstream",
- "version": "0.3.2",
+ "version": "0.3.3",
"description": "ES6 iterator based read/write bit streams & support for variable word widths",
"main": "./index.js",
"typings": "./index.d.ts",
@@ -8,10 +8,11 @@
"author": "Karsten Schmidt ",
"license": "Apache-2.0",
"scripts": {
- "build": "yarn run clean && tsc --declaration",
- "test": "yarn run clean && tsc -p test && mocha build/test/*.js",
+ "build": "yarn clean && tsc --declaration",
"clean": "rm -rf *.js *.d.ts build doc",
- "pub": "yarn run build && yarn publish --access public"
+ "doc": "node_modules/.bin/typedoc --mode modules --out doc src",
+ "pub": "yarn build && yarn publish --access public",
+ "test": "rm -rf build && tsc -p test && mocha build/test/*.js"
},
"devDependencies": {
"@types/mocha": "^2.2.46",
diff --git a/packages/bitstream/test/tsconfig.json b/packages/bitstream/test/tsconfig.json
index 15f6b2a4f3..13d45669e5 100644
--- a/packages/bitstream/test/tsconfig.json
+++ b/packages/bitstream/test/tsconfig.json
@@ -1,7 +1,7 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
- "outDir": "../build",
+ "outDir": "../build"
},
"include": [
"./**/*.ts",
diff --git a/packages/checks/CHANGELOG.md b/packages/checks/CHANGELOG.md
index 067ce2dd04..b319914a9d 100644
--- a/packages/checks/CHANGELOG.md
+++ b/packages/checks/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [1.1.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.1.2...@thi.ng/checks@1.1.3) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/checks
+
## [1.1.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/checks@1.1.1...@thi.ng/checks@1.1.2) (2018-01-28)
diff --git a/packages/checks/package.json b/packages/checks/package.json
index 111c2cb793..f0fee5acf3 100644
--- a/packages/checks/package.json
+++ b/packages/checks/package.json
@@ -1,6 +1,6 @@
{
"name": "@thi.ng/checks",
- "version": "1.1.2",
+ "version": "1.1.3",
"description": "Single-function sub-modules for type, feature & value checks",
"main": "./index.js",
"typings": "./index.d.ts",
@@ -8,10 +8,11 @@
"author": "Karsten Schmidt ",
"license": "Apache-2.0",
"scripts": {
- "build": "yarn run clean && tsc --declaration",
- "test": "yarn run clean && tsc -p test && mocha build/test/*.js",
+ "build": "yarn clean && tsc --declaration",
"clean": "rm -rf *.js *.d.ts build doc",
- "pub": "yarn run build && yarn publish --access public"
+ "doc": "node_modules/.bin/typedoc --mode modules --out doc src",
+ "pub": "yarn build && yarn publish --access public",
+ "test": "rm -rf build && tsc -p test && mocha build/test/*.js"
},
"devDependencies": {
"@types/mocha": "^2.2.46",
diff --git a/packages/checks/test/tsconfig.json b/packages/checks/test/tsconfig.json
index 15f6b2a4f3..13d45669e5 100644
--- a/packages/checks/test/tsconfig.json
+++ b/packages/checks/test/tsconfig.json
@@ -1,7 +1,7 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
- "outDir": "../build",
+ "outDir": "../build"
},
"include": [
"./**/*.ts",
diff --git a/packages/checks/tsconfig.json b/packages/checks/tsconfig.json
index fe4ca75067..f6c291a0a0 100644
--- a/packages/checks/tsconfig.json
+++ b/packages/checks/tsconfig.json
@@ -4,6 +4,6 @@
"outDir": "."
},
"include": [
- "./src/**/*.ts",
+ "./src/**/*.ts"
]
}
\ No newline at end of file
diff --git a/packages/csp/CHANGELOG.md b/packages/csp/CHANGELOG.md
index 842c96c01c..fd890c782d 100644
--- a/packages/csp/CHANGELOG.md
+++ b/packages/csp/CHANGELOG.md
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [0.3.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/csp@0.3.5...@thi.ng/csp@0.3.6) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/csp
+
+
+## [0.3.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/csp@0.3.4...@thi.ng/csp@0.3.5) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/csp
+
+
+## [0.3.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/csp@0.3.3...@thi.ng/csp@0.3.4) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/csp
+
## [0.3.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/csp@0.3.2...@thi.ng/csp@0.3.3) (2018-01-28)
diff --git a/packages/csp/package.json b/packages/csp/package.json
index 32e3290a8b..d56225faaf 100644
--- a/packages/csp/package.json
+++ b/packages/csp/package.json
@@ -1,6 +1,6 @@
{
"name": "@thi.ng/csp",
- "version": "0.3.3",
+ "version": "0.3.6",
"description": "ES6 promise based CSP implementation",
"main": "./index.js",
"typings": "./index.d.ts",
@@ -8,14 +8,15 @@
"author": "Karsten Schmidt ",
"license": "Apache-2.0",
"scripts": {
- "build": "yarn run clean && tsc --declaration",
- "test": "yarn run clean && tsc -p test && mocha build/test/*.js",
+ "build": "yarn clean && tsc --declaration",
+ "clean": "rm -rf *.js *.d.ts build doc utils",
+ "doc": "node_modules/.bin/typedoc --mode modules --out doc src",
+ "pub": "yarn build && yarn publish --access public",
+ "test": "rm -rf build && tsc -p test && mocha build/test/index.js",
"testasync": "tsc -p test && node build/test/async.js",
"testfile": "tsc -p test && node build/test/file.js",
"testgraph": "tsc -p test && node build/test/graph.js",
- "testnode": "tsc -p test && node build/test/node.js",
- "clean": "rm -rf *.js *.d.ts build doc utils",
- "pub": "yarn run build && yarn publish --access public"
+ "testnode": "tsc -p test && node build/test/node.js"
},
"devDependencies": {
"@types/mocha": "^2.2.46",
@@ -27,9 +28,9 @@
"webpack": "^3.10.0"
},
"dependencies": {
- "@thi.ng/api": "^1.3.0",
- "@thi.ng/dcons": "^0.1.5",
- "@thi.ng/transducers": "^1.0.0"
+ "@thi.ng/api": "^1.4.1",
+ "@thi.ng/dcons": "^0.1.7",
+ "@thi.ng/transducers": "^1.0.3"
},
"keywords": [
"async",
diff --git a/packages/csp/test/index.ts b/packages/csp/test/index.ts
new file mode 100644
index 0000000000..5bc2940287
--- /dev/null
+++ b/packages/csp/test/index.ts
@@ -0,0 +1,3 @@
+describe("csp", () => {
+ it("tests pending");
+});
diff --git a/packages/csp/test/tsconfig.json b/packages/csp/test/tsconfig.json
index 15f6b2a4f3..13d45669e5 100644
--- a/packages/csp/test/tsconfig.json
+++ b/packages/csp/test/tsconfig.json
@@ -1,7 +1,7 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
- "outDir": "../build",
+ "outDir": "../build"
},
"include": [
"./**/*.ts",
diff --git a/packages/csp/tsconfig.json b/packages/csp/tsconfig.json
index fe4ca75067..f6c291a0a0 100644
--- a/packages/csp/tsconfig.json
+++ b/packages/csp/tsconfig.json
@@ -4,6 +4,6 @@
"outDir": "."
},
"include": [
- "./src/**/*.ts",
+ "./src/**/*.ts"
]
}
\ No newline at end of file
diff --git a/packages/dcons/CHANGELOG.md b/packages/dcons/CHANGELOG.md
index f93423a221..d0ebcfe880 100644
--- a/packages/dcons/CHANGELOG.md
+++ b/packages/dcons/CHANGELOG.md
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [0.1.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/dcons@0.1.6...@thi.ng/dcons@0.1.7) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/dcons
+
+
+## [0.1.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/dcons@0.1.5...@thi.ng/dcons@0.1.6) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/dcons
+
## [0.1.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/dcons@0.1.4...@thi.ng/dcons@0.1.5) (2018-01-28)
diff --git a/packages/dcons/package.json b/packages/dcons/package.json
index 1f1557ea68..4b1e7a99a3 100644
--- a/packages/dcons/package.json
+++ b/packages/dcons/package.json
@@ -1,6 +1,6 @@
{
"name": "@thi.ng/dcons",
- "version": "0.1.5",
+ "version": "0.1.7",
"description": "Comprehensive doubly linked list structure w/ iterator support",
"main": "./index.js",
"typings": "./index.d.ts",
@@ -8,10 +8,11 @@
"author": "Karsten Schmidt ",
"license": "Apache-2.0",
"scripts": {
- "build": "yarn run clean && tsc --declaration",
- "test": "yarn run clean && tsc -p test && mocha build/test/*.js",
+ "build": "yarn clean && tsc --declaration",
"clean": "rm -rf *.js *.d.ts build doc",
- "pub": "yarn run build && yarn publish --access public"
+ "doc": "node_modules/.bin/typedoc --mode modules --out doc src",
+ "pub": "yarn build && yarn publish --access public",
+ "test": "rm -rf build && tsc -p test && mocha build/test/*.js"
},
"devDependencies": {
"@types/mocha": "^2.2.46",
@@ -23,7 +24,7 @@
"webpack": "^3.10.0"
},
"dependencies": {
- "@thi.ng/api": "^1.3.0"
+ "@thi.ng/api": "^1.4.1"
},
"keywords": [
"datastructure",
diff --git a/packages/dcons/test/index.ts b/packages/dcons/test/index.ts
index 3e79406870..87ea10f0dd 100644
--- a/packages/dcons/test/index.ts
+++ b/packages/dcons/test/index.ts
@@ -3,8 +3,27 @@ import * as assert from "assert";
import { DCons } from "../src/index";
describe("DCons", () => {
- it("foo", () => {
- const a = new DCons([1, 2, 3, 4, 5, 6]);
+ let a: DCons, src;
+ beforeEach(() => {
+ src = [1, 2, 3, 4, 5];
+ a = new DCons(src);
+ });
+
+ it("is instanceof", () => {
assert(a instanceof DCons);
});
-});
+
+ it("has length", () => {
+ assert.equal(a.length, 5);
+ a = new DCons();
+ assert.equal(a.length, 0);
+ });
+
+ it("is iterable", () => {
+ assert.deepEqual([...a], src);
+ });
+
+ it("works as stack");
+
+ it("works as queue");
+});
\ No newline at end of file
diff --git a/packages/dcons/test/tsconfig.json b/packages/dcons/test/tsconfig.json
index 15f6b2a4f3..13d45669e5 100644
--- a/packages/dcons/test/tsconfig.json
+++ b/packages/dcons/test/tsconfig.json
@@ -1,7 +1,7 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
- "outDir": "../build",
+ "outDir": "../build"
},
"include": [
"./**/*.ts",
diff --git a/packages/dcons/tsconfig.json b/packages/dcons/tsconfig.json
index fe4ca75067..f6c291a0a0 100644
--- a/packages/dcons/tsconfig.json
+++ b/packages/dcons/tsconfig.json
@@ -4,6 +4,6 @@
"outDir": "."
},
"include": [
- "./src/**/*.ts",
+ "./src/**/*.ts"
]
}
\ No newline at end of file
diff --git a/packages/hiccup/CHANGELOG.md b/packages/hiccup/CHANGELOG.md
index dafcc9ecbc..1be5bfce35 100644
--- a/packages/hiccup/CHANGELOG.md
+++ b/packages/hiccup/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [0.1.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup@0.1.3...@thi.ng/hiccup@0.1.4) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/hiccup
+
## [0.1.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup@0.1.2...@thi.ng/hiccup@0.1.3) (2018-01-28)
diff --git a/packages/hiccup/package.json b/packages/hiccup/package.json
index b76d2be69f..4cc231ddf5 100644
--- a/packages/hiccup/package.json
+++ b/packages/hiccup/package.json
@@ -1,6 +1,6 @@
{
"name": "@thi.ng/hiccup",
- "version": "0.1.3",
+ "version": "0.1.4",
"description": "HTML/SVG/XML serialization of nested data structures, iterables & closures",
"main": "./index.js",
"typings": "./index.d.ts",
@@ -8,10 +8,11 @@
"author": "Karsten Schmidt ",
"license": "Apache-2.0",
"scripts": {
- "build": "yarn run clean && tsc --declaration",
- "test": "yarn run clean && tsc -p test && mocha build/test/*.js",
+ "build": "yarn clean && tsc --declaration",
"clean": "rm -rf *.js *.d.ts build doc",
- "pub": "yarn run build && yarn publish --access public"
+ "doc": "node_modules/.bin/typedoc --mode modules --out doc src",
+ "pub": "yarn build && yarn publish --access public",
+ "test": "rm -rf build && tsc -p test && mocha build/test/*.js"
},
"devDependencies": {
"@types/mocha": "^2.2.46",
diff --git a/packages/hiccup/test/tsconfig.json b/packages/hiccup/test/tsconfig.json
index 15f6b2a4f3..13d45669e5 100644
--- a/packages/hiccup/test/tsconfig.json
+++ b/packages/hiccup/test/tsconfig.json
@@ -1,7 +1,7 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
- "outDir": "../build",
+ "outDir": "../build"
},
"include": [
"./**/*.ts",
diff --git a/packages/hiccup/tsconfig.json b/packages/hiccup/tsconfig.json
index fe4ca75067..f6c291a0a0 100644
--- a/packages/hiccup/tsconfig.json
+++ b/packages/hiccup/tsconfig.json
@@ -4,6 +4,6 @@
"outDir": "."
},
"include": [
- "./src/**/*.ts",
+ "./src/**/*.ts"
]
}
\ No newline at end of file
diff --git a/packages/iterators/CHANGELOG.md b/packages/iterators/CHANGELOG.md
index d145d251e1..1feeacd6e3 100644
--- a/packages/iterators/CHANGELOG.md
+++ b/packages/iterators/CHANGELOG.md
@@ -3,6 +3,31 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+# [4.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/iterators@3.2.4...@thi.ng/iterators@4.0.0) (2018-01-29)
+
+
+### Code Refactoring
+
+* **iterators:** remove default exports ([651d07c](https://github.com/thi-ng/umbrella/commit/651d07c))
+
+
+### BREAKING CHANGES
+
+* **iterators:** switch back to named function exports for project consistency
+and following lead from tslint (https://palantir.github.io/tslint/rules/no-default-export/)
+
+
+
+
+
+## [3.2.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/iterators@3.2.3...@thi.ng/iterators@3.2.4) (2018-01-29)
+
+
+
+
+**Note:** Version bump only for package @thi.ng/iterators
+
## [3.2.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/iterators@3.2.2...@thi.ng/iterators@3.2.3) (2018-01-28)
diff --git a/packages/iterators/README.md b/packages/iterators/README.md
index e19858f5c2..817e31721d 100644
--- a/packages/iterators/README.md
+++ b/packages/iterators/README.md
@@ -4,7 +4,7 @@
## Overview
-Collection of approx. 50 composable, iterator-centric data processing functions,
+Collection of ~50 composable, iterator-centric data processing functions,
largely implemented as ES6 iterators / generators, inspired by
[clojure.core](http://clojure.github.io/clojure/clojure.core-api.html) API.
Written in TypeScript.
@@ -17,17 +17,15 @@ See [changelog](https://github.com/thi-ng/iterators/blob/master/CHANGELOG.md) fo
yarn add @thi.ng/iterators
```
-All functions are defined as sub-modules and exposed as default exports. This is an additional feature. The full library can still be imported as before. Function sub-modules use *Kebab case* whereas function names are in *Camel case*.
+All functions are defined as sub-modules and re-exported to allow the full
+library to be imported if desired. Sub-module file names use *Kebab case*,
+whereas function names are in *Camel case*.
```js
-// import entire library
-let ti = require("@thi.ng/iterators");
-
-// single function (ES5)
-let map = require("@thi.ng/iterators/map").default;
-
+// import all
+import * as ti from "@thi.ng/iterators";
// single function (ES6 / TS)
-import map from "@thi.ng/iterators/map";
+import { partitionBy } from "@thi.ng/iterators/partition-by";
```
## API
diff --git a/packages/iterators/package.json b/packages/iterators/package.json
index 6117f0f102..411e369634 100644
--- a/packages/iterators/package.json
+++ b/packages/iterators/package.json
@@ -1,6 +1,6 @@
{
"name": "@thi.ng/iterators",
- "version": "3.2.3",
+ "version": "4.0.0",
"description": "clojure.core inspired, composable ES6 iterators & generators",
"main": "./index.js",
"typings": "./index.d.ts",
@@ -8,10 +8,11 @@
"author": "Karsten Schmidt ",
"license": "Apache-2.0",
"scripts": {
- "build": "yarn run clean && tsc --declaration",
- "test": "yarn run clean && tsc -p test && mocha build/test/*.js",
+ "build": "yarn clean && tsc --declaration",
"clean": "rm -rf *.js *.d.ts build doc",
- "pub": "yarn run build && yarn publish --access public"
+ "doc": "node_modules/.bin/typedoc --mode modules --out doc src",
+ "pub": "yarn build && yarn publish --access public",
+ "test": "rm -rf build && tsc -p test && mocha build/test/*.js"
},
"devDependencies": {
"@types/mocha": "^2.2.46",
@@ -23,7 +24,7 @@
"webpack": "^3.10.0"
},
"dependencies": {
- "@thi.ng/dcons": "^0.1.5"
+ "@thi.ng/dcons": "^0.1.7"
},
"keywords": [
"clojure",
diff --git a/packages/iterators/src/butlast.ts b/packages/iterators/src/butlast.ts
index 4daf3fdc11..ecf1ba61d2 100644
--- a/packages/iterators/src/butlast.ts
+++ b/packages/iterators/src/butlast.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* butLast(input: Iterable) {
+export function* butLast(input: Iterable) {
let iter = iterator(input),
v: IteratorResult,
prev: T,
diff --git a/packages/iterators/src/cached.ts b/packages/iterators/src/cached.ts
index 8a19ee1e93..567b05cde5 100644
--- a/packages/iterators/src/cached.ts
+++ b/packages/iterators/src/cached.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function cached(input: Iterable) {
+export function cached(input: Iterable) {
let cache: T[] = [],
iter = iterator(input),
done = false;
diff --git a/packages/iterators/src/concat.ts b/packages/iterators/src/concat.ts
index 0d97bdb415..7e620c7ae6 100644
--- a/packages/iterators/src/concat.ts
+++ b/packages/iterators/src/concat.ts
@@ -1,7 +1,7 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
import { ensureIterable } from "./ensure";
-export default function* concat(...inputs: Iterable[]) {
+export function* concat(...inputs: Iterable[]) {
let iter = iterator(inputs),
v: IteratorResult>;
while (((v = iter.next()), !v.done)) {
diff --git a/packages/iterators/src/constantly.ts b/packages/iterators/src/constantly.ts
index 1e18d16714..dfd4499078 100644
--- a/packages/iterators/src/constantly.ts
+++ b/packages/iterators/src/constantly.ts
@@ -1,3 +1,3 @@
-export default function constantly(x: T): (...args: any[]) => T {
+export function constantly(x: T): (...args: any[]) => T {
return () => x;
}
diff --git a/packages/iterators/src/consume.ts b/packages/iterators/src/consume.ts
index a1f7377ed6..ed7ed0d143 100644
--- a/packages/iterators/src/consume.ts
+++ b/packages/iterators/src/consume.ts
@@ -1,4 +1,4 @@
-export default function consume(iter: Iterator, n = Number.POSITIVE_INFINITY) {
+export function consume(iter: Iterator, n = Number.POSITIVE_INFINITY) {
while (n-- > 0 && !iter.next().done) { }
return iter;
}
diff --git a/packages/iterators/src/cycle.ts b/packages/iterators/src/cycle.ts
index 0f162037f2..e8a9fca1ff 100644
--- a/packages/iterators/src/cycle.ts
+++ b/packages/iterators/src/cycle.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* cycle(input: Iterable) {
+export function* cycle(input: Iterable) {
let cache: T[] = [],
iter = iterator(input),
v: IteratorResult;
diff --git a/packages/iterators/src/dedupe-with.ts b/packages/iterators/src/dedupe-with.ts
index 5f20af070e..585b234e94 100644
--- a/packages/iterators/src/dedupe-with.ts
+++ b/packages/iterators/src/dedupe-with.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* dedupeWith(equiv: (a: T, b: T) => boolean, input: Iterable) {
+export function* dedupeWith(equiv: (a: T, b: T) => boolean, input: Iterable) {
let iter = iterator(input),
v: IteratorResult,
prev: T;
diff --git a/packages/iterators/src/dedupe.ts b/packages/iterators/src/dedupe.ts
index 9b5811bd8b..6790c1be9f 100644
--- a/packages/iterators/src/dedupe.ts
+++ b/packages/iterators/src/dedupe.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* dedupe(input: Iterable) {
+export function* dedupe(input: Iterable) {
let iter = iterator(input),
v: IteratorResult,
prev: T;
diff --git a/packages/iterators/src/dense.ts b/packages/iterators/src/dense.ts
index 7e12fe3f6d..d62cd06de3 100644
--- a/packages/iterators/src/dense.ts
+++ b/packages/iterators/src/dense.ts
@@ -1,5 +1,5 @@
-import filter from "./filter";
+import { filter } from "./filter";
-export default function dense(input: Iterable) {
+export function dense(input: Iterable) {
return filter(x => x != null, input);
}
diff --git a/packages/iterators/src/drop-nth.ts b/packages/iterators/src/drop-nth.ts
index 6fd0129cac..d1404b2f73 100644
--- a/packages/iterators/src/drop-nth.ts
+++ b/packages/iterators/src/drop-nth.ts
@@ -1,8 +1,8 @@
-import iterator from "./iterator";
-import take from "./take";
+import { iterator } from "./iterator";
+import { take } from "./take";
import { ensureIterable } from "./ensure";
-export default function* dropNth(n: number, input: Iterable) {
+export function* dropNth(n: number, input: Iterable) {
let iter = ensureIterable(iterator(input));
do {
yield* take(n - 1, iter);
diff --git a/packages/iterators/src/drop-while.ts b/packages/iterators/src/drop-while.ts
index 34b9d9bf3d..e18351a180 100644
--- a/packages/iterators/src/drop-while.ts
+++ b/packages/iterators/src/drop-while.ts
@@ -1,6 +1,6 @@
import { ensureIterator } from "./ensure";
-export default function* dropWhile(pred: (x: T) => boolean, input: Iterable) {
+export function* dropWhile(pred: (x: T) => boolean, input: Iterable) {
let iter = ensureIterator(input),
v: IteratorResult;
while (((v = iter.next()), !v.done && pred(v.value) === true)) { }
diff --git a/packages/iterators/src/drop.ts b/packages/iterators/src/drop.ts
index b860ab07bc..f3b3cfb3fd 100644
--- a/packages/iterators/src/drop.ts
+++ b/packages/iterators/src/drop.ts
@@ -1,7 +1,7 @@
-import consume from "./consume";
+import { consume } from "./consume";
import { ensureIterator } from "./ensure";
-export default function* drop(n: number, input: Iterable) {
+export function* drop(n: number, input: Iterable) {
let iter = ensureIterator(input);
consume(iter, n);
yield* iter;
diff --git a/packages/iterators/src/ensure.ts b/packages/iterators/src/ensure.ts
index 1de7325bb5..0533fba0e5 100644
--- a/packages/iterators/src/ensure.ts
+++ b/packages/iterators/src/ensure.ts
@@ -1,4 +1,4 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
export function ensureIterable(x: any): IterableIterator {
if (!(x != null && x[Symbol.iterator])) {
diff --git a/packages/iterators/src/every.ts b/packages/iterators/src/every.ts
index 4b6eb88a11..15970014a4 100644
--- a/packages/iterators/src/every.ts
+++ b/packages/iterators/src/every.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function every(pred: (x: T) => boolean, input: Iterable) {
+export function every(pred: (x: T) => boolean, input: Iterable) {
let iter = iterator(input),
v: IteratorResult,
empty = true;
diff --git a/packages/iterators/src/filter.ts b/packages/iterators/src/filter.ts
index abcc0c8a36..00dfb0d0e6 100644
--- a/packages/iterators/src/filter.ts
+++ b/packages/iterators/src/filter.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* filter(pred: (x: T) => boolean, input: Iterable) {
+export function* filter(pred: (x: T) => boolean, input: Iterable) {
let iter = iterator(input),
v: IteratorResult;
while (((v = iter.next()), !v.done)) {
diff --git a/packages/iterators/src/flatten-with.ts b/packages/iterators/src/flatten-with.ts
index 46a6b9aa2a..1fb4e76164 100644
--- a/packages/iterators/src/flatten-with.ts
+++ b/packages/iterators/src/flatten-with.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* flattenWith(tx: (x: any) => any, input: Iterable): IterableIterator {
+export function* flattenWith(tx: (x: any) => any, input: Iterable): IterableIterator {
let iter = iterator(input),
v: IteratorResult, val, res;
while (((v = iter.next()), !v.done)) {
diff --git a/packages/iterators/src/flatten.ts b/packages/iterators/src/flatten.ts
index 1906393108..6ab857b428 100644
--- a/packages/iterators/src/flatten.ts
+++ b/packages/iterators/src/flatten.ts
@@ -1,8 +1,8 @@
-import flattenWith from "./flatten-with";
+import { flattenWith } from "./flatten-with";
import { maybeIterator } from "./iterator";
import { maybeObjectIterator } from "./object-iterator";
-export default function flatten(input: Iterable, includeObjects = true) {
+export function flatten(input: Iterable, includeObjects = true) {
return flattenWith(
(x) =>
(typeof x !== "string" &&
diff --git a/packages/iterators/src/fnil.ts b/packages/iterators/src/fnil.ts
index 7456d2263d..7b0d85d138 100644
--- a/packages/iterators/src/fnil.ts
+++ b/packages/iterators/src/fnil.ts
@@ -1,4 +1,4 @@
-export default function fnil(fn: (...args: any[]) => any, ...ctors: (() => any)[]) {
+export function fnil(fn: (...args: any[]) => any, ...ctors: (() => any)[]) {
let [cta, ctb, ctc] = ctors;
switch (ctors.length) {
case 1:
diff --git a/packages/iterators/src/fork.ts b/packages/iterators/src/fork.ts
index 0e1b54af5f..948c46ab71 100644
--- a/packages/iterators/src/fork.ts
+++ b/packages/iterators/src/fork.ts
@@ -1,8 +1,8 @@
import { DCons } from "@thi.ng/dcons";
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function fork(src: Iterable, cacheLimit = 16) {
+export function fork(src: Iterable, cacheLimit = 16) {
const iter = iterator(src),
cache = new DCons(),
forks = [];
diff --git a/packages/iterators/src/frequencies.ts b/packages/iterators/src/frequencies.ts
index adaf531b88..1052a8078d 100644
--- a/packages/iterators/src/frequencies.ts
+++ b/packages/iterators/src/frequencies.ts
@@ -1,11 +1,11 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
export interface FrequencyPair {
[0]: T;
[1]: number;
}
-export default function* frequencies(input: Iterable, key?: (v: T) => any): IterableIterator[]> {
+export function* frequencies(input: Iterable, key?: (v: T) => any): IterableIterator[]> {
let freqs = {},
iter = iterator(input),
v: IteratorResult;
diff --git a/packages/iterators/src/group-by.ts b/packages/iterators/src/group-by.ts
index 5cfe14d4aa..408cabe206 100644
--- a/packages/iterators/src/group-by.ts
+++ b/packages/iterators/src/group-by.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function groupBy(key: (v) => any, input: Iterable): { [id: string]: T[] } {
+export function groupBy(key: (v) => any, input: Iterable): { [id: string]: T[] } {
let groups = {},
iter = iterator(input),
v: IteratorResult;
diff --git a/packages/iterators/src/identity.ts b/packages/iterators/src/identity.ts
index 9f0bc8867f..79137c560f 100644
--- a/packages/iterators/src/identity.ts
+++ b/packages/iterators/src/identity.ts
@@ -1,3 +1,3 @@
-export default function identity(x: T) {
+export function identity(x: T) {
return x;
}
diff --git a/packages/iterators/src/index.ts b/packages/iterators/src/index.ts
index ba7962b302..d90a28b4ae 100644
--- a/packages/iterators/src/index.ts
+++ b/packages/iterators/src/index.ts
@@ -1,50 +1,50 @@
-export { default as butLast } from "./butlast";
-export { default as cached } from "./cached";
-export { default as concat } from "./concat";
-export { default as constantly } from "./constantly";
-export { default as consume } from "./consume";
-export { default as cycle } from "./cycle";
-export { default as dedupeWith } from "./dedupe-with";
-export { default as dedupe } from "./dedupe";
-export { default as dense } from "./dense";
-export { default as dropNth } from "./drop-nth";
-export { default as dropWhile } from "./drop-while";
-export { default as drop } from "./drop";
-export { ensureIterable, ensureIterator } from "./ensure";
-export { default as every } from "./every";
-export { default as filter } from "./filter";
-export { default as flattenWith } from "./flatten-with";
-export { default as flatten } from "./flatten";
-export { default as fnil } from "./fnil";
-export { default as fork } from "./fork";
-export { default as frequencies } from "./frequencies";
-export { default as groupBy } from "./group-by";
-export { default as identity } from "./identity";
-export { default as indexed } from "./indexed";
-export { default as interleave } from "./interleave";
-export { default as interpose } from "./interpose";
-export { default as iterate } from "./iterate";
-export { default as iterator, maybeIterator } from "./iterator";
-export { default as juxt } from "./juxt";
-export { default as last } from "./last";
-export { default as mapIndexed } from "./map-indexed";
-export { default as map } from "./map";
-export { default as mapcat } from "./mapcat";
-export { default as objectIterator, maybeObjectIterator } from "./object-iterator";
-export { default as partitionBy } from "./partition-by";
-export { default as partition } from "./partition";
-export { default as randomSample } from "./random-sample";
-export { default as range } from "./range";
-export { default as reduce, reduced, ReducedValue } from "./reduce";
-export { default as reductions } from "./reductions";
-export { default as repeat } from "./repeat";
-export { default as repeatedly } from "./repeatedly";
-export { default as reverse } from "./reverse";
-export { default as run } from "./run";
-export { default as some } from "./some";
-export { default as takeLast } from "./take-last";
-export { default as takeNth } from "./take-nth";
-export { default as takeWhile } from "./take-while";
-export { default as take } from "./take";
-export { default as walk, walkIterator } from "./walk";
-export { default as zip } from "./zip";
+export * from "./butlast";
+export * from "./cached";
+export * from "./concat";
+export * from "./constantly";
+export * from "./consume";
+export * from "./cycle";
+export * from "./dedupe-with";
+export * from "./dedupe";
+export * from "./dense";
+export * from "./drop-nth";
+export * from "./drop-while";
+export * from "./drop";
+export * from "./ensure";
+export * from "./every";
+export * from "./filter";
+export * from "./flatten-with";
+export * from "./flatten";
+export * from "./fnil";
+export * from "./fork";
+export * from "./frequencies";
+export * from "./group-by";
+export * from "./identity";
+export * from "./indexed";
+export * from "./interleave";
+export * from "./interpose";
+export * from "./iterate";
+export * from "./iterator";
+export * from "./juxt";
+export * from "./last";
+export * from "./map-indexed";
+export * from "./map";
+export * from "./mapcat";
+export * from "./object-iterator";
+export * from "./partition-by";
+export * from "./partition";
+export * from "./random-sample";
+export * from "./range";
+export * from "./reduce";
+export * from "./reductions";
+export * from "./repeat";
+export * from "./repeatedly";
+export * from "./reverse";
+export * from "./run";
+export * from "./some";
+export * from "./take-last";
+export * from "./take-nth";
+export * from "./take-while";
+export * from "./take";
+export * from "./walk";
+export * from "./zip";
diff --git a/packages/iterators/src/indexed.ts b/packages/iterators/src/indexed.ts
index 1e78cd5204..0ee1b9c449 100644
--- a/packages/iterators/src/indexed.ts
+++ b/packages/iterators/src/indexed.ts
@@ -1,5 +1,5 @@
-import mapIndexed from "./map-indexed";
+import { mapIndexed } from "./map-indexed";
-export default function indexed(input: Iterable): IterableIterator<[number, T]> {
+export function indexed(input: Iterable): IterableIterator<[number, T]> {
return mapIndexed((i, x) => [i, x], input);
}
diff --git a/packages/iterators/src/interleave.ts b/packages/iterators/src/interleave.ts
index fee25d0ebe..05367daf67 100644
--- a/packages/iterators/src/interleave.ts
+++ b/packages/iterators/src/interleave.ts
@@ -1,8 +1,8 @@
-import cycle from "./cycle";
-import map from "./map";
-import iterator from "./iterator";
+import { cycle } from "./cycle";
+import { map } from "./map";
+import { iterator } from "./iterator";
-export default function* interleave(...inputs: Iterable[]) {
+export function* interleave(...inputs: Iterable[]) {
let n = inputs.length;
if (n === 0) {
throw new Error(`no inputs given`);
diff --git a/packages/iterators/src/interpose.ts b/packages/iterators/src/interpose.ts
index 9007c11941..4fd63c9049 100644
--- a/packages/iterators/src/interpose.ts
+++ b/packages/iterators/src/interpose.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* interpose(x: any, input: Iterable) {
+export function* interpose(x: any, input: Iterable) {
let iter = iterator(input),
v: IteratorResult = iter.next();
while (!v.done) {
diff --git a/packages/iterators/src/iterate.ts b/packages/iterators/src/iterate.ts
index c0110ce576..b99e1eee29 100644
--- a/packages/iterators/src/iterate.ts
+++ b/packages/iterators/src/iterate.ts
@@ -1,4 +1,4 @@
-export default function* iterate(fn: (x: T) => T, seed: T) {
+export function* iterate(fn: (x: T) => T, seed: T) {
while (true) {
yield seed;
seed = fn(seed);
diff --git a/packages/iterators/src/iterator.ts b/packages/iterators/src/iterator.ts
index 955ad3d955..70d1f7b660 100644
--- a/packages/iterators/src/iterator.ts
+++ b/packages/iterators/src/iterator.ts
@@ -1,4 +1,4 @@
-export default function iterator(x: Iterable) {
+export function iterator(x: Iterable) {
return x[Symbol.iterator]();
}
diff --git a/packages/iterators/src/juxt.ts b/packages/iterators/src/juxt.ts
index 45c4ac3001..3d29dcd95d 100644
--- a/packages/iterators/src/juxt.ts
+++ b/packages/iterators/src/juxt.ts
@@ -1,4 +1,4 @@
-export default function juxt(...fns: ((x: T) => any)[]) {
+export function juxt(...fns: ((x: T) => any)[]) {
return function (x: T) {
let res = [];
for (let i = 0; i < fns.length; i++) {
diff --git a/packages/iterators/src/last.ts b/packages/iterators/src/last.ts
index 8ad9d12516..6d9aedd1a9 100644
--- a/packages/iterators/src/last.ts
+++ b/packages/iterators/src/last.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function last(input: Iterable) {
+export function last(input: Iterable) {
let iter = iterator(input),
v: IteratorResult,
prev: T;
diff --git a/packages/iterators/src/map-indexed.ts b/packages/iterators/src/map-indexed.ts
index e430a46163..38701ee3ab 100644
--- a/packages/iterators/src/map-indexed.ts
+++ b/packages/iterators/src/map-indexed.ts
@@ -1,6 +1,6 @@
-import map from "./map";
-import range from "./range";
+import { map } from "./map";
+import { range } from "./range";
-export default function mapIndexed(fn: (i: number, ...args: any[]) => T[], ...inputs: Iterable[]): IterableIterator {
+export function mapIndexed(fn: (i: number, ...args: any[]) => T[], ...inputs: Iterable[]): IterableIterator {
return map.apply(null, ([fn, range()] as any[]).concat(inputs));
}
diff --git a/packages/iterators/src/map.ts b/packages/iterators/src/map.ts
index 5613499f6d..67eea3a50c 100644
--- a/packages/iterators/src/map.ts
+++ b/packages/iterators/src/map.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* map(fn: (...args: any[]) => T, ...inputs: Iterable[]) {
+export function* map(fn: (...args: any[]) => T, ...inputs: Iterable[]) {
let v: IteratorResult,
n = inputs.length;
switch (n) {
diff --git a/packages/iterators/src/mapcat.ts b/packages/iterators/src/mapcat.ts
index c462a8e34a..4acd14a120 100644
--- a/packages/iterators/src/mapcat.ts
+++ b/packages/iterators/src/mapcat.ts
@@ -1,7 +1,7 @@
-import map from "./map";
+import { map } from "./map";
import { ensureIterable } from "./ensure";
-export default function* mapcat(fn: (...args: any[]) => Iterable, ...inputs: Iterable[]): IterableIterator {
+export function* mapcat(fn: (...args: any[]) => Iterable, ...inputs: Iterable[]): IterableIterator {
(inputs as any[]).unshift(fn);
let iter = map.apply(null, inputs),
v: IteratorResult>;
diff --git a/packages/iterators/src/object-iterator.ts b/packages/iterators/src/object-iterator.ts
index 0672f169dd..631986dabf 100644
--- a/packages/iterators/src/object-iterator.ts
+++ b/packages/iterators/src/object-iterator.ts
@@ -1,6 +1,6 @@
-import map from "./map";
+import { map } from "./map";
-export default function objectIterator(x: any) {
+export function objectIterator(x: any) {
return map((k) => [k, x[k]], Object.keys(x));
}
diff --git a/packages/iterators/src/partition-by.ts b/packages/iterators/src/partition-by.ts
index 0e28e0ebdc..b5a8f00b2a 100644
--- a/packages/iterators/src/partition-by.ts
+++ b/packages/iterators/src/partition-by.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* partitionBy(fn: (x: T) => any, input: Iterable) {
+export function* partitionBy(fn: (x: T) => any, input: Iterable) {
let iter = iterator(input),
chunk: T[] = [],
v: IteratorResult,
diff --git a/packages/iterators/src/partition.ts b/packages/iterators/src/partition.ts
index 2afbd86b39..4089ef6fe8 100644
--- a/packages/iterators/src/partition.ts
+++ b/packages/iterators/src/partition.ts
@@ -1,7 +1,7 @@
-import consume from "./consume";
-import iterator from "./iterator";
+import { consume } from "./consume";
+import { iterator } from "./iterator";
-export default function* partition(n: number, step: number, input: Iterable, all = false) {
+export function* partition(n: number, step: number, input: Iterable, all = false) {
if (n < 1) {
throw new Error(`invalid partition size: ${n}`);
}
diff --git a/packages/iterators/src/random-sample.ts b/packages/iterators/src/random-sample.ts
index ea890244a8..32dbfc5e93 100644
--- a/packages/iterators/src/random-sample.ts
+++ b/packages/iterators/src/random-sample.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* randomSample(prob: number, input: Iterable) {
+export function* randomSample(prob: number, input: Iterable) {
let iter = iterator(input),
random = Math.random,
v: IteratorResult;
diff --git a/packages/iterators/src/range.ts b/packages/iterators/src/range.ts
index b80c03d8e2..89db57e105 100644
--- a/packages/iterators/src/range.ts
+++ b/packages/iterators/src/range.ts
@@ -1,8 +1,8 @@
-export default function range(): IterableIterator;
-export default function range(to: number): IterableIterator;
-export default function range(from: number, to: number): IterableIterator;
-export default function range(from: number, to: number, step: number): IterableIterator;
-export default function* range(from?: number, to?: number, step?: number) {
+export function range(): IterableIterator;
+export function range(to: number): IterableIterator;
+export function range(from: number, to: number): IterableIterator;
+export function range(from: number, to: number, step: number): IterableIterator;
+export function* range(from?: number, to?: number, step?: number) {
if (from === undefined) {
from = 0;
to = Number.POSITIVE_INFINITY;
diff --git a/packages/iterators/src/reduce.ts b/packages/iterators/src/reduce.ts
index d84e1b8139..36ed99fe5f 100644
--- a/packages/iterators/src/reduce.ts
+++ b/packages/iterators/src/reduce.ts
@@ -1,4 +1,4 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
export class ReducedValue {
public value: T;
@@ -8,7 +8,7 @@ export class ReducedValue {
}
}
-export default function reduce(rfn: (acc: B, x: A) => B | ReducedValue, acc: B, input: Iterable) {
+export function reduce(rfn: (acc: B, x: A) => B | ReducedValue, acc: B, input: Iterable) {
let iter = iterator(input),
v: IteratorResult,
_acc: B | ReducedValue = acc;
diff --git a/packages/iterators/src/reductions.ts b/packages/iterators/src/reductions.ts
index e78208f24b..1572a4f147 100644
--- a/packages/iterators/src/reductions.ts
+++ b/packages/iterators/src/reductions.ts
@@ -1,7 +1,7 @@
import { ReducedValue } from "./reduce";
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* reductions(rfn: (acc: B, x: A) => B | ReducedValue, acc: B, input: Iterable) {
+export function* reductions(rfn: (acc: B, x: A) => B | ReducedValue, acc: B, input: Iterable) {
let iter = iterator(input),
v: IteratorResult,
_acc: B | ReducedValue = acc,
diff --git a/packages/iterators/src/repeat.ts b/packages/iterators/src/repeat.ts
index f49ec312d3..cf4658e605 100644
--- a/packages/iterators/src/repeat.ts
+++ b/packages/iterators/src/repeat.ts
@@ -1,4 +1,4 @@
-export default function* repeat(x: T, n = Number.POSITIVE_INFINITY) {
+export function* repeat(x: T, n = Number.POSITIVE_INFINITY) {
while (n-- > 0) {
yield x;
}
diff --git a/packages/iterators/src/repeatedly.ts b/packages/iterators/src/repeatedly.ts
index 93b65e0243..8e4117609a 100644
--- a/packages/iterators/src/repeatedly.ts
+++ b/packages/iterators/src/repeatedly.ts
@@ -1,4 +1,4 @@
-export default function* repeatedly(fn: () => T, n = Number.POSITIVE_INFINITY) {
+export function* repeatedly(fn: () => T, n = Number.POSITIVE_INFINITY) {
while (n-- > 0) {
yield fn();
}
diff --git a/packages/iterators/src/reverse.ts b/packages/iterators/src/reverse.ts
index b0dfd7983c..5e404ec93c 100644
--- a/packages/iterators/src/reverse.ts
+++ b/packages/iterators/src/reverse.ts
@@ -1,4 +1,4 @@
-export default function* reverse(input: Iterable) {
+export function* reverse(input: Iterable) {
if (!(input.constructor === Array || (input as T[]).length !== undefined)) {
input = [...input];
}
diff --git a/packages/iterators/src/run.ts b/packages/iterators/src/run.ts
index 6bcd64720b..5f65f7cf8d 100644
--- a/packages/iterators/src/run.ts
+++ b/packages/iterators/src/run.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function run(fn: (x: T) => any, input: Iterable) {
+export function run(fn: (x: T) => any, input: Iterable) {
let iter = iterator(input),
v: IteratorResult;
while (((v = iter.next()), !v.done)) {
diff --git a/packages/iterators/src/some.ts b/packages/iterators/src/some.ts
index ca04880bb9..bfeb5d3512 100644
--- a/packages/iterators/src/some.ts
+++ b/packages/iterators/src/some.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function some(pred: (x: T) => boolean, input: Iterable) {
+export function some(pred: (x: T) => boolean, input: Iterable) {
let iter = iterator(input),
v: IteratorResult;
while (((v = iter.next()), !v.done)) {
diff --git a/packages/iterators/src/take-last.ts b/packages/iterators/src/take-last.ts
index e8e6708d70..601fee917d 100644
--- a/packages/iterators/src/take-last.ts
+++ b/packages/iterators/src/take-last.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* takeLast(n: number, input: Iterable) {
+export function* takeLast(n: number, input: Iterable) {
let iter = iterator(input),
v: IteratorResult,
prev: T[] = [];
diff --git a/packages/iterators/src/take-nth.ts b/packages/iterators/src/take-nth.ts
index ba4133dad9..ac0dd3377f 100644
--- a/packages/iterators/src/take-nth.ts
+++ b/packages/iterators/src/take-nth.ts
@@ -1,7 +1,7 @@
-import consume from "./consume";
-import iterator from "./iterator";
+import { consume } from "./consume";
+import { iterator } from "./iterator";
-export default function* takeNth(n: number, input: Iterable) {
+export function* takeNth(n: number, input: Iterable) {
let iter = iterator(input),
v: IteratorResult;
while (((v = iter.next()), !v.done)) {
diff --git a/packages/iterators/src/take-while.ts b/packages/iterators/src/take-while.ts
index e451d1cc9d..aa9d9d7f82 100644
--- a/packages/iterators/src/take-while.ts
+++ b/packages/iterators/src/take-while.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* takeWhile(pred: (x: T) => boolean, input: Iterable) {
+export function* takeWhile(pred: (x: T) => boolean, input: Iterable) {
let iter = iterator(input),
v: IteratorResult;
while (((v = iter.next()), !v.done && pred(v.value))) {
diff --git a/packages/iterators/src/take.ts b/packages/iterators/src/take.ts
index fdc6d79f7c..1674b1109c 100644
--- a/packages/iterators/src/take.ts
+++ b/packages/iterators/src/take.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function* take(n: number, input: Iterable) {
+export function* take(n: number, input: Iterable) {
let iter = iterator(input);
while (n-- > 0) {
let v = iter.next();
diff --git a/packages/iterators/src/walk.ts b/packages/iterators/src/walk.ts
index c802d80cce..02e48fa16c 100644
--- a/packages/iterators/src/walk.ts
+++ b/packages/iterators/src/walk.ts
@@ -1,11 +1,11 @@
-import { default as iterator, maybeIterator } from "./iterator";
+import { iterator, maybeIterator } from "./iterator";
import { maybeObjectIterator } from "./object-iterator";
export function walkable(x) {
return typeof x !== "string" ? maybeIterator(x) || maybeObjectIterator(x) : undefined;
}
-export default function walk(fn: (x: any) => void, input: Iterable, postOrder = false) {
+export function walk(fn: (x: any) => void, input: Iterable, postOrder = false) {
let inner = (iter) => {
let v: IteratorResult,
node;
diff --git a/packages/iterators/src/zip.ts b/packages/iterators/src/zip.ts
index 1046a55293..b8cba4b4d4 100644
--- a/packages/iterators/src/zip.ts
+++ b/packages/iterators/src/zip.ts
@@ -1,6 +1,6 @@
-import iterator from "./iterator";
+import { iterator } from "./iterator";
-export default function zip(keys: Iterable, vals: Iterable, target?: any) {
+export function zip(keys: Iterable, vals: Iterable, target?: any) {
let kiter = iterator(keys),
viter = iterator(vals),
k: IteratorResult,
diff --git a/packages/iterators/test/index.ts b/packages/iterators/test/index.ts
index 0cbacdead3..6339a2afc8 100644
--- a/packages/iterators/test/index.ts
+++ b/packages/iterators/test/index.ts
@@ -73,8 +73,8 @@ describe("iterators", function () {
assert.deepEqual([...ti.dropNth(-1, ti.range(6))], [], "dropNth(-1)");
});
it("dropWhile", () => {
- assert.deepEqual([...ti.dropWhile((x) => false, [])], [], "empty");
- assert.deepEqual([...ti.dropWhile((x) => true, [1, 2, 3])], [], "always");
+ assert.deepEqual([...ti.dropWhile((_) => false, [])], [], "empty");
+ assert.deepEqual([...ti.dropWhile((_) => true, [1, 2, 3])], [], "always");
assert.deepEqual([...ti.dropWhile((x) => x < 3, ti.range(6))], [3, 4, 5], "x<3");
assert.deepEqual([...ti.dropWhile((x) => x > 3, ti.range(6))], [0, 1, 2, 3, 4, 5], "none");
});
@@ -84,7 +84,7 @@ describe("iterators", function () {
});
it("every", () => {
let nums = ti.iterator([2, 4, 6, 8, 10]) as IterableIterator;
- assert(!ti.every((x) => true, []), "empty");
+ assert(!ti.every((_) => true, []), "empty");
assert(ti.every((x) => (x % 2) === 0, nums), "even");
assert.deepEqual(nums.next(), { value: undefined, done: true }, "nums done");
nums = ti.iterator([2, 3, 4]) as IterableIterator;
@@ -92,7 +92,7 @@ describe("iterators", function () {
assert.deepEqual(nums.next(), { value: 4, done: false }, "next = 4");
});
it("filter", () => {
- assert.deepEqual([...ti.filter((x) => true, [])], [], "empty");
+ assert.deepEqual([...ti.filter((_) => true, [])], [], "empty");
assert.deepEqual([...ti.filter((x) => (x % 3) === 0, ti.range(10))], [0, 3, 6, 9], "mult3");
});
it("flatten", () => {
@@ -266,7 +266,7 @@ describe("iterators", function () {
});
it("takeWhile", () => {
let input = ti.range(10);
- assert.deepEqual([...ti.takeWhile((x) => true, [])], [], "empty");
+ assert.deepEqual([...ti.takeWhile((_) => true, [])], [], "empty");
assert.deepEqual([...ti.takeWhile((x) => x < 5, input)], [0, 1, 2, 3, 4], "x<5");
assert.deepEqual([...input], [6, 7, 8, 9], "rest");
});
diff --git a/packages/iterators/test/tsconfig.json b/packages/iterators/test/tsconfig.json
index 15f6b2a4f3..13d45669e5 100644
--- a/packages/iterators/test/tsconfig.json
+++ b/packages/iterators/test/tsconfig.json
@@ -1,7 +1,7 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
- "outDir": "../build",
+ "outDir": "../build"
},
"include": [
"./**/*.ts",
diff --git a/packages/iterators/tsconfig.json b/packages/iterators/tsconfig.json
index fe4ca75067..f6c291a0a0 100644
--- a/packages/iterators/tsconfig.json
+++ b/packages/iterators/tsconfig.json
@@ -4,6 +4,6 @@
"outDir": "."
},
"include": [
- "./src/**/*.ts",
+ "./src/**/*.ts"
]
}
\ No newline at end of file
diff --git a/packages/rle-pack/CHANGELOG.md b/packages/rle-pack/CHANGELOG.md
index b99062b5b6..0ffa817115 100644
--- a/packages/rle-pack/CHANGELOG.md
+++ b/packages/rle-pack/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+