Skip to content

Commit

Permalink
Merge remote-tracking branch upstream/master into senali-d/component/…
Browse files Browse the repository at this point in the history
…connection-chip

Signed-off-by: Senali <[email protected]>
  • Loading branch information
senali-d committed Dec 13, 2023
2 parents 3293b56 + c27345f commit 65b05d3
Show file tree
Hide file tree
Showing 110 changed files with 5,666 additions and 1,457 deletions.
10 changes: 8 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,11 @@ vite.config.ts
.eslintrc.cjs
node_modules
dist
storybook-static
*.md
*.md
site
apps/next-12
.yarnrc.yml
.eslintrc.*js
*.config.*js
eslint-config-sistent
apps/design-system
25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
root: true,
env: {
browser: true,
es6: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:storybook/recommended'
],
plugins: ['react'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
requireConfigFile: false
},
settings: {
react: {
version: 'detect'
}
}
};
63 changes: 0 additions & 63 deletions .github/workflows/_release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.0.0
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
branch: site # The branch the action should deploy to.
folder: public # The folder the action should deploy.
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint check

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn install

- name: Run Lint
run: yarn lint
11 changes: 8 additions & 3 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,16 @@ jobs:

- name: Identify changed packages
run: |
CHANGED_PACKAGES=$(yarn lerna changed --json | jq -r '.[].name' || echo "Error parsing JSON")
echo $CHANGED_PACKAGES
CHANGED_PACKAGES=$(yarn lerna changed --json)
echo "Raw JSON output:"
echo "$CHANGED_PACKAGES"
CHANGED_PACKAGES_NAMES=$(echo "$CHANGED_PACKAGES" | jq -r '.[].name' || echo "Error parsing JSON")
echo "Parsed package names:"
echo "$CHANGED_PACKAGES_NAMES"
- name: Version packages
run: ./scripts/version-prerelease-packages.sh $CHANGED_PACKAGES
run: ./scripts/version-prerelease-packages.sh $CHANGED_PACKAGES_NAMES

- name: Commit changes
run: |
Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Version and Publish to NPM

on:
workflow_dispatch:
inputs:
version:
description: 'Specify the version type (path, minor, major)'
required: true
default: 'patch'

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.RELEASEDRAFTER_PAT }}
ref: 'master'

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
scope: "@layer5"

- name: Install deps and build
run: |
yarn
yarn build-all
- name: Initialize the NPM config
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_AUTH: ${{ secrets.GH_TOKEN }}

- name: Initialize Git User
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
- name: Identify changed packages
id: changed-packages
run: |
echo "Changed packages: $(yarn lerna changed --json | jq -r '.[].name')"
- name: Check if there are changed packages
run: |
echo "Changed packages: ${{ steps.changed-packages.outputs.changed-packages }}"
if: steps.changed-packages.outputs.changed-packages != ''

- name: Version packages
run: |
if [ "${{ github.event.inputs.version }}" != 'none' ]; then
./scripts/version-release.sh "${{ steps.changed-packages.outputs.changed-packages }}"
else
echo "Skipping versioning based on input."
fi
- name: Use git-auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: publish'
commit_user_name: l5io
commit_user_email: [email protected]
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: '--signoff'

- name: Create Git tags
run: ./scripts/create-multiple-git-tag.sh

- name: Publish packages
run: make publish-ci
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_AUTH: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ node_modules
build/**
dist/**

packages/dist/**
packages/design-system/node_modules/**

.yarn/*
.yarn/cache
!.yarn/patches
Expand All @@ -33,3 +36,6 @@ dist/**
**/storybook-static/**
lerna-debug.log
pub.sh
.eslintcache

.DS_Store
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

6 changes: 0 additions & 6 deletions .husky/prepare-commit-msg

This file was deleted.

7 changes: 6 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Ignore artifacts:
**/dist/**
**/coverage/**
**/.cache/**
**/.cache/**
**/.github/**
**/.yarn/**
site/public
.yarnrc.yml
.eslintrc.*js
9 changes: 5 additions & 4 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Sistent Maintainer
# Sistent Maintainers

| Name | GitHub | Affiliation |
| ------------------ | ---------- | ----------- |
| Antonette Caldwell | nebula-aac | Aquia |
| Name | GitHub | Affiliation |
| ------------------ | ----------- | ----------- |
| Antonette Caldwell | nebula-aac | Aquia |
| Aabid Sofi | aabidsofi19 | Layer5 |
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,25 @@ package-format-check:

package-format-fix:
yarn run format:write

.PHONY: version-patch version-minor version-major version-alpha

# Create a patch version of packages
version-patch:
yarn run versionup:patch

# Create a minor version of packages
version-minor:
yarn run versionup:minor

# Create a major versio of packages
version-major:
yarn run versionup:major

# Create beta version of the next minor version
# For example: 0.12.0 => 0.13.0-alpha.0
version-alpha:
yarn run version:alpha

publish-ci:
yarn release-latest:ci
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ format-fix:
yarn run format:write
```

> [!NOTE]
> Avoid using `type any` in your code. Always specify explicit types to ensure type safety and maintainability.
<br/>

## Join the Layer5 community!

<a name="contributing"></a><a name="community"></a>
Expand Down
36 changes: 36 additions & 0 deletions apps/next-12/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
Loading

0 comments on commit 65b05d3

Please sign in to comment.