Skip to content

fix: Bump compression from 1.7.3 to 1.8.2 - #32

Closed
mtrezza wants to merge 1 commit into
parse-community:mainfrom
mtrezza:fix/compression-1.8.2
Closed

mtrezza wants to merge 1 commit into
parse-community:mainfrom
mtrezza:fix/compression-1.8.2

Conversation

@mtrezza

@mtrezza mtrezza commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Closes #26

Changes

compression:

Dependencies of compression that change (each is used only by compression; the other copies in the tree stay as they are):

  • negotiator 0.6.1 → 0.6.4 (new nested copy; accepts keeps 0.6.1): 0.6.2 fixes the sorting of charsets, encodings and languages with extra parameters; 0.6.3 reverts the lazy-loading of modules from the main entry point; 0.6.4 adds the preferred encodings argument (Added an option preferred encodings array jshttp/negotiator#59) and replaces the deprecated String.prototype.substr()
  • on-headers 1.0.1 → 1.1.0: 1.0.2 fixes the res.writeHead patch missing its return value; 1.1.0 fixes CVE-2025-7339 (see 1.8.1)
  • compressible 2.0.14 → 2.0.18, with a new nested mime-db 1.54.0 (the top-level mime-db 1.35.0 stays for mime-types): 2.0.15 to 2.0.17 raise the mime-db range; 2.0.16 marks text/less as compressible, which compressible already did through its text/* fallback; 2.0.18 marks font/ttf as compressible and drops the compressible: false flag from multipart/mixed, which stays not compressible; mime-db 1.35.0 → 1.54.0 adds media types and their compressible flags
  • bytes 3.0.0 → 3.1.2 (new nested copy; body-parser and raw-body keep 3.0.0): 3.1.0 adds petabyte support; 3.1.1 fixes thousandsSeparator formatting the fractional part; 3.1.2 fixes the return value for unparsable strings
  • safe-buffer 5.1.2 → 5.2.1 (nested copy): 5.2.0 makes the SafeBuffer prototype inherit from Buffer; 5.2.1 has no functional changes
  • destroy 1.2.0 (new dependency, nested; send keeps 1.0.4): 1.1.0 adds zlib stream support and a Node.js leak workaround; 1.1.1 works around a zlib close bug in Node.js < 4.5.5; 1.2.0 adds the suppress argument
  • accepts is no longer used by compression; it stays in the tree for express, express-graphql and serve-index.

compression is a transitive production dependency of webpack-dev-server 3.1.5 in the todo subproject (compression@^1.5.2). webpack-dev-server 3.1.5 loads the module at startup, but mounts the middleware, as compress() without options, only when its compress option is truthy. The todo server.js creates WebpackDevServer with only contentBase, publicPath and stats, so the middleware is not mounted in this app, and the upgrade does not change how the app handles requests. If compress were enabled, the default options would behave differently in these ways:

  • Clients that accept br and gzip with equal quality, as current browsers do, would receive Brotli-compressed responses (Content-Encoding: br, quality 4) instead of gzip on Node.js versions with Brotli support.
  • The 1.7.3 override that switched from deflate to gzip whenever the client accepted gzip no longer exists, and the preferred encodings (br, gzip) only break ties between equal q-values. A client that gives deflate a higher q-value than gzip would get deflate instead of gzip, and a client that lists identity before gzip at equal q-values would get gzip instead of an uncompressed response. Both are edge cases.
  • A Cache-Control header with no-transform in any letter case would disable compression.
  • The compressible content types would follow mime-db 1.54.0 instead of 1.35.0; for example, font/ttf would now be compressed. text/less was already compressed through the text/* fallback, and multipart/mixed stays uncompressed.
  • A compressed response that the client aborts would free its zlib stream instead of leaking it.

The default threshold stays 1 KiB, the default filter logic is unchanged, Vary: Accept-Encoding is still set, and requests without Accept-Encoding still get an uncompressed response, because enforceEncoding defaults to identity.

The strictest engines.node among the new package versions is >= 0.8, and the todo subproject declares no engines. The legacy root .travis.yml (Node.js 6, 8 and 10, running npm install, npm run update-schema and npm run build in ./todo) is inactive, as no Travis check reports on this PR; Node.js 6 would also satisfy these ranges.

Risk

Medium. compression moves across a minor version with changed encoding negotiation: the override that switched from deflate to gzip is gone since 1.7.5, Brotli is preferred over gzip since 1.8.0, and negotiator moves from 0.6.1 to 0.6.4 with the new preferred encodings argument. on-headers 1.1.0 changes how res.writeHead() applies array headers, compressible and mime-db change the set of compressible types, and the new destroy dependency handles the stream on response close. None of this affects the todo app, because webpack-dev-server does not mount the middleware without the compress option.

Breaking Changes

None

Code Changes Required

None — the upgrade is a drop-in replacement. compression is a transitive dependency in the todo subproject. In todo/package-lock.json and todo/yarn.lock, only the entries of compression and its own dependencies change: compression, compressible, on-headers and the nested safe-buffer are updated, and nested bytes, destroy, negotiator and mime-db entries are added. In yarn.lock, the new safe-buffer@5.2.1 range resolves to the existing safe-buffer 5.2.1 entry, and the safe-buffer@5.1.2 and mime-db@>= 1.34.0 < 2 ranges are removed from the headers of the existing safe-buffer 5.1.2 and mime-db 1.35.0 entries, which other packages still use. The lock-file changes are identical to the bot PR's, because npm 10 rewrites yarn.lock and unrelated package-lock.json fields in this subproject; npm resolves the same entries.

Summary by CodeRabbit

  • Chores
    • Updated internal project maintenance records.
    • No user-visible feature, interface, or behavior changes are described in this release. The update is limited to behind-the-scenes project metadata, with no reported changes to how the app is used. Existing functionality remains as before, based on the available change summary.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 2fdc2949-983e-4b70-84f2-fa7c55f66b3d
Commits

Reviewing files that changed from the base of the PR and between 3f8aa9c and 5031768.

Files ignored due to path filters: 1
  • todo/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
Files selected for processing: 1
  • todo/package-lock.json

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Walkthrough

The /todo lockfile updates compression and compressible, and records on-headers at version 1.1.0.

Changes: Todo dependency updates

Layer / File(s) Summary
Update locked package versions
todo/package-lock.json
The lockfile updates compressible to 2.0.18 and compression to 1.8.2, with revised dependency records. It updates on-headers to 1.1.0 and records MIT license metadata.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: flovilmart

Merge Risk: Minimal · up to 50317

The dependency update is limited to lockfile metadata with no identified application behavior issue.

Pre-merge checks: Passed 7
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title begins with the required fix: prefix and uses a capitalized first word. It accurately describes the compression dependency update.
Linked Issues check Passed Issue #26 requires compression 1.8.2 in /todo, including the CVE fixes and case-insensitive Cache-Control: no-transform handling. The pull request updates todo/package-lock.json from `compress…
Out of Scope Changes check Passed The reported changes are limited to the /todo dependency lockfile and the nested dependencies required by the compression update. The description also explains the resulting transitive dependency …
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Security Check Passed PASS. The pull request changes only todo/package-lock.json and todo/yarn.lock. It upgrades compression from 1.7.3 to 1.8.2, adds destroy 1.2.0, and upgrades on-headers to 1.1.0. Changed reco…
Engage In Review Feedback Passed No review feedback comments or actionable findings were supplied. The engagement requirement is therefore not triggered.
Full details: Linked Issues check

Explanation

Issue #26 requires compression 1.8.2 in /todo, including the CVE fixes and case-insensitive Cache-Control: no-transform handling. The pull request updates todo/package-lock.json from compression 1.7.3 to 1.8.2 and records on-headers 1.1.0, destroy 1.2.0, and the updated compressible dependency. These dependency versions provide the issue's required fixes. The excluded todo/yarn.lock does not provide evidence against compliance.

Full details: Out of Scope Changes check

Explanation

The reported changes are limited to the /todo dependency lockfile and the nested dependencies required by the compression update. The description also explains the resulting transitive dependency behavior. No unrelated application code or unrelated feature change is established.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Full details: Security Check

Explanation

PASS. The pull request changes only todo/package-lock.json and todo/yarn.lock. It upgrades compression from 1.7.3 to 1.8.2, adds destroy 1.2.0, and upgrades on-headers to 1.1.0. Changed records use registry URLs with integrity hashes. No executable code, install scripts, unsafe URLs, or new security-risk patterns were introduced. The old compression version is absent from both lockfiles.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mtrezza

mtrezza commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

Superseded by #26, merged directly because the repository ruleset requires an approval from someone other than the PR author. The analysis stays in this PR's description.

@mtrezza mtrezza closed this Oct 25, 2026
@mtrezza
mtrezza deleted the fix/compression-1.8.2 branch October 25, 2026 08:03
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.

1 participant