Skip to content

LF-5362: Upgrade to @datafoodconsortium/connector v2#4235

Draft
SayakaOno wants to merge 5 commits into
integrationfrom
LF-5362/Upgrade_to_@datafoodconsortium/connector_v2
Draft

LF-5362: Upgrade to @datafoodconsortium/connector v2#4235
SayakaOno wants to merge 5 commits into
integrationfrom
LF-5362/Upgrade_to_@datafoodconsortium/connector_v2

Conversation

@SayakaOno

@SayakaOno SayakaOno commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Upgrade @datafoodconsortium/connector to v2.0.0-beta.2 (CHANGELOG) and restores existing DFC API functionality under the new version.

Breaking changes addressed

  • EnterpriseOrganization in the adapter and all tests
  • dfc-b:hasAddress country field now requires a SKOSConcept object instead of a plain string URI

New in this PR

  • Content-Type: application/ld+json; profile="dfc-v2" response header on both DFC endpoints
  • GET /dfc/enterprises/ response wrapped in ldp:Container for DFC v2 compliance

Taxonomy file

The v2 release taxonomy is structurally incompatible with the connector's importThesaurus (uses broader only, no ConceptScheme/hasTopConcept). As a workaround, the v1 taxonomy structure is retained with the URI prefix updated to http://w3id.org/dfc/taxonomies/v2.0.0/productTypes.rdf#.

Other changes

  • X (Twitter) social media URL updated to x.com
  • Linked references (dfc-b:hasAddress, dfc-b:hasMainContact, etc.) are now serialized as plain URI strings instead of {"@id": "..."} objects — this is v2 connector behaviour, semantically equivalent per JSON-LD spec

Jira link: https://lite-farm.atlassian.net/browse/LF-5362

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Passes test case
  • UI components visually reviewed on desktop view
  • UI components visually reviewed on mobile view
  • Other (please explain)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The precommit and linting ran successfully
  • I have added or updated language tags for text that's part of the UI
  • I have ordered translation keys alphabetically (optional: run pnpm i18n to help with this)
  • I have added the GNU General Public License to all new files

@SayakaOno SayakaOno self-assigned this Jun 30, 2026
@socket-security

socket-security Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​datafoodconsortium/​connector@​1.0.0-alpha.10 ⏵ 2.0.0-beta.272 +410099 +193 +5100

View full report

@SayakaOno SayakaOno added the enhancement New feature or request label Jul 2, 2026
@SayakaOno SayakaOno changed the title [WIP] LF-5362: Upgrade to @datafoodconsortium/connector v2 LF-5362: Upgrade to @datafoodconsortium/connector v2 Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant