-
Notifications
You must be signed in to change notification settings - Fork 0
Monorepo #1
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
base: sabbir
Are you sure you want to change the base?
Monorepo #1
Changes from all commits
0c95541
1bb62fb
7225b1c
24e85bd
d052ebc
ed0b42d
695fe3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: read | ||
|
|
||
| jobs: | ||
| main: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| filter: tree:0 | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
| name: Install pnpm | ||
| with: | ||
| version: 9.8.0 | ||
| run_install: false | ||
|
|
||
| # This enables task distribution via Nx Cloud | ||
| # Run this command as early as possible, before dependencies are installed | ||
| # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun | ||
| # Uncomment this line to enable task distribution | ||
| # - run: pnpm dlx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" | ||
|
|
||
| # Cache node_modules | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: 'pnpm' | ||
|
|
||
| - run: pnpm install --frozen-lockfile | ||
|
|
||
| # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud | ||
| # - run: pnpm exec nx-cloud record -- echo Hello World | ||
| - run: pnpm exec nx run-many -t lint test build | ||
| # Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci | ||
| - run: pnpm exec nx fix-ci | ||
| if: always() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,53 @@ | ||
| # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
| # See https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more about ignoring files. | ||
|
|
||
| # dependencies | ||
| /node_modules | ||
| /.pnp | ||
| .pnp.* | ||
| .yarn/* | ||
| !.yarn/patches | ||
| !.yarn/plugins | ||
| !.yarn/releases | ||
| !.yarn/versions | ||
|
|
||
| # testing | ||
| /coverage | ||
|
|
||
| # next.js | ||
| /.next/ | ||
| /out/ | ||
| # compiled output | ||
| dist | ||
| tmp | ||
| out-tsc | ||
|
|
||
| # production | ||
| /build | ||
| # dependencies | ||
| node_modules | ||
|
|
||
| # IDEs and editors | ||
| /.idea | ||
| .project | ||
| .classpath | ||
| .c9/ | ||
| *.launch | ||
| .settings/ | ||
| *.sublime-workspace | ||
|
|
||
| # IDE - VSCode | ||
| .vscode/* | ||
| !.vscode/settings.json | ||
| !.vscode/tasks.json | ||
| !.vscode/launch.json | ||
| !.vscode/extensions.json | ||
|
|
||
| # misc | ||
| /.sass-cache | ||
| /connect.lock | ||
| /coverage | ||
| /libpeerconnection.log | ||
| npm-debug.log | ||
| yarn-error.log | ||
| testem.log | ||
| /typings | ||
|
|
||
| # System Files | ||
| .DS_Store | ||
| *.pem | ||
| Thumbs.db | ||
|
|
||
| # debug | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| .pnpm-debug.log* | ||
| .nx/cache | ||
| .nx/workspace-data | ||
| .cursor/rules/nx-rules.mdc | ||
| .github/instructions/nx.instructions.md | ||
|
|
||
| # env files (can opt-in for committing if needed) | ||
| .env* | ||
| vite.config.*.timestamp* | ||
| vitest.config.*.timestamp* | ||
|
|
||
| # vercel | ||
| .vercel | ||
| # Next.js | ||
| .next | ||
| out | ||
|
|
||
| # typescript | ||
| *.tsbuildinfo | ||
| next-env.d.ts | ||
| test-output |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| strict-peer-dependencies=false | ||
| auto-install-peers=true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Add files here to ignore them from prettier formatting | ||
| /dist | ||
| /coverage | ||
| /.nx/cache | ||
| /.nx/workspace-data |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "singleQuote": false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "nxConsole.generateAiAgentRules": true | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1 +1,90 @@ | ||||||
| ## BrowserPlugins | ||||||
| # Browserplugins | ||||||
|
|
||||||
| <a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix MD045: put alt text on the image, not the anchor The current Apply this diff: -<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
+<a href="https://nx.dev" target="_blank" rel="noreferrer"><img alt="Nx logo" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45" /></a>📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.17.2)3-3: Images should have alternate text (alt text) (MD045, no-alt-text) 🤖 Prompt for AI Agents |
||||||
|
|
||||||
| ✨ Your new, shiny [Nx workspace](https://nx.dev) is almost ready ✨. | ||||||
|
|
||||||
| [Learn more about this workspace setup and its capabilities](https://nx.dev/nx-api/js?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) or run `npx nx graph` to visually explore what was created. Now, let's get you up to speed! | ||||||
|
|
||||||
| ## Finish your CI setup | ||||||
|
|
||||||
| [Click here to finish setting up your workspace!](https://cloud.nx.app/connect/1dtRgv7sbF) | ||||||
|
|
||||||
|
|
||||||
| ## Generate a library | ||||||
|
|
||||||
| ```sh | ||||||
| npx nx g @nx/js:lib packages/pkg1 --publishable --importPath=@my-org/pkg1 | ||||||
| ``` | ||||||
|
|
||||||
| ## Run tasks | ||||||
|
|
||||||
| To build the library use: | ||||||
|
|
||||||
| ```sh | ||||||
| npx nx build pkg1 | ||||||
| ``` | ||||||
|
|
||||||
| To run any task with Nx use: | ||||||
|
|
||||||
| ```sh | ||||||
| npx nx <target> <project-name> | ||||||
| ``` | ||||||
|
|
||||||
| These targets are either [inferred automatically](https://nx.dev/concepts/inferred-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) or defined in the `project.json` or `package.json` files. | ||||||
|
|
||||||
| [More about running tasks in the docs »](https://nx.dev/features/run-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) | ||||||
|
|
||||||
| ## Versioning and releasing | ||||||
|
|
||||||
| To version and release the library use | ||||||
|
|
||||||
| ``` | ||||||
| npx nx release | ||||||
| ``` | ||||||
|
|
||||||
| Pass `--dry-run` to see what would happen without actually releasing the library. | ||||||
|
|
||||||
| [Learn more about Nx release »](https://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) | ||||||
|
|
||||||
| ## Keep TypeScript project references up to date | ||||||
|
|
||||||
| Nx automatically updates TypeScript [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) in `tsconfig.json` files to ensure they remain accurate based on your project dependencies (`import` or `require` statements). This sync is automatically done when running tasks such as `build` or `typecheck`, which require updated references to function correctly. | ||||||
|
|
||||||
| To manually trigger the process to sync the project graph dependencies information to the TypeScript project references, run the following command: | ||||||
|
|
||||||
| ```sh | ||||||
| npx nx sync | ||||||
| ``` | ||||||
|
|
||||||
| You can enforce that the TypeScript project references are always in the correct state when running in CI by adding a step to your CI job configuration that runs the following command: | ||||||
|
|
||||||
| ```sh | ||||||
| npx nx sync:check | ||||||
| ``` | ||||||
|
|
||||||
| [Learn more about nx sync](https://nx.dev/reference/nx-commands#sync) | ||||||
|
|
||||||
|
|
||||||
| [Learn more about Nx on CI](https://nx.dev/ci/intro/ci-with-nx#ready-get-started-with-your-provider?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) | ||||||
|
|
||||||
| ## Install Nx Console | ||||||
|
|
||||||
| Nx Console is an editor extension that enriches your developer experience. It lets you run tasks, generate code, and improves code autocompletion in your IDE. It is available for VSCode and IntelliJ. | ||||||
|
|
||||||
| [Install Nx Console »](https://nx.dev/getting-started/editor-setup?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) | ||||||
|
|
||||||
| ## Useful links | ||||||
|
|
||||||
| Learn more: | ||||||
|
|
||||||
| - [Learn more about this workspace setup](https://nx.dev/nx-api/js?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) | ||||||
| - [Learn about Nx on CI](https://nx.dev/ci/intro/ci-with-nx?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) | ||||||
| - [Releasing Packages with Nx release](https://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) | ||||||
| - [What are Nx plugins?](https://nx.dev/concepts/nx-plugins?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) | ||||||
|
|
||||||
| And join the Nx community: | ||||||
| - [Discord](https://go.nx.dev/community) | ||||||
| - [Follow us on X](https://twitter.com/nxdevtools) or [LinkedIn](https://www.linkedin.com/company/nrwl) | ||||||
| - [Our Youtube channel](https://www.youtube.com/@nxdevtools) | ||||||
| - [Our blog](https://nx.dev/blog?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1 @@ | ||||||||||||||
| SERVER_URL="" | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion For client-side access in Next.js, prefix with NEXT_PUBLIC_ Environment variables must start with NEXT_PUBLIC_ to be exposed to the browser. If this is consumed in the client app, rename accordingly and add a newline. -SERVER_URL=""
+NEXT_PUBLIC_SERVER_URL=📝 Committable suggestion
Suggested change
🧰 Tools🪛 dotenv-linter (3.3.0)[warning] 1-1: [EndingBlankLine] No blank line at the end of the file (EndingBlankLine) [warning] 1-1: [QuoteCharacter] The value has quote characters (', ") (QuoteCharacter) 🤖 Prompt for AI Agents |
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,41 @@ | ||||||||||||||||||||||
| # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # dependencies | ||||||||||||||||||||||
| /node_modules | ||||||||||||||||||||||
| /.pnp | ||||||||||||||||||||||
| .pnp.* | ||||||||||||||||||||||
| .yarn/* | ||||||||||||||||||||||
| !.yarn/patches | ||||||||||||||||||||||
| !.yarn/plugins | ||||||||||||||||||||||
| !.yarn/releases | ||||||||||||||||||||||
| !.yarn/versions | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # testing | ||||||||||||||||||||||
| /coverage | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # next.js | ||||||||||||||||||||||
| /.next/ | ||||||||||||||||||||||
| /out/ | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # production | ||||||||||||||||||||||
| /build | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # misc | ||||||||||||||||||||||
| .DS_Store | ||||||||||||||||||||||
| *.pem | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # debug | ||||||||||||||||||||||
| npm-debug.log* | ||||||||||||||||||||||
| yarn-debug.log* | ||||||||||||||||||||||
| yarn-error.log* | ||||||||||||||||||||||
| .pnpm-debug.log* | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # env files (can opt-in for committing if needed) | ||||||||||||||||||||||
| .env | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
Comment on lines
+33
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Broaden env ignores to prevent accidental secret commits. Only ignoring “.env” risks leaking values from .env.local, .env.production, etc. Keep .env.example tracked. Apply this diff: -# env files (can opt-in for committing if needed)
-.env
+# env files (opt-in via .env.example only)
+.env
+.env.local
+.env.*.local
+.env.development
+.env.production
+.env.test
+!.env.example📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| # vercel | ||||||||||||||||||||||
| .vercel | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # typescript | ||||||||||||||||||||||
| *.tsbuildinfo | ||||||||||||||||||||||
| next-env.d.ts | ||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ## BrowserPlugins |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { dirname } from "path"; | ||
| import { fileURLToPath } from "url"; | ||
| import { FlatCompat } from "@eslint/eslintrc"; | ||
|
|
||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = dirname(__filename); | ||
|
|
||
| const compat = new FlatCompat({ | ||
| baseDirectory: __dirname, | ||
| }); | ||
|
|
||
| const eslintConfig = [ | ||
| ...compat.extends("next/core-web-vitals", "next/typescript"), | ||
| ]; | ||
|
|
||
| export default eslintConfig; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "name": "@browserplugins/client", | ||
| "version": "1.1.2", | ||
| "private": true, | ||
| "scripts": { | ||
| "dev": "next dev", | ||
| "build": "next build", | ||
| "start": "next start", | ||
| "lint": "next lint" | ||
| }, | ||
| "dependencies": { | ||
| "@browserplugins/schema": "workspace:*", | ||
| "@radix-ui/react-avatar": "^1.1.10", | ||
| "@radix-ui/react-checkbox": "^1.3.2", | ||
| "@radix-ui/react-dialog": "^1.1.14", | ||
| "@radix-ui/react-dropdown-menu": "^2.1.15", | ||
| "@radix-ui/react-hover-card": "^1.1.14", | ||
| "@radix-ui/react-label": "^2.1.7", | ||
| "@radix-ui/react-progress": "^1.1.7", | ||
| "@radix-ui/react-select": "^2.2.5", | ||
| "@radix-ui/react-separator": "^1.1.7", | ||
| "@radix-ui/react-slider": "^1.3.5", | ||
| "@radix-ui/react-slot": "^1.2.3", | ||
| "@radix-ui/react-switch": "^1.2.5", | ||
| "@radix-ui/react-tabs": "^1.1.12", | ||
| "@radix-ui/react-tooltip": "^1.2.7", | ||
| "axios": "^1.11.0", | ||
| "class-variance-authority": "^0.7.1", | ||
| "clsx": "^2.1.1", | ||
| "lucide-react": "^0.525.0", | ||
| "moment": "^2.30.1", | ||
| "next": "15.3.5", | ||
| "next-themes": "^0.4.6", | ||
| "postcss": "^8.5.6", | ||
| "react": "^19.0.0", | ||
| "react-dom": "^19.0.0", | ||
| "sonner": "^2.0.6", | ||
| "tailwind-merge": "^3.3.1", | ||
| "tailwindcss-animate": "^1.0.7", | ||
| "zod": "^4.0.14", | ||
| "zustand": "^5.0.7" | ||
| }, | ||
| "devDependencies": { | ||
| "@eslint/eslintrc": "^3", | ||
| "@tailwindcss/postcss": "^4", | ||
| "@types/node": "^20", | ||
| "@types/react": "^19.1.10", | ||
| "@types/react-dom": "^19.1.7", | ||
| "eslint": "^9", | ||
| "eslint-config-next": "15.3.5", | ||
| "tailwindcss": "^4", | ||
| "tw-animate-css": "^1.3.5", | ||
| "typescript": "^5" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| export const browsers = [ | ||
| "chrome", | ||
| "firefox", | ||
| "microsoft edge", | ||
| "safari", | ||
| ] as const; | ||
| export type Browser = (typeof browsers)[number]; | ||
| export const browsers = [ | ||
| "chrome", | ||
| "firefox", | ||
| "microsoft edge", | ||
| "safari", | ||
| ] as const; | ||
| export type Browser = (typeof browsers)[number]; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| export const category = [ | ||
| "productivity", | ||
| "security", | ||
| "developer", | ||
| "social", | ||
| "entertainment", | ||
| "utility", | ||
| "all", | ||
| ] as const; | ||
| export type Category = (typeof category)[number]; | ||
| export const category = [ | ||
| "productivity", | ||
| "security", | ||
| "developer", | ||
| "social", | ||
| "entertainment", | ||
| "utility", | ||
| "all", | ||
| ] as const; | ||
| export type Category = (typeof category)[number]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Guard against missing Nx targets (especially “test”)
If no project defines a test target,
nx run-many -t lint test buildcan fail the job. Either split into conditional steps or verify the targets exist first.Option A (verify locally and keep as-is if safe). Please run:
Option B (conditionally run per target). Example:
🏁 Script executed:
Length of output: 135
🏁 Script executed:
Length of output: 16273
🏁 Script executed:
Length of output: 587
CI step will always fail without any Nx targets
It looks like your workspace has no project definitions (no
workspace.json/angular.jsonand noproject.jsonfiles), and evennx show projects --withTarget …returns nothing. As a result, the singlepnpm exec nx run-many -t lint test buildwill error out every time. You must guard or split these commands so the job can succeed when targets are absent.Please update your
.github/workflows/ci.ymlaccordingly. For example, you can detect which targets exist and run them conditionally:• Ensure that each target step is skipped if no projects define it.
• Keep the
pnpm exec nx fix-cistep (if: always()) unchanged so self-healing still runs.• Alternatively, define at least one project with
test,lint, orbuildtargets if CI should always run them.📝 Committable suggestion
🤖 Prompt for AI Agents