Skip to content

refactor: reorganize monorepo domain structure#10987

Merged
zkochan merged 1 commit into
mainfrom
refactor-domains
Mar 17, 2026
Merged

refactor: reorganize monorepo domain structure#10987
zkochan merged 1 commit into
mainfrom
refactor-domains

Conversation

@zkochan

@zkochan zkochan commented Mar 17, 2026

Copy link
Copy Markdown
Member

Summary

Reorganize the monorepo's top-level domain directories for better clarity and cohesion.

Changes

  • pkg-manager/ split into installing/, installing/linking/, and bins/
  • completion/ merged into cli/
  • dedupe/ moved to installing/dedupe/
  • env/ renamed to engine/ with engine/runtime/ and engine/pm/ subdomains
  • tools/ and runtime/ dissolved into engine/
  • reviewing/ and lockfile audit packages moved to deps/inspection/ and deps/compliance/
  • registry/ moved to resolving/registry/
  • semver/peer-range moved to deps/
  • network/fetching-types moved to fetching/
  • packages/ slimmed down — moved packages to their proper domains
  • env.path moved to shell/
  • plugin-commands-init moved to workspace/

Final domain structure

bins/                        # Binary handling (link-bins, package-bins, remove-bins)
building/                    # Build scripts (postinstall, rebuild)
cache/                       # Cache commands
catalogs/                    # Workspace catalog feature
cli/                         # CLI framework (cli-utils, command, parse-cli-args, reporter, doctor)
config/                      # Configuration
crypto/                      # Cryptographic utilities
deps/                        # Dependency graph and analysis
  compliance/                #   Security and legal (audit, licenses, sbom)
  inspection/                #   Dependency queries (list, outdated, dependencies-hierarchy)
engine/                      # Engine management
  pm/                        #   pnpm self-update, setup
  runtime/                   #   Node.js version management
exec/                        # Script execution (run, exec, dlx, lifecycle)
fetching/                    # Package fetching
fs/                          # Filesystem utilities
global/                      # Global package management
hooks/                       # pnpmfile hooks
installing/                  # Install pipeline
  dedupe/                    #   Deduplication
  linking/                   #   node_modules layout (hoist, modules-cleaner, etc.)
lockfile/                    # Lockfile handling
modules-mounter/             # FUSE mounting
network/                     # Network utilities (fetch, auth, git-utils)
object/                      # Object utilities
packages/                    # Shared foundations (types, error, logger, constants, core-loggers)
patching/                    # Package patching
pkg-manifest/                # Package manifest operations
pnpm/                        # CLI entry point
releasing/                   # Publishing and deploy
resolving/                   # Dependency resolvers (npm, git, tarball, etc.)
  registry/                  #   Registry types and metadata filtering
shell/                       # Shell utilities (PATH, shell scripts)
store/                       # Content-addressable store
text/                        # Text utilities (tree-renderer, comments-parser, naming-cases)
worker/                      # Worker process
workspace/                   # Workspace utilities (init, filter, sort, etc.)
yaml/                        # YAML utilities

No code changes — only directory moves and tsconfig/workspace reference updates.

Test plan

  • pnpm install succeeds
  • pnpm run compile succeeds (typecheck + bundle + meta-updater)
  • Lint passes (pre-push hook)

@zkochan zkochan force-pushed the refactor-domains branch 3 times, most recently from 5378bcb to 7e787d1 Compare March 17, 2026 11:42
@zkochan zkochan marked this pull request as ready for review March 17, 2026 11:45
@zkochan zkochan requested a review from weyert as a code owner March 17, 2026 11:45
Copilot AI review requested due to automatic review settings March 17, 2026 11:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Reorganizes the monorepo domain layout by moving packages into new top-level domains and updating TypeScript project references and package metadata URLs to match the new locations.

Changes:

  • Added/updated tsconfig.json / tsconfig.lint.json project references and include paths to reflect the new directory structure.
  • Updated package.json repository/homepage links for moved packages.
  • Introduced missing per-package TS configs for newly relocated compliance packages.

Reviewed changes

Copilot reviewed 44 out of 1049 changed files in this pull request and generated no comments.

Show a summary per file
File Description
deps/compliance/sbom/tsconfig.lint.json Adds lint tsconfig with updated include paths after move.
deps/compliance/sbom/tsconfig.json Adds package TS project config and references under new domain.
deps/compliance/sbom/test/tsconfig.json Adds test TS config with correct root-relative typings include.
deps/compliance/sbom/package.json Updates repository/homepage URLs to new path.
deps/compliance/plugin-commands-sbom/tsconfig.lint.json Adds lint tsconfig for moved plugin package.
deps/compliance/plugin-commands-sbom/tsconfig.json Adds TS project config/references for relocated plugin package.
deps/compliance/plugin-commands-sbom/test/tsconfig.json Adds test TS config for relocated plugin package.
deps/compliance/plugin-commands-sbom/package.json Updates repository/homepage URLs to new path.
deps/compliance/plugin-commands-licenses/tsconfig.lint.json Fixes typings include path depth after move.
deps/compliance/plugin-commands-licenses/tsconfig.json Adds TS project config/references under new domain.
deps/compliance/plugin-commands-licenses/test/tsconfig.json Fixes test typings include path depth after move.
deps/compliance/plugin-commands-licenses/package.json Updates repository/homepage URLs to new path.
deps/compliance/plugin-commands-audit/tsconfig.lint.json Fixes typings include path depth after move.
deps/compliance/plugin-commands-audit/tsconfig.json Adds TS project config/references under new domain.
deps/compliance/plugin-commands-audit/test/tsconfig.json Fixes test typings include path depth after move.
deps/compliance/plugin-commands-audit/package.json Updates repository/homepage URLs to new path.
deps/compliance/license-scanner/tsconfig.lint.json Fixes typings include path depth after move.
deps/compliance/license-scanner/tsconfig.json Adds TS project config/references under new domain.
deps/compliance/license-scanner/test/tsconfig.json Fixes test typings include path depth after move.
deps/compliance/license-scanner/package.json Updates repository/homepage URLs to new path.
deps/compliance/audit/tsconfig.lint.json Fixes typings include path depth after move.
deps/compliance/audit/tsconfig.json Adds TS project config/references under new domain.
deps/compliance/audit/test/tsconfig.json Fixes test typings include path depth after move.
deps/compliance/audit/package.json Updates repository/homepage URLs to new path.
deps/calc-dep-state/tsconfig.json Updates project references to new locations (constants/types/dependency-path).
deps/calc-dep-state/package.json Updates repository/homepage URLs to new path.
crypto/shasums-file/tsconfig.json Updates reference for fetching-types new domain location.
config/plugin-commands-config/tsconfig.json Updates naming-cases reference to text/ domain.
config/parse-overrides/tsconfig.json Updates parse-wanted-dependency reference to resolving/.
config/package-is-installable/tsconfig.json Updates engine runtime reference path after envengine.
config/deps-installer/tsconfig.json Repoints references for moved installer/resolver-related projects.
config/config/tsconfig.json Updates references for moved git-utils and naming-cases.
cli/plugin-commands-doctor/tsconfig.json Updates references after CLI domain consolidation.
cli/plugin-commands-doctor/package.json Updates repository/homepage URLs to new path.
cli/plugin-commands-completion/tsconfig.json Updates references after completion/ merged into cli/.
cli/plugin-commands-completion/package.json Updates repository/homepage URLs to new path.
cli/default-reporter/tsconfig.json Updates dedupe/render-peer-issues references to new installing/ locations.
building/policy-commands/tsconfig.json Updates references for moved dependency-path and modules-yaml.
building/during-install/tsconfig.json Updates references for moved bins/install pipeline projects.
building/after-install/tsconfig.json Updates references for moved bins/install pipeline projects.
bins/remove-bins/package.json Updates repository/homepage URLs to new path.
bins/package-bins/package.json Updates repository/homepage URLs to new path.
bins/link-bins/package.json Updates repository/homepage URLs to new path.
utils/assert-project/tsconfig.json Updates modules-yaml reference to new installing/ location.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Reorganize the monorepo's top-level domain directories for clarity:

- pkg-manager/ split into:
  - installing/ (core, headless, client, resolve-dependencies, etc.)
  - installing/linking/ (hoist, direct-dep-linker, modules-cleaner, etc.)
  - bins/ (link-bins, package-bins, remove-bins)
- completion/ merged into cli/
- dedupe/ moved to installing/dedupe/
- env/ renamed to engine/ with subdomains:
  - engine/runtime/ (node.fetcher, node.resolver, plugin-commands-env, etc.)
  - engine/pm/ (plugin-commands-setup, plugin-commands-self-updater)
- env.path moved to shell/
- tools/ and runtime/ dissolved
- reviewing/ and lockfile audit packages moved to deps/:
  - deps/inspection/ (list, outdated, dependencies-hierarchy)
  - deps/compliance/ (audit, licenses, sbom)
- registry/ moved to resolving/registry/
- semver/peer-range moved to deps/
- network/fetching-types moved to fetching/
- packages/ slimmed down, moving packages to proper domains:
  - calc-dep-state, dependency-path -> deps/
  - parse-wanted-dependency -> resolving/
  - git-utils -> network/
  - naming-cases -> text/
  - make-dedicated-lockfile -> lockfile/
  - render-peer-issues -> installing/
  - plugin-commands-doctor -> cli/
  - plugin-commands-init -> workspace/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zkochan zkochan merged commit f47ef4b into main Mar 17, 2026
11 of 12 checks passed
@zkochan zkochan deleted the refactor-domains branch March 17, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants