Skip to content

Commit

Permalink
Merge pull request #260 from nekochans/feature/issue259/upgrade-npm-p…
Browse files Browse the repository at this point in the history
…ackages

npm packageを最新安定版に更新
  • Loading branch information
keitakn authored Aug 23, 2023
2 parents a4c2099 + 59c5727 commit e2be5c7
Show file tree
Hide file tree
Showing 30 changed files with 4,715 additions and 5,951 deletions.
10,435 changes: 4,604 additions & 5,831 deletions package-lock.json

Large diffs are not rendered by default.

74 changes: 37 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,62 +24,62 @@
"chromatic": "chromatic --project-token=$CHROMATIC_PROJECT_TOKEN"
},
"dependencies": {
"@nekochans/lgtm-cat-ui": "^3.0.0",
"@sentry/nextjs": "^7.44.2",
"@nekochans/lgtm-cat-ui": "^3.0.1",
"@sentry/nextjs": "^7.64.0",
"lodash.throttle": "^4.1.1",
"next": "^13.2.4",
"next": "^13.4.19",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^8.0.6",
"react-markdown": "^8.0.7",
"ress": "^5.0.2"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.2.3",
"@storybook/addon-interactions": "^7.2.3",
"@storybook/addon-links": "^7.2.3",
"@storybook/addon-essentials": "^7.3.2",
"@storybook/addon-interactions": "^7.3.2",
"@storybook/addon-links": "^7.3.2",
"@storybook/addon-onboarding": "^1.0.8",
"@storybook/blocks": "^7.2.3",
"@storybook/nextjs": "^7.2.3",
"@storybook/react": "^7.2.3",
"@storybook/blocks": "^7.3.2",
"@storybook/nextjs": "^7.3.2",
"@storybook/react": "^7.3.2",
"@storybook/testing-library": "^0.2.0",
"@testing-library/react": "^14.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@types/eslint": "^8.21.3",
"@types/jest": "^29.5.0",
"@types/eslint": "^8.44.2",
"@types/jest": "^29.5.4",
"@types/lodash.throttle": "^4.1.7",
"@types/prettier": "^2.7.2",
"@types/react": "18.0.28",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"chromatic": "^6.17.2",
"eslint": "^8.36.0",
"eslint-config-next": "^13.2.4",
"eslint-config-prettier": "^8.8.0",
"eslint-config-standard-with-typescript": "^34.0.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"@types/prettier": "^2.7.3",
"@types/react": "18.2.21",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"chromatic": "^6.23.0",
"eslint": "^8.47.0",
"eslint-config-next": "^13.4.19",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard-with-typescript": "^38.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-n": "^16.0.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-storybook": "^0.6.11",
"happy-css-modules": "^2.1.1",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"msw": "^1.2.0",
"eslint-plugin-storybook": "^0.6.13",
"happy-css-modules": "^2.1.2",
"jest": "^29.6.3",
"jest-environment-jsdom": "^29.6.3",
"msw": "^1.2.3",
"msw-storybook-addon": "^1.8.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.21",
"prettier": "^2.8.6",
"storybook": "^7.2.3",
"stylelint": "^15.6.2",
"postcss": "^8.4.28",
"prettier": "^3.0.2",
"storybook": "^7.3.2",
"stylelint": "^15.10.3",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recess-order": "^4.0.0",
"stylelint-config-standard": "^33.0.0",
"stylelint-config-recess-order": "^4.3.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-order": "^6.0.3",
"ts-jest": "^29.0.5",
"ts-jest": "^29.1.1",
"typescript": "5.1.6",
"whatwg-fetch": "^3.6.2"
"whatwg-fetch": "^3.6.17"
},
"msw": {
"workerDirectory": "public"
Expand Down
2 changes: 1 addition & 1 deletion public/mockServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* tslint:disable */

/**
* Mock Service Worker (1.2.0).
* Mock Service Worker (1.2.3).
* @see https://github.com/mswjs/msw
* - Please do NOT modify this file.
* - Please do NOT serve this file on production.
Expand Down
12 changes: 6 additions & 6 deletions src/api/fetch/lgtmImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type FetchImageResponseBody = {

// eslint-disable-next-line max-statements
const isFetchImageResponseBody = (
value: unknown
value: unknown,
): value is FetchImageResponseBody => {
if (Object.prototype.toString.call(value) !== '[object Object]') {
return false;
Expand Down Expand Up @@ -120,7 +120,7 @@ export const isAcceptableCatImage: IsAcceptableCatImage = async (dto) => {
if (response.status !== httpStatusCode.ok) {
if (response.status === httpStatusCode.payloadTooLarge) {
return createFailureResult<UploadCatImageSizeTooLargeError>(
new UploadCatImageSizeTooLargeError()
new UploadCatImageSizeTooLargeError(),
);
}

Expand All @@ -133,7 +133,7 @@ export const isAcceptableCatImage: IsAcceptableCatImage = async (dto) => {
(await response.json()) as IsAcceptableCatImageResponse;

return createSuccessResult<IsAcceptableCatImageResponse>(
isAcceptableCatImageResponse
isAcceptableCatImageResponse,
);
};

Expand All @@ -142,7 +142,7 @@ type UploadCatImageResponseBody = {
};

const isUploadCatImageResponseBody = (
value: unknown
value: unknown,
): value is UploadCatImageResponseBody => {
if (Object.prototype.toString.call(value) !== '[object Object]') {
return false;
Expand Down Expand Up @@ -176,11 +176,11 @@ export const uploadCatImage: UploadCatImage = async (dto) => {
switch (response.status) {
case httpStatusCode.payloadTooLarge:
return createFailureResult<UploadCatImageSizeTooLargeError>(
new UploadCatImageSizeTooLargeError()
new UploadCatImageSizeTooLargeError(),
);
case httpStatusCode.unprocessableEntity:
return createFailureResult<UploadCatImageValidationError>(
new UploadCatImageValidationError()
new UploadCatImageValidationError(),
);
default:
mightSetRequestIdToSentry(response);
Expand Down
1 change: 0 additions & 1 deletion src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './httpStatusCode';
export * from './secret';
8 changes: 0 additions & 8 deletions src/constants/secret.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/features/lgtmImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type IsAcceptableCatImageResponse = {
};

export type IsAcceptableCatImage = (
dto: IsAcceptableCatImageDto
dto: IsAcceptableCatImageDto,
) => Promise<
Result<IsAcceptableCatImageResponse, UploadCatImageSizeTooLargeError>
>;
Expand All @@ -53,7 +53,7 @@ type UploadedImage = {
export type UploadCatImageDto = IsAcceptableCatImageDto;

export type UploadCatImage = (
request: UploadCatImageDto
request: UploadCatImageDto,
) => Promise<
Result<
UploadedImage,
Expand Down
4 changes: 2 additions & 2 deletions src/features/result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const createFailureResult = <E>(value: E): FailureResult<E> => ({
});

export const isSuccessResult = <T>(
result: Result<unknown, unknown>
result: Result<unknown, unknown>,
): result is SuccessResult<T> => {
if ('_' in result) {
return result._ === SuccessMarker;
Expand All @@ -28,7 +28,7 @@ export const isSuccessResult = <T>(
};

export const isFailureResult = <T>(
result: Result<unknown, unknown>
result: Result<unknown, unknown>,
): result is FailureResult<T> => {
if ('_' in result) {
return result._ === FailureMarker;
Expand Down
14 changes: 7 additions & 7 deletions src/hooks/__tests__/useCatImageUploader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('useCatImageUploader TestCases', () => {
const imageUploadResult = await imageUploader(image, imageExtension);

expect(imageUploadResult.value).toStrictEqual(expected);
}
},
);

it.each`
Expand All @@ -82,13 +82,13 @@ describe('useCatImageUploader TestCases', () => {
const { imageUploader } = useCatImageUploader(language);

mockServer.use(
rest.post(uploadCatImageUrl(), mockUploadCatImagePayloadTooLarge)
rest.post(uploadCatImageUrl(), mockUploadCatImagePayloadTooLarge),
);

const imageUploadResult = await imageUploader(image, imageExtension);

expect(imageUploadResult.value).toStrictEqual(expected);
}
},
);

it.each`
Expand All @@ -101,13 +101,13 @@ describe('useCatImageUploader TestCases', () => {
const { imageUploader } = useCatImageUploader(language);

mockServer.use(
rest.post(uploadCatImageUrl(), mockUploadCatImageUnprocessableEntity)
rest.post(uploadCatImageUrl(), mockUploadCatImageUnprocessableEntity),
);

const imageUploadResult = await imageUploader(image, imageExtension);

expect(imageUploadResult.value).toStrictEqual(expected);
}
},
);

it.each`
Expand All @@ -122,8 +122,8 @@ describe('useCatImageUploader TestCases', () => {
mockServer.use(rest.post(uploadCatImageUrl(), mockInternalServerError));

await expect(imageUploader(image, imageExtension)).rejects.toStrictEqual(
expected
expected,
);
}
},
);
});
Loading

1 comment on commit e2be5c7

@vercel
Copy link

@vercel vercel bot commented on e2be5c7 Aug 23, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.