@digitalbazaar/http-client
Advanced tools
Comparing version 2.0.1 to 3.0.0
# @digitalbazaar/http-client ChangeLog | ||
## 3.0.0 - 2022-04-20 | ||
### Changed | ||
- **BREAKING**: Convert to module (ESM) internally and use conditional exports | ||
to export a directory that has an entry point for CommonJS. | ||
- Use `ky@0.30` and `ky-universal@0.10.1`. | ||
- **BREAKING**: Only specific methods and properties are proxied from `ky` | ||
on `httpClient` instances now. This includes the same set of functions | ||
that were proxied in previous versions: | ||
`get`, `post`, `put`, `push`, `patch`, `head`, `delete` | ||
With the same caveat that these functions return a promise that resolves | ||
to the response (just like in previous versions, but different from `ky` | ||
which returns the response synchronously). This version also proxies | ||
`create` and `extend`, where `extend` now properly inherits options from | ||
the parent `ky` instance. The `stop` property is also proxied, but returns | ||
a promise that resolves to the `ky.stop` signal. This change was made because | ||
the latest version of `ky` is ESM-only -- and to continue supporting a CJS | ||
build, it meant importing the library dynamically. Therefore, the `ky` | ||
instance must settle before it can be used -- requiring all `httpClient` | ||
methods and accessors to be asynchronous. | ||
### Removed | ||
- **BREAKING**: Drop support for node 10 and 12. | ||
## 2.0.1 - 2021-12-01 | ||
### Fixed | ||
- Remove unused `httpAgent` param. | ||
- Remove unused `httpsAgent` param. | ||
@@ -8,0 +34,0 @@ ## 2.0.0 - 2021-11-15 |
{ | ||
"name": "@digitalbazaar/http-client", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"description": "An opinionated, isomorphic HTTP client.", | ||
"license": "BSD-3-Clause", | ||
"main": "index.js", | ||
"type": "module", | ||
"main": "./dist/cjs/index.cjs", | ||
"exports": { | ||
"require": "./dist/cjs/index.cjs", | ||
"import": "./lib/index.js" | ||
}, | ||
"scripts": { | ||
"test": "npm run test-node", | ||
"test-node": "cross-env NODE_ENV=test mocha -r esm --preserve-symlinks -t 30000 -A -R ${REPORTER:-spec} --require tests/test-mocha.js tests/*.spec.js", | ||
"test-karma": "karma start karma.conf.js", | ||
"test-watch": "cross-env NODE_ENV=test mocha -r esm --watch --preserve-symlinks -t 30000 -A -R ${REPORTER:-spec} --require tests/test-mocha.js tests/*.spec.js", | ||
"coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary npm run test-node", | ||
"coverage-ci": "cross-env NODE_ENV=test nyc --reporter=lcovonly npm run test-node", | ||
"coverage-report": "nyc report", | ||
"rollup": "rollup -c rollup.config.js", | ||
"build": "npm run clear && npm run rollup", | ||
"clear": "rimraf dist/ && mkdir dist", | ||
"prepare": "npm run build", | ||
"rebuild": "npm run clear && npm run build", | ||
"test": "npm run test-node && npm run test-node-cjs", | ||
"test-node": "cross-env NODE_ENV=test mocha --preserve-symlinks -t 30000 -A -R ${REPORTER:-spec} --require tests/test-mocha.js tests/*.spec.js", | ||
"test-node-cjs": "cross-env NODE_ENV=test mocha --preserve-symlinks -t 30000 -A -R ${REPORTER:-spec} --require tests/test-mocha.cjs tests/*.spec.cjs", | ||
"test-karma": "karma start karma.conf.cjs", | ||
"test-watch": "cross-env NODE_ENV=test mocha --watch --parallel --preserve-symlinks -t 30000 -A -R ${REPORTER:-spec} --require tests/test-mocha.js tests/*.spec.js", | ||
"coverage": "cross-env NODE_ENV=test c8 --reporter=lcov --reporter=text-summary npm run test-node", | ||
"coverage-ci": "cross-env NODE_ENV=test c8 --reporter=lcovonly npm run test-node", | ||
"coverage-report": "c8 report", | ||
"lint": "eslint ." | ||
}, | ||
"files": [ | ||
"index.js", | ||
"main.js" | ||
"lib/*", | ||
"dist/*" | ||
], | ||
"dependencies": { | ||
"esm": "^3.2.22", | ||
"ky": "^0.25.1", | ||
"ky-universal": "^0.8.2" | ||
"ky": "^0.30.0", | ||
"ky-universal": "^0.10.1" | ||
}, | ||
@@ -32,7 +42,9 @@ "devDependencies": { | ||
"@babel/runtime": "^7.10.2", | ||
"c8": "^7.11.0", | ||
"chai": "^4.2.0", | ||
"cross-env": "^7.0.2", | ||
"detect-node": "^2.0.4", | ||
"eslint": "^7.2.0", | ||
"eslint-config-digitalbazaar": "^2.5.0", | ||
"eslint": "^7.32.0", | ||
"eslint-config-digitalbazaar": "^2.8.0", | ||
"eslint-plugin-jsdoc": "^39.2.5", | ||
"karma": "^6.3.4", | ||
@@ -47,3 +59,4 @@ "karma-babel-preprocessor": "^8.0.1", | ||
"mocha": "^8.3.2", | ||
"nyc": "^15.1.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.47.0", | ||
"webpack": "^5.41.1" | ||
@@ -69,11 +82,11 @@ }, | ||
"homepage": "https://github.com/digitalbazaar/http-client", | ||
"module": "main.js", | ||
"engines": { | ||
"node": ">=10.0.0" | ||
"node": ">=14.0" | ||
}, | ||
"nyc": { | ||
"c8": { | ||
"exclude": [ | ||
"tests" | ||
"tests", | ||
"node_modules" | ||
] | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
17475
2
7
249
Yes
24
1
+ Addeddata-uri-to-buffer@4.0.1(transitive)
+ Addedfetch-blob@3.2.0(transitive)
+ Addedformdata-polyfill@4.0.10(transitive)
+ Addedky@0.30.0(transitive)
+ Addedky-universal@0.10.1(transitive)
+ Addednode-domexception@1.0.0(transitive)
+ Addednode-fetch@3.3.2(transitive)
+ Addedweb-streams-polyfill@3.3.3(transitive)
- Removedesm@^3.2.22
- Removeddata-uri-to-buffer@3.0.1(transitive)
- Removedesm@3.2.25(transitive)
- Removedfetch-blob@2.1.2(transitive)
- Removedky@0.25.1(transitive)
- Removedky-universal@0.8.2(transitive)
- Removednode-fetch@3.0.0-beta.9(transitive)
Updatedky@^0.30.0
Updatedky-universal@^0.10.1