CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-vue--cli

Command line interface for rapid Vue.js development

Pending
Overview
Eval results
Files

project-maintenance.mddocs/

Project Maintenance

Update checking, upgrade utilities, migration tools, and environment diagnostics for Vue CLI projects.

Capabilities

Outdated Command

Check for outdated Vue CLI service and plugins in current project.

/**
 * (experimental) Check for outdated vue cli service / plugins
 * Scans project dependencies and compares with latest versions
 */
vue outdated

Options:
  --next    Also check for alpha / beta / rc versions when upgrading

Usage Examples:

# Check for outdated dependencies
vue outdated

# Include pre-release versions in check
vue outdated --next

Upgrade Command

Upgrade Vue CLI service and plugins to newer versions.

/**
 * (experimental) Upgrade vue cli service / plugins
 * @param plugin-name - Specific plugin to upgrade (optional)
 */
vue upgrade [plugin-name]

Options:
  -t, --to <version>         Upgrade <package-name> to a version that is not latest
  -f, --from <version>       Skip probing installed plugin, assuming it is upgraded from the designated version
  -r, --registry <url>       Use specified npm registry when installing dependencies
  --all                      Upgrade all plugins
  --next                     Also check for alpha / beta / rc versions when upgrading

Usage Examples:

# Upgrade all plugins
vue upgrade --all

# Upgrade specific plugin
vue upgrade @vue/cli-plugin-router

# Upgrade to specific version
vue upgrade @vue/cli-service --to 5.0.8

# Upgrade with custom registry
vue upgrade --all --registry https://registry.example.com

# Include pre-release versions
vue upgrade --all --next

# Upgrade assuming specific current version
vue upgrade @vue/cli-service --from 4.5.0

Migrate Command

Run migration scripts for plugins after version upgrades.

/**
 * (experimental) Run migrator for an already-installed cli plugin
 * @param plugin-name - Plugin to migrate (optional, defaults to all)
 */
vue migrate [plugin-name]

Options:
  -f, --from <version>    (Required) The base version for the migrator to migrate from

Usage Examples:

# Migrate all plugins from version 4.x
vue migrate --from 4.0.0

# Migrate specific plugin
vue migrate @vue/cli-plugin-router --from 3.1.0

# Migrate TypeScript plugin from specific version
vue migrate @vue/cli-plugin-typescript --from 4.5.0

Info Command

Print debugging information about the development environment.

/**
 * Print debugging information about your environment
 * Displays system info, installed versions, and project dependencies
 */
vue info

Usage Examples:

# Display environment information
vue info

Outdated Function (Programmatic)

Programmatic interface for checking outdated dependencies.

/**
 * Check for outdated Vue CLI dependencies programmatically
 * @param options - Options for outdated check
 * @param context - Project directory path
 */
async function outdated(
  options?: OutdatedOptions,
  context?: string
): Promise<OutdatedResult>;

interface OutdatedOptions {
  /** Include pre-release versions */
  next?: boolean;
}

interface OutdatedResult {
  /** Outdated packages found */
  outdated: OutdatedPackage[];
  /** Current Vue CLI service version */
  currentService: string;
  /** Latest Vue CLI service version */
  latestService: string;
}

interface OutdatedPackage {
  /** Package name */
  name: string;
  /** Current installed version */
  current: string;
  /** Latest available version */
  latest: string;
  /** Whether update is recommended */
  updateRecommended: boolean;
}

Usage Examples:

import { outdated } from "@vue/cli";

// Check for outdated packages
const result = await outdated({}, "/path/to/project");

console.log("Outdated packages:", result.outdated);
console.log("Current service:", result.currentService);
console.log("Latest service:", result.latestService);

// Include pre-release versions
const nextResult = await outdated({ next: true }, "/path/to/project");

Upgrade Function (Programmatic)

Programmatic interface for upgrading dependencies.

/**
 * Upgrade Vue CLI dependencies programmatically
 * @param packageName - Specific package to upgrade (optional)
 * @param options - Upgrade options
 * @param context - Project directory path
 */
async function upgrade(
  packageName?: string,
  options?: UpgradeOptions,
  context?: string
): Promise<UpgradeResult>;

interface UpgradeOptions {
  /** Upgrade to specific version */
  to?: string;
  /** Assume current version without probing */
  from?: string;
  /** NPM registry URL */
  registry?: string;
  /** Upgrade all packages */
  all?: boolean;
  /** Include pre-release versions */
  next?: boolean;
}

interface UpgradeResult {
  /** Successfully upgraded packages */
  upgraded: UpgradedPackage[];
  /** Failed upgrades */
  failed: FailedUpgrade[];
  /** Whether any migrations are needed */
  migrationsNeeded: boolean;
}

interface UpgradedPackage {
  /** Package name */
  name: string;
  /** Previous version */
  from: string;
  /** New version */
  to: string;
}

interface FailedUpgrade {
  /** Package name */
  name: string;
  /** Error message */
  error: string;
}

Migrate Function (Programmatic)

Programmatic interface for running migrations.

/**
 * Run plugin migrations programmatically
 * @param packageName - Plugin to migrate (optional)
 * @param options - Migration options
 * @param context - Project directory path
 */
async function migrate(
  packageName?: string,
  options?: MigrateOptions,
  context?: string
): Promise<MigrationResult>;

interface MigrateOptions {
  /** Base version to migrate from (required) */
  from: string;
}

interface MigrationResult {
  /** Successfully migrated plugins */
  migrated: MigratedPlugin[];
  /** Failed migrations */
  failed: FailedMigration[];
  /** Files that were modified */
  modifiedFiles: string[];
}

interface MigratedPlugin {
  /** Plugin name */
  name: string;
  /** Version migrated from */
  from: string;
  /** Version migrated to */
  to: string;
  /** Migration steps applied */
  steps: string[];
}

interface FailedMigration {
  /** Plugin name */
  name: string;
  /** Error message */
  error: string;
}

Version Checking

Version detection and comparison utilities.

/**
 * Get version information for project dependencies
 * @param context - Project directory path
 * @returns Version information object
 */
async function getVersions(context?: string): Promise<VersionInfo>;

interface VersionInfo {
  /** Vue CLI version */
  cli: string;
  /** Vue CLI service version */
  service: string;
  /** Vue.js version */
  vue: string;
  /** Node.js version */
  node: string;
  /** NPM version */
  npm: string;
  /** Yarn version (if available) */
  yarn?: string;
  /** pnpm version (if available) */
  pnpm?: string;
  /** Installed plugins with versions */
  plugins: Record<string, string>;
}

/**
 * Check if current CLI version satisfies requirement
 * @param range - Semver range requirement
 * @returns Whether version is satisfied
 */
function assertCliVersion(range: string): boolean;

/**
 * Check if current CLI service version satisfies requirement
 * @param range - Semver range requirement  
 * @returns Whether version is satisfied
 */
function assertCliServiceVersion(range: string): boolean;

Environment Diagnostics

Environment information collection for debugging.

/**
 * Collect environment diagnostic information
 * @returns Environment information object
 */
async function collectEnvironmentInfo(): Promise<EnvironmentInfo>;

interface EnvironmentInfo {
  /** System information */
  system: {
    OS: string;
    CPU: string;
    Memory: string;
  };
  /** Binary versions */
  binaries: {
    Node: string;
    Yarn: string;
    npm: string;
  };
  /** Browser versions */
  browsers: {
    Chrome?: string;
    Edge?: string;
    Firefox?: string;
    Safari?: string;
  };
  /** Vue-related npm packages */
  npmPackages: Record<string, string>;
  /** Global Vue CLI packages */
  npmGlobalPackages: Record<string, string>;
}

Migration System

Plugin migration system for handling breaking changes.

/**
 * Plugin migration system structure
 */
interface Migrator {
  /** Plugin ID */
  plugin: string;
  /** Migration function */
  migrate: MigrationFunction;
  /** Version range this migration applies to */
  version: string;
}

interface MigrationFunction {
  (api: MigratorAPI, options: any): Promise<void> | void;
}

/**
 * API provided to migration functions
 */
interface MigratorAPI {
  /** Project context path */
  context: string;
  /** Transform code files */
  transformScript(file: string, codemod: any, options?: any): void;
  /** Modify package.json */
  extendPackage(fields: object): void;
  /** Add/modify files */
  render(source: string, data?: object): void;
  /** Post-process files */
  postProcessFiles(callback: (files: any) => void): void;
}

/**
 * Common migration scenarios:
 * - Update import statements
 * - Modify configuration files
 * - Transform deprecated API calls
 * - Update dependency versions
 * - Rename or move files
 * - Update webpack configuration
 */

Upgrade Strategies

Different strategies for handling dependency upgrades.

/**
 * Upgrade strategies for different scenarios:
 */
const upgradeStrategies = {
  /** Conservative: Only patch and minor updates */
  conservative: {
    allowMajor: false,
    allowMinor: true,
    allowPatch: true
  },
  /** Moderate: Minor and patch updates, selective major */
  moderate: {
    allowMajor: false,
    allowMinor: true,
    allowPatch: true,
    majorPlugins: ['@vue/cli-service']
  },
  /** Aggressive: All updates including major versions */
  aggressive: {
    allowMajor: true,
    allowMinor: true,
    allowPatch: true
  },
  /** Security: Only security patches */
  security: {
    securityOnly: true
  }
};

Compatibility Checking

Version compatibility validation and warnings.

/**
 * Check compatibility between Vue CLI components
 * @param versions - Current version information
 * @returns Compatibility report
 */
function checkCompatibility(versions: VersionInfo): CompatibilityReport;

interface CompatibilityReport {
  /** Overall compatibility status */
  compatible: boolean;
  /** Compatibility warnings */
  warnings: CompatibilityWarning[];
  /** Compatibility errors */
  errors: CompatibilityError[];
  /** Recommendations for fixes */
  recommendations: string[];
}

interface CompatibilityWarning {
  /** Component with compatibility issue */
  component: string;
  /** Version with issue */
  version: string;
  /** Warning message */
  message: string;
  /** Severity level */
  severity: 'low' | 'medium' | 'high';
}

interface CompatibilityError {
  /** Component with compatibility error */
  component: string;
  /** Version with error */
  version: string;
  /** Error message */
  message: string;
  /** Whether this blocks functionality */
  blocking: boolean;
}

Install with Tessl CLI

npx tessl i tessl/npm-vue--cli

docs

configuration-management.md

development-tools.md

graphical-interface.md

index.md

plugin-management.md

programmatic-api.md

project-creation.md

project-maintenance.md

tile.json