Skip to content
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
76 changes: 17 additions & 59 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

3 changes: 0 additions & 3 deletions .yarn/cache/fetch-blob-npm-3.2.0-28e01becfc-5264ecceb5.zip

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions .yarn/cache/node-fetch-npm-3.3.2-5267e015f2-24207ca8c8.zip

This file was deleted.

3 changes: 3 additions & 0 deletions .yarn/cache/typescript-npm-6.0.3-585eecd158-0ef2357a4c.zip
Git LFS file not shown
3 changes: 3 additions & 0 deletions .yarn/cache/typescript-patch-bfb0cdd3b9-22b67a18da.zip
Git LFS file not shown
2 changes: 1 addition & 1 deletion .yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "5.6.3-sdk",
"version": "6.0.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs",
"bin": {
Expand Down
1 change: 1 addition & 0 deletions app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ declare module '*.graphql' {
export = value;
}

declare module '*.css';
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[Medium] With the new `tsconfig.json` `types: ["node", "jest", "@testing-library/jest-dom"]` narrowing, ambient `google.maps` types resolve only because `@googlemaps/js-api-loader` carries a transitive `/// `. Any future upgrade of that package that drops the reference will silently lose those ambient types. Recommend adding an explicit reference here so the chain isn't load-bearing on a transitive dep's internals:
/// <reference types="google.maps" />
declare module '*.graphql' { ... }
declare module '*.css';
declare module '*.svg';

Comment thread
canac marked this conversation as resolved.
declare module '*.svg';
13 changes: 13 additions & 0 deletions i18next.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Narrow react-i18next's `t()` return type to `string`. Without this,
// TFunction's TDefaultResult widens to `TFunctionResult | ReactNode`,
// which doesn't satisfy MUI props like `aria-label: string | undefined`.
//
// Remove this file once i18next is upgraded to v22+ and react-i18next to v12+,
// where `t()` returns `string` by default and this workaround is unnecessary.
import 'react-i18next';

declare module 'react-i18next' {
interface Resources {
translation: Record<string, string>;
}
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"next-auth": "^4.24.11",
"next-optimized-images": "^2.6.2",
"next-pwa": "^5.6.0",
"node-fetch": "^3.3.2",
"notistack": "^2.0.5",
"prop-types": "^15.8.1",
"react": "^18.2.0",
Expand Down Expand Up @@ -141,7 +140,7 @@
"prettier": "^3.6.2",
"puppeteer": "24.4.0",
"ts-essentials": "^9.3.0",
"typescript": "~5.6.3",
"typescript": "~6.0.0",
Comment thread
canac marked this conversation as resolved.
"url-loader": "^4.1.1",
"webpack": "^5.96.1"
},
Expand Down
2 changes: 0 additions & 2 deletions pages/acceptInvite.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import { render, waitFor } from '@testing-library/react';
import { SnackbarProvider } from 'notistack';
import TestRouter from '__tests__/util/TestRouter';
import AcceptInvitePage from './acceptInvite.page';
import 'node-fetch';

jest.mock('node-fetch', () => jest.fn());
jest.mock('src/hooks/useAccountListId');
const mockPush = jest.fn();
const dashboardLink = '/accountLists/_/';
Expand Down
3 changes: 1 addition & 2 deletions pages/api/auth/[...nextauth].page.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NextApiRequest, NextApiResponse } from 'next';
import NextAuth, { NextAuthOptions } from 'next-auth';
import { Provider } from 'next-auth/providers';
import OktaProvider from 'next-auth/providers/okta';
import rollbar, { isRollBarEnabled } from 'pages/api/utils/rollBar';
import {
Expand Down Expand Up @@ -95,7 +94,7 @@ if (
);
}

const providersArray: Provider[] = [];
const providersArray: NextAuthOptions['providers'] = [];

if (AUTH_PROVIDER === 'OKTA') {
providersArray.push(
Expand Down
1 change: 0 additions & 1 deletion pages/api/auth/impersonate/impersonateHelper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NextApiRequest } from 'next';
import { getToken } from 'next-auth/jwt';
import fetch from 'node-fetch';
import { getErrorMessage } from 'src/lib/getErrorFromCatch';
import { cookieDefaultInfo } from '../../utils/cookies';
import { signValue } from '../helpers';
Expand Down
1 change: 0 additions & 1 deletion pages/api/csv-update.page.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { NextApiRequest, NextApiResponse } from 'next';
import formidable, { IncomingForm } from 'formidable';
import { getToken } from 'next-auth/jwt';
import fetch from 'node-fetch';
import createPatch from 'src/lib/createPatch';
import { camelToSnakeObject } from 'src/lib/snakeToCamel';

Expand Down
5 changes: 2 additions & 3 deletions pages/api/uploads/csv-upload.page.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { readFile } from 'fs/promises';
import { openAsBlob } from 'node:fs';
import { NextApiRequest, NextApiResponse } from 'next';
import formidable, { IncomingForm } from 'formidable';
import { getToken } from 'next-auth/jwt';
import fetch, { File, FormData } from 'node-fetch';

export const config = {
api: {
Expand Down Expand Up @@ -54,7 +53,7 @@ const uploadFile = async (
}

const csvFile = new File(
[await readFile(file.filepath)],
[await openAsBlob(file.filepath)],
file.originalFilename ?? 'csvFile',
);

Expand Down
5 changes: 2 additions & 3 deletions pages/api/uploads/upload-person-avatar.page.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { readFile } from 'fs/promises';
import { openAsBlob } from 'node:fs';
import { NextApiRequest, NextApiResponse } from 'next';
import formidable, { IncomingForm } from 'formidable';
import { getToken } from 'next-auth/jwt';
import fetch, { File, FormData } from 'node-fetch';

export const config = {
api: {
Expand Down Expand Up @@ -59,7 +58,7 @@ const uploadPersonAvatar = async (

const pictureId = crypto.randomUUID();
const file = new File(
[await readFile(avatar.filepath)],
[await openAsBlob(avatar.filepath)],
avatar.originalFilename ?? 'avatar',
);

Expand Down
2 changes: 1 addition & 1 deletion src/components/Shared/MassActions/MassActionsDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const ActionsButton = styled(Button)(({ theme }) => ({

interface MassActionsDropdownProps {
handleClick: (event: React.MouseEvent<HTMLElement>) => void;
children: React.ReactElement;
children: React.ReactNode;
disabled?: boolean;
open: boolean;
}
Expand Down
14 changes: 10 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"compilerOptions": {
"baseUrl": ".",
"target": "esnext",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": ["dom", "esnext"],
"allowJs": true,
"checkJs": true,
"skipLibCheck": true,
Expand All @@ -12,14 +11,21 @@
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"noImplicitAny": false,
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
"jsx": "preserve",
"types": ["node", "jest", "@testing-library/jest-dom"],
"paths": {
"src/*": ["./src/*"],
"pages/*": ["./pages/*"],
"__tests__/*": ["./__tests__/*"]
}
},
"include": [
"app.d.ts",
"i18next.d.ts",
"next-env.d.ts",
"__tests__/jest.d.ts",
"**/*.ts",
Expand Down
Loading
Loading