Skip to content

Commit

Permalink
feat: inform about dropped CLS support
Browse files Browse the repository at this point in the history
  • Loading branch information
analog-nico committed Jul 11, 2016
1 parent 82ed81d commit 8c42fda
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ If you want to debug a test you should use `gulp test-without-coverage` to run a

- v4.0.0 (upcoming)
- **Breaking Change**: `request` is declared as a peer dependency which has to be installed separately by the user now
- **Breaking Change**: Dropped support for Continuation Local Storage since [`request-promise-any`](https://github.com/request/request-promise-any) can be used for that now
- **Breaking Change**: Dropped support for Continuation Local Storage since [`request-promise-any`](https://github.com/request/request-promise-any) can be [used](https://github.com/request/request-promise/wiki/Getting-Back-Support-for-Continuation-Local-Storage) for that now
- Introduced the `transform2xxOnly` option to ease the breaking change regarding the new `transform` handling in v3.0.0
*(Thanks to @stevage for pointing out the effect of the breaking change in [issue #131](https://github.com/request/request-promise/issues/131))*
- Resolved issues [#65](https://github.com/request/request-promise/issues/65) and [#71](https://github.com/request/request-promise/issues/71) by publishing nearly identical libraries to support other Promise implementations: [`request-promise-native`](https://github.com/request/request-promise-native) and [`request-promise-any`](https://github.com/request/request-promise-any)
Expand Down
5 changes: 5 additions & 0 deletions lib/rp.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ configure({
});


request.bindCLS = function RP$bindCLS() {
throw new Error('CLS support was dropped. To get it back read: https://github.com/request/request-promise/wiki/Getting-Back-Support-for-Continuation-Local-Storage');
};


module.exports = request;
8 changes: 8 additions & 0 deletions test/spec/request-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,12 @@ describe('Request-Promise', function () {

});

it('should inform about the dropped CLS support', function () {

expect(function () {
rp.bindCLS();
}).to.throw();

});

});

0 comments on commit 8c42fda

Please sign in to comment.