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

feat(repo): Add Vite React Typescript playground app #1424

Merged

Conversation

anagstef
Copy link
Member

@anagstef anagstef commented Jun 27, 2023

Type of change

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

Packages affected

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

Description

  • npm test runs as expected.
  • npm run build runs as expected.

This PR adds a Clerk + Vite + React + TypeScript playground.
Also, it resolves the ReferenceError: global is not defined error on Vite + React projects.

@changeset-bot
Copy link

changeset-bot bot commented Jun 27, 2023

🦋 Changeset detected

Latest commit: e720398

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

This PR includes changesets to release 6 packages
Name Type
@clerk/clerk-react Minor
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
gatsby-plugin-clerk Patch
@clerk/nextjs Patch
@clerk/remix 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

@anagstef
Copy link
Member Author

!snapshot

@anagstef
Copy link
Member Author

!snapshot

Copy link

@jit-ci jit-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Great news! Jit hasn't found any security issues in your PR. Good Job! 🏆

@clerk-cookie
Copy link
Collaborator

Hey @anagstef - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 0.23.6-snapshot.73a3055
@clerk/chrome-extension 0.3.17-snapshot.73a3055
@clerk/clerk-js 4.51.0-snapshot.73a3055
eslint-config-custom 0.3.0
@clerk/clerk-expo 0.18.8-snapshot.73a3055
@clerk/fastify 0.5.5-snapshot.73a3055
gatsby-plugin-clerk 4.3.17-snapshot.73a3055
@clerk/localizations 1.22.0-snapshot.73a3055
@clerk/nextjs 4.21.11-snapshot.73a3055
@clerk/clerk-react 4.20.6-snapshot.73a3055
@clerk/remix 2.6.14-snapshot.73a3055
@clerk/clerk-sdk-node 4.10.13-snapshot.73a3055
@clerk/shared 0.20.0-snapshot.73a3055
@clerk/themes 1.7.5
@clerk/types 3.46.1-snapshot.73a3055

Tip: use the snippet copy button below to quickly install the required packages.

# @clerk/backend
npm i @clerk/backend@0.23.6-snapshot.73a3055
# @clerk/chrome-extension
npm i @clerk/chrome-extension@0.3.17-snapshot.73a3055
# @clerk/clerk-js
npm i @clerk/clerk-js@4.51.0-snapshot.73a3055
# eslint-config-custom
npm i eslint-config-custom@0.3.0
# @clerk/clerk-expo
npm i @clerk/clerk-expo@0.18.8-snapshot.73a3055
# @clerk/fastify
npm i @clerk/fastify@0.5.5-snapshot.73a3055
# gatsby-plugin-clerk
npm i gatsby-plugin-clerk@4.3.17-snapshot.73a3055
# @clerk/localizations
npm i @clerk/localizations@1.22.0-snapshot.73a3055
# @clerk/nextjs
npm i @clerk/nextjs@4.21.11-snapshot.73a3055
# @clerk/clerk-react
npm i @clerk/clerk-react@4.20.6-snapshot.73a3055
# @clerk/remix
npm i @clerk/remix@2.6.14-snapshot.73a3055
# @clerk/clerk-sdk-node
npm i @clerk/clerk-sdk-node@4.10.13-snapshot.73a3055
# @clerk/shared
npm i @clerk/shared@0.20.0-snapshot.73a3055
# @clerk/themes
npm i @clerk/themes@1.7.5
# @clerk/types
npm i @clerk/types@3.46.1-snapshot.73a3055

@anagstef
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @anagstef - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 0.23.6-snapshot.bae5a19
@clerk/chrome-extension 0.3.17-snapshot.bae5a19
@clerk/clerk-js 4.51.0-snapshot.bae5a19
eslint-config-custom 0.3.0
@clerk/clerk-expo 0.18.8-snapshot.bae5a19
@clerk/fastify 0.5.5-snapshot.bae5a19
gatsby-plugin-clerk 4.3.17-snapshot.bae5a19
@clerk/localizations 1.22.0-snapshot.bae5a19
@clerk/nextjs 4.21.11-snapshot.bae5a19
@clerk/clerk-react 4.20.6-snapshot.bae5a19
@clerk/remix 2.6.14-snapshot.bae5a19
@clerk/clerk-sdk-node 4.10.13-snapshot.bae5a19
@clerk/shared 0.20.0-snapshot.bae5a19
@clerk/themes 1.7.5
@clerk/types 3.46.1-snapshot.bae5a19

Tip: use the snippet copy button below to quickly install the required packages.

# @clerk/backend
npm i @clerk/backend@0.23.6-snapshot.bae5a19
# @clerk/chrome-extension
npm i @clerk/chrome-extension@0.3.17-snapshot.bae5a19
# @clerk/clerk-js
npm i @clerk/clerk-js@4.51.0-snapshot.bae5a19
# eslint-config-custom
npm i eslint-config-custom@0.3.0
# @clerk/clerk-expo
npm i @clerk/clerk-expo@0.18.8-snapshot.bae5a19
# @clerk/fastify
npm i @clerk/fastify@0.5.5-snapshot.bae5a19
# gatsby-plugin-clerk
npm i gatsby-plugin-clerk@4.3.17-snapshot.bae5a19
# @clerk/localizations
npm i @clerk/localizations@1.22.0-snapshot.bae5a19
# @clerk/nextjs
npm i @clerk/nextjs@4.21.11-snapshot.bae5a19
# @clerk/clerk-react
npm i @clerk/clerk-react@4.20.6-snapshot.bae5a19
# @clerk/remix
npm i @clerk/remix@2.6.14-snapshot.bae5a19
# @clerk/clerk-sdk-node
npm i @clerk/clerk-sdk-node@4.10.13-snapshot.bae5a19
# @clerk/shared
npm i @clerk/shared@0.20.0-snapshot.bae5a19
# @clerk/themes
npm i @clerk/themes@1.7.5
# @clerk/types
npm i @clerk/types@3.46.1-snapshot.bae5a19

@anagstef anagstef force-pushed the stefanos/js-498-global-undefined-clerk-react-with-vite branch from bae5a19 to c7c8096 Compare June 27, 2023 18:23
@anagstef
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @anagstef - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 0.23.6-snapshot.c7c8096
@clerk/chrome-extension 0.3.17-snapshot.c7c8096
@clerk/clerk-js 4.51.0-snapshot.c7c8096
eslint-config-custom 0.3.0
@clerk/clerk-expo 0.18.8-snapshot.c7c8096
@clerk/fastify 0.5.5-snapshot.c7c8096
gatsby-plugin-clerk 4.3.17-snapshot.c7c8096
@clerk/localizations 1.22.0-snapshot.c7c8096
@clerk/nextjs 4.21.11-snapshot.c7c8096
@clerk/clerk-react 4.20.6-snapshot.c7c8096
@clerk/remix 2.6.14-snapshot.c7c8096
@clerk/clerk-sdk-node 4.10.13-snapshot.c7c8096
@clerk/shared 0.20.0-snapshot.c7c8096
@clerk/themes 1.7.5
@clerk/types 3.46.1-snapshot.c7c8096

Tip: use the snippet copy button below to quickly install the required packages.

# @clerk/backend
npm i @clerk/backend@0.23.6-snapshot.c7c8096
# @clerk/chrome-extension
npm i @clerk/chrome-extension@0.3.17-snapshot.c7c8096
# @clerk/clerk-js
npm i @clerk/clerk-js@4.51.0-snapshot.c7c8096
# eslint-config-custom
npm i eslint-config-custom@0.3.0
# @clerk/clerk-expo
npm i @clerk/clerk-expo@0.18.8-snapshot.c7c8096
# @clerk/fastify
npm i @clerk/fastify@0.5.5-snapshot.c7c8096
# gatsby-plugin-clerk
npm i gatsby-plugin-clerk@4.3.17-snapshot.c7c8096
# @clerk/localizations
npm i @clerk/localizations@1.22.0-snapshot.c7c8096
# @clerk/nextjs
npm i @clerk/nextjs@4.21.11-snapshot.c7c8096
# @clerk/clerk-react
npm i @clerk/clerk-react@4.20.6-snapshot.c7c8096
# @clerk/remix
npm i @clerk/remix@2.6.14-snapshot.c7c8096
# @clerk/clerk-sdk-node
npm i @clerk/clerk-sdk-node@4.10.13-snapshot.c7c8096
# @clerk/shared
npm i @clerk/shared@0.20.0-snapshot.c7c8096
# @clerk/themes
npm i @clerk/themes@1.7.5
# @clerk/types
npm i @clerk/types@3.46.1-snapshot.c7c8096

@anagstef
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @anagstef - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 0.23.6-snapshot.1819c97
@clerk/chrome-extension 0.3.17-snapshot.1819c97
@clerk/clerk-js 4.51.0-snapshot.1819c97
eslint-config-custom 0.3.0
@clerk/clerk-expo 0.18.8-snapshot.1819c97
@clerk/fastify 0.5.5-snapshot.1819c97
gatsby-plugin-clerk 4.3.17-snapshot.1819c97
@clerk/localizations 1.22.0-snapshot.1819c97
@clerk/nextjs 4.21.11-snapshot.1819c97
@clerk/clerk-react 4.20.6-snapshot.1819c97
@clerk/remix 2.6.14-snapshot.1819c97
@clerk/clerk-sdk-node 4.10.13-snapshot.1819c97
@clerk/shared 0.20.0-snapshot.1819c97
@clerk/themes 1.7.5
@clerk/types 3.46.1-snapshot.1819c97

Tip: use the snippet copy button below to quickly install the required packages.

# @clerk/backend
npm i @clerk/backend@0.23.6-snapshot.1819c97
# @clerk/chrome-extension
npm i @clerk/chrome-extension@0.3.17-snapshot.1819c97
# @clerk/clerk-js
npm i @clerk/clerk-js@4.51.0-snapshot.1819c97
# eslint-config-custom
npm i eslint-config-custom@0.3.0
# @clerk/clerk-expo
npm i @clerk/clerk-expo@0.18.8-snapshot.1819c97
# @clerk/fastify
npm i @clerk/fastify@0.5.5-snapshot.1819c97
# gatsby-plugin-clerk
npm i gatsby-plugin-clerk@4.3.17-snapshot.1819c97
# @clerk/localizations
npm i @clerk/localizations@1.22.0-snapshot.1819c97
# @clerk/nextjs
npm i @clerk/nextjs@4.21.11-snapshot.1819c97
# @clerk/clerk-react
npm i @clerk/clerk-react@4.20.6-snapshot.1819c97
# @clerk/remix
npm i @clerk/remix@2.6.14-snapshot.1819c97
# @clerk/clerk-sdk-node
npm i @clerk/clerk-sdk-node@4.10.13-snapshot.1819c97
# @clerk/shared
npm i @clerk/shared@0.20.0-snapshot.1819c97
# @clerk/themes
npm i @clerk/themes@1.7.5
# @clerk/types
npm i @clerk/types@3.46.1-snapshot.1819c97

@anagstef
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @anagstef - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 0.23.6-snapshot.c9a29e3
@clerk/chrome-extension 0.3.17-snapshot.c9a29e3
@clerk/clerk-js 4.51.0-snapshot.c9a29e3
eslint-config-custom 0.3.0
@clerk/clerk-expo 0.18.8-snapshot.c9a29e3
@clerk/fastify 0.5.5-snapshot.c9a29e3
gatsby-plugin-clerk 4.3.17-snapshot.c9a29e3
@clerk/localizations 1.22.0-snapshot.c9a29e3
@clerk/nextjs 4.21.11-snapshot.c9a29e3
@clerk/clerk-react 4.20.6-snapshot.c9a29e3
@clerk/remix 2.6.14-snapshot.c9a29e3
@clerk/clerk-sdk-node 4.10.13-snapshot.c9a29e3
@clerk/shared 0.20.0-snapshot.c9a29e3
@clerk/themes 1.7.5
@clerk/types 3.46.1-snapshot.c9a29e3

Tip: use the snippet copy button below to quickly install the required packages.

# @clerk/backend
npm i @clerk/backend@0.23.6-snapshot.c9a29e3
# @clerk/chrome-extension
npm i @clerk/chrome-extension@0.3.17-snapshot.c9a29e3
# @clerk/clerk-js
npm i @clerk/clerk-js@4.51.0-snapshot.c9a29e3
# eslint-config-custom
npm i eslint-config-custom@0.3.0
# @clerk/clerk-expo
npm i @clerk/clerk-expo@0.18.8-snapshot.c9a29e3
# @clerk/fastify
npm i @clerk/fastify@0.5.5-snapshot.c9a29e3
# gatsby-plugin-clerk
npm i gatsby-plugin-clerk@4.3.17-snapshot.c9a29e3
# @clerk/localizations
npm i @clerk/localizations@1.22.0-snapshot.c9a29e3
# @clerk/nextjs
npm i @clerk/nextjs@4.21.11-snapshot.c9a29e3
# @clerk/clerk-react
npm i @clerk/clerk-react@4.20.6-snapshot.c9a29e3
# @clerk/remix
npm i @clerk/remix@2.6.14-snapshot.c9a29e3
# @clerk/clerk-sdk-node
npm i @clerk/clerk-sdk-node@4.10.13-snapshot.c9a29e3
# @clerk/shared
npm i @clerk/shared@0.20.0-snapshot.c9a29e3
# @clerk/themes
npm i @clerk/themes@1.7.5
# @clerk/types
npm i @clerk/types@3.46.1-snapshot.c9a29e3

Co-Authored-By: Nikos Douvlis <nikosdouvlis@gmail.com>
@anagstef anagstef force-pushed the stefanos/js-498-global-undefined-clerk-react-with-vite branch from c9a29e3 to 0967435 Compare June 28, 2023 08:55
@anagstef anagstef marked this pull request as ready for review June 28, 2023 08:59
@anagstef anagstef requested a review from dimkl June 28, 2023 09:00
playground/vite-react-ts/src/App.tsx Outdated Show resolved Hide resolved
playground/vite-react-ts/src/App.tsx Outdated Show resolved Hide resolved
Copy link
Member

@nikosdouvlis nikosdouvlis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@nikosdouvlis nikosdouvlis merged commit 1e71b60 into main Jun 28, 2023
@nikosdouvlis nikosdouvlis deleted the stefanos/js-498-global-undefined-clerk-react-with-vite branch June 28, 2023 09:29
mikestopcontinues pushed a commit to mikestopcontinues/clerk-javascript that referenced this pull request Jun 28, 2023
* feat(repo): Add Vite React Typescript playground app

* fix(clerk-react): Correctly polyfill window.global for vite prod builds

Co-Authored-By: Nikos Douvlis <nikosdouvlis@gmail.com>

* chore(clerk-react): Add changeset

* fix(repo): Remove the env var check from React Vite playground

---------

Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>
@clerk-cookie
Copy link
Collaborator

This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@clerk clerk locked as resolved and limited conversation to collaborators Jun 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants