Skip to content
This repository was archived by the owner on May 3, 2026. It is now read-only.

monorepo wip#207

Merged
matteobruni merged 8 commits intomainfrom
dev
Apr 30, 2026
Merged

monorepo wip#207
matteobruni merged 8 commits intomainfrom
dev

Conversation

@matteobruni
Copy link
Copy Markdown
Contributor

@matteobruni matteobruni commented Apr 30, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Build command now features modular sub-commands: bundle, circular-deps, clear, distfiles, and diststats for more granular control.
    • Consolidated create utilities into a shared package for improved code organization and reusability.
  • Chores

    • Updated pnpm to v11.0.3.
    • Added dependency validation and automated update configurations.
    • Restructured CLI command architecture to leverage workspace packages.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1b8de1f9-961f-497c-b653-4f0155a096c4

📥 Commits

Reviewing files that changed from the base of the PR and between 6349cc5 and e281d16.

⛔ Files ignored due to path filters (2)
  • commands/create/files/create-preset/images/sample.png is excluded by !**/*.png
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (124)
  • .github/workflows/node.js-ci.yml
  • commands/build-bundle/.dependency-cruiser.cjs
  • commands/build-bundle/README.md
  • commands/build-bundle/eslint.config.js
  • commands/build-bundle/package.json
  • commands/build-bundle/renovate.json
  • commands/build-bundle/src/bundle.ts
  • commands/build-bundle/src/tsconfig.json
  • commands/build-bundle/src/utils.ts
  • commands/build-bundle/tsconfig.json
  • commands/build-circular-deps/.dependency-cruiser.cjs
  • commands/build-circular-deps/README.md
  • commands/build-circular-deps/eslint.config.js
  • commands/build-circular-deps/package.json
  • commands/build-circular-deps/renovate.json
  • commands/build-circular-deps/src/circular-deps.ts
  • commands/build-circular-deps/src/tsconfig.json
  • commands/build-circular-deps/src/utils.ts
  • commands/build-circular-deps/tsconfig.json
  • commands/build-clear/.dependency-cruiser.cjs
  • commands/build-clear/README.md
  • commands/build-clear/eslint.config.js
  • commands/build-clear/package.json
  • commands/build-clear/renovate.json
  • commands/build-clear/src/clear.ts
  • commands/build-clear/src/tsconfig.json
  • commands/build-clear/src/utils.ts
  • commands/build-clear/tsconfig.json
  • commands/build-distfiles/.dependency-cruiser.cjs
  • commands/build-distfiles/README.md
  • commands/build-distfiles/eslint.config.js
  • commands/build-distfiles/package.json
  • commands/build-distfiles/renovate.json
  • commands/build-distfiles/src/distfiles.ts
  • commands/build-distfiles/src/tsconfig.json
  • commands/build-distfiles/src/utils.ts
  • commands/build-distfiles/tsconfig.json
  • commands/build-diststats/.dependency-cruiser.cjs
  • commands/build-diststats/README.md
  • commands/build-diststats/eslint.config.js
  • commands/build-diststats/package.json
  • commands/build-diststats/renovate.json
  • commands/build-diststats/src/diststats.ts
  • commands/build-diststats/src/tsconfig.json
  • commands/build-diststats/tsconfig.json
  • commands/build/.dependency-cruiser.cjs
  • commands/build/README.md
  • commands/build/eslint.config.js
  • commands/build/package.json
  • commands/build/renovate.json
  • commands/build/src/build-eslint.ts
  • commands/build/src/build-prettier.ts
  • commands/build/src/build-tsc.ts
  • commands/build/src/build.ts
  • commands/build/src/tsconfig.json
  • commands/build/tsconfig.json
  • commands/create-utils/.dependency-cruiser.cjs
  • commands/create-utils/README.md
  • commands/create-utils/eslint.config.js
  • commands/create-utils/files/empty-project/.browserslistrc
  • commands/create-utils/files/empty-project/.gitignore
  • commands/create-utils/files/empty-project/LICENSE
  • commands/create-utils/files/empty-project/eslint.config.js
  • commands/create-utils/files/empty-project/package.dist.json
  • commands/create-utils/files/empty-project/package.json
  • commands/create-utils/files/empty-project/tsconfig.base.json
  • commands/create-utils/files/empty-project/tsconfig.browser.json
  • commands/create-utils/files/empty-project/tsconfig.json
  • commands/create-utils/files/empty-project/tsconfig.module.json
  • commands/create-utils/files/empty-project/tsconfig.types.json
  • commands/create-utils/files/empty-project/webpack.config.js
  • commands/create-utils/package.json
  • commands/create-utils/renovate.json
  • commands/create-utils/src/file-utils.ts
  • commands/create-utils/src/index.ts
  • commands/create-utils/src/string-utils.ts
  • commands/create-utils/src/template-utils.ts
  • commands/create-utils/src/tsconfig.json
  • commands/create-utils/tests/.gitignore
  • commands/create-utils/tests/file-utils.test.ts
  • commands/create-utils/tests/string-utils.test.ts
  • commands/create-utils/tests/tsconfig.json
  • commands/create-utils/tsconfig.json
  • commands/create-utils/vitest.config.ts
  • commands/create/.dependency-cruiser.cjs
  • commands/create/README.md
  • commands/create/eslint.config.js
  • commands/create/files/create-plugin/README.md
  • commands/create/files/create-plugin/src/PluginInstance.ts
  • commands/create/files/create-plugin/src/index.lazy.ts
  • commands/create/files/create-plugin/src/index.ts
  • commands/create/files/create-plugin/src/plugin.ts
  • commands/create/files/create-preset/README.md
  • commands/create/files/create-preset/src/bundle.lazy.ts
  • commands/create/files/create-preset/src/bundle.ts
  • commands/create/files/create-preset/src/index.lazy.ts
  • commands/create/files/create-preset/src/index.ts
  • commands/create/files/create-preset/src/options.ts
  • commands/create/files/create-shape/README.md
  • commands/create/files/create-shape/src/ShapeDrawer.ts
  • commands/create/files/create-shape/src/index.lazy.ts
  • commands/create/files/create-shape/src/index.ts
  • commands/create/package.json
  • commands/create/renovate.json
  • commands/create/src/create.ts
  • commands/create/src/plugin/create-plugin.ts
  • commands/create/src/plugin/plugin.ts
  • commands/create/src/preset/create-preset.ts
  • commands/create/src/preset/preset.ts
  • commands/create/src/shape/create-shape.ts
  • commands/create/src/shape/shape.ts
  • commands/create/src/tsconfig.json
  • commands/create/tests/.gitignore
  • commands/create/tests/create-plugin.test.ts
  • commands/create/tests/create-preset.test.ts
  • commands/create/tests/create-shape.test.ts
  • commands/create/tests/tsconfig.json
  • commands/create/tsconfig.json
  • commands/create/vitest.config.ts
  • nx.json
  • package.json
  • packages/cli/package.json
  • packages/cli/src/cli.ts
  • pnpm-workspace.yaml

📝 Walkthrough

Walkthrough

This pull request refactors the CLI architecture by extracting individual CLI commands into separate, independently packaged npm modules under the commands/ directory. Each command package (build-bundle, build-circular-deps, build-clear, etc.) now includes its own configuration files, dependencies, and build scripts. The main CLI package is updated to import commands from these new packages instead of local files, and the workspace configuration is expanded to include the new command packages.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/node.js-ci.yml
Commented out the pnpm test step in the build-and-deploy job, disabling test execution in CI.
New Command Packages: Configuration
commands/build-bundle/.dependency-cruiser.cjs, commands/build-circular-deps/.dependency-cruiser.cjs, commands/build-clear/.dependency-cruiser.cjs, commands/build-distfiles/.dependency-cruiser.cjs, commands/build-diststats/.dependency-cruiser.cjs, commands/build/.dependency-cruiser.cjs, commands/create-utils/.dependency-cruiser.cjs, commands/create/.dependency-cruiser.cjs
Added dependency-cruiser configuration files for circular dependency detection with consistent forbidden rules and analysis options across all new command packages.
New Command Packages: ESLint Configuration
commands/build-bundle/eslint.config.js, commands/build-circular-deps/eslint.config.js, commands/build-clear/eslint.config.js, commands/build-distfiles/eslint.config.js, commands/build-diststats/eslint.config.js, commands/build/eslint.config.js, commands/create-utils/eslint.config.js, commands/create/eslint.config.js
Added ESLint flat-config files for each command package, configuring TypeScript parser options and disabling the no-console rule.
New Command Packages: TypeScript Configuration
commands/*/tsconfig.json, commands/*/src/tsconfig.json
Added root and src-level TypeScript configurations for each command package with strict compiler settings, composite builds, and appropriate output/source directories.
New Command Packages: Package Manifests
commands/build-bundle/package.json, commands/build-circular-deps/package.json, commands/build-clear/package.json, commands/build-distfiles/package.json, commands/build-diststats/package.json, commands/build/package.json, commands/create-utils/package.json, commands/create/package.json
Added npm package manifests for each command package with scripts for formatting, linting, compilation, testing, circular dependency checks, and prepack hooks. Each declares commander as a peer dependency and specifies relevant runtime/dev dependencies.
New Command Packages: Documentation & Configuration
commands/*/README.md, commands/*/renovate.json
Added README files documenting CLI installation and usage, plus Renovate configuration files targeting the dev branch across all new command packages.
Build Command Extraction
commands/build/src/build.ts, commands/build-bundle/src/bundle.ts, commands/build-circular-deps/src/circular-deps.ts, commands/build-clear/src/clear.ts, commands/build-distfiles/src/distfiles.ts, commands/build-diststats/src/diststats.ts
Extracted build subcommands into separate package modules, each with Commander-based CLI definitions, --ci and --silent options, and corresponding action logic.
Create Command Extraction
commands/create/src/plugin/plugin.ts, commands/create/src/plugin/create-plugin.ts, commands/create/src/preset/preset.ts, commands/create/src/preset/create-preset.ts, commands/create/src/shape/shape.ts, commands/create/src/shape/create-shape.ts, commands/create/tests/...
Reorganized create command modules (plugin, preset, shape) to use centralized utilities from @tsparticles/cli-create-utils and updated test import paths to reflect the new module structure.
Create Utilities Package
commands/create-utils/src/index.ts, commands/create-utils/src/template-utils.ts, commands/create-utils/tests/...
Created new create-utils package exporting common utility functions (file-utils, string-utils, template-utils) and adjusted template file paths. Updated existing test imports to use the new centralized entry point.
Main CLI Package Updates
packages/cli/package.json, packages/cli/src/cli.ts
Updated CLI package to import build and create commands from new @tsparticles/cli-command-* packages, corrected main entry point to dist/cli.js, and removed the test script.
Workspace Configuration
pnpm-workspace.yaml, nx.json
Expanded pnpm workspace to include commands/* packages. Updated Nx configuration with release automation settings, target defaults, named inputs, and affected base branch targeting.
Root Package Configuration
package.json
Updated pnpm package manager version from 11.0.1 to 11.0.3.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • 3.2.1 #102: Directly related code-level changes adding/propagating a "silent" flag to CLI commands and updating function signatures/exports (bundle, circularDeps, clearDist, buildDistFiles).
  • 3.1.1 #89: Related through dependency-cruiser configuration changes for circular-deps tooling, replacing prior madge usage with .dependency-cruiser.cjs rules.
  • 3.4.5 #161: Related through modifications to the "build distfiles" functionality, refactoring/relocating the distfiles command into a new package and updating buildDistFiles exports.

Suggested labels

size/XXL

Poem

🐰 Commands hop into their own cozy burrows now,
Each package a neat warren with configs in tow,
Utilities shared in one clever nest,
The CLI hops lighter—refactored for the best! 🌟

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 30, 2026

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit e281d16

Command Status Duration Result
nx run-many -t build:ci ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-30 21:35:35 UTC

@matteobruni matteobruni merged commit 99248e6 into main Apr 30, 2026
3 of 4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant