Skip to content

feat: export getVersion helper from @netlify/build#6984

Merged
pieh merged 1 commit intomainfrom
pieh/export-netlify-build-version
Mar 19, 2026
Merged

feat: export getVersion helper from @netlify/build#6984
pieh merged 1 commit intomainfrom
pieh/export-netlify-build-version

Conversation

@pieh
Copy link
Copy Markdown
Contributor

@pieh pieh commented Mar 17, 2026

🎉 Thanks for submitting a pull request! 🎉

Summary

Part of https://linear.app/netlify/issue/FRB-2141/cli-deploys-dont-set-netlifybuild-version-metadata


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
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2b0e7187-afa5-4b35-9db9-5f5c8ec4ce50

📥 Commits

Reviewing files that changed from the base of the PR and between 6588f01 and 9697b1a.

📒 Files selected for processing (2)
  • packages/build/src/index.ts
  • packages/build/src/utils/json.ts

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

New Features

  • Added version information retrieval capability to support programmatic access to package version details.

Walkthrough

This pull request introduces a new utility function getVersion in the build package. A new function is added to packages/build/src/utils/json.ts that returns the version field from an already-loaded ROOT_PACKAGE_JSON object. The function is then exported from packages/build/src/index.ts as a named export, making it available to consumers of the package. The changes are minimal and purely additive.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

✨ 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/export-netlify-build-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.

@pieh pieh marked this pull request as ready for review March 19, 2026 06:42
@pieh pieh requested a review from a team as a code owner March 19, 2026 06:42
@pieh pieh merged commit 8b0e729 into main Mar 19, 2026
55 of 56 checks passed
@pieh pieh deleted the pieh/export-netlify-build-version branch March 19, 2026 06:43
pieh added a commit to netlify/cli that referenced this pull request Mar 20, 2026
…sion (#8049)

🎉 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](https://github.com/netlify/cli/issues/new/choose) 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](../CONTRIBUTING.md) 📖. 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)**
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.

2 participants