javascript icon indicating copy to clipboard operation
javascript copied to clipboard

chore(clerk-js,clerk-react,types): Expose environment for better inter-package development

Open tmilewski opened this issue 1 year ago • 5 comments

Description

We're utilizing __unstable__environment a bunch in elements and the current state doesn't enforce type safety and requires us to override types in our own package.

The better facilitate inter-package development, I've made the following changes to Clerk and IsomorphicClerk:

  • __unstable__environment is now exposed, typed, marked as deprecated, and commented on about its internal state. (To be removed in a future release.)
  • __internal_environment is exposed with the appropriate typing and comments about its internal state.

Notes:

  • I left __unstable__environment for now, until it's worked out of both elements and the accounts repo.

Checklist

  • [x] npm test runs as expected.
  • [x] npm run build runs as expected.
  • [ ] (If applicable) JSDoc comments have been added or updated for any package exports
  • [ ] (If applicable) Documentation has been updated

Type of change

  • [ ] 🐛 Bug fix
  • [ ] 🌟 New feature
  • [ ] 🔨 Breaking change
  • [x] 📖 Refactoring / dependency upgrade / documentation
  • [ ] other:

Packages affected

  • [ ] @clerk/backend
  • [ ] @clerk/chrome-extension
  • [x] @clerk/clerk-js
  • [ ] @clerk/clerk-expo
  • [ ] @clerk/fastify
  • [ ] gatsby-plugin-clerk
  • [ ] @clerk/localizations
  • [ ] @clerk/nextjs
  • [x] @clerk/clerk-react
  • [ ] @clerk/remix
  • [ ] @clerk/clerk-sdk-node
  • [ ] @clerk/shared
  • [ ] @clerk/themes
  • [x] @clerk/types
  • [ ] build/tooling/chore

tmilewski avatar Jan 11 '24 19:01 tmilewski