All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
2.6.0 (2019-07-17)
- core: Improved logging (#217) (3e876a8)
- PollyError and improved adapter error handling (#234) (23a2127)
2.5.0 (2019-06-06)
- adapter-xhr: Support
context
option (65b3c38)
2.4.0 (2019-04-27)
2.3.2 (2019-04-09)
2.3.1 (2019-03-06)
- adapter-fetch: Correctly handle key/value pairs headers (dc0323d)
2.3.0 (2019-02-27)
2.2.0 (2019-02-20)
2.1.0 (2019-02-04)
- adapter: Log information if request couldn't be found in recording (#172) (8dcdf7b)
- adapter-xhr: Xhr.send should not be an async method (#173) (eb3a6eb)
- Correctly handle array header values (#179) (fb7dbb4)
2.0.0 (2019-01-29)
- feat(adapter-node-http): Use
nock
under the hood instead of custom implementation (#166) (62374f4), closes #166
- adapter: Test for navigator before accessing (#165) (7200255)
- ember: Remove Node 6 from supported versions (#169) (07b2b4e)
- persister: Only persist post data if a request has a body (#171) (f62d318)
- Make PollyRequest.respond accept a response object (#168) (5b07b26)
- Simplify adapter implementation (#154) (12c8601)
- The node-http adapter no longer accepts the
transports
option - Any adapters calling
pollyRequest.respond
should pass it a response object instead of the previous 3 arguments (statusCode, headers, body). - Polly will no longer actively support Node 6
- Changes to the base adapter implementation and external facing API
1.4.2 (2019-01-16)
- adapter-node-http: Fix unhandled rejection if connection fails (#160) (12fcfa7)
- adapter-node-http: Pause socket on original request (#162) (8f0c56c)
1.4.1 (2018-12-13)
1.4.0 (2018-12-07)
1.3.2 (2018-11-29)
Note: Version bump only for package pollyjs
1.3.1 (2018-11-28)
- Support URL objects (#139) (cf0d755)
- core: Handle trailing slashes when generating route names (#142) (19147f7)
- core: Ignore
context
options from being deep merged (#144) (2123d83) - core: Support multiple handlers for same paths (#141) (79e04b8)
-
core: Support custom functions in matchRequestsBy config options (#138) (626a84c)
-
Add an onIdentifyRequest hook to allow adapter level serialization (#140) (548002c)
<a name="1.2.0"></a>
- adapter-puppeteer: Do not intercept CORS preflight requests (#90) (53ad433)
- Changes self to global, rollup-plugin-node-globals makes isomorphic (#54) (3811e9d)
- core: Freeze request after emitting afterResponse. (66a2b64)
- Allow 204 responses without a body (#101) (20b4125)
- Browser (UMD) build now bundles corejs (#106) (ec62fc0)
- Bumping core within Ember (af4faa1)
- Config expiresIn can contain periods. i.e, 1.5 weeks (e9c7aaa)
- Correctly normalize relative URLs (b9b23cd)
- Creator cleanup and persister assertion (#67) (19fee5a)
- Do not display node server listening banner in quiet mode (1be57a7)
- Ensure polly's middleware goes before ember-cli's (#36) (43db361)
- Improve support for relative URLs (#78) (2c0083e), closes #76
- Loosen up global XHR native check (#69) (79cdd96)
- Proxy route.params onto the request instead of mutating req (5bcd4f9)
- Puppeteer 1.7.0 support (#100) (e208b38)
- Puppeteer CORS request matching (#110) (7831115)
- Rest server on Windows (be5c473)
- core: Set
url
on the fetch Response object (#44) (f5980cf), closes #43 - ember: Fix auto-register and add tests to cover (24c15bd)
- persister: Handle concurrent find requests (#88) (0e02414)
- Abort and passthrough from an intercept (#57) (4ebacb8)
- Class events and EventEmitter (#52) (0a3d591)
- Cleanup event handler logic + rename some event names (78dbb5d)
- Convert recordings to be HAR compliant (#45) (e622640)
- Custom persister support (8bb313c)
- Fetch adapter support for
context
provided via adapterOptions (#66) (82ebd09) - Improved adapter and persister registration (#62) (164dbac)
- Keyed persister & adapter options (#60) (29ed8e1)
- Make recording size limit configurable (#40) (d4be431)
- Move more response methods to shared base class (#74) (4f845e5)
- Node File System Persister (#61) (0a0eeca)
- Presets persisterOptions.host to the node server default (0b47838)
- Puppeteer Adapter (#64) (f902c6d)
- Use status code 204 in place of 404. (#5) (930c492)
- core: Add
json
property toRequest
(bb8e1cb), closes #7 - core: Default
Response
status code to 200 (f42a281), closes #6 - Wait for all handled requests to resolve via
.flush()
(#75) (a3113b7) - core: Normalize headers by lower-casing all keys (#42) (02a4767)
- core: Server level configuration (#80) (0f32d9b)
- node-server: Add cors support to express server to pass-through all requests (223ce4e)
- persister: Add
keepUnusedRequests
config option (#108) (3f5f5b2) - persister: Cache recordings (#31) (a04d7a7)
- "Update commitlint.config.js" (65e6996)
- Add
json
property toRequest
(4ea50e8) - Revert "Update commitlint.config.js" (6624cb5)
- Revert Use docsify GA plugin (35ace6f)
- Use docsify GA plugin (cf5f1c5)
- Adapters
import { XHRAdapter, FetchAdapter } from '@pollyjs/core';
// Register the xhr adapter so its accessible by all future polly instances
Polly.register(XHRAdapter);
polly.configure({
adapters: ['xhr', FetchAdapter]
});
Persister
import { LocalStoragePersister, RESTPersister } from '@pollyjs/core';
// Register the local-storage persister so its accessible by all future polly instances
Polly.register(LocalStoragePersister);
polly.configure({
persister: 'local-storage'
});
polly.configure({
persister: RESTPersister
});
-
Recordings now produce HAR compliant json. Please delete existing recordings.
-
core: With this change, request ids will resolve to a different hash meaning that users will have to rerecord.
-
Relative URLs will have different hashes and will require to re-record.
# Changelog