Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postcss/postcss-selector-parser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.1.2
Choose a base ref
...
head repository: postcss/postcss-selector-parser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.0.0
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on Oct 23, 2024

  1. feat!: make insertions during iteration safe (#295)

    This change addresses some unexpected behavior when inserting nodes into
    a container. For example, assume you have a container containing two
    class nodes `.foo.baz`. While iterating that container with `each`,
    assume you are processing `.foo` at index 0. Today, the behavior is as
    follows:
    
    - `insertBefore(.baz, .bar)` => the next callback is to `.baz` at idx 3
    - `insertAfter(.foo, .bar)` => the next callback is to `.baz` at idx 3
    - `prepend(.bar)` => the next callback is to `.foo` again at idx 1
    
    With this change, the behavior is the following, respectively:
    
    - the next callback is to `.bar` at idx 2
    - the next callback is to `.bar` at idx 2
    - the next callback is to `.baz` at idx 3
    
    The newly added tests demonstrate this behavior. I've also removed the
    old "container#each (safe iteration)" test, as it now creates an
    infinite loop. I'd argue that this is the expected behavior now, though.
    mattrberry authored Oct 23, 2024
    Configuration menu
    Copy the full SHA
    4fa6e86 View commit details
    Browse the repository at this point in the history
  2. chore(release): 7.0.0

    alexander-akait committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    6158750 View commit details
    Browse the repository at this point in the history
Loading