Skip to content

BREAKING: Make same-file duplicate skipping the default - #602

Merged
RyanZim merged 2 commits into
postcss:masterfrom
Nic-Polumeyv:skipduplicates-same-file
Aug 12, 2026
Merged

BREAKING: Make same-file duplicate skipping the default#602
RyanZim merged 2 commits into
postcss:masterfrom
Nic-Polumeyv:skipduplicates-same-file

Conversation

@Nic-Polumeyv

@Nic-Polumeyv Nic-Polumeyv commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Reworked per the discussion in #601: content-hash matching is removed and skipDuplicates stays a boolean. no-duplicate.expected.css had the content behavior baked into its default expectations and is regenerated.

Fixes #601

@Nic-Polumeyv Nic-Polumeyv changed the title Allow skipping only same-file duplicates with skipDuplicates: "same-file", fixes #601 Make same-file duplicate skipping the default, fixes #601 Jul 27, 2026
@RyanZim

RyanZim commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

@Nic-Polumeyv You'll want to rebase this now that #605 is merged. Also, are you up to modifying this to remove the content-hash-matching logic outright (keeping skipDuplicates a boolean option) as discussed in #601?

@Nic-Polumeyv
Nic-Polumeyv force-pushed the skipduplicates-same-file branch from 9d48439 to fb2cf1e Compare August 11, 2026 19:25
@RyanZim
RyanZim requested review from romainmenke and a balanced review from Copilot August 12, 2026 15:27
@RyanZim RyanZim changed the title Make same-file duplicate skipping the default, fixes #601 BREAKING: Make same-file duplicate skipping the default Aug 12, 2026
Comment thread README.md

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Changes duplicate skipping to deduplicate by resolved file path rather than identical content, preventing path-dependent semantics from being dropped.

Changes:

  • Removes content-hash deduplication.
  • Adds coverage for identical content at different paths.
  • Updates expected output and option documentation.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
index.js Removes hash-tracking state.
lib/parse-styles.js Removes content-based duplicate checks.
README.md Updates skipDuplicates documentation.
test/import.js Registers the new regression fixture.
test/fixtures/same-file-dedup.css Imports distinct and repeated paths.
test/fixtures/same-file-dedup.expected.css Verifies path-based deduplication.
test/fixtures/imports/same-file-dedup/a/shared.css Adds first identical source file.
test/fixtures/imports/same-file-dedup/b/shared.css Adds second identical source file.
test/fixtures/no-duplicate.expected.css Updates expectations without content deduplication.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md

@romainmenke romainmenke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. LGTM 👍

@RyanZim
RyanZim merged commit 0928508 into postcss:master Aug 12, 2026
4 checks passed
@RyanZim

RyanZim commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Thanks a lot @Nic-Polumeyv!

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.

skipDuplicates content dedup silently drops files containing path-dependent at-rules

4 participants