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

[workspace] Converted to Yarn Workspace 3 with Lerna #95

Merged
merged 41 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6f4fce7
Converted to Yarn Workspace 3
nebula-aac Sep 12, 2023
35807fe
chore: formatted package.json
nebula-aac Sep 14, 2023
108331b
patch: update module exports
nebula-aac Sep 14, 2023
84472ae
prelease components 0.1.1-beta.1
nebula-aac Sep 14, 2023
822d809
feat: Created Avatar story
nebula-aac Sep 14, 2023
e6b814f
feat: Created Accordion story
nebula-aac Sep 14, 2023
15a91b0
feat: Created Badge story
nebula-aac Sep 14, 2023
cdb3bb8
feat: Grouped Fullscreen icons
nebula-aac Sep 20, 2023
b7639bd
chore: Minor patch
nebula-aac Sep 20, 2023
e4cd8a4
chore: Upgrade Storybook
nebula-aac Sep 20, 2023
704c432
fix: Moved deps to devDeps, and allow them to be peers
nebula-aac Sep 20, 2023
0c25592
feat: Updated Button to allow a label and also take in children
nebula-aac Sep 20, 2023
f123b5b
chore: published @layer5/[email protected]
nebula-aac Sep 20, 2023
456002b
components: Defined Dialog props, and hardcoded styles for testing
nebula-aac Sep 20, 2023
41affa5
feat: Added Backdrop story
nebula-aac Sep 20, 2023
fa7a0bf
chore: Grouped Configuration
nebula-aac Sep 20, 2023
6567997
chore: Grouped Dashboard
nebula-aac Sep 20, 2023
29015b4
chore: Grouped Zoom icons
nebula-aac Sep 20, 2023
e34b416
chore: Grouped Shapes
nebula-aac Sep 20, 2023
e2fc07c
chore: Grouped Credential icon
nebula-aac Sep 20, 2023
ab84384
chore: Updated index.ts
nebula-aac Sep 20, 2023
6eb9660
chore: Update to v0.6.6
nebula-aac Sep 20, 2023
76bc470
chore: update components to v0.2.0
nebula-aac Sep 24, 2023
c375c11
chore: update workspace yarn
nebula-aac Sep 24, 2023
5d8e016
release: Updated components to include svg packages by official release
nebula-aac Sep 24, 2023
8eaa3b6
chore: Updated readme
nebula-aac Sep 27, 2023
a7b2270
chore: Update fork
nebula-aac Sep 27, 2023
fe8df9d
feat: Attempt to clean up
nebula-aac Sep 27, 2023
19f2267
feat: (wip) update rtk-query-codegen for reference
nebula-aac Sep 28, 2023
d75c0e4
feat: Update react-error-boundary and define type definitions
nebula-aac Sep 28, 2023
a5cb646
feat: Revised to use Lerna to help with the build process
nebula-aac Sep 28, 2023
42bf34a
feat: Update lerna to build in root workspace
nebula-aac Sep 28, 2023
bf42b7e
chore: Added script to clean node_modules with lerna
nebula-aac Sep 28, 2023
9c7f2f7
update fork
nebula-aac Sep 28, 2023
a9f205e
feat: Created release github action
nebula-aac Sep 28, 2023
48b2189
chore: Renamed release to checks
nebula-aac Sep 28, 2023
0e74c68
chore(ci): added step to do prettier check
nebula-aac Sep 28, 2023
eef0557
chore(ci): removed other release actions, and created single release
nebula-aac Sep 28, 2023
4b6a1fe
chore(workspace): Added publish command to lerna
nebula-aac Sep 28, 2023
5e9f98a
feat(ci): Update release to publish npm package by way lerna
nebula-aac Sep 28, 2023
7d993b7
chore(rtk-query-codegen): Update README and fix grammatical errors. A…
nebula-aac Sep 28, 2023
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.yarn/cache
.yarn/install-state.gz
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
jest.config.js
vite.config.ts
.eslintrc.cjs
node_modules
dist
storybook-static
*.md
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.yarn/releases/** binary
/.yarn/plugins/** binary
27 changes: 27 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Checks
on:
pull_request:
types: [opened, synchronize]

jobs:
checks:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20]
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Setup and install deps
run: |
yarn install

- name: Prettier check
run: |
yarn format:check
16 changes: 13 additions & 3 deletions .github/workflows/release.yaml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
Expand All @@ -36,7 +36,7 @@ jobs:
packages: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
Expand All @@ -46,7 +46,17 @@ jobs:
scope: "@layer5"

- name: Publish to npm
run: yarn publish --release
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"

if [ ${{ github.base_ref }} = development ]; then
npx lerna version --conventional-commits --conventional-prerelease --preid beta --yes
else
npx lerna version --conventional-commits --conventional-graduate --yes
fi

npx lerna publish from-git --yes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@
node_modules

build/**
dist/**
dist/**

.yarn/*
.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
enableGlobalCache: true

nmHoistingLimits: workspaces

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.6.3.cjs
10 changes: 5 additions & 5 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Sistent Maintainer
| Name | GitHub | Affiliation |
| ------------------- | ---------------------- | ----------- |
| Antonette Caldwell | nebula-aac | Acquia |
### Sistent Maintainer

| Name | GitHub | Affiliation |
| ------------------ | ---------- | ----------- |
| Antonette Caldwell | nebula-aac | Aquia |
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

The Sistent Design System from Layer5 provides the open source building blocks to design and implement consistent, accessible, and delightful product experiences.

## Brand
### Packages

Design System components in React, usually built with Vite.

List of npm packages:

- `@layer5/sistent-components`
- `@layer5/sistent-svg`

### Brand

- Layer5 Brand Guide ([PDF](https://layer5.io/brand/brand-guide.pdf))
- [Layer5 Logos](https://layer5.io/company/brand) (more assets available in shared Community drive).
Expand All @@ -13,17 +22,10 @@ The Sistent Design System from Layer5 provides the open source building blocks t

### How to get started

1. Install `[email protected]`
2. Use `yarn` to install dependencies

### NPM Packages
- `@layer5/sistent-components`
- `@layer5/sistent-svg`

### Redux Toolkit Query

- [Readme](packages/rtk-query-codegen/README.md)
Use `corepack enable` to go ahead and install yarn.

1. Install `[email protected]`
2. Use `yarn` to install dependencies from the root of this project.

<div>&nbsp;</div>

Expand Down
1 change: 1 addition & 0 deletions apps/design-system/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
storybook-static
14 changes: 14 additions & 0 deletions apps/design-system/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'plugin:storybook/recommended'],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
26 changes: 26 additions & 0 deletions apps/design-system/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

storybook-static
28 changes: 28 additions & 0 deletions apps/design-system/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import type { StorybookConfig } from '@storybook/react-vite';

import { dirname, join } from 'path';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}
const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-onboarding'),
getAbsolutePath('@storybook/addon-interactions')
],
framework: {
name: getAbsolutePath('@storybook/react-vite'),
options: {}
},
docs: {
autodocs: 'tag'
}
};
export default config;
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { CssBaseline, ThemeProvider } from '@mui/material';
import { lightTheme, darkTheme } from '../src/stories/themes/app';
import { withThemeFromJSXProvider } from '@storybook/addon-styling';
import type { Preview } from '@storybook/react';
import { darkTheme, lightTheme } from '../src/stories/themes/app';

/** @type { import('@storybook/react').Preview } */
const preview = {
const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
49 changes: 49 additions & 0 deletions apps/design-system/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "design-system",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"build-storybook": "storybook build",
"dev": "vite",
"init-msw": "msw init public/",
"lint": "eslint .",
"lint:fix": "eslint --fix",
"preview": "vite preview",
"storybook": "BROWSER=none storybook dev -p 6006"
},
"dependencies": {
"@layer5/sistent-components": "workspace:^",
"@layer5/sistent-svg": "workspace:^",
"@mui/material": "^5.14.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@storybook/addon-essentials": "^7.4.3",
"@storybook/addon-interactions": "^7.4.3",
"@storybook/addon-links": "^7.4.3",
"@storybook/addon-onboarding": "^1.0.8",
"@storybook/addon-styling": "^1.3.7",
"@storybook/blocks": "^7.4.3",
"@storybook/react": "^7.4.3",
"@storybook/react-vite": "^7.4.3",
"@storybook/testing-library": "^0.2.1",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"eslint": "^8.45.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"eslint-plugin-storybook": "^0.6.13",
"msw": "^1.3.0",
"msw-storybook-addon": "^1.8.0",
"storybook": "^7.4.3",
"typescript": "^5.0.2",
"vite": "^4.4.5"
}
}
5 changes: 5 additions & 0 deletions apps/design-system/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function App() {
return <div></div>;
}

export default App;
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import App from './App.tsx';

ReactDOM.createRoot(document.getElementById('root')).render(
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>
Expand Down
Loading