Skip to content

Commit af7fba8

Browse files
authored
fix: updating parser deps in tests and adding simple PR validation (#99)
1 parent c7a87d1 commit af7fba8

File tree

8 files changed

+67
-150
lines changed

8 files changed

+67
-150
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ jobs:
4040
- name: Get version from package.json after release step
4141
id: extractver
4242
run: echo "::set-output name=version::$(npm run get-lib-version --silent)"
43+
- name: Use latest version in the Playground #this will update package.json and a lock file for the playground that will also be pushed to PR with next step
44+
if: steps.initversion.outputs.version != steps.extractver.outputs.version
45+
run: npm install @kyma-project/asyncapi-react@${{ steps.extractver.outputs.version }} -s
46+
working-directory: ./playground
4347
- name: Create Pull Request with updated package files
4448
if: steps.initversion.outputs.version != steps.extractver.outputs.version
4549
uses: peter-evans/create-pull-request@v2.4.4
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Simple PR Validation
2+
3+
on:
4+
pull_request
5+
6+
jobs:
7+
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repo
12+
uses: actions/checkout@v2
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 13
17+
- name: Install dependencies
18+
run: npm install
19+
- name: Bootstrap the project
20+
run: npm run bootstrap
21+
- name: Run library tests
22+
run: npm test

library/src/containers/AsyncApi/AsyncApi.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from '../../types';
1212
import { ConfigInterface, defaultConfig } from '../../config';
1313
import { beautifier, bemClasses, stateHelpers, Parser } from '../../helpers';
14-
import { parse, parseFromUrl } from 'asyncapi-parser';
14+
import { parse, parseFromUrl } from '@asyncapi/parser';
1515
import { CSS_PREFIX } from '../../constants';
1616
import { useExpandedContext, useChangeHashContext } from '../../store';
1717

library/src/helpers/__tests__/parser.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
ParserErrorUnsupportedVersion,
33
ParserErrorNoJS,
4-
} from 'asyncapi-parser';
4+
} from '@asyncapi/parser';
55
import { Options as ParserOptions } from 'json-schema-ref-parser';
66

77
import { Parser } from '../parser';

library/src/helpers/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
ParserErrorUnsupportedVersion,
33
ParserErrorNoJS,
4-
} from 'asyncapi-parser';
4+
} from '@asyncapi/parser';
55
import { Options as ParserOptions } from 'json-schema-ref-parser';
66

77
import { ParserReturn, FetchingSchemaInterface } from '../types';

library/src/react-app-env.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
declare module 'asyncapi-parser';
2-
declare module 'asyncapi-parser/lib/parser';
1+
declare module '@asyncapi/parser';
2+
declare module '@asyncapi/parser/lib/parser';
33
declare module 'merge';
44
declare module 'openapi-sampler';

0 commit comments

Comments
 (0)