All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
6.0.6 (2023-07-20)
Note: Version bump only for package pollyjs
6.0.5 (2022-04-04)
6.0.4 (2021-12-10)
6.0.3 (2021-12-08)
6.0.2 (2021-12-07)
6.0.1 (2021-12-06)
- ember: Bump peer dependencies to 6.x (#432) (1529226)
- types: add types.d.ts to package.files (#431) (113ee89)
6.0.0 (2021-11-30)
-
persister: Only treat status codes >= 400 as failed (#430) (7658952)
-
feat!: Cleanup adapter and persister APIs (#429) (06499fc), closes #429
-
feat!: Improve logging and add logLevel (#427) (bef3ee3), closes #427
-
chore!: Upgrade package dependencies (#421) (dd23334), closes #421
-
feat!: Use base64 instead of hex encoding for binary data (#420) (6bb9b36), closes #420
-
feat(ember)!: Upgrade to ember octane (#415) (8559ef8), closes #415
- adapter-node-http: Upgrade nock to v13 (#424) (2d5b59e)
- node-server: Upgrade dependencies (#417) (246a2f2)
- Upgrade url-parse to 1.5.0+ to fix CVE-2021-27515. This change could alter the final url generated for a request.
- Adapter
passthroughRequest
renamed toonFetchResponse
respondToRequest
renamed toonRespond
- Persister
findRecording
renamed toonFindRecording
saveRecording
renamed toonSaveRecording
deleteRecording
renamed toonDeleteRecording
- The
logging
configuration option has now been replaced withlogLevel
. This allows for more fine-grain control over what should be logged as well as silencing logs altogether. - Recording file name will no longer have trailing dashes
- Use the standard
encoding
field on the generated har file instead of_isBinary
and usebase64
encoding instead ofhex
to reduce the payload size.- Although backwards compatibility is not guaranteed, you can replace all occurrences of
"_isBinary": true
with"encoding": "hex"
in the recorded HAR files.
- Although backwards compatibility is not guaranteed, you can replace all occurrences of
- @pollyjs dependencies for @pollyjs/ember have been moved to peer dependencies
5.2.0 (2021-11-24)
5.1.1 (2021-06-02)
5.1.0 (2020-12-12)
5.0.2 (2020-12-06)
5.0.1 (2020-09-25)
5.0.0 (2020-06-23)
- adapter-fetch: Add statusText to the response (#341) (0d45953)
- core: Compute order based on id and recording name (#342) (42004d2)
- Persister.name and Adapter.name have been replaced with Persister.id and Adapter.id
- core: A request's order is will now be computed based on its id and the recording name it will be persisted to.
4.3.0 (2020-05-18)
- adapter-fetch: Add support for handling binary data (#332) (111bebf)
- adapter-xhr: Add support for handling binary data (#333) (48ea1d7)
- core: Add
flushRequestsOnStop
configuration option (#335) (ab4a2e1)
4.2.1 (2020-04-30)
4.2.0 (2020-04-29)
- node-server: Pass options to the CORS middleware via
corsOptions
(3d991f5)
4.1.0 (2020-04-23)
- Improve abort handling (#320) (cc46bb4)
- Legacy persisters and adapters should register (#325) (8fd4d19)
4.0.4 (2020-03-21)
- Deprecates adapter & persister
name
in favor ofid
(#310) (41dd093) - adapter-node-http: Bump nock version (#319) (7d361a6)
4.0.3 (2020-01-30)
4.0.2 (2020-01-29)
4.0.1 (2020-01-25)
- ember: Config read from project root (7d6da38)
4.0.0 (2020-01-13)
- adapter: Clone the recording entry before mutating it (#294) (d7e1303)
- core: Disconnect from all adapters when
pause
is called (#291) (5c655bf)
- core: Provide the request as an argument to matchRequestsBy methods (#293) (4e3163f)
- core: Remove deprecated
recordIfExpired
option (#295) (5fe991d)
- core:
recordIfExpired
is no longer supported, please useexpiryStrategy
instead. - Drop support for Node 8 as it is now EOL
- core: Calling
polly.pause()
will now disconnect from all connected adapters instead of setting the mode to passthrough. Callingpolly.play()
will reconnect to the disconnected adapters before pause was called.
3.0.2 (2020-01-08)
3.0.1 (2019-12-25)
3.0.0 (2019-12-18)
- ember: moves location of polly configuration
2.7.0 (2019-11-21)
2.6.3 (2019-09-30)
- use watch strategy (#236) (5b4edf3)
- adapter-fetch: Correctly handle Request instance passed into fetch (#259) (593ecb9)
2.6.2 (2019-08-05)
2.6.1 (2019-08-01)
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