Merged
Conversation
…erV2 as the default. Mark ParserV1 exports as deprecated with migration notes. Update related types and constants to align with new ParserV2 structure. Add utility functions for adapting between ParserV1 and ParserV2 formats.
…ME with breaking changes and migration instructions. Refactor related types and constants to align with new structure. Enhance components and utilities to utilize Token and MarkToken types, ensuring compatibility with the new parsing system.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… to ParserV2. This includes the deletion of constants, types, utilities, and tests associated with the deprecated ParserV1. Update README to reflect the removal and emphasize migration to ParserV2.
…in useValueParser.tsx
…e new parser. Refactor parsing logic to ensure compatibility with the updated store structure, enhancing token processing and management.
…e definitions to use semicolons instead of commas for object properties. Clean up whitespace in various files for improved readability. Adjust test cases in TriggerFinder.spec.ts to enhance clarity and maintainability.
…ving all references to ParserV1. Update performance metrics and results storage structure for consistency. Revise README to reflect current benchmark results and performance characteristics of ParserV2. Remove deprecated utility tests for assertAnnotated.
…djust table formatting for improved readability and consistency in performance metrics presentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚨 Breaking Changes: Migration to ParserV2
1. Markup Format Change
Impact: All markup patterns must be updated to use the new placeholder names.
2. Mark Component Props Change
// OLD - no longer supported const Mark = ({label, value}) => ( <mark title={value}>{label}</mark> ) // NEW - required const Mark = ({value, meta}) => ( <mark title={meta}>{value}</mark> )Impact: All custom Mark components must update their prop destructuring.
3. initMark Function Signature Change
// OLD - no longer supported { initMark: ({label, value}) => ({ children: label, data: value }) } // NEW - required { initMark: ({value, meta}) => ({ children: value, data: meta }) }Impact: All option configurations with
initMarkmust be updated.4. useMark Hook Props Change
// OLD - no longer supported const {label, value, ref} = useMark() // NEW - required const {value, meta, ref} = useMark()Impact: All editable marks using the
useMarkhook must update prop names.5. Removed Types & Functions
// ❌ REMOVED - these no longer exist import {MarkStruct, MarkMatch, ParserV1Markup} from 'rc-marked-input' import {denoteV1, annotateV1, isAnnotated} from 'rc-marked-input' // ✅ USE INSTEAD - new API import {MarkToken, Token, TextToken, Markup} from 'rc-marked-input' import {denote, annotate} from 'rc-marked-input' // For type checking: token.type === 'mark'Impact: All imports and usage of deprecated APIs must be updated.
6. Token Structure Change
// OLD - MarkStruct array tokens: MarkStruct[] // {label: string, value?: string} // NEW - Token union array tokens: Token[] // TextToken | MarkTokenImpact: Internal changes, but affects any code directly accessing
tokens.📋 Migration Steps
__label__→__value__,__value__→__meta__{label, value}to{value, meta}