prismicio / prismic-react

React components and hooks to fetch and present Prismic content
https://prismic.io/docs/technologies/homepage-reactjs
Apache License 2.0
153 stars 40 forks source link

refactor: remove `__PRODUCTION__` and `invariant`; add tests for `development` environment #180

Closed angeloashmore closed 11 months ago

angeloashmore commented 11 months ago

Types of changes

Description

This PR refactors the codebase by:

Checklist:

codecov-commenter commented 11 months ago

Codecov Report

Merging #180 (2da0d38) into master (aac1cc7) will increase coverage by 0.19%. The diff coverage is 88.23%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #180      +/-   ##
==========================================
+ Coverage   99.24%   99.44%   +0.19%     
==========================================
  Files          21       20       -1     
  Lines        2388     2332      -56     
  Branches      129      126       -3     
==========================================
- Hits         2370     2319      -51     
+ Misses         18       13       -5     
Impacted Files Coverage Δ
src/lib/processPolyfill.ts 25.00% <25.00%> (ø)
src/SliceZone.tsx 98.57% <95.00%> (+0.96%) :arrow_up:
src/PrismicImage.tsx 100.00% <100.00%> (ø)
src/index.ts 100.00% <100.00%> (ø)
src/react-server/PrismicLink.tsx 100.00% <100.00%> (ø)
src/usePrismicClient.ts 100.00% <100.00%> (ø)
github-actions[bot] commented 11 months ago

size-limit report 📦

Path Size
./dist/index.cjs 6.97 KB (-9.85% 🔽)
./dist/index.js 4.59 KB (-13.39% 🔽)
./dist/react-server.cjs 6.16 KB (-9.99% 🔽)
./dist/react-server.js 4.14 KB (-13.75% 🔽)