Skip to content

Conversation

gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Jul 8, 2025

Description Of Changes

Added modern exports field to package.json to improve package resolution and enable direct imports of different Fides variants. This allows customers to import specific builds (headless, TCF) directly using clean import paths while maintaining backward compatibility with existing usage patterns.

Solves the following issues:

  • Only main fides.mjs was referenced in package.json "module" field
  • Missing modern "exports" field for better package resolution
  • Other variants (TCF, headless) weren't exposed through package exports

Example:

// Main Fides SDK
import { init } from 'fides-js';

// Headless version (no UI)
import { init } from 'fides-js/headless';

// TCF-enabled version
import { init } from 'fides-js/tcf';

Copy link

vercel bot commented Jul 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2025 3:32pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-privacy-center ⬜️ Ignored (Inspect) Jul 9, 2025 3:32pm

@gilluminate gilluminate merged commit 34c1c9a into main Jul 9, 2025
17 checks passed
@gilluminate gilluminate deleted the gill/package-exports branch July 9, 2025 15:32
Copy link

cypress bot commented Jul 9, 2025

fides    Run #13093

Run Properties:  status check passed Passed #13093  •  git commit 34c1c9aecd: Include exports field to improve 3rd party usage (#6315)
Project fides
Branch Review main
Run status status check passed Passed #13093
Run duration 00m 48s
Commit git commit 34c1c9aecd: Include exports field to improve 3rd party usage (#6315)
Committer Jason Gill
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
View all changes introduced in this branch ↗︎

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