🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis β†’
Socket
Book a DemoInstallSign in
Socket

nanoweb-mono

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nanoweb-mono

This guide covers how to set up, manage, and maintain the **nanoweb** monorepo, including package dependencies, scripts, and automated workflows.

latest
npmnpm
Version
1.8.4
Version published
Maintainers
1
Created
Source

πŸ“– Monorepo Usage Guide

This guide covers how to set up, manage, and maintain the nanoweb monorepo, including package dependencies, scripts, and automated workflows.

πŸ“Œ Project Structure

The monorepo follows a pnpm workspace setup with multiple packages:

root/
β”œβ”€β”€ apps/           # Your apps
β”œβ”€β”€ bin/            # Utility scripts
β”‚   β”œβ”€β”€ clean.js
β”‚   β”œβ”€β”€ create-app.js
β”‚   β”œβ”€β”€ create-package.js
β”‚   β”œβ”€β”€ lint.js
β”‚   β”œβ”€β”€ llm.js
β”‚   β”œβ”€β”€ optimize.js
β”‚   β”œβ”€β”€ release.js
β”‚   β”œβ”€β”€ workspace.js
β”‚   β”œβ”€β”€ write-docs.js
β”œβ”€β”€ packages/       # All packages in the workspace
β”‚   β”œβ”€β”€ nano-db-fs
β”‚   β”œβ”€β”€ nano-db-fetch
β”‚   β”œβ”€β”€ nano-format
β”‚   β”œβ”€β”€ nanoweb-cli
β”‚   β”œβ”€β”€ nanoweb-fs
β”‚   β”œβ”€β”€ nanoweb-llm
β”‚   β”œβ”€β”€ nanoweb-react
β”‚   β”œβ”€β”€ nanoweb-sync
β”‚   β”œβ”€β”€ nanoweb-sync-ftp
β”‚   β”œβ”€β”€ nanoweb-sync-php
β”‚   β”œβ”€β”€ nanoweb-theme
β”œβ”€β”€ pnpm-workspace.yaml # Defines workspace packages
β”œβ”€β”€ package.json    # Root package.json (manages workspace commands)
└── eslint.config.js # ESLint configuration

πŸ”— Requirements

  • Node.js runtime environment You must have the node v22+ installed.
  • The pnpm package manager You must have the pnpm package manager installed.

πŸ”§ Setting Up the Monorepo

πŸ”’ Work within the monorepo.

  • Clone the repository:

    git clone https://gitlab.com/nan.web/monorepo.git nanoweb && cd nanoweb
    
  • Initialize workspace and install dependencies:

    pnpm install
    pnpm ws:clone
    # runs the ws:optimize within the ws:init
    pnpm ws:init
    

    This command clones all missing package repositories, ensures correct dependencies, and installs them.

  • Prepare packages for the usage in the workspace:

    pnpm ws:pull
    pnpm build
    
  • Run optimization (optional, recommended after setup, if did not run within the ws:init):

    pnpm ws:optimize
    

    This command:

    • Cleans unnecessary cache and dependencies
    • Updates dependencies to their latest versions
    • Runs linter and tests

πŸš— Running the Development Environment

1️⃣ Work only within the specific project.
Change the directory to the specific package, for instance: cd packages/nano-format.

  • Start the development server:

    pnpm dev
    
  • Run tests across all packages:

    pnpm test:all
    
  • Run nanoweb-mono tests:

    pnpm test
    
  • Build all packages:

    pnpm build:all
    
  • Lint all packages:

    pnpm lint:all
    

πŸ”„ Managing Dependencies & Versions

Updating Dependencies

1οΈβƒ£πŸ”’ Work within the specific package and within the monorepo.
Before committing, ensure all workspace: dependencies are replaced with their actual versions:

pnpm ws:latest

If you plan to work on multiple interdependent packages, switch all dependencies to workspace:*:

pnpm ws:workspace

Checking for Issues Before Commit

Run the following to check for uncommitted workspace dependencies and pre-commit hooks:

pnpm ws:check

Checking Git Status Across All Packages

pnpm ws:status

πŸ— Releasing Packages

1️⃣ Work within the specific package.
Change the directory to the specific package, for instance: cd packages/nano-format.

  • Ensure all changes are committed and pushed.
  • Run the release script inside the package:
    pnpm release
    
    This will:
    • Run all tests and linting
    • Build the package
    • Tag the new version in Git
    • Publish to npm
    • Push all commits and tags

πŸ›Έ Contributing

  • Create a new branch:
    git checkout -b feature/my-update
    
  • Make changes and commit:
    git commit -m "Add new feature"
    
  • Push your branch and open a merge request.

βš™οΈ Useful Utility Scripts

CommandDescription
pnpm ws:initInitialize workspace & install packages
pnpm ws:checkValidate package.json & pre-commit hooks
pnpm ws:latestReplace workspace:* with actual versions
pnpm ws:workspaceConvert all versions to workspace:*
pnpm ws:optimizeClean, install, update, lint, build, test
pnpm ws:statusCheck uncommitted changes in all packages
pnpm releaseBuild, test, tag, and publish package
pnpm cloneCloning missing packages into the monorepo

πŸ› οΈ Troubleshooting

  • Dependency Issues: Run pnpm ws:optimize to clean and reinstall.
  • Build Errors: Ensure all dependencies are up to date with pnpm ws:latest.
  • Linting Issues: Run pnpm lint and fix reported errors.
  • Pre-commit Hook Failures: Check .husky/pre-commit and ensure it includes workspace checks.

With these steps, you can efficiently manage and maintain the nanoweb monorepo! πŸ›Έ

Keywords

nanoweb

FAQs

Package last updated on 08 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts