• English
  • Development Workflow

    Start the Project

    Start Project
    pnpm install && pnpm dev

    Understand Requirements and Write Code

    This is a complex process, but generally involves three things:

    1. Define the input: vseed
    2. Define the output: vseed → advancedVSeed, or advancedVSeed → spec
    3. Write code to ensure new inputs produce the expected outputs
    Tip

    The playground (apps/website/docs/en-US/vseed/playground.mdx) can be used for debugging and development.

    Create New Test Cases

    If necessary, consider creating new test cases.

    Tip

    When test coverage decreases, new test cases are required.

    In the packages/vseed/tests/* directory, create a new testName.json file and write a VSeed DSL.

    Then run:

    Create Test Case
    pnpm build:canvasTest

    Run Unit Tests and Update Coverage

    Run Unit Tests and Update Coverage
    pnpm test:coverage

    Ensure three things:

    1. All tests pass
    2. Snapshot changes are as expected
    3. Coverage has not decreased

    Coverage changes will be automatically updated to README.md

    Update Options Documentation

    If you modify TypeScript definitions for chart types, please update the options documentation.

    Tip

    All type definitions under packages/vseed/src/types/chartType correspond to the options documentation for each chart. If changes are made, please update accordingly.

    Update Options Documentation
    pnpm build:docs

    Publish and Submit

    Describe Changes
    pnpm changeset

    After running pnpm changeset, follow the prompts to:

    1. Select the packages to change — in most cases, only vseed
    2. Follow semantic versioning: press Enter twice to skip major and minor, then select patch
    3. Enter a change description, e.g.: fix: chart render error caused by only one measure
    Recommendation

    One feature or bugfix → one changeset → one commit

    One Pull Request → one issue

    One Pull Request can contain multiple features or bugfixes → multiple changesets → multiple commits

    Commit

    Commit Everything
    git add .
    git commit -m "fix: chart render error caused by only one measure"
    git push