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

chore: upgrade dependencies #80

Merged
merged 5 commits into from
Dec 5, 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
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
"postinstall": "husky install"
},
"devDependencies": {
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@tophat/conventional-changelog-config": "^1.0.1",
"@types/eslint": "^8.21.0",
"@types/prettier": "^2.7.2",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
"eslint": "^8.33.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-prettier": "^4.2.1",
"@types/eslint": "^8.44.8",
"@types/prettier": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.0.1",
"husky": "^8.0.3",
"lint-staged": "^13.1.0",
"monodeploy": "3.6.0",
"prettier": "^2.8.3",
"typescript": "4.9.5"
"lint-staged": "^15.2.0",
"monodeploy": "5.0.1",
"prettier": "^3.1.0",
"typescript": "5.3.2"
},
"dependenciesMeta": {
"@playwright/test": {
Expand Down
2 changes: 1 addition & 1 deletion packages/example-vue/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
16 changes: 8 additions & 8 deletions packages/example-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
"install:browsers": "yarn playwright install"
},
"dependencies": {
"axios": "^1.3.2",
"vue": "^3.2.45"
"axios": "^1.6.2",
"vue": "^3.3.10"
},
"devDependencies": {
"@playwright/test": "^1.30.0",
"@vitejs/plugin-vue": "^4.5.0",
"msw": "2.0.8",
"@playwright/test": "^1.40.1",
"@vitejs/plugin-vue": "^4.5.1",
"msw": "2.0.10",
"playwright-msw": "workspace:*",
"typescript": "4.9.5",
"vite": "4.1.1",
"vue-tsc": "1.0.24"
"typescript": "5.3.2",
"vite": "5.0.5",
"vue-tsc": "1.8.24"
},
"msw": {
"workerDirectory": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/example-vue/src/mocks/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export const testHandlers = [
{ name: 'Ron' },
{ name: 'Hermione' },
]);
}
},
),
];
2 changes: 1 addition & 1 deletion packages/example-vue/test/specs/http.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test.describe.parallel('HTTP', () => {
http.get('/api/users', async () => {
await delay(250);
return HttpResponse.json([{ name: 'Custom User' }]);
})
}),
);
await page.goto('/users');
await expect(page.locator('text="Custom User"')).toBeVisible();
Expand Down
2 changes: 1 addition & 1 deletion packages/example/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
17 changes: 6 additions & 11 deletions packages/example/mockServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/* tslint:disable */

/**
* Mock Service Worker (2.0.8).
* Mock Service Worker (2.0.10).
* @see https://github.com/mswjs/msw
* - Please do NOT modify this file.
* - Please do NOT serve this file on production.
*/

const INTEGRITY_CHECKSUM = '0877fcdc026242810f5bfde0d7178db4';
const INTEGRITY_CHECKSUM = 'c5f7f8e188b673ea4e677df7ea3c5a39';
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse');
const activeClientIds = new Set();

Expand Down Expand Up @@ -121,11 +121,6 @@ async function handleRequest(event, requestId) {
if (client && activeClientIds.has(client.id)) {
(async function () {
const responseClone = response.clone();
// When performing original requests, response body will
// always be a ReadableStream, even for 204 responses.
// But when creating a new Response instance on the client,
// the body for a 204 response must be null.
const responseBody = response.status === 204 ? null : responseClone.body;

sendToClient(
client,
Expand All @@ -137,11 +132,11 @@ async function handleRequest(event, requestId) {
type: responseClone.type,
status: responseClone.status,
statusText: responseClone.statusText,
body: responseBody,
body: responseClone.body,
headers: Object.fromEntries(responseClone.headers.entries()),
},
},
[responseBody]
[responseClone.body],
);
})();
}
Expand Down Expand Up @@ -237,7 +232,7 @@ async function getResponse(event, client, requestId) {
keepalive: request.keepalive,
},
},
[requestBuffer]
[requestBuffer],
);

switch (clientMessage.type) {
Expand Down Expand Up @@ -267,7 +262,7 @@ function sendToClient(client, message, transferrables = []) {

client.postMessage(
message,
[channel.port2].concat(transferrables.filter(Boolean))
[channel.port2].concat(transferrables.filter(Boolean)),
);
});
}
Expand Down
21 changes: 11 additions & 10 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,24 @@
"install:browsers": "yarn playwright install"
},
"dependencies": {
"@apollo/client": "^3.8.7",
"@apollo/client": "^3.8.8",
"buffer": "^6.0.3",
"graphql": "^16.8.1",
"msw": "2.0.8",
"msw": "2.0.10",
"playwright": "^1.40.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-query": "^3.39.3",
"react-router-dom": "^6.19.0"
"react-router-dom": "^6.20.1"
},
"devDependencies": {
"@playwright/test": "^1.30.0",
"@types/node": "^18.18.9",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@vitejs/plugin-react": "^4.2.0",
"@playwright/test": "^1.40.1",
"@types/node": "^20.10.3",
"@types/react": "^18.2.42",
"@types/react-dom": "^18.2.17",
"@vitejs/plugin-react": "^4.2.1",
"playwright-msw": "workspace:*",
"typescript": "4.9.5",
"vite": "^5.0.0"
"typescript": "5.3.2",
"vite": "^5.0.5"
}
}
4 changes: 2 additions & 2 deletions packages/example/src/components/documents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const DocumentsList: FC<{ slug: string }> = ({ slug }) => {
const response = await fetch(`/api/documents/${slug}`);
return await response.json();
},
{ retry: false, enabled: !!slug }
{ retry: false, enabled: !!slug },
);

if (status === 'loading' || status === 'idle') {
Expand All @@ -37,7 +37,7 @@ export const Documents: FC = () => {
(event: ChangeEvent<HTMLSelectElement>) => {
navigate(`/documents/${event.currentTarget.value}`);
},
[]
[],
);
return (
<div>
Expand Down
10 changes: 5 additions & 5 deletions packages/example/src/components/login-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const useSessionQuery = () => {
session: response.status === 200 ? await response.json() : null,
};
},
{ retry: false, refetchOnWindowFocus: false, refetchOnMount: false }
{ retry: false, refetchOnWindowFocus: false, refetchOnMount: false },
);
};

Expand All @@ -57,7 +57,7 @@ const useLoginMutation = () => {

return response.json();
},
{ retry: false }
{ retry: false },
);
};

Expand All @@ -73,7 +73,7 @@ const useLogoutMutation = () => {
throw new Error('Failed to logout');
}
},
{ retry: false }
{ retry: false },
);
};

Expand All @@ -88,10 +88,10 @@ export const LoginForm: FC = () => {
getLoginFormValues(event.target as HTMLFormElement),
{
onSuccess: () => sessionQuery.refetch(),
}
},
);
},
[loginMutation.mutate]
[loginMutation.mutate],
);

const handleLogoutButtonPress = useCallback(() => {
Expand Down
6 changes: 3 additions & 3 deletions packages/example/src/components/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const SearchResults: FC<{
refetchOnWindowFocus: false,
refetchOnMount: false,
enabled: !!searchParams.get('q'),
}
},
);
switch (searchQuery.status) {
case 'idle':
Expand Down Expand Up @@ -49,7 +49,7 @@ export const Search: FC = () => {
(event: ChangeEvent<HTMLSelectElement>) => {
setEndpoint(event.currentTarget.value);
},
[]
[],
);
const handleFormChange = useCallback(
(event: FormEvent<HTMLFormElement>) => {
Expand All @@ -63,7 +63,7 @@ export const Search: FC = () => {
});
setSearchParams(newSearchParams);
},
[setSearchParams]
[setSearchParams],
);
return (
<div>
Expand Down
2 changes: 1 addition & 1 deletion packages/example/src/components/user-profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const UserProfile: FC<UserProfileProps> = () => {
const response = await fetch(`/api/users/${userId}`);
return await response.json();
},
{ retry: false }
{ retry: false },
);

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/example/src/components/users-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const UsersList: FC<UsersListProps> = () => {
const response = await fetch('/api/users');
return await response.json();
},
{ retry: false }
{ retry: false },
);

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/example/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void prepare().then(() => {
createRoot(rootElement).render(
<React.StrictMode>
<App />
</React.StrictMode>
</React.StrictMode>,
);
}
});
6 changes: 3 additions & 3 deletions packages/example/src/mocks/handlers/documents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default [
title: 'march.pdf',
},
]);
}
},
),
http.get<GetDocumentsParams, GetDocumentsResponse>(
'/api/documents/:slug',
Expand All @@ -33,8 +33,8 @@ export default [
new Array(3).fill(null).map((_, index) => ({
id: `${params.slug}-${index + 1}`,
title: `${params.slug}-document-${index + 1}.pdf`,
}))
})),
);
}
},
),
];
2 changes: 1 addition & 1 deletion packages/example/src/mocks/handlers/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default [
const searchResults =
q && q.length > 0
? items.filter(({ title }) =>
title.toLocaleLowerCase().includes(q.toLocaleLowerCase())
title.toLocaleLowerCase().includes(q.toLocaleLowerCase()),
)
: items;

Expand Down
10 changes: 5 additions & 5 deletions packages/example/src/mocks/handlers/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ const encodeSessionCookie = (username: string, password: string) =>
Buffer.from(`${username}:${password}`).toString('base64');

const decodeSessionCookie = (
cookie: string
cookie: string,
): { username: string; password: string } => {
const [username, password] = Buffer.from(
(cookie ?? '').split(',')[0],
'base64'
'base64',
)
.toString()
.split(':');
Expand Down Expand Up @@ -54,7 +54,7 @@ export default [
: HttpResponse.json(null, {
status: 401,
});
}
},
),
http.post<PostSessionRequestBody, PostSessionResponse>(
'/api/session',
Expand All @@ -68,7 +68,7 @@ export default [
headers: {
'Set-Cookie': `${SESSION_COOKIE_KEY}=${encodeSessionCookie(
username,
password
password,
)}`,
},
});
Expand All @@ -77,7 +77,7 @@ export default [
return HttpResponse.json(null, {
status: 401,
});
}
},
),
http.delete('/api/session', async ({ cookies }) => {
const sessionCookie = cookies[SESSION_COOKIE_KEY];
Expand Down
4 changes: 2 additions & 2 deletions packages/example/src/mocks/handlers/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export default [
data: {
settings: DEFAULT_SETTINGS,
},
})
}),
),
graphql.mutation<SettingsMutationData, SettingsMutationVariables>(
'MutateSettings',
({ variables }) =>
HttpResponse.json({
data: { mutateSettings: { ...DEFAULT_SETTINGS, ...variables } },
})
}),
),
];
Loading
Loading