Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit bfe73de

Browse files
committed
fix(cli): allow --adapter to have precedence
1 parent cec2412 commit bfe73de

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

packages/fury-cli/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## Master
4+
5+
### Enhancements
6+
7+
- Any adapter added via the `--adapter` option will be preferred for parsing
8+
when there are multiple adapters loaded for the same media types. For example
9+
if you want to use `--adapter fury-adapter-remote` and there is already a
10+
conflicting adapter such as `fury-adapter-apib-parser` which previously took
11+
precedence.
12+
313
## 0.9.1 (2019-07-02)
414

515
This update incorporates changes from Fury Adapters:

packages/fury-cli/lib/fury.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ if (require.main === module) {
228228

229229
if (commander.adapter) {
230230
// eslint-disable-next-line import/no-dynamic-require, global-require
231-
fury.use(require(commander.adapter));
231+
const adapter = require(commander.adapter);
232+
fury.adapters.unshift(adapter);
232233
}
233234

234235
const furyCLI = new FuryCLI(input, output, commander.format,

0 commit comments

Comments
 (0)