restream
Version:
Regular Expression Detection & Replacement streams.
202 lines (126 loc) • 5.26 kB
Markdown
## 2 May 2020
### [4.0.0](https://gitlab.com/artdeco/restream/compare/v3.7.4...v4.0.0)
- [Package] Build the package with the compiler and generate abstract Luxes.
- [License] Change to AGPL-3.0.
- [Repo] Move to `GitLab`.
- [Fix] _SyncReplaceable_ to accept a single rule.
## 7 August 2019
### [3.7.4](https://gitlab.com/artdeco/restream/compare/v3.7.3...v3.7.4)
- [types] Publish the _types_ folder to embed types in other packages.
## 3 August 2019
### [3.7.3](https://gitlab.com/artdeco/restream/compare/v3.7.2...v3.7.3)
- [api] Export the `replace` static function as a named export.
## 26 July 2019
### [3.7.2](https://gitlab.com/artdeco/restream/compare/v3.7.1...v3.7.2)
- [fix] Fix specifying a string replacement in _SyncReplaceable_.
## 20 April 2019
### [3.7.1](https://gitlab.com/artdeco/restream/compare/v3.7.0...v3.7.1)
- [types] Fix broken types with `this: !` and `function(opt?)`; add `emit` method to the interface.
### [3.7.0](https://gitlab.com/artdeco/restream/compare/v3.6.0...v3.7.0)
- [feature] Add the static `.replace` method on the _Replaceable_ class.
- [feature] Add the instance `.replace` method to be able to update content of a match.
- [doc] Write `ReplaceableInterface` type and define it as the context of replacer functions.
## 10 April 2019
### [3.6.0](https://gitlab.com/artdeco/restream/compare/v3.5.1...v3.6.0)
- [externs] Provide externs for _Google Closure Compiler_ via _Depack_.
- [fix] Fix _SyncReplaceable_ using global context.
- [doc] Use `_restream_` namespace, markdown in examples.
- [deps] Update and unlock dependencies.
## 28 March 2019
### [3.5.1](https://gitlab.com/artdeco/restream/compare/v3.5.0...v3.5.1)
- [fix] Allow to pass options to the _Transform_ constructor from _Replaceable_.
- [package] Add experimental externs file for _Depack_.
## 23 January 2019
### 3.5.0
- [feature] Add synchronous `pipeRules` for processing values before pasting them back.
- [package] Add the "module" field.
- [package] Add [Tech Nation Visa](https://www.technation.sucks) footer.
## 20 November 2018
### 3.4.1
- [package] Point to the `index` in main.
- [docs] Fix the image.
## 20 November 2018
### 3.4.0
- [feature] Add the `SerialAsyncReplaceable` class.
- [docs] Add section breaks.
## 1 November 2018
### 3.3.0
- [feature] Add `SyncReplaceable` to the API, doc, and test.
- [build] Build without source maps.
- [deps] Update the dev dependencies.
## 13 September 2018
### 3.2.1
- [deps] Update dependencies, use `@artdeco/clean-stack`.
## 5 September 2018
### 3.2.0
- [feature] Implement `brake` method to stop further rule execution.
- [feature] Hide inner parts of error stacks for sync replacers (only show lines relevant to rules' calls).
- [feature] Add `clean-stack` support.
- [refactor] Move `Replaceable` to its own file; rename `fixture` directory.
- [package] Update `launch.json` for `zoroaster@3`; `d` scripts to embed types.
- [doc] Add todo, related, catchment sections; pipe examples into process.stdout directly.
- [deps] Update `zoroaster@3`, `alamode@1.4`, `documentary@1.11`, `catchment@3.1`.
## 1 September 2018
### 3.1.1
- [build] Add source maps, preserve lines and columns.
- [package] Install `alamode` in package.json and test w/ it.
## 10 August 2018
### 3.1.0
- [feature] Markers to cut and paste chunks of text.
- [package] Build with [`alamode`](https://alamode.cc).
## 21 July 2018
### 3.0.0
**Breaking**: pass context to replaces as _Replaceable_ instance. It is possible that someone relied on the `this` keyword inside of a rule or scope.
```js
const rule = {
abc: 'def',
f() {
console.log(this.abc)
},
}
rule.f() // def
```
```js
function test() {
this.abc = 'def'
const rule = {
f: () => {
console.log(this.abc)
},
}
rule.f() // def
}
test()
```
- [feature] Pass context to the `replacer` functions.
- [feature] Catch errors in replacers and emit them as stream errors.
- [deprecate] Remove `replaceStream` function to construct to what is now a `Replaceable` stream.
- [doc] Document with `%TYPE%`, give examples of `sync` and `async` replacers.
## 20 June 2018
### 2.1.0
- [feature] `async` replacer, `Replaceable` class to replace `replaceStream`.
## 15 June 2018
### 2.0.3
- [package] `test-build` script
- [test] move `test-examples` to its own folder
- [build] build without `retainLines`
### 2.0.2
- [doc] use [`documentary`](https://npmjs.org/package/documentary) to generate TOC.
- [doc] better JSDoc for methods.
## 2.0.1 (9 May 2018)
* [fix] move [`snapshot-context`](https://context.zoroaster.co.uk/snapshot) to dev-dependencies
## 2.0.0 (9 May 2018)
* [style] switch to modules and use babel
* [documentation] update examples and add scripts to run them, update readme
* [documentation] add JSDoc types
* [test] snapshot testing of examples
* [dep] update zoroaster and catchment
* [repository] move to [Art Deco Code](https://artdeco.bz)
## 1.2.0 (29 May 2017)
* [feature] use a function for replacement in `replaceStream`
## 1.1.0 (28 May 2017)
* [feature] `replaceStream`: a transform stream which replaces regular expressions.
## 1.0.1 (20 May 2017)
* [bugfix] add `use strict`
## 1.0.0 (19 May 2017)
* initial release (copied from `node-exiftool`)