-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deps): use ApiDOM npmjs.com npm packages (#2861)
Refs #2860
- Loading branch information
Showing
7 changed files
with
414 additions
and
510 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,16 +14,15 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: "@swagger-api" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Semantic Release | ||
id: semantic | ||
uses: cycjimmy/[email protected] | ||
|
@@ -34,6 +33,7 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Release published | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,35 @@ The npm package contains transpiled and minified ES5 compatible code. | |
$ npm install swagger-client | ||
``` | ||
|
||
**Increasing installation speed:** | ||
|
||
`swagger-client` integrates with [ApiDOM](https://github.com/swagger-api/apidom) and use it | ||
as a direct dependency. Some transitive dependencies of ApiDOM are [optional](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#optionaldependencies), | ||
which means we can use [override package.json field](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides) | ||
to speed up the installation: | ||
|
||
```json | ||
"overrides": { | ||
"@swagger-api/apidom-reference": { | ||
"@swagger-api/apidom-ns-asyncapi-2": "npm:[email protected]", | ||
"@swagger-api/apidom-parser-adapter-api-design-systems-json": "npm:[email protected]", | ||
"@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "npm:[email protected]", | ||
"@swagger-api/apidom-parser-adapter-asyncapi-json-2": "npm:[email protected]", | ||
"@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "npm:[email protected]", | ||
"@swagger-api/apidom-parser-adapter-json": "npm:[email protected]", | ||
"@swagger-api/apidom-parser-adapter-openapi-json-3-0": "npm:[email protected]", | ||
"@swagger-api/apidom-parser-adapter-openapi-json-3-1": "npm:[email protected]", | ||
"@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "npm:[email protected]", | ||
"@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "npm:[email protected]", | ||
"@swagger-api/apidom-parser-adapter-yaml-1-2": "npm:[email protected]" | ||
} | ||
} | ||
``` | ||
|
||
> NOTE 1: Above override uses [empty npm package called "-"](https://www.npmjs.com/package/-) to override optional ApiDOM transitive dependencies. | ||
> NOTE 2: When ApiDOM optional dependencies fail to install, you can safely ignore it as `swagger-client` can work without these optional dependencies. | ||
After installed successfully: | ||
|
||
[ES6 imports](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) | ||
|
Oops, something went wrong.