ljharb / ljharb/qs

[Breaking] flip `strictMerge` default to `false` in v7

Open
#548 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

semver-major: breaking change
Dominant language
JavaScript
Stars
8.9k
Forks
936
PR merge metrics
No merged PRs in 30d

Description

In v6, the new `strictMerge` option (added in cb41a54) defaults to `true`, which changes the behavior of parsing conflicting key types. When a key appears as both a plain value and an object (e.g. `a[b]=c&a=d`), the result is now wrapped in an array (`{ a: [{ b: 'c' }, 'd'] }`) instead of the legacy behavior of using the primitive as a key with value `true` (`{ a: { b: 'c', d: true } }`).

In v7, `strictMerge` should default to `false` (removing the legacy `target[source] = true` code path entirely), since the array-wrapping behavior will be the only supported behavior.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the strictMerge option handling and the target[source] = true path in the parser. Verify the conflicting-key example and existing default behavior, then update the v7 default and confirm that the legacy path is no longer supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.