Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
KhudaDad414 committed May 17, 2024
2 parents 67cd22f + 36fc1b8 commit c15a013
Show file tree
Hide file tree
Showing 44 changed files with 24,531 additions and 61,278 deletions.
8 changes: 8 additions & 0 deletions .changeset/odd-rules-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"design-system": patch
"studio-next": patch
"@asyncapi/studio": patch
"@asyncapi/studio-ui": patch
---

- Use PNPM instead of NPM.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

50 changes: 43 additions & 7 deletions .github/workflows/bounty-program-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ on:
types:
- created

env:
BOUNTY_PROGRAM_LABELS_JSON: |
[
{"name": "bounty", "color": "0e8a16", "description": "Participation in the Bounty Program"}
]
jobs:
guard-against-unauthorized-use:
if: >
github.actor != ('aeworxet' || 'thulieblack') &&
(
contains(github.event.comment.body, '/bounty' )
startsWith(github.event.comment.body, '/bounty' )
)
runs-on: ubuntu-latest
Expand All @@ -46,15 +52,10 @@ jobs:
if: >
github.actor == ('aeworxet' || 'thulieblack') &&
(
contains(github.event.comment.body, '/bounty' )
startsWith(github.event.comment.body, '/bounty' )
)
runs-on: ubuntu-latest
env:
BOUNTY_PROGRAM_LABELS_JSON: |
[
{"name": "bounty", "color": "0e8a16", "description": "Participation in the Bounty Program"}
]

steps:
- name: Add label `bounty`
Expand Down Expand Up @@ -88,3 +89,38 @@ jobs:
repo: context.repo.repo,
labels: [BOUNTY_PROGRAM_LABELS[0].name]
})
remove-label-bounty:
if: >
github.actor == ('aeworxet' || 'thulieblack') &&
(
startsWith(github.event.comment.body, '/unbounty' )
)
runs-on: ubuntu-latest

steps:
- name: Remove label `bounty`
uses: actions/github-script@v6

with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const BOUNTY_PROGRAM_LABELS = JSON.parse(process.env.BOUNTY_PROGRAM_LABELS_JSON);
let LIST_OF_LABELS_FOR_ISSUE = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
LIST_OF_LABELS_FOR_ISSUE = LIST_OF_LABELS_FOR_ISSUE.data.map(key => key.name);
if (LIST_OF_LABELS_FOR_ISSUE.includes(BOUNTY_PROGRAM_LABELS[0].name)) {
console.log('Removing label `bounty`...');
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: [BOUNTY_PROGRAM_LABELS[0].name]
})
}
47 changes: 21 additions & 26 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,36 +44,31 @@ jobs:
name: Checkout repository
uses: actions/checkout@v4
- if: steps.should_run.outputs.shouldrun == 'true'
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
shell: bash
- if: steps.packagejson.outputs.exists == 'true'
name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- if: steps.packagejson.outputs.exists == 'true'
name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "${{ steps.lockversion.outputs.version }}"
- if: steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest'
#npm cli 10 is buggy because of some cache issue
name: Install npm cli 8
node-version: 20
- if: steps.should_run.outputs.shouldrun == 'true'
uses: pnpm/action-setup@v3
with:
run_install: false
- if: steps.should_run.outputs.shouldrun == 'true'
name: Get pnpm store directory
shell: bash
run: npm install -g npm@8.19.4
- if: steps.packagejson.outputs.exists == 'true'
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- if: steps.should_run.outputs.shouldrun == 'true'
uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- if: steps.should_run.outputs.shouldrun == 'true'
name: Install dependencies
shell: bash
run: npm ci
- if: steps.packagejson.outputs.exists == 'true'
run: pnpm install
- if: steps.should_run.outputs.shouldrun == 'true'
name: Test
run: npm test --if-present
- if: steps.packagejson.outputs.exists == 'true' && matrix.os == 'ubuntu-latest'
#linting should run just one and not on all possible operating systems
name: Run linter
run: npm run lint --if-present
- if: steps.packagejson.outputs.exists == 'true'
name: Run release assets generation to make sure PR does not break it
shell: bash
run: npm run generate:assets --if-present
run: pnpm test
65 changes: 0 additions & 65 deletions .github/workflows/if-nodejs-version-bump.yml

This file was deleted.

33 changes: 23 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,36 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
node-version: 18
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: npm install
shell: bash
run: pnpm install
- name: Create Release Pull Request or Release
uses: changesets/action@v1
with:
publish: npm run publish-packages
version: npm run version-packages
publish: pnpm run publish-packages
version: pnpm run version-packages
commit: "version packages"
title: "chore: version packages"
env:
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
legacy-peer-deps=true
public-hoist-pattern[]=@asyncapi*
public-hoist-pattern[]=nimma*
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.17
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,47 @@ This is a monorepo containing Studio source code, design system, and all their d
Clone this repo and run:

```
npm install
pnpm install
```

> **Note:** NPM v7+ is required.
> **Note:** PNPM v8+ and Node.js v18.17+ is required.
## Development

#### Run Studio locally

```
npm run studio
pnpm run studio
```

#### Run the Design System locally

```
npm run ds
pnpm run ds
```

#### Run Studio and the Design System locally at the same time

```
npm run dev
pnpm run dev
```

#### Build Studio for production

```
npm run build:studio
pnpm run build:studio
```

#### Build the Design System for production

```
npm run build:ds
pnpm run build:ds
```

#### Build Studio and the Design System for production

```
npm run build
pnpm run build
```

## Architecture decision records
Expand Down
2 changes: 2 additions & 0 deletions apps/design-system/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!.storybook
storybook-static
10 changes: 10 additions & 0 deletions apps/design-system/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": ["eslint-config-custom","plugin:storybook/recommended"],
"plugins": ["import", "sonarjs"],
"rules": {
"import/no-anonymous-default-export": ["error", {
"allowObject": true
}],
"sonarjs/no-duplicate-string": "off"
}
}
21 changes: 0 additions & 21 deletions apps/design-system/.storybook/main.js

This file was deleted.

34 changes: 34 additions & 0 deletions apps/design-system/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import remarkGfm from 'remark-gfm';
import { StorybookConfig } from '@storybook/react-webpack5';
const config: StorybookConfig = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
{
name: '@storybook/addon-docs',
options: {
configureJSX: true,
mdxPluginOptions: {
mdxCompileOptions: {
remarkPlugins: [remarkGfm],
},
},
},
},
],
framework: {
name: "@storybook/react-webpack5",
options: {}
},
typescript: {
reactDocgen: "react-docgen-typescript"
},
docs: {
autodocs: 'tag'
},
staticDirs: ['../public']
};

export default config;
Loading

0 comments on commit c15a013

Please sign in to comment.