Skip to content

Commit

Permalink
feat: introduce the turborepo to the parser.js (#1008)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergio Moya <[email protected]>%0ACo-authored-by: AyushNautiyalDeveloper <[email protected]>%0ACo-authored-by: Turbobot <[email protected]>
  • Loading branch information
ayushnau and turbobot-temp authored Jul 4, 2024
1 parent 01be22e commit b2a0f54
Show file tree
Hide file tree
Showing 414 changed files with 27,084 additions and 14,077 deletions.
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/parser-js" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"privatePackages": {
"version": true,
"tag": true
}
}
5 changes: 5 additions & 0 deletions .changeset/wise-laws-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@asyncapi/parser": minor
---

Turning Parser-JS into monorepo by integrating Turborepo. No new features or bugfixes were introduced.
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ node_modules
/lib
/esm
/cjs
/browser
/browser
esm
cjs
134 changes: 0 additions & 134 deletions .eslintrc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# 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

# It does magic only if there is package.json file in the root of the project
# It does magic only if there is a package.json file in the root of the project
name: Release - if Node project

on:
push:
branches:
- master
# below lines are not enough to have release supported for these branches
# make sure configuration of `semantic-release` package mentions these branches
# The below lines are not enough to have release supported for these branches
- next-spec
- next-major
- next-major-spec
Expand All @@ -18,10 +14,9 @@ on:
- next

jobs:

test-nodejs:
# We just check the message of first commit as there is always just one commit because we squash into one before merging
# "commits" contains array of objects where one of the properties is commit "message"
# We just check the message of the first commit as there is always just one commit because we squash into one before merging
# "commits" contains an array of objects where one of the properties is the commit "message"
# Release workflow will be skipped if release conventional commits are not used
if: |
startsWith( github.repository, 'asyncapi/' ) &&
Expand All @@ -33,11 +28,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Using macos-13 instead of latest (macos-14) due to an issue with Puppeteer and such runner.
# 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:
- name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows
- name: Set git to use LF # To once and for all finish the never-ending fight between Unix and Windows
run: |
git config --global core.autocrlf false
git config --global core.eol lf
Expand All @@ -60,7 +55,7 @@ jobs:
- if: steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest'
name: Install npm cli 8
shell: bash
#npm cli 10 is buggy because of some cache issues
# npm cli 10 is buggy because of some cache issues
run: npm install -g [email protected]
- if: steps.packagejson.outputs.exists == 'true'
name: Install dependencies
Expand All @@ -75,16 +70,16 @@ jobs:
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'Release workflow failed in testing job'
text: "Release workflow failed in testing job"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}

release:
needs: [test-nodejs]
name: Publish to any of NPM, Github, or Docker Hub
name: Publish to any of NPM, GitHub, or Docker Hub
runs-on: ubuntu-latest
steps:
- name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows
- name: Set git to use LF # To once and for all finish the never-ending fight between Unix and Windows
run: |
git config --global core.autocrlf false
git config --global core.eol lf
Expand All @@ -108,11 +103,19 @@ jobs:
shell: bash
run: npm ci
- if: steps.packagejson.outputs.exists == 'true'
name: Add plugin for conventional commits for semantic-release
run: npm install --save-dev [email protected]
name: Install changelog
shell: bash
run: npm install @changesets/[email protected]
- if: steps.packagejson.outputs.exists == 'true'
name: Publish to any of NPM, Github, and Docker Hub
uses: changesets/action@v1
id: release
with:
version: npx -p @changesets/cli changeset version
commit: version packages
title: "chore: version packages"
publish: npx -p @changesets/cli changeset publish
setupGitUser: false
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -122,13 +125,12 @@ jobs:
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: asyncapi-bot
GIT_COMMITTER_EMAIL: [email protected]
run: npx [email protected]
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
- 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: 'Release workflow failed in release job'
text: "Release workflow failed in release job"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ node_modules
/cjs
/browser
*.tgz
.turbo
Empty file added .npmrc
Empty file.
24 changes: 0 additions & 24 deletions .releaserc

This file was deleted.

4 changes: 2 additions & 2 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Disable specific duplicate code since it would introduce more complexity to reduce it.
sonar.cpd.exclusions=src/models/**/*.ts,src/spec-types/*.ts
sonar.exclusions=test/**/*
sonar.cpd.exclusions=packages/parser/src/models/**/*.ts,packages/parser/src/spec-types/*.ts
sonar.exclusions=packages/parser/test/**/*
Loading

0 comments on commit b2a0f54

Please sign in to comment.