Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from asyncapi:master #3

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d2069bd
chore(ci): change pages to markdown (#1210)
Shurtu-gal May 27, 2024
ea8159e
fix: update @asyncapi/parser to 3.0.15 version and others (#1215)
asyncapi-bot Jun 5, 2024
9285982
fix: update @asyncapi/parser to 3.0.16 version and others (#1216)
asyncapi-bot Jun 5, 2024
f27c37c
chore(release): v2.0.3 (#1217)
asyncapi-bot Jun 11, 2024
0a393ee
ci: update of files from global .github repo (#1214)
asyncapi-bot Jun 11, 2024
3ce42bb
ci: update of files from global .github repo (#1220)
asyncapi-bot Jun 11, 2024
128c92c
chore(deps-dev): bump ws from 7.5.9 to 7.5.10 (#1223)
dependabot[bot] Jun 18, 2024
bc9dbec
refactor: introduce monorepo to Generator Repo (#1213)
ayushnau Jun 20, 2024
99a14a8
feat: include default nunjucks filters and new release to the generat…
ayushnau Jul 29, 2024
97348b1
chore(release): release and bump versions of packages (#1231)
asyncapi-bot Jul 29, 2024
36ee8a8
fix: remove package name from version tag for Docker tagging (#1232)
ayushnau Jul 29, 2024
2d51aa3
chore(release): release and bump versions of packages (#1233)
asyncapi-bot Jul 29, 2024
a3e93ef
fix: update the default context for docker publishing (#1235)
ayushnau Jul 30, 2024
828b03f
chore(release): release and bump versions of packages (#1236)
asyncapi-bot Jul 30, 2024
93fb8e8
fix: update the method for importing the nunjucks filter dependency (…
ayushnau Jul 31, 2024
722228a
fix: update the ignore dependency in the changeset config (#1238)
ayushnau Jul 31, 2024
ef865ad
chore(release): release and bump versions of packages (#1239)
asyncapi-bot Jul 31, 2024
81dfd0c
feat: enable noOverwriteGlobs for templates based on react engine (#…
lmgyuan Jul 31, 2024
8501f8d
chore(release): release and bump versions of packages (#1241)
asyncapi-bot Jul 31, 2024
b093dbc
chore: update the readme file path for docker hub (#1243)
ayushnau Jul 31, 2024
44fcc33
fix: `ts-node` is registered only when it's actually needed (#1165)
Gmin2 Jul 31, 2024
c1bbcda
chore(release): release and bump versions of packages (#1244)
asyncapi-bot Jul 31, 2024
b174732
chore: add the readme.md file for the generator (#1245)
ayushnau Aug 1, 2024
e814283
chore: update the readme path in the docker ci (#1246)
ayushnau Aug 3, 2024
8094653
chore: use @asyncapi/multi-parser instead of @smoya/multi-parser (#1247)
smoya Aug 11, 2024
9d60902
fix: update @asyncapi/generator-react-sdk to 1.1.0 version and others…
asyncapi-bot Aug 12, 2024
db9b0e1
fix: update @asyncapi/generator-react-sdk to 1.1.1 version and others…
asyncapi-bot Aug 21, 2024
46114d8
feat: add `compile` option to enable rerun of transpilation for react…
Gmin2 Aug 26, 2024
8ade3c1
chore(release): release and bump versions of packages (#1260)
asyncapi-bot Aug 26, 2024
3a372c4
fix: remove `source-map-support` package (#1258)
bakasmarius Aug 28, 2024
91f157e
chore(release): release and bump versions of packages (#1262)
asyncapi-bot Aug 28, 2024
5a71b72
docs: improve documentation related to File templates feature (#1230)
Florence-Njeri Sep 2, 2024
0ab1a3d
ci: docs update workflow fixed (#1265)
DhairyaMajmudar Sep 4, 2024
5e58efe
docs: minor updation in generated files output folder path (#1263)
DhairyaMajmudar Sep 9, 2024
001bbcd
docs: add DhairyaMajmudar as a contributor for bug (#1266)
allcontributors[bot] Sep 9, 2024
60a788d
ci: minor fix in update docs workflow (#1267)
DhairyaMajmudar Sep 10, 2024
48441cb
fix: update @asyncapi/generator-react-sdk to 1.1.2 version and others…
asyncapi-bot Sep 11, 2024
c4c49ba
chore(deps): bump rollup from 2.79.1 to 2.79.2 in /apps/generator/tes…
dependabot[bot] Sep 29, 2024
1f06df5
docs: add the development guide on how to run test (#1250)
Gmin2 Oct 2, 2024
52c6796
chore(deps): bump rollup from 2.79.1 to 2.79.2 in /apps/generator/tes…
dependabot[bot] Oct 2, 2024
5c28787
refactor: switch to optional chaining in custom filters and update es…
rishabhr4 Oct 8, 2024
a3460a5
refactor: optional chaining instead of expression in `parser.js` (#1277)
rishabhr4 Oct 8, 2024
2feefdc
refactor: use an object spread instead of `Object.assign` in filters …
rishabhr4 Oct 8, 2024
6872020
ci: update .prettierignore from global .github repo (#1293)
asyncapi-bot Oct 9, 2024
8540832
refactor: switch to optional chaining in custom filters and removing …
rishabhr4 Oct 9, 2024
950f4c8
refactor: used optional chaining instead of expression in generator.j…
rishabhr4 Oct 9, 2024
074e520
refactor: improve custom filters readability with optional chaining (…
ManikantaMandala Oct 9, 2024
6f60d50
refactor: used object.hasown instead of object.hasownproperty in gene…
rishabhr4 Oct 9, 2024
0e3478b
refactor: use optional chaining in template validator (#1300)
thebedigupta Oct 14, 2024
254b072
refactor: use optional chaining in template params validation (#1299)
thebedigupta Oct 14, 2024
298479a
refactor: simplify variable initialization in tests (#1297)
thebedigupta Oct 14, 2024
25c4e53
refactor: better readability of `buildLineCore` filter (#1301)
thebedigupta Oct 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@
"test",
"doc"
]
},
{
"login": "DhairyaMajmudar",
"name": "Dhairya Majmudar",
"avatar_url": "https://avatars.githubusercontent.com/u/124715224?v=4",
"profile": "https://dhaiyra-majmudar.netlify.app/",
"contributions": [
"bug"
]
}
],
"contributorsPerLine": 3,
Expand Down
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-git", { "repo": "asyncapi/generator" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",

Check warning on line 8 in .changeset/config.json

View check run for this annotation

In Solidarity / Inclusive Language

Match Found

Please consider an alternative to `master`. Possibilities include: `primary`, `main`, `leader`, `active`, `writer`
Raw output
/master/gi
"updateInternalDependencies": "patch",
"privatePackages": {
"version": true,
"tag": true
}
}
11 changes: 6 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
output
node_modules
.github/templates-list-validator/dist
test/temp
test/test-templates/react-template/__transpiled
apps/generator/output/*
**/node_modules/
.github/templates-list-validator/dist/*
apps/generator/test/temp/*
apps/generator/test/test-templates/react-template/__transpiled/*

2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extends:
- plugin:sonarjs/recommended

parserOptions:
ecmaVersion: 2018
ecmaVersion: 2020
sourceType: module
ecmaFeatures:
jsx: true
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# Purpose of this action is to update npm package in libraries that use it. It is like dependabot for asyncapi npm modules only.
# It runs in a repo after merge of release commit and searches for other packages that use released package. Every found package gets updated with lates version

name: Bump package version in dependent repos - if Node project
name: Bump package version in dependent repos

on:
# It cannot run on release event as when release is created then version is not yet bumped in package.json
Expand All @@ -21,15 +15,12 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Check if Node.js project and has package.json
id: packagejson
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
- if: steps.packagejson.outputs.exists == 'true'
name: Bumping latest version of this package in other repositories
- name: Bumping latest version of this package in other repositories
uses: derberg/npm-dependency-manager-for-your-github-org@1eafd3bf3974f21d395c1abac855cb04b295d570 # using v6.-.- https://github.com/derberg/npm-dependency-manager-for-your-github-org/releases/tag/v6
with:
github_token: ${{ secrets.GH_TOKEN }}
committer_username: asyncapi-bot
committer_email: [email protected]
repos_to_ignore: spec,bindings,saunter,server-api
packagejson_path: ./apps/generator
custom_id: "dependency update from asyncapi bot"
4 changes: 3 additions & 1 deletion .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# Using macos-13 instead of latest (macos-14) due to an issue with Puppeteer and such runner.
# See: https://github.com/puppeteer/puppeteer/issues/12327 and https://github.com/asyncapi/parser-js/issues/1001
os: [ubuntu-latest, macos-13, windows-latest]
steps:
- if: >
!github.event.pull_request.draft && !(
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/if-nodejs-version-bump.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/issues-prs-notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
name: Notify slack on every new issue
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Convert markdown to slack markdown for issue
uses: asyncapi/.github/.github/actions/slackify-markdown@master
id: issuemarkdown
Expand All @@ -40,8 +38,6 @@ jobs:
name: Notify slack on every new pull request
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Convert markdown to slack markdown for pull request
uses: asyncapi/.github/.github/actions/slackify-markdown@master
id: prmarkdown
Expand All @@ -60,8 +56,6 @@ jobs:
name: Notify slack on every new pull request
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Convert markdown to slack markdown for pull request
uses: asyncapi/.github/.github/actions/slackify-markdown@master
id: discussionmarkdown
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/local-generate-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# this workflow runs after releases to generate some files like for example api.md
name: Autogenerate API files

on:
release:
types:
- published

jobs:
version_bump:
name: Generate assets and bump NodeJS
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# target branch of release. More info https://docs.github.com/en/rest/reference/repos#releases
# in case release is created from release branch then we need to checkout from given branch
# if @semantic-release/github is used to publish, the minimum version is 7.2.0 for proper working
ref: ${{ github.event.release.target_commitish }}
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master

Check warning on line 22 in .github/workflows/local-generate-files.yml

View check run for this annotation

In Solidarity / Inclusive Language

Match Found

Please consider an alternative to `master`. Possibilities include: `primary`, `main`, `leader`, `active`, `writer`
Raw output
/master/gi
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ steps.lockversion.outputs.version }}"
- name: Install dependencies
run: npm ci
- name: Assets generation
run: npm run generate:assets --if-present
- name: Create Pull Request with updated asset files including package.json
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # use 4.2.4 https://github.com/peter-evans/create-pull-request/releases/tag/v4.2.4
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'chore(release): ${{github.event.release.tag_name}}'
committer: asyncapi-bot <[email protected]>
author: asyncapi-bot <[email protected]>
title: 'chore: update assets'
body: 'Updating assets like for example API.md, but not only, that shoudl be generated and not manually updated'
branch: assets-update/${{github.event.release.tag_name}}
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
name: Report workflow run status to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'Unable to bump the version in package.json after the release'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
4 changes: 2 additions & 2 deletions .github/workflows/pr-testing-with-test-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18', '20' ]
node: ["18", "20"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run test
run: NODE_IMAGE_TAG=${{ matrix.node }} docker compose up --abort-on-container-exit --remove-orphans --force-recreate
working-directory: ./test/test-project
working-directory: ./apps/generator/test/test-project
9 changes: 7 additions & 2 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
id: version
run: |
VERSION=${{github.event.release.tag_name}}
VERSION_WITHOUT_V=${VERSION:1}
VERSION_WITHOUT_V=${VERSION##*@}
echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT

- name: Set Up QEMU
Expand All @@ -36,6 +36,7 @@ jobs:
- name: Build Image
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:apps/generator"
push: true
load: false
build-args: |
Expand All @@ -46,11 +47,15 @@ jobs:
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha


- name: Check out the repository
uses: actions/checkout@v4

- name: Update Docker Hub Readme
uses: meeDamian/[email protected]
with:
user: ${{ secrets.DOCKER_USERNAME }}
pass: ${{ secrets.DOCKER_PASSWORD }}
slug: asyncapi/generator
readme: ./apps/generator/README.md
description: Use your AsyncAPI definition to generate literally anything. Markdown documentation, Node.js code, HTML documentation, anything!
Loading
Loading