Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unpkg bundle holds everything needed and refers to peers correctly #2818

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

ntucker
Copy link
Collaborator

@ntucker ntucker commented Sep 18, 2023

Motivation

Stackoverflow example embeds can utilize umd well

Solution

Globals naming

  • Client packages namespace into RDC
    • @data-client/react - RDC
    • @data-client/core - RDC.Core
    • @data-client/redux - RDC.Redux
  • Definition packages namespace top level
    • @data-client/rest - Rest
    • @data-client/graphql - GraphQL
    • @data-client/img - Img
    • @data-client/endpoint - Endpoint
  • Utility
    • @data-client/normalizr - normalizr
    • @data-client/use-enhanced-reducer - EnhancedReducer
    • @data-client/test - [does not have an unpkg]

Configuration fixes

  • unpkg (UMD) builds should bundle all non-peers (update externals specifically to only be listed peers)
  • update names to above
  • Add output.globals to correctly map the peerdeps to their unpkg name

@changeset-bot
Copy link

changeset-bot bot commented Sep 18, 2023

🦋 Changeset detected

Latest commit: 190df1a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@data-client/use-enhanced-reducer Patch
@data-client/normalizr Patch
@data-client/endpoint Patch
@data-client/graphql Patch
@data-client/hooks Patch
@data-client/react Patch
@data-client/redux Patch
@data-client/core Patch
@data-client/rest Patch
@data-client/img Patch
@data-client/ssr Patch
example-benchmark Patch
normalizr-github-example Patch
normalizr-redux-example Patch
normalizr-relationships Patch
rdc-website Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (8c14e04) 98.58% compared to head (190df1a) 98.58%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2818   +/-   ##
=======================================
  Coverage   98.58%   98.58%           
=======================================
  Files         116      116           
  Lines        1907     1907           
  Branches      277      277           
=======================================
  Hits         1880     1880           
  Misses         14       14           
  Partials       13       13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ntucker ntucker merged commit fc00928 into master Sep 18, 2023
@ntucker ntucker deleted the umd-fix branch September 18, 2023 20:26
@github-actions github-actions bot mentioned this pull request Sep 18, 2023
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