Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: propagate @netlify/build version, primary framework and its version#8049

Merged
pieh merged 4 commits into
mainfrom
pieh/report-netlify-build-and-framework-version
Mar 20, 2026
Merged

feat: propagate @netlify/build version, primary framework and its version#8049
pieh merged 4 commits into
mainfrom
pieh/report-netlify-build-and-framework-version

Conversation

@pieh

@pieh pieh commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

πŸŽ‰ Thanks for submitting a pull request! πŸŽ‰

Summary

Relies on netlify/build#6984

This adds build_version, framework and framework_version metadata to CLI deploys so there is parity with buildbot deploys.

Part of https://linear.app/netlify/issue/FRB-2141/cli-deploys-dont-set-netlifybuild-version-metadata
Part of https://linear.app/netlify/issue/FRB-1384/framework-metadata-not-passed-through-from-manual-cli-deploys


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code πŸ§‘β€πŸ’». This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire πŸ”₯ (e.g. incident related), you can skip this step.
  • Read the contribution guidelines πŸ“–. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) πŸ§ͺ
  • Update or add documentation (if features were changed or added) πŸ“
  • Make sure the status checks below are successful βœ…

A picture of a cute animal (not mandatory, but encouraged)

@coderabbitai

coderabbitai Bot commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 121983da-2f6e-461e-82f9-eeafb6ffabec

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 62dfd85 and 984caf2.

πŸ“’ Files selected for processing (1)
  • tests/integration/commands/deploy/deploy.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/integration/commands/deploy/deploy.test.ts

πŸ“ Walkthrough

Summary by CodeRabbit

  • New Features

    • Deploy requests now include framework metadata: detected framework, framework version, and build version.
    • Improved framework detection in monorepo deployments, identifying frameworks per package.
  • Tests

    • Added integration tests validating framework and build version fields across single-package and monorepo deploy scenarios.

Walkthrough

The deploy request payload sent to the API now includes three metadata fields. The code imports getVersion from @netlify/build, selects the primary framework from command.project.frameworks.get(command.workspacePackage ?? ''), and sets framework, framework_version, and build_version on the deployParams.body passed to api.updateSiteDeploy(), defaulting to 'unknown' when values are unavailable. Tests and a test interface were updated/added to assert these fields in recorded deploy requests.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

πŸš₯ Pre-merge checks | βœ… 3
βœ… Passed checks (3 passed)
Check name Status Explanation
Title check βœ… Passed The title clearly and concisely describes the main change: propagating @netlify/build version and framework metadata to CLI deploys.
Description check βœ… Passed The description is directly related to the changeset, explaining the purpose of adding build_version, framework, and framework_version metadata.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pieh/report-netlify-build-and-framework-version
πŸ“ Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

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

Comment thread package.json Outdated
@github-actions

github-actions Bot commented Mar 17, 2026

Copy link
Copy Markdown

πŸ“Š Benchmark results

Comparing with bb81ca7

  • Dependency count: 1,057 (no change)
  • Package size: 354 MB (no change)
  • Number of ts-expect-error directives: 357 (no change)

Comment thread src/utils/deploy/deploy-site.ts Outdated
@pieh pieh force-pushed the pieh/report-netlify-build-and-framework-version branch from 5d8a008 to 7df49d1 Compare March 17, 2026 21:58
@pieh pieh force-pushed the pieh/report-netlify-build-and-framework-version branch from 7df49d1 to 781ec18 Compare March 19, 2026 13:52
@pieh pieh marked this pull request as ready for review March 19, 2026 14:10
@pieh pieh requested a review from a team as a code owner March 19, 2026 14:10

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/utils/deploy/deploy-site.ts (1)

172-172: Remove explanatory inline comment and keep intent in code structure only.

Please drop this comment; it describes behavior rather than adding non-obvious rationale.

♻️ Proposed cleanup
-  // frameworks are already detected and results are memoized
   const frameworks = await command.project.detectFrameworks()

As per coding guidelines, "Never write comments on what the code does; make the code clean and self-explanatory instead."

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/utils/deploy/deploy-site.ts` at line 172, Delete the inline comment "//
frameworks are already detected and results are memoized" in
src/utils/deploy/deploy-site.ts (it's describing behavior not rationale) and
instead ensure the code intent is expressed via identifiers or structureβ€”e.g.,
rely on a clearly named helper like detectFrameworks or a memoized variable such
as detectedFrameworks/memoizedFrameworks inside the deploySite (or similarly
named) function so no explanatory comment is needed.
πŸ€– Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/utils/deploy/deploy-site.ts`:
- Line 172: Delete the inline comment "// frameworks are already detected and
results are memoized" in src/utils/deploy/deploy-site.ts (it's describing
behavior not rationale) and instead ensure the code intent is expressed via
identifiers or structureβ€”e.g., rely on a clearly named helper like
detectFrameworks or a memoized variable such as
detectedFrameworks/memoizedFrameworks inside the deploySite (or similarly named)
function so no explanatory comment is needed.

ℹ️ Review info
βš™οΈ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9367b49d-bca2-43cf-8f85-50a91480ea35

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 78b5af9 and 781ec18.

πŸ“’ Files selected for processing (1)
  • src/utils/deploy/deploy-site.ts

serhalp
serhalp previously approved these changes Mar 19, 2026

@serhalp serhalp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

is adding test coverage here challenging? πŸ‘οΈ

serhalp
serhalp previously approved these changes Mar 19, 2026

@serhalp serhalp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

πŸ’― beautiful tests

@pieh pieh merged commit 1db6f6e into main Mar 20, 2026
71 checks passed
@pieh pieh deleted the pieh/report-netlify-build-and-framework-version branch March 20, 2026 11:11
serhalp pushed a commit that referenced this pull request Mar 20, 2026
πŸ€– I have created a release *beep* *boop*
---


## [24.4.0](v24.3.0...v24.4.0)
(2026-03-20)


### Features

* propagate @netlify/build version, primary framework and its version
([#8049](#8049))
([1db6f6e](1db6f6e))
* support switching to a known user
([#8046](#8046))
([e460e68](e460e68))


### Bug Fixes

* **deps:** bump h3 from 1.15.5 to 1.15.8
([#8055](#8055))
([7a1c8fa](7a1c8fa))
* **deps:** update dependency @netlify/dev to v4.16.3
([#8053](#8053))
([4460d87](4460d87))
* **deps:** update dependency @netlify/dev to v4.16.4
([#8060](#8060))
([d0491da](d0491da))
* **deps:** update dependency @netlify/dev-utils to v4.4.2
([#8054](#8054))
([bdb944f](bdb944f))
* **deps:** update dependency @netlify/dev-utils to v4.4.3
([#8061](#8061))
([78b5af9](78b5af9))
* **deps:** update dependency @netlify/edge-functions to v3.0.5
([#8056](#8056))
([6254a75](6254a75))
* **deps:** update dependency @netlify/edge-functions to v3.0.6
([#8063](#8063))
([7646545](7646545))
* **deps:** update dependency @netlify/functions to v5.1.4
([#8057](#8057))
([18d5ccb](18d5ccb))
* **deps:** update dependency @netlify/functions to v5.1.5
([#8064](#8064))
([77a9249](77a9249))
* **deps:** update dependency @netlify/images to v1.3.6
([#8058](#8058))
([06f564b](06f564b))
* **deps:** update dependency @netlify/images to v1.3.7
([#8065](#8065))
([12a3a3f](12a3a3f))
* **deps:** update dependency cookie to v1.1.1
([#8037](#8037))
([6e6bcf5](6e6bcf5))
* **deps:** update dependency envinfo to v7.21.0
([#8039](#8039))
([08b5fc5](08b5fc5))
* **deps:** update netlify packages
([#8047](#8047))
([d57ce32](d57ce32))
* **deps:** update netlify packages
([#8062](#8062))
([3006f8c](3006f8c))
* **deps:** update netlify packages
([#8067](#8067))
([02632aa](02632aa))
* **deps:** upgrade deps to fix new vulnerabilities
([#8070](#8070))
([e3655f9](e3655f9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com>
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.

3 participants