-
Notifications
You must be signed in to change notification settings - Fork 940
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update setup checklists with latest js package version #1588
Conversation
The latest updates on your projects. Learn more about Vercel for Git 鈫楋笌 |
Thank you for following the naming conventions for pull request titles! 馃檹 |
apps/formbricks-com/app/docs/getting-started/framework-guides/page.mdxIt's good to see that you're updating the version of the Formbricks library. However, it's important to note that hardcoding the version number in multiple places can lead to inconsistencies and maintenance issues. Consider using a single source of truth for the version number, such as a configuration file or environment variable, and reference it in your code. This way, you only need to update the version number in one place. const formbricksVersion = "^1.1.4";
var t = document.createElement("script");
t.type = "text/javascript";
t.async = !0;
t.src = `https://unpkg.com/@formbricks/js@${formbricksVersion}/dist/index.umd.js`; apps/formbricks-com/components/home/SetupTabs.tsxHardcoding sensitive information like environmentId and apiHost can pose a security risk and limit flexibility. Consider using environment variables or a secure configuration file to store this information. This not only improves security but also makes your code more flexible. const environmentId = process.env.FORMBRICKS_ENV_ID;
const apiHost = process.env.FORMBRICKS_API_HOST;
formbricks.init({
environmentId: environmentId,
apiHost: apiHost,
}); |
!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://unpkg.com/@formbricks/js@^1.1.4/dist/index.umd.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),setTimeout(function(){window.formbricks.init({environmentId: "<your-environment-id>", apiHost: "<api-host>"})},500)}(); | ||
</script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace hardcoded version number with a variable reference to ensure consistency and ease of maintenance.
!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://unpkg.com/@formbricks/js@^1.1.4/dist/index.umd.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),setTimeout(function(){window.formbricks.init({environmentId: "<your-environment-id>", apiHost: "<api-host>"})},500)}(); | |
</script> | |
<script type="text/javascript"> | |
!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=`https://unpkg.com/@formbricks/js@${formbricksVersion}/dist/index.umd.js`;var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),setTimeout(function(){window.formbricks.init({environmentId: "<your-environment-id>", apiHost: "<api-host>"})},500)}(); | |
</script> |
thank you :-) |
What does this PR do?
Update js package version to 1.1.4 from 1.1.2
Type of change
Checklist
Required
pnpm build
console.logs
git pull origin main
Appreciated