Skip to content

Commit d171820

Browse files
committed
Changed to ts-json-schema-generator
updated unit tests Added new vs old unit test Add a test for omit utility type Removal of typescript-json-schema from main code Moved __test__ directory out of src folder for better code coverage Updated circle.ci
1 parent 4b93b7e commit d171820

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+7637
-8310
lines changed

.circleci/config.yml

Lines changed: 76 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,83 @@
11
version: 2.1
22

33
orbs:
4-
node: circleci/[email protected]
4+
node: circleci/[email protected]
5+
win: circleci/[email protected]
56

6-
refs:
7-
container: &container
8-
docker:
9-
- image: node:16
10-
working_directory: ~/repo
11-
steps:
12-
- &PNPM
13-
run:
14-
name: Install PNPM
15-
command: npm i -g pnpm
16-
- &Versions
17-
run:
18-
name: Versions
19-
command: node -v && npm -v && pnpm -v
20-
- &Install
21-
run:
22-
name: Install Dependencies
23-
command: pnpm install
24-
- &Build
25-
run:
26-
name: Build
27-
command: pnpm build
28-
- &Test
29-
run:
30-
name: Test
31-
command: pnpm ci:test
7+
executors:
8+
linux:
9+
docker:
10+
- image: node:16
11+
working_directory: ~/repo
12+
windows:
13+
machine:
14+
image: windows-server-2022-gui:current
15+
resource_class: windows.medium
16+
shell: bash.exe
3217

18+
refs:
19+
steps:
20+
- &InstallNode
21+
node/install:
22+
node-version: << parameters.node-version >>
23+
- &PNPM
24+
run:
25+
name: Install PNPM
26+
command: nvm v & node -v && npm -v && npm install -g pnpm
27+
- &Versions
28+
run:
29+
name: Versions
30+
command: node -v && npm -v && npx pnpm -v
31+
- &Install
32+
run:
33+
name: Install Dependencies
34+
command: npx pnpm install
35+
- &Build
36+
run:
37+
name: Build
38+
command: npx pnpm build
39+
- &Test
40+
run:
41+
name: Test
42+
command: npx pnpm ci:test
43+
- &EnsureNode
44+
run:
45+
name: EnsureNode
46+
command: nvm use << parameters.node-version >> ; npm i -g which-
3347
jobs:
34-
test:
35-
<<: *container
36-
steps:
37-
- checkout
38-
- *PNPM
39-
- *Versions
40-
- *Install
41-
- *Test
42-
- *Build
43-
44-
publish:
45-
<<: *container
46-
steps:
47-
- checkout
48-
- *Versions
49-
- *Install
50-
- *Test
51-
- *Build
52-
- run:
53-
name: NPM Auth
54-
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
55-
- run:
56-
name: Release
57-
command: |
58-
npx semantic-release && \
59-
npx cross-ci :run \
60-
npx commit-status success Version "'\${PROJECT_VERSION}'"
48+
test:
49+
parameters:
50+
os:
51+
type: executor
52+
node-version:
53+
type: string
54+
executor: << parameters.os >>
55+
steps:
56+
- when:
57+
condition:
58+
equal:
59+
- 'Linux'
60+
- << parameters.os >>
61+
steps:
62+
- *InstallNode
63+
- *EnsureNode
64+
- *PNPM
65+
- *Versions
66+
- checkout
67+
- *Install
68+
- *Test
69+
- *Build
6170
workflows:
62-
version: 2
63-
all:
64-
jobs:
65-
- test:
66-
filters:
67-
branches:
68-
ignore:
69-
- master
70-
- gh-pages
71+
version: 2
72+
all:
73+
jobs:
74+
- test:
75+
matrix:
76+
parameters:
77+
os: [linux, windows]
78+
node-version: [16.15.0]
79+
filters:
80+
branches:
81+
ignore:
82+
- master
83+
- gh-pages

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ lib
2626
environment.toml
2727
.env
2828

29-
src/__tests__/**/*.validator.ts
29+
__tests__/**/*.validator.ts
30+
__tests__/validators/output/
3031
.vscode
31-
src/Example.validator.ts
3232
tsconfig.tsbuildinfo
3333
.dccache

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
enable-pre-post-script = true
2+
strict-peer-dependencies = false

0 commit comments

Comments
 (0)