Skip to content

Commit 83c4599

Browse files
philsturgeonPhil Sturgeon
andauthored
BREAKING CHANGE: drop support for nodejs v8
* 1.0.1 * github action > circleci also treeware and semantic release * chore: updated mocha * chore: update nyc * chore: add semnatic release * allow locks * chore: never any nodejs v8 support Co-authored-by: Phil Sturgeon <[email protected]>
1 parent 623d88c commit 83c4599

File tree

9 files changed

+8685
-113
lines changed

9 files changed

+8685
-113
lines changed

.circleci/config.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/FUNDING.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release npm package
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: "12.x"
17+
- run: npm ci
18+
- run: npm run build --if-present
19+
- run: npm test
20+
- run: npx semantic-release
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/npm-test.yml renamed to .github/workflows/test.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
name: Node CI
1+
name: Tests
22

3-
on: [push]
3+
on: push
44

55
jobs:
6-
build:
7-
6+
test:
87
runs-on: ubuntu-latest
9-
108
strategy:
119
matrix:
12-
node-version: [8.x, 10.x, 12.x]
13-
10+
node-version: [10.x, 12.x]
1411
steps:
1512
- uses: actions/checkout@v1
1613
- name: Use Node.js ${{ matrix.node-version }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ build.sh
22
.coveralls.yml
33
.node-version
44
.nyc_output
5-
package-lock.json
65
yarn.lock
76
resolved.yaml
87

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@
22

33
A little NodeJS package to convert JSON Schema to a [OpenAPI Schema Object](http://spec.openapis.org/oas/v3.0.3.html#schema-object).
44

5+
[![Treeware](https://img.shields.io/badge/dynamic/json?color=brightgreen&label=Treeware&query=%24.total&url=https%3A%2F%2Fpublic.offset.earth%2Fusers%2Ftreeware%2Ftrees)](https://treeware.earth)
6+
57
## Features
68

7-
* converts JSON Schema Draft 00 Wright (a.k.a draft v5) to OpenAPI 3.0 Schema Object
9+
* converts JSON Schema Draft 04 to OpenAPI 3.0 Schema Object
810
* switches `type: ['foo', 'null']` to `type: foo` and `nullable: true`
911
* supports deep structures with nested `allOf`s etc.
1012
* switches `patternProperties` to `x-patternProperties`
1113
* converts `dependencies` to an allOf + oneOf OpenAPI-valid equivalent
1214

1315
## Installation
1416

15-
```
17+
``` shell
1618
npm install --save @openapi-contrib/json-schema-to-openapi-schema
1719
```
1820

21+
Requires NodeJS v10 or greater.
22+
1923
## Usage
2024

2125
Here's a small example to get the idea:
@@ -85,6 +89,10 @@ To run the test-suite:
8589
npm test
8690
```
8791

92+
## Treeware
93+
94+
This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/{venfor}/{package}) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
95+
8896
## Thanks
8997

9098
- [Stoplight][] for [donating time and effort](https://stoplight.io/blog/companies-supporting-open-source/) to this project, and many more.

0 commit comments

Comments
 (0)