Skip to content

Conversation

@github-actions
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

annotation-comments@1.0.0

Major Changes

  • a5b2179: First major release. Mainly to ensure that semver ranges work as expected, but hooray! 🎉

Minor Changes

  • a5b2179: Adds support for target ranges defined by matching start...end annotation comments. This allows you to annotate ranges of code without having to count lines or manually updating the ranges when the code changes.

    The following example shows how to define a simple target line range using the new feature:

    // [!mark:start]
    function foo() {
      console.log('foo')
    }
    // [!mark:end]

    You can also combine start...end ranges with search queries, which limits the search to the range defined by the start and end annotation comments:

    // [!mark:"log":start]
    function foo() {
      console.log('The words "log" will be marked both in the method call and this text.')
      console.log('Also on this line.')
    }
    // [!mark:"log":end]
    
    console.log('As this line is outside the range, "log" will not be marked.')

@hippotastic hippotastic merged commit 5f0c202 into main Feb 15, 2025
@hippotastic hippotastic deleted the changeset-release/main branch February 15, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants