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
2 changes: 1 addition & 1 deletion .github/workflows/deploy-github-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.0
version: 10.14.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Pin Node version in this workflow to avoid environment drift.

This job does not set up Node explicitly. Runners can change preinstalled Node versions, which can break Storybook builds or violate engines in package.json. Align with other workflows by pinning Node and enabling pnpm cache.

Add this before “Setup pnpm” (outside the selected lines):

- name: Setup Node.js 20.17.0
  uses: actions/setup-node@v4
  with:
    node-version: 20.17.0
    cache: pnpm
🤖 Prompt for AI Agents
.github/workflows/deploy-github-pages.yaml around line 22: the workflow doesn't
explicitly set up Node which can cause environment drift; add a step before the
existing "Setup pnpm" step to invoke actions/setup-node@v4, pin node-version to
20.17.0 and enable pnpm caching (cache: pnpm) so the runner uses a fixed Node
version and leverages pnpm cache.


- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
31 changes: 26 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.0
version: 10.14.0

- name: Install Dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.0
version: 10.14.0

- name: Install Dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -73,13 +73,34 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.0
version: 10.14.0

- name: Cache Cypress binary
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-13.16.1

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Build Packages
run: pnpm build
- name: Install Cypress binary (components workspace)
run: |
pnpm --filter @baseapp-frontend/components exec cypress cache path
pnpm --filter @baseapp-frontend/components exec cypress cache list || true
pnpm --filter @baseapp-frontend/components exec cypress install
pnpm --filter @baseapp-frontend/components exec cypress cache list
env:
CYPRESS_CACHE_FOLDER: ~/.cache/Cypress

- name: Setup Chrome
uses: browser-actions/setup-chrome@v1

- name: Verify Cypress binary exists
run: |
ls -la ~/.cache/Cypress || true
ls -la ~/.cache/Cypress/13.16.1/Cypress || true
test -x ~/.cache/Cypress/13.16.1/Cypress/Cypress

- name: Component Test
run: pnpm test:component
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.0
version: 10.14.0

- name: Install Dependencies
run: pnpm install --frozen-lockfile
Expand Down
111 changes: 0 additions & 111 deletions .scripts/command-utils.mjs

This file was deleted.

41 changes: 0 additions & 41 deletions .scripts/copy-dts.js

This file was deleted.

45 changes: 3 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,51 +88,12 @@ pnpm build --filter=@baseapp-frontend/authentication

## Develop

Our development mode is designed to provide immediate feedback as you work on our monorepo apps and packages. In dev mode, each package automatically watches for changes in its source files, rebuilds itself using a custom build process, and synchronizes its output (bundled code, type declarations, etc.) to the consumer app.

This ensures that any changes you make are quickly reflected in the running application without the need to manually rebuild or restart servers.

### What Happens in Dev Mode

Some of our packages—like `@baseapp-frontend/components` and `@baseapp-frontend/design-system`—have a multi-step build process. When you run:
To develop all apps and packages, run the following command:

```bash
pnpm dev
```

Each package in our monorepo enters a persistent watch mode.

For example, when running dev mode for `@baseapp-frontend/components`, you might see output similar to the following:
```bash
[@baseapp-frontend/components] Waiting for other packages to start... # wait for other dependencies to be build
[@baseapp-frontend/components] Starting build process... # start the build process
[@baseapp-frontend/components] Running Relay Compiler... # since this package uses relay, run the relay compiler
[@baseapp-frontend/components] Relay compilation completed.
[@baseapp-frontend/components] Running Babel transpiling... # run babel step to transpile the code
[@baseapp-frontend/components] Babel transpilation completed.
[@baseapp-frontend/components] Running tsup bundling... # run tsup step to bunle the code
[@baseapp-frontend/components] Running type declaration generation... # run tsc step to create type declarations
[@baseapp-frontend/components] tsup Bundling completed.
[@baseapp-frontend/components] Type declarations generated.
[@baseapp-frontend/components] Copying DTS files... # merge the declaration files with the bundled files
[@baseapp-frontend/components] DTS files copied.
[@baseapp-frontend/components] Cleaning temporary files... # remove temporary folders
[@baseapp-frontend/components] Temporary files cleaned.
[@baseapp-frontend/components] Build completed successfully. # build completed
[@baseapp-frontend/components] Syncing dist folder to consumer app... # sync the build output with the consumer app (baseapp-frontend-template)
[@baseapp-frontend/components] Sync completed successfully.
```
**Disclaimer**

The dev mode is a powerful tool that makes live testing of changes very convenient by automatically rebuilding packages as you edit files.

However, note that for packages like `@baseapp-frontend/design-system` and `@baseapp-frontend/components`, the watch process can trigger multiple build tasks upon every file change.

This continuous rebuild may lead to increased memory consumption and CPU usage if you’re making a lot of simultaneous changes.

It is recommended to use this live mode only at appropriate times rather than throughout your entire development phase.


## **PNPM Catalog Overview**

This monorepo manages some dependencies using pnpm catalogs. As a rule of thumb, we often add dependencies to the catalogs that are reused across multiple packages, rather than arbitrarily adding dependencies to these lists. This approach ensures that shared dependencies are centrally managed and consistently applied across the codebase.
Expand Down Expand Up @@ -181,7 +142,7 @@ If you need to install a package version that hasn't been published yet, follow

3. **Copy the Commit Hash**:

Push the code to GitHub and copy the last commit hash. You’ll need this hash to point your consumer app to the correct version of the package.
Push the code to GitHub and copy the last commit hash. You’ll need this hash to point your consumer app to the correct version of the package.

4. **Update Consumer App**:

Expand All @@ -198,7 +159,7 @@ If you need to install a package version that hasn't been published yet, follow
- Option 1: Run the `restore-catalogs` script

Refer to the (Restore Catalog Entries)[https://github.com/silverlogic/baseapp-frontend/blob/master/README.md#restore-catalog-entries] section to reapply catalog entries.

Comment on lines 161 to +162
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix Markdown link syntax.

The link text/URL are inverted.

-    Refer to the (Restore Catalog Entries)[https://github.com/silverlogic/baseapp-frontend/blob/master/README.md#restore-catalog-entries] section to reapply catalog entries.
+    Refer to the [Restore Catalog Entries](https://github.com/silverlogic/baseapp-frontend/blob/master/README.md#restore-catalog-entries) section to reapply catalog entries.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Refer to the (Restore Catalog Entries)[https://github.com/silverlogic/baseapp-frontend/blob/master/README.md#restore-catalog-entries] section to reapply catalog entries.
Refer to the [Restore Catalog Entries](https://github.com/silverlogic/baseapp-frontend/blob/master/README.md#restore-catalog-entries) section to reapply catalog entries.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

161-161: Reversed link syntax
(Restore Catalog Entries)[https://github.com/silverlogic/baseapp-frontend/blob/master/README.md#restore-catalog-entries]

(MD011, no-reversed-links)

🤖 Prompt for AI Agents
In README.md around lines 161 to 162, the Markdown link uses the inverted syntax
"(Text)[URL]" instead of "[Text](URL)"; update the line to use standard Markdown
by placing the link text in square brackets followed by the URL in parentheses
(e.g., [Restore Catalog
Entries](https://github.com/silverlogic/baseapp-frontend/blob/master/README.md#restore-catalog-entries))
so the link renders correctly.

- Option 2: Revert the Commit

Revert the commit that removed the catalogs to restore them to their previous state:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"engines": {
"node": ">=20.17.0"
},
"packageManager": "pnpm@9.12.0",
"packageManager": "pnpm@10.14.0",
"resolutions": {
"wrap-ansi": "7.0.0",
"string-width": "4.1.0"
Expand Down
1 change: 0 additions & 1 deletion packages/authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"dependencies": {
"@hookform/resolvers": "catalog:",
"@tanstack/react-query": "catalog:",
"jotai": "catalog:",
"js-cookie": "catalog:",
"react-hook-form": "catalog:",
"zod": "catalog:",
Expand Down
4 changes: 0 additions & 4 deletions packages/components/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,3 @@ cypress/downloads
# relay
/__generated__
!/__generated__/.keep

# babel & tsc
/tmp-babel
/tmp-dts
3 changes: 0 additions & 3 deletions packages/components/.scripts/build-command.mjs

This file was deleted.

61 changes: 0 additions & 61 deletions packages/components/.scripts/build.mjs

This file was deleted.

Loading
Loading