Migration Guide

Upgrading to v0.3.2

Learn how to upgrade LogicStamp Context to v0.3.2, including breaking changes, migration steps, and optional cleanup tasks.

Breaking changes
Mostly automatic
Improved parsing

TL;DR

v0.3.2 improves portability by using relative paths instead of absolute paths. Most users won't need any changes - just regenerate your context files. Only custom tools or scripts that parse context_main.json may need updates.

Migration Guide: Upgrading to v0.3.2

Unable to load migration guide. Please check the migration documentation on GitHub.

Error: ENOENT: no such file or directory, open '/var/task/docs/context/MIGRATION_0.3.2.md'

Style Metadata Migration Details

Enhanced CSS/SCSS parsing with AST-based extraction

What Changed in Style Extraction

v0.3.2 introduces AST-based parsing for CSS and SCSS files, replacing the previous regex-based approach. This provides more accurate and comprehensive style metadata extraction.

Before (v0.3.1)

  • Regex-based parsing
  • Limited selector extraction
  • Basic property detection
  • Limited SCSS feature support

After (v0.3.2)

  • AST-based parsing (more accurate)
  • Complete selector extraction
  • Full property parsing
  • Full SCSS feature support (variables, nesting, mixins)

Impact on Style Metadata

Improved Accuracy

Style metadata is now more accurate and comprehensive:

  • Better detection of CSS selectors and pseudo-classes
  • More accurate SCSS variable and mixin extraction
  • Improved nesting detection in SCSS files
  • Better handling of complex CSS properties

Format Differences

When regenerating context files with style metadata, you may notice:

  • More detailed scssDetails structure
  • Additional SCSS features detected (variables, mixins, nesting)
  • More comprehensive selector lists
  • Potentially different property extraction format

Example: SCSS Metadata Changes

{ "style": { "styleSources": { "scssModule": "src/components/Button.module.scss", "scssDetails": { "selectors": [".button", ".primary"], "properties": ["background", "color", "padding"] } } } }

Migration Steps for Style Metadata

1

Regenerate Context Files

Run stamp context style or stamp context --include-style to regenerate style metadata with the new AST-based parser.

2

Review Style Metadata

Check that style metadata is more comprehensive. The new format includes additional SCSS features and more detailed selector/property information.

3

Update Tools (If Needed)

If you have custom tools that parse style metadata, they should continue to work but may benefit from the additional information now available (SCSS features, more detailed selectors).

Non-Breaking Improvement

This is a non-breaking improvement. Existing style metadata consumers will continue to work, but will now receive more accurate and comprehensive data. The schema structure remains the same—only the accuracy and completeness of the extracted data has improved.