Skip to content

Component Update & Version Management

Iterate versions of published components, fix issues, or add new features.

Update Process

1. Download Component

Go to "My Components", find the component that needs updating, and click the "Update" button. On the update page:

  1. Click "Download" to get the current version
  2. Select the save path (project's components directory)
  3. Confirm download is complete

2. Local Modification

Open the downloaded component folder in your project and make modifications:

  • Fix bugs
  • Add new features
  • Optimize performance
  • Update documentation

3. Testing & Validation

Test the modified component in the local environment to ensure:

  • Original functions work normally
  • New features work as expected
  • No console errors

4. Upload Update

Return to comp-hub's update page:

  1. Select the modified component folder
  2. Update version number (if file content has changed)
  3. Adjust preview configuration (if needed)
  4. Modify component description (recommended to explain changes)
  5. Click "Update" to publish

Version Number Specification

Component versions follow the Semantic Versioning specification:

major.minor.patch
Version TypeChange ContentExample
Patch VersionBug fixes, backward compatible1.0.0 → 1.0.1
Minor VersionNew features, backward compatible1.0.0 → 1.1.0
Major VersionBreaking changes1.0.0 → 2.0.0

When to Update Version Number

Must Update:

  • Modified component code (.vue file)
  • Changed component props interface
  • Adjusted component behavior logic

No Need to Update:

  • Only modified preview configuration
  • Only updated component description

How to Modify Version Number

In the configuration area of the component update page, directly modify the version number input box, and the system will automatically update the comp.json file.

Method 2: Manual Local Modification

Manually modify the version number in comp.json in the local project:

json
{
  "name": "MyComponent",
  "version": "1.1.0"
}

Version Management

Multiple Versions Coexist

The platform retains all historical versions of components. Users can:

  • Switch to view different versions on the preview page
  • Download and use any historical version
  • Compare differences between versions

Best Practices

Changelog

Maintain a changelog in the component's README.md:

markdown
## Changelog

### 1.1.0 (2024-01-15)

- Added: Support for custom theme colors
- Optimized: Improved rendering performance with large data volumes

### 1.0.1 (2024-01-10)

- Fixed: Fixed tooltip not displaying in certain situations

### 1.0.0 (2024-01-01)

- Initial version release

Backward Compatibility

  • Try to keep the props interface stable
  • If you need to deprecate a property, mark it as deprecated in the documentation first
  • Breaking changes must upgrade the major version number

Components uploaded by users are open source