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(repo): Fix turborepo globalDependencies #1922

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/empty-terms-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
use-turbo-cache: 'true'
- name: Run lint
run: npm run lint
run: npm run lint -- --output-logs=errors-only -- --quiet

unit-tests:
name: Run unit tests
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"test:integration:generic": "E2E_APP_ID=react.vite.* npm run test:integration:base -- --grep @generic",
"test:integration:nextjs": "E2E_APP_ID=next.appRouter.withEmailCodes npm run test:integration:base -- --grep \"@generic|@nextjs\"",
"test:integration:remix": "echo 'placeholder'",
"turbo:clean": "turbo daemon clean",
"update:lockfile": "npm run nuke && npm install -D --arch=x64 --platform=linux turbo && npm install -D --arch=arm64 --platform=darwin turbo",
"version": "changeset version && ./scripts/version-info.sh",
"version:snapshot": "./scripts/snapshot.mjs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const InviteMembersPage = withCardStateProvider(() => {
const reachedOrganizationMemberLimit =
!!__unstable_manageBillingMembersLimit &&
runIfFunctionOrReturn(__unstable_manageBillingMembersLimit) <=
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
organization.pendingInvitationsCount + organization.membersCount;

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export const MembershipWidget = () => {
return null;
}

// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
const totalCount = organization?.membersCount + organization?.pendingInvitationsCount;

return (
<Flex
sx={theme => ({
Expand Down Expand Up @@ -57,7 +60,7 @@ export const MembershipWidget = () => {
color: t.colors.$blackAlpha600,
})}
>
{organization?.membersCount + organization?.pendingInvitationsCount} of{' '}
{totalCount} of{' '}
{__unstable_manageBillingMembersLimit
? `${runIfFunctionOrReturn(__unstable_manageBillingMembersLimit)} members`
: 'unlimited'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const ProfileSettingsPage = withCardStateProvider(() => {
const dataChanged = organization.name !== nameField.value || organization.slug !== slugField.value;
const canSubmit = (dataChanged || avatarChanged) && !slugField.errorText;

// eslint-disable-next-line @typescript-eslint/require-await
const onSubmit = async (e: React.FormEvent) => {
e.preventDefault();
return (dataChanged ? organization.update({ name: nameField.value, slug: slugField.value }) : Promise.resolve())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const NotificationCountBadgeSwitcherTrigger = withGate(
});

const notificationCount =
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
(userInvitations.count || 0) + (userSuggestions.count || 0) + (membershipRequests?.count || 0);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const AddConnectedAccount = () => {
const isModal = mode === 'modal';

const enabledStrategies = strategies.filter(s => s.startsWith('oauth')) as OAuthStrategy[];
const connectedStrategies = user.verifiedExternalAccounts.map(a => 'oauth_' + a.provider) as OAuthStrategy[];
const connectedStrategies = user.verifiedExternalAccounts.map(a => `oauth_${a.provider}`) as OAuthStrategy[];

const unconnectedStrategies = enabledStrategies.filter(provider => {
return !connectedStrategies.includes(provider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const EmailPage = withCardStateProvider(() => {

const canSubmit = emailField.value.length > 1 && user.username !== emailField.value;

// eslint-disable-next-line @typescript-eslint/require-await
const addEmail = async (e: React.FormEvent) => {
e.preventDefault();
return user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const AddPhone = (props: AddPhoneProps) => {

const canSubmit = phoneField.value.length > 1 && user.username !== phoneField.value;

// eslint-disable-next-line @typescript-eslint/require-await
const addPhone = async (e: React.FormEvent) => {
e.preventDefault();
return user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const ProfilePage = withCardStateProvider(() => {

const nameEditDisabled = user.samlAccounts.some(sa => sa.active);

// eslint-disable-next-line @typescript-eslint/require-await
const onSubmit = async (e: React.FormEvent) => {
e.preventDefault();

Expand Down
8 changes: 7 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"signature": true
},
"globalDependencies": [
".*",
".changeset/changelog.js",
".changeset/config.json",
".dockerignore",
".github/**",
".jit",
".nvmrc",
".prettier*",
"jest.*.ts",
"packages/eslint-config-custom/index.js",
"package.json",
Expand Down
Loading