Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
44 changes: 24 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,29 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: umidbekk/actions/prepare-node-repo@v2
- uses: superdispatch/actions/prepare-node-repo@v2
with:
cache-key: yarn-v4
node-version: 18
cache-key: cache-v4-
node-version: 24
pnpm-version: 10.25

- run: yarn check:types
- run: yarn lint
- run: yarn test
- run: pnpm check:types
- run: pnpm lint
- run: pnpm test
- uses: codecov/codecov-action@v2.1.0
- run: yarn build
- run: pnpm build

docs:
runs-on: ubuntu-latest

steps:
- uses: umidbekk/actions/prepare-node-repo@v2
- uses: superdispatch/actions/prepare-node-repo@v2
with:
cache-key: yarn-v4
node-version: 18
cache-key: cache-v4-
node-version: 24
pnpm-version: 10.25

- run: yarn docs
- run: pnpm docs
- id: deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
Expand All @@ -46,12 +48,13 @@ jobs:
- docs
runs-on: ubuntu-latest
steps:
- uses: umidbekk/actions/prepare-node-repo@v2
- uses: superdispatch/actions/prepare-node-repo@v2
with:
cache-key: yarn-v4
node-version: 18
- run: yarn cypress install
- run: yarn cypress run
cache-key: cache-v4-
node-version: 24
pnpm-version: 10.25
- run: pnpm cypress install
- run: pnpm cypress run
env:
CYPRESS_HOST: https://ui.superdispatch.org

Expand All @@ -61,12 +64,13 @@ jobs:
- docs
runs-on: ubuntu-latest
steps:
- uses: umidbekk/actions/prepare-node-repo@v2
- uses: superdispatch/actions/prepare-node-repo@v2
with:
cache-key: yarn-v4
node-version: 18
cache-key: cache-v4-
node-version: 24
pnpm-version: 10.25

- run: yarn test-visual-ci https://ui.superdispatch.org
- run: pnpm test-visual-ci https://ui.superdispatch.org

- if: ${{ failure() }}
uses: actions/upload-artifact@v4
Expand Down
60 changes: 31 additions & 29 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,32 @@ jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: umidbekk/actions/prepare-node-repo@v2
- uses: superdispatch/actions/prepare-node-repo@v2
with:
cache-key: yarn-v4
node-version: 18
cache-key: cache-v4-
node-version: 24
pnpm-version: 10.25

- run: yarn check:types
- run: yarn lint
- run: yarn test
- run: pnpm check:types
- run: pnpm lint
- run: pnpm test
- uses: codecov/codecov-action@v2.1.0
- uses: EndBug/add-and-commit@v7
if: ${{ failure() && github.actor == 'renovate' }}

build:
runs-on: ubuntu-latest
steps:
- uses: umidbekk/actions/prepare-node-repo@v2
- uses: superdispatch/actions/prepare-node-repo@v2
with:
cache-key: yarn-v4
node-version: 18
cache-key: cache-v4-
node-version: 24
pnpm-version: 10.25

- uses: superdispatch/actions/build-size/limit@v1
with:
install_command: 'yarn install'
build_command: 'yarn build'
install_command: 'pnpm install'
build_command: 'pnpm build'

preview:
runs-on: ubuntu-latest
Expand All @@ -39,13 +41,14 @@ jobs:
deploy-url: ${{ steps.deploy.outputs.details_url }}

steps:
- uses: umidbekk/actions/prepare-node-repo@v2
- uses: superdispatch/actions/prepare-node-repo@v2
with:
cache-key: yarn-v4
node-version: 18
cache-key: cache-v4-
node-version: 24
pnpm-version: 10.25

- run: yarn storybook:build
- run: yarn playroom:build
- run: pnpm storybook:build
- run: pnpm playroom:build
- id: deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
Expand All @@ -62,14 +65,14 @@ jobs:
- preview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: umidbekk/actions/npm/install@v2
- uses: superdispatch/actions/prepare-node-repo@v2
with:
cache-key: yarn-v4
node-version: 18
cache-key: cache-v4-
node-version: 24
pnpm-version: 10.25

- run: yarn cypress install
- run: yarn cypress run
- run: pnpm cypress install
- run: pnpm cypress run
env:
CYPRESS_HOST: ${{ needs.preview.outputs.deploy-url }}

Expand All @@ -79,14 +82,13 @@ jobs:
- preview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
- uses: umidbekk/actions/npm/install@v2
- uses: superdispatch/actions/prepare-node-repo@v2
with:
cache-key: yarn-v4
node-version: 18
cache-key: cache-v4-
node-version: 24
pnpm-version: 10.25

- uses: superdispatch/actions/update-snapshots@v1.5
with:
command: yarn test-visual-ci ${{ needs.preview.outputs.deploy-url }}
update-command: yarn visual-update-ci ${{ needs.preview.outputs.deploy-url }}
command: pnpm test-visual-ci ${{ needs.preview.outputs.deploy-url }}
update-command: pnpm visual-update-ci ${{ needs.preview.outputs.deploy-url }}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn check:types
pnpm check:types
Binary file modified .loki/reference/chrome.laptop/Inputs/Avatar_Button_Interactive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .loki/reference/chrome.laptop/Lab/FileListItem_Status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .loki/reference/chrome.laptop/Lab/Navbar_Basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .loki/reference/chrome.laptop/Lab/Sidebar_Basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .loki/reference/chrome.laptop/Lab/Sidebar_Checkbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .loki/reference/chrome.laptop/Lab/Sidebar_Checkbox_Many.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .loki/reference/chrome.laptop/Lab/Sidebar_Complex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .loki/reference/chrome.laptop/Lab/Sidebar_List.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .loki/reference/chrome.laptop/Recipes/Forms_Sign_Up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ pkg/
docs/
coverage/
lerna.json
pnpm-lock.yaml
plop-templates/
packages/*/generated/
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
const babelConfig = createBabelConfig({ docs: true });

const jsRule = config.module.rules[0];
jsRule.exclude = /node_modules\/(?!(luxon)\/).*/; // Luxon has optional chaining and nullish coalescing operators. So we need to compile it.
jsRule.exclude = /node_modules\/(?!\.pnpm\/luxon|luxon\/).*/; // Luxon has optional chaining and nullish coalescing operators. So we need to compile it.
jsRule.use[0].options.plugins.push(...babelConfig.plugins);

config.resolve.mainFields = ['module', 'browser', 'main'];
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
2. Ask frontend chapter lead to give access to Superdispatch organization in NPM
3. Enable 2FA for your NPM account
4. Run `npm login` from your terminal and login into your account
5. Run `yarn release`
5. Run `pnpm release`
6. Make sure the tag is created on Github and packages published into NPM
7. Update all usages of packages in product repositories.

Expand All @@ -26,7 +26,7 @@ In our project, we use Plop, a micro-generator framework that helps developers t
To generate component use command:

```bash
yarn run generate
pnpm generate
```

1. Plop will ask you what type of component you'd like to generate
Expand All @@ -39,9 +39,9 @@ yarn run generate

#### `tsc` error: Output file '...' has not been built from source file '...'

If error points at `@superdispatch/...` package, open respective package directory and run `yarn tsc` command.
If error points at `@superdispatch/...` package, open respective package directory and run `pnpm tsc` command.

#### `tsc` error on `yarn run release` or `lerna publish` commands:
#### `tsc` error on `pnpm release` or `lerna publish` commands:

- Run logged `tsc` command.
- Try solution of error described above (_tsc error: Output file ..._).
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "0.50.12",
"npmClient": "yarn",
"npmClient": "pnpm",
"useWorkspaces": true,
"packages": [
"packages/*"
Expand Down
57 changes: 34 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,36 @@
"type": "git",
"url": "https://github.com/superdispatch/ui.git"
},
"workspaces": {
"packages": [
"packages/*"
]
},
"scripts": {
"postinstall": "patch-package && husky install && js-tools lint:yarn-deduplicate --fix",
"postinstall": "patch-package && husky install",
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider turbo run version",
"build-size": "cross-env NODE_OPTIONS=--openssl-legacy-provider yarn build && size-limit",
"check:types": "yarn tsc && yarn tsc --project cypress",
"build-size": "cross-env NODE_OPTIONS=--openssl-legacy-provider pnpm build && size-limit",
"check:types": "pnpm tsc && pnpm tsc --project cypress",
"clean": "git clean -fxd -e '.idea' -e '.vscode'",
"predocs": "rimraf docs",
"docs": "run-s storybook:build playroom:build",
"lint": "js-tools lint",
"lint-changed": "git add . && yarn lint-staged",
"preplayroom:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider yarn playroom:generate",
"lint-changed": "git add . && pnpm lint-staged",
"preplayroom:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider pnpm playroom:generate",
"playroom:build": "cross-env NODE_OPTIONS=\"--openssl-legacy-provider --max_old_space_size=4096\" playroom build",
"playroom:generate": "ts-node scripts/generate-playroom-components.ts",
"preplayroom:start": "yarn playroom:generate",
"preplayroom:start": "pnpm playroom:generate",
"playroom:start": "playroom start",
"prerelease": "git fetch origin && git pull --rebase origin && yarn --force && yarn lint && yarn tsc && yarn test",
"release": "yarn lerna publish",
"prestart": "yarn",
"prerelease": "git fetch origin && git pull --rebase origin && pnpm install && pnpm lint && pnpm tsc && pnpm test",
"release": "pnpm lerna publish",
"prestart": "pnpm install",
"start": "run-p storybook:start playroom:start",
"storybook:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider build-storybook -o docs --quiet",
"storybook:start": "cross-env NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 5000 --ci",
"tdd": "jest --watch",
"test": "jest --coverage --forceExit",
"visual-approve": "yarn loki approve",
"visual-update": "yarn loki update --port 5000 --chromeRetries 2",
"visual-update-ci": "yarn loki update --requireReference --verboseRenderer --reactUri",
"test-visual": "yarn loki test --port 5000 --chromeRetries 2",
"test-visual-ci": "yarn loki test --requireReference --verboseRenderer --reactUri",
"test-branch": "yarn test --changedSince origin/main",
"test-changed": "yarn test --onlyChanged",
"visual-approve": "pnpm loki approve",
"visual-update": "pnpm loki update --port 5000 --chromeRetries 2",
"visual-update-ci": "pnpm loki update --requireReference --verboseRenderer --reactUri",
"test-visual": "pnpm loki test --port 5000 --chromeRetries 2",
"test-visual-ci": "pnpm loki test --requireReference --verboseRenderer --reactUri",
"test-branch": "pnpm test --changedSince origin/main",
"test-changed": "pnpm test --onlyChanged",
"generate": "plop"
},
"lint-staged": {
Expand Down Expand Up @@ -113,13 +108,25 @@
"@size-limit/preset-small-lib": "8.2.6",
"@storybook/addon-docs": "6.3.12",
"@storybook/addon-essentials": "6.3.12",
"@storybook/client-api": "6.3.12",
"@storybook/react": "6.3.12",
"@storybook/source-loader": "6.3.12",
"@superdispatch/babel-preset": "0.7.6",
"@superdispatch/dates": "link:packages/dates",
"@superdispatch/eslint-plugin": "0.7.0",
"@superdispatch/eslint-plugin-ui": "link:packages/eslint-plugin",
"@superdispatch/forms": "link:packages/forms",
"@superdispatch/hooks": "link:packages/hooks",
"@superdispatch/jestutils": "link:packages/jestutils",
"@superdispatch/js-tools": "0.7.0",
"@superdispatch/phones": "link:packages/phones",
"@superdispatch/prettier-config": "0.7.0",
"@superdispatch/testutils": "link:packages/testutils",
"@superdispatch/tsconfig": "0.7.0",
"@superdispatch/ui": "link:packages/ui",
"@superdispatch/ui-docs": "link:packages/__docs__",
"@superdispatch/ui-lab": "link:packages/lab",
"@superdispatch/ui-testutils": "link:packages/__testutils__",
"@testing-library/cypress": "8.0.3",
"@testing-library/jest-dom": "5.16.4",
"@testing-library/react": "12.1.5",
Expand All @@ -131,14 +138,17 @@
"@types/lodash": "4.14.185",
"@types/luxon": "3.7.1",
"@types/mockdate": "3.0.0",
"@types/node": "~18.0.6",
"@types/prettier": "2.3.2",
"@types/qs": "6.9.7",
"@types/react": "17.0.49",
"@types/react": "17.0.59",
"@types/react-dom": "17.0.17",
"@types/react-is": "17.0.3",
"@types/react-transition-group": "^4.4.12",
"@types/react-window": "1.8.5",
"@types/semver": "7.3.12",
"@types/styled-components": "5.1.26",
"@types/testing-library__jest-dom": "^5.14.0",
"babel-jest": "27.4.5",
"babel-loader": "8.2.5",
"babel-plugin-direct-import": "0.9.2",
Expand Down Expand Up @@ -172,6 +182,7 @@
"react-docgen-typescript-loader": "3.7.2",
"react-dom": "17.0.2",
"react-element-to-jsx-string": "14.3.4",
"react-is": "17.0.2",
"react-test-renderer": "17.0.2",
"rimraf": "3.0.2",
"semver": "7.7.3",
Expand Down Expand Up @@ -236,7 +247,7 @@
}
],
"turbo": {
"npmClient": "yarn",
"npmClient": "pnpm",
"baseBranch": "origin/main",
"pipeline": {
"version": {
Expand Down
9 changes: 8 additions & 1 deletion packages/__docs__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@
"version": "0.50.0",
"private": true,
"main": "index.ts",
"types": "index.ts"
"types": "index.ts",
"dependencies": {
"@babel/runtime": "^7.0.0",
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
"@superdispatch/ui": "workspace:*",
"react": "^17.0.2"
}
}
Loading