From d2c3cd9d748314469d66844a2eafe9541ab90651 Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 05:58:38 +0900 Subject: [PATCH 01/16] =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB?= =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC=E3=82=B8=E3=81=AEpackage.j?= =?UTF-8?q?son=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/shared/package.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 packages/shared/package.json diff --git a/packages/shared/package.json b/packages/shared/package.json new file mode 100644 index 0000000..876614f --- /dev/null +++ b/packages/shared/package.json @@ -0,0 +1,12 @@ +{ + "name": "@local/shared", + "type": "module", + "private": true, + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist" + ] +} From f5dee0b65eabe4d9160c5bc4b9d33ef6cfe61fd2 Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 05:59:02 +0900 Subject: [PATCH 02/16] =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=82=AF=E3=82=B9?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B9=E3=83=AB=E3=83=BC=E3=83=88=E3=81=8B?= =?UTF-8?q?=E3=82=89shared=E3=81=AE=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A1=8C=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 4cf919e..9f15334 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "type": "module", "scripts": { "functions": "pnpm --dir functions", + "shared": "pnpm --dir packages/shared", "build": "remix vite:build", "dev": "remix vite:dev", "lint:hosting": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", From 14d54c270fbdce271773d68ca760ae510bbe78a0 Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 05:59:33 +0900 Subject: [PATCH 03/16] pnpm shared add -D typescript --- packages/shared/package.json | 5 ++++- pnpm-lock.yaml | 15 +++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/shared/package.json b/packages/shared/package.json index 876614f..e67ec17 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -8,5 +8,8 @@ "types": "dist/index.d.ts", "files": [ "dist" - ] + ], + "devDependencies": { + "typescript": "^5.6.3" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5344961..6d53355 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,7 +117,7 @@ importers: version: 9.1.0(eslint@8.57.1) eslint-plugin-import: specifier: ^2.25.4 - version: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1) + version: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1) firebase-functions-test: specifier: ^3.1.0 version: 3.3.0(firebase-admin@12.6.0)(firebase-functions@6.0.1(firebase-admin@12.6.0))(jest@29.7.0(@types/node@22.7.7)) @@ -128,6 +128,12 @@ importers: specifier: ^4.9.0 version: 4.9.5 + packages/shared: + devDependencies: + typescript: + specifier: ^5.6.3 + version: 5.6.3 + packages: '@alloc/quick-lru@5.2.0': @@ -7161,13 +7167,14 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): + eslint-module-utils@2.12.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@4.9.5) eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1) transitivePeerDependencies: - supports-color @@ -7192,7 +7199,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -7203,7 +7210,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 From 0c436a47fcfe6fac3f0e679d07d673d9b4ec104c Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 06:00:20 +0900 Subject: [PATCH 04/16] pnpm shared add -D eslint@^8.57.0 @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import --- packages/shared/package.json | 4 + pnpm-lock.yaml | 190 +++++++++++++++++++++++++++++++++++ 2 files changed, 194 insertions(+) diff --git a/packages/shared/package.json b/packages/shared/package.json index e67ec17..8d5d31e 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -10,6 +10,10 @@ "dist" ], "devDependencies": { + "@typescript-eslint/eslint-plugin": "^8.10.0", + "@typescript-eslint/parser": "^8.10.0", + "eslint": "^8.57.0", + "eslint-plugin-import": "^2.31.0", "typescript": "^5.6.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d53355..354fa87 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -130,6 +130,18 @@ importers: packages/shared: devDependencies: + '@typescript-eslint/eslint-plugin': + specifier: ^8.10.0 + version: 8.10.0(@typescript-eslint/parser@8.10.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/parser': + specifier: ^8.10.0 + version: 8.10.0(eslint@8.57.1)(typescript@5.6.3) + eslint: + specifier: ^8.57.0 + version: 8.57.1 + eslint-plugin-import: + specifier: ^2.31.0 + version: 2.31.0(@typescript-eslint/parser@8.10.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1) typescript: specifier: ^5.6.3 version: 5.6.3 @@ -1261,6 +1273,17 @@ packages: typescript: optional: true + '@typescript-eslint/eslint-plugin@8.10.0': + resolution: {integrity: sha512-phuB3hoP7FFKbRXxjl+DRlQDuJqhpOnm5MmtROXyWi3uS/Xg2ZXqiQfcG2BJHiN4QKyzdOJi3NEn/qTnjUlkmQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/parser@5.62.0': resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1281,6 +1304,16 @@ packages: typescript: optional: true + '@typescript-eslint/parser@8.10.0': + resolution: {integrity: sha512-E24l90SxuJhytWJ0pTQydFT46Nk0Z+bsLKo/L8rtQSL93rQ6byd1V/QbDpHUTdLPOMsBCcYXZweADNCfOCmOAg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/scope-manager@5.62.0': resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1289,6 +1322,10 @@ packages: resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/scope-manager@8.10.0': + resolution: {integrity: sha512-AgCaEjhfql9MDKjMUxWvH7HjLeBqMCBfIaBbzzIcBbQPZE7CPh1m6FF+L75NUMJFMLYhCywJXIDEMa3//1A0dw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@5.62.0': resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1309,6 +1346,15 @@ packages: typescript: optional: true + '@typescript-eslint/type-utils@8.10.0': + resolution: {integrity: sha512-PCpUOpyQSpxBn230yIcK+LeCQaXuxrgCm2Zk1S+PTIRJsEfU6nJ0TtwyH8pIwPK/vJoA+7TZtzyAJSGBz+s/dg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/types@5.62.0': resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1317,6 +1363,10 @@ packages: resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/types@8.10.0': + resolution: {integrity: sha512-k/E48uzsfJCRRbGLapdZgrX52csmWJ2rcowwPvOZ8lwPUv3xW6CcFeJAXgx4uJm+Ge4+a4tFOkdYvSpxhRhg1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@5.62.0': resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1335,6 +1385,15 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.10.0': + resolution: {integrity: sha512-3OE0nlcOHaMvQ8Xu5gAfME3/tWVDpb/HxtpUZ1WeOAksZ/h/gwrBzCklaGzwZT97/lBbbxJ16dMA98JMEngW4w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@5.62.0': resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1347,6 +1406,12 @@ packages: peerDependencies: eslint: ^7.0.0 || ^8.0.0 + '@typescript-eslint/utils@8.10.0': + resolution: {integrity: sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@5.62.0': resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1355,6 +1420,10 @@ packages: resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/visitor-keys@8.10.0': + resolution: {integrity: sha512-k8nekgqwr7FadWk548Lfph6V3r9OVqjzAIVskE7orMZR23cGJjAOVazsZSJW+ElyjfTM4wx/1g88Mi70DDtG9A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -6092,6 +6161,24 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.10.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': + dependencies: + '@eslint-community/regexpp': 4.11.1 + '@typescript-eslint/parser': 8.10.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.10.0 + '@typescript-eslint/type-utils': 8.10.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/utils': 8.10.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.10.0 + eslint: 8.57.1 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.3.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5)': dependencies: '@typescript-eslint/scope-manager': 5.62.0 @@ -6117,6 +6204,19 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@8.10.0(eslint@8.57.1)(typescript@5.6.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.10.0 + '@typescript-eslint/types': 8.10.0 + '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.10.0 + debug: 4.3.7 + eslint: 8.57.1 + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/scope-manager@5.62.0': dependencies: '@typescript-eslint/types': 5.62.0 @@ -6127,6 +6227,11 @@ snapshots: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 + '@typescript-eslint/scope-manager@8.10.0': + dependencies: + '@typescript-eslint/types': 8.10.0 + '@typescript-eslint/visitor-keys': 8.10.0 + '@typescript-eslint/type-utils@5.62.0(eslint@8.57.1)(typescript@4.9.5)': dependencies: '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) @@ -6151,10 +6256,24 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/type-utils@8.10.0(eslint@8.57.1)(typescript@5.6.3)': + dependencies: + '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.10.0(eslint@8.57.1)(typescript@5.6.3) + debug: 4.3.7 + ts-api-utils: 1.3.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - eslint + - supports-color + '@typescript-eslint/types@5.62.0': {} '@typescript-eslint/types@6.21.0': {} + '@typescript-eslint/types@8.10.0': {} + '@typescript-eslint/typescript-estree@5.62.0(typescript@4.9.5)': dependencies: '@typescript-eslint/types': 5.62.0 @@ -6184,6 +6303,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.10.0(typescript@5.6.3)': + dependencies: + '@typescript-eslint/types': 8.10.0 + '@typescript-eslint/visitor-keys': 8.10.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@5.62.0(eslint@8.57.1)(typescript@4.9.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) @@ -6213,6 +6347,17 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.10.0(eslint@8.57.1)(typescript@5.6.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@typescript-eslint/scope-manager': 8.10.0 + '@typescript-eslint/types': 8.10.0 + '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) + eslint: 8.57.1 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@5.62.0': dependencies: '@typescript-eslint/types': 5.62.0 @@ -6223,6 +6368,11 @@ snapshots: '@typescript-eslint/types': 6.21.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.10.0': + dependencies: + '@typescript-eslint/types': 8.10.0 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@vanilla-extract/babel-plugin-debug-ids@1.1.0': @@ -7199,6 +7349,17 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.10.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 8.10.0(eslint@8.57.1)(typescript@5.6.3) + eslint: 8.57.1 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1) + transitivePeerDependencies: + - supports-color + eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 @@ -7257,6 +7418,35 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.10.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1): + dependencies: + '@rtsao/scc': 1.1.0 + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.57.1 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.10.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1) + hasown: 2.0.2 + is-core-module: 2.15.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + string.prototype.trimend: 1.0.8 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 8.10.0(eslint@8.57.1)(typescript@5.6.3) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + eslint-plugin-jsx-a11y@6.10.0(eslint@8.57.1): dependencies: aria-query: 5.1.3 From 0dc9b98dbd61a9aecb0dcd6f3a4d5be023c3599c Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 06:00:45 +0900 Subject: [PATCH 05/16] pnpm shared add -D prettier eslint-config-prettier --- packages/shared/package.json | 2 ++ pnpm-lock.yaml | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/packages/shared/package.json b/packages/shared/package.json index 8d5d31e..75c0689 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -13,7 +13,9 @@ "@typescript-eslint/eslint-plugin": "^8.10.0", "@typescript-eslint/parser": "^8.10.0", "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.31.0", + "prettier": "^3.3.3", "typescript": "^5.6.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 354fa87..9fc9a98 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -139,9 +139,15 @@ importers: eslint: specifier: ^8.57.0 version: 8.57.1 + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@8.57.1) eslint-plugin-import: specifier: ^2.31.0 version: 2.31.0(@typescript-eslint/parser@8.10.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1) + prettier: + specifier: ^3.3.3 + version: 3.3.3 typescript: specifier: ^5.6.3 version: 5.6.3 From 7b8f15dc1e61061834a7d83ebb2237239837cfb4 Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 06:01:41 +0900 Subject: [PATCH 06/16] =?UTF-8?q?ESLint=E3=82=92=E8=87=AA=E5=8B=95?= =?UTF-8?q?=E3=82=A2=E3=83=83=E3=83=97=E3=83=87=E3=83=BC=E3=83=88=E3=81=8B?= =?UTF-8?q?=E3=82=89=E9=99=A4=E5=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package.json b/package.json index 9f15334..31ff6de 100644 --- a/package.json +++ b/package.json @@ -55,5 +55,12 @@ }, "volta": { "node": "20.17.0" + }, + "pnpm": { + "updateConfig": { + "ignoreDependencies": [ + "eslint" + ] + } } } From 48841b631ed265ac997f12f9483fb9c6c7109a15 Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 06:04:28 +0900 Subject: [PATCH 07/16] =?UTF-8?q?TypeScript/ESLint/Prettier=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E4=BD=9C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/shared/.eslintrc.cjs | 53 +++++++++++++++++++++++++++++++ packages/shared/.prettierrc.cjs | 9 ++++++ packages/shared/tsconfig.dev.json | 3 ++ packages/shared/tsconfig.json | 13 ++++++++ 4 files changed, 78 insertions(+) create mode 100644 packages/shared/.eslintrc.cjs create mode 100644 packages/shared/.prettierrc.cjs create mode 100644 packages/shared/tsconfig.dev.json create mode 100644 packages/shared/tsconfig.json diff --git a/packages/shared/.eslintrc.cjs b/packages/shared/.eslintrc.cjs new file mode 100644 index 0000000..260b7ed --- /dev/null +++ b/packages/shared/.eslintrc.cjs @@ -0,0 +1,53 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + root: true, + env: { + browser: true, + es2021: true, + node: true, + }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'prettier', + ], + overrides: [ + { + env: { + node: true, + }, + files: ['.eslintrc.{js,cjs}'], + parserOptions: { + sourceType: 'script', + }, + }, + ], + parser: '@typescript-eslint/parser', + parserOptions: { + project: ['tsconfig.json', 'tsconfig.dev.json'], + }, + plugins: ['@typescript-eslint', 'import'], + rules: { + 'import/order': [ + 'error', + { + groups: [ + 'builtin', + 'external', + 'internal', + 'parent', + 'sibling', + 'index', + 'object', + 'type', + ], + alphabetize: { order: 'asc' }, + }, + ], + '@typescript-eslint/consistent-type-imports': [ + 'error', + { prefer: 'type-imports' }, + ], + '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], + }, +}; diff --git a/packages/shared/.prettierrc.cjs b/packages/shared/.prettierrc.cjs new file mode 100644 index 0000000..1c4cae2 --- /dev/null +++ b/packages/shared/.prettierrc.cjs @@ -0,0 +1,9 @@ +/** @type {import("prettier").Config} */ +module.exports = { + // NOTE: 書籍にコードを載せやすくするためにprintWidthを短めに設定してます printWidth: 76, + singleQuote: true, + jsxSingleQuote: true, + semi: true, + trailingComma: "all", + bracketSpacing: true, +}; diff --git a/packages/shared/tsconfig.dev.json b/packages/shared/tsconfig.dev.json new file mode 100644 index 0000000..2aecd16 --- /dev/null +++ b/packages/shared/tsconfig.dev.json @@ -0,0 +1,3 @@ +{ + "include": [".eslintrc.cjs", ".prettierrc.cjs"] +} diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json new file mode 100644 index 0000000..cd69d57 --- /dev/null +++ b/packages/shared/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "ES2017", + "module": "NodeNext", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "declaration": true, + "outDir": "./dist" + }, + "include": ["src"] +} From 4774c731baca26f58e7f0b35ddc1bb36a0e26860 Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 06:04:57 +0900 Subject: [PATCH 08/16] =?UTF-8?q?.gitignore=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/shared/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 packages/shared/.gitignore diff --git a/packages/shared/.gitignore b/packages/shared/.gitignore new file mode 100644 index 0000000..b947077 --- /dev/null +++ b/packages/shared/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +dist/ From 60efeea597890a16cd97ad4b517667a0430d86c8 Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 06:08:34 +0900 Subject: [PATCH 09/16] =?UTF-8?q?build/lint/format=E3=82=B3=E3=83=9E?= =?UTF-8?q?=E3=83=B3=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 9 +++++---- packages/shared/package.json | 6 ++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 31ff6de..9103919 100644 --- a/package.json +++ b/package.json @@ -6,13 +6,14 @@ "scripts": { "functions": "pnpm --dir functions", "shared": "pnpm --dir packages/shared", - "build": "remix vite:build", + "build": "pnpm build:shared && remix vite:build", + "build:shared": "pnpm shared build", "dev": "remix vite:dev", "lint:hosting": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", "stylelint": "stylelint '**/*.css'", - "lint": "pnpm lint:hosting && pnpm stylelint && pnpm functions lint", - "lint:fix": "pnpm lint:hosting --fix && pnpm stylelint --fix && pnpm functions lint:fix", - "format": "prettier --write . && pnpm functions format", + "lint": "pnpm lint:hosting && pnpm stylelint && pnpm functions lint && pnpm shared lint", + "lint:fix": "pnpm lint:hosting --fix && pnpm stylelint --fix && pnpm functions lint:fix && pnpm shared lint:fix", + "format": "prettier --write . && pnpm functions format && pnpm shared format", "preview": "vite preview", "typecheck": "tsc", "deploy:hosting": "pnpm build && firebase deploy --except functions --project default", diff --git a/packages/shared/package.json b/packages/shared/package.json index 75c0689..b634073 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -9,6 +9,12 @@ "files": [ "dist" ], + "scripts": { + "build": "tsc", + "lint": "eslint --ignore-path .gitignore .", + "lint:fix": "pnpm lint --fix", + "format": "prettier --write ." + }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^8.10.0", "@typescript-eslint/parser": "^8.10.0", From e9bd0101e69a514eed4e5c64fdc93087045b452f Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 06:09:03 +0900 Subject: [PATCH 10/16] pnpm shared add -D firebase firebase-admin --- packages/shared/package.json | 2 + pnpm-lock.yaml | 509 ++++++++++++++++++++++++++++++++++- 2 files changed, 510 insertions(+), 1 deletion(-) diff --git a/packages/shared/package.json b/packages/shared/package.json index b634073..63860f7 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -21,6 +21,8 @@ "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.31.0", + "firebase": "^10.14.1", + "firebase-admin": "^12.6.0", "prettier": "^3.3.3", "typescript": "^5.6.3" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9fc9a98..e398827 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -145,6 +145,12 @@ importers: eslint-plugin-import: specifier: ^2.31.0 version: 2.31.0(@typescript-eslint/parser@8.10.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1) + firebase: + specifier: ^10.14.1 + version: 10.14.1 + firebase-admin: + specifier: ^12.6.0 + version: 12.6.0 prettier: specifier: ^3.3.3 version: 3.3.3 @@ -707,18 +713,75 @@ packages: '@fastify/busboy@3.0.0': resolution: {integrity: sha512-83rnH2nCvclWaPQQKvkJ2pdOjG4TZyEVuFDnlOF6KP08lDaaceVyw/W63mDuafQT+MKHCvXIPpE5uYWeM0rT4w==} + '@firebase/analytics-compat@0.2.14': + resolution: {integrity: sha512-unRVY6SvRqfNFIAA/kwl4vK+lvQAL2HVcgu9zTrUtTyYDmtIt/lOuHJynBMYEgLnKm39YKBDhtqdapP2e++ASw==} + peerDependencies: + '@firebase/app-compat': 0.x + + '@firebase/analytics-types@0.8.2': + resolution: {integrity: sha512-EnzNNLh+9/sJsimsA/FGqzakmrAUKLeJvjRHlg8df1f97NLUlFidk9600y0ZgWOp3CAxn6Hjtk+08tixlUOWyw==} + + '@firebase/analytics@0.10.8': + resolution: {integrity: sha512-CVnHcS4iRJPqtIDc411+UmFldk0ShSK3OB+D0bKD8Ck5Vro6dbK5+APZpkuWpbfdL359DIQUnAaMLE+zs/PVyA==} + peerDependencies: + '@firebase/app': 0.x + + '@firebase/app-check-compat@0.3.15': + resolution: {integrity: sha512-zFIvIFFNqDXpOT2huorz9cwf56VT3oJYRFjSFYdSbGYEJYEaXjLJbfC79lx/zjx4Fh+yuN8pry3TtvwaevrGbg==} + peerDependencies: + '@firebase/app-compat': 0.x + '@firebase/app-check-interop-types@0.3.2': resolution: {integrity: sha512-LMs47Vinv2HBMZi49C09dJxp0QT5LwDzFaVGf/+ITHe3BlIhUiLNttkATSXplc89A2lAaeTqjgqVkiRfUGyQiQ==} + '@firebase/app-check-types@0.5.2': + resolution: {integrity: sha512-FSOEzTzL5bLUbD2co3Zut46iyPWML6xc4x+78TeaXMSuJap5QObfb+rVvZJtla3asN4RwU7elaQaduP+HFizDA==} + + '@firebase/app-check@0.8.8': + resolution: {integrity: sha512-O49RGF1xj7k6BuhxGpHmqOW5hqBIAEbt2q6POW0lIywx7emYtzPDeQI+ryQpC4zbKX646SoVZ711TN1DBLNSOQ==} + peerDependencies: + '@firebase/app': 0.x + + '@firebase/app-compat@0.2.43': + resolution: {integrity: sha512-HM96ZyIblXjAC7TzE8wIk2QhHlSvksYkQ4Ukh1GmEenzkucSNUmUX4QvoKrqeWsLEQ8hdcojABeCV8ybVyZmeg==} + '@firebase/app-types@0.9.2': resolution: {integrity: sha512-oMEZ1TDlBz479lmABwWsWjzHwheQKiAgnuKxE0pz0IXCVx7/rtlkx1fQ6GfgK24WCrxDKMplZrT50Kh04iMbXQ==} + '@firebase/app@0.10.13': + resolution: {integrity: sha512-OZiDAEK/lDB6xy/XzYAyJJkaDqmQ+BCtOEPLqFvxWKUz5JbBmej7IiiRHdtiIOD/twW7O5AxVsfaaGA/V1bNsA==} + + '@firebase/auth-compat@0.5.14': + resolution: {integrity: sha512-2eczCSqBl1KUPJacZlFpQayvpilg3dxXLy9cSMTKtQMTQSmondUtPI47P3ikH3bQAXhzKLOE+qVxJ3/IRtu9pw==} + peerDependencies: + '@firebase/app-compat': 0.x + '@firebase/auth-interop-types@0.2.3': resolution: {integrity: sha512-Fc9wuJGgxoxQeavybiuwgyi+0rssr76b+nHpj+eGhXFYAdudMWyfBHvFL/I5fEHniUM/UQdFzi9VXJK2iZF7FQ==} + '@firebase/auth-types@0.12.2': + resolution: {integrity: sha512-qsEBaRMoGvHO10unlDJhaKSuPn4pyoTtlQuP1ghZfzB6rNQPuhp/N/DcFZxm9i4v0SogjCbf9reWupwIvfmH6w==} + peerDependencies: + '@firebase/app-types': 0.x + '@firebase/util': 1.x + + '@firebase/auth@1.7.9': + resolution: {integrity: sha512-yLD5095kVgDw965jepMyUrIgDklD6qH/BZNHeKOgvu7pchOKNjVM+zQoOVYJIKWMWOWBq8IRNVU6NXzBbozaJg==} + peerDependencies: + '@firebase/app': 0.x + '@react-native-async-storage/async-storage': ^1.18.1 + peerDependenciesMeta: + '@react-native-async-storage/async-storage': + optional: true + '@firebase/component@0.6.9': resolution: {integrity: sha512-gm8EUEJE/fEac86AvHn8Z/QW8BvR56TBw3hMW0O838J/1mThYQXAIQBgUv75EqlCZfdawpWLrKt1uXvp9ciK3Q==} + '@firebase/data-connect@0.1.0': + resolution: {integrity: sha512-vSe5s8dY13ilhLnfY0eYRmQsdTbH7PUFZtBbqU6JVX/j8Qp9A6G5gG6//ulbX9/1JFOF1IWNOne9c8S/DOCJaQ==} + peerDependencies: + '@firebase/app': 0.x + '@firebase/database-compat@1.0.8': resolution: {integrity: sha512-OpeWZoPE3sGIRPBKYnW9wLad25RaWbGyk7fFQe4xnJQKRzlynWeFBSRRAoLE2Old01WXwskUiucNqUUVlFsceg==} @@ -728,12 +791,122 @@ packages: '@firebase/database@1.0.8': resolution: {integrity: sha512-dzXALZeBI1U5TXt6619cv0+tgEhJiwlUtQ55WNZY7vGAjv7Q1QioV969iYwt1AQQ0ovHnEW0YW9TiBfefLvErg==} + '@firebase/firestore-compat@0.3.38': + resolution: {integrity: sha512-GoS0bIMMkjpLni6StSwRJarpu2+S5m346Na7gr9YZ/BZ/W3/8iHGNr9PxC+f0rNZXqS4fGRn88pICjrZEgbkqQ==} + peerDependencies: + '@firebase/app-compat': 0.x + + '@firebase/firestore-types@3.0.2': + resolution: {integrity: sha512-wp1A+t5rI2Qc/2q7r2ZpjUXkRVPtGMd6zCLsiWurjsQpqPgFin3AhNibKcIzoF2rnToNa/XYtyWXuifjOOwDgg==} + peerDependencies: + '@firebase/app-types': 0.x + '@firebase/util': 1.x + + '@firebase/firestore@4.7.3': + resolution: {integrity: sha512-NwVU+JPZ/3bhvNSJMCSzfcBZZg8SUGyzZ2T0EW3/bkUeefCyzMISSt/TTIfEHc8cdyXGlMqfGe3/62u9s74UEg==} + engines: {node: '>=10.10.0'} + peerDependencies: + '@firebase/app': 0.x + + '@firebase/functions-compat@0.3.14': + resolution: {integrity: sha512-dZ0PKOKQFnOlMfcim39XzaXonSuPPAVuzpqA4ONTIdyaJK/OnBaIEVs/+BH4faa1a2tLeR+Jy15PKqDRQoNIJw==} + peerDependencies: + '@firebase/app-compat': 0.x + + '@firebase/functions-types@0.6.2': + resolution: {integrity: sha512-0KiJ9lZ28nS2iJJvimpY4nNccV21rkQyor5Iheu/nq8aKXJqtJdeSlZDspjPSBBiHRzo7/GMUttegnsEITqR+w==} + + '@firebase/functions@0.11.8': + resolution: {integrity: sha512-Lo2rTPDn96naFIlSZKVd1yvRRqqqwiJk7cf9TZhUerwnPKgBzXy+aHE22ry+6EjCaQusUoNai6mU6p+G8QZT1g==} + peerDependencies: + '@firebase/app': 0.x + + '@firebase/installations-compat@0.2.9': + resolution: {integrity: sha512-2lfdc6kPXR7WaL4FCQSQUhXcPbI7ol3wF+vkgtU25r77OxPf8F/VmswQ7sgIkBBWtymn5ZF20TIKtnOj9rjb6w==} + peerDependencies: + '@firebase/app-compat': 0.x + + '@firebase/installations-types@0.5.2': + resolution: {integrity: sha512-que84TqGRZJpJKHBlF2pkvc1YcXrtEDOVGiDjovP/a3s6W4nlbohGXEsBJo0JCeeg/UG9A+DEZVDUV9GpklUzA==} + peerDependencies: + '@firebase/app-types': 0.x + + '@firebase/installations@0.6.9': + resolution: {integrity: sha512-hlT7AwCiKghOX3XizLxXOsTFiFCQnp/oj86zp1UxwDGmyzsyoxtX+UIZyVyH/oBF5+XtblFG9KZzZQ/h+dpy+Q==} + peerDependencies: + '@firebase/app': 0.x + '@firebase/logger@0.4.2': resolution: {integrity: sha512-Q1VuA5M1Gjqrwom6I6NUU4lQXdo9IAQieXlujeHZWvRt1b7qQ0KwBaNAjgxG27jgF9/mUwsNmO8ptBCGVYhB0A==} + '@firebase/messaging-compat@0.2.12': + resolution: {integrity: sha512-pKsiUVZrbmRgdImYqhBNZlkKJbqjlPkVdQRZGRbkTyX4OSGKR0F/oJeCt1a8jEg5UnBp4fdVwSWSp4DuCovvEQ==} + peerDependencies: + '@firebase/app-compat': 0.x + + '@firebase/messaging-interop-types@0.2.2': + resolution: {integrity: sha512-l68HXbuD2PPzDUOFb3aG+nZj5KA3INcPwlocwLZOzPp9rFM9yeuI9YLl6DQfguTX5eAGxO0doTR+rDLDvQb5tA==} + + '@firebase/messaging@0.12.12': + resolution: {integrity: sha512-6q0pbzYBJhZEtUoQx7hnPhZvAbuMNuBXKQXOx2YlWhSrlv9N1m0ZzlNpBbu/ItTzrwNKTibdYzUyaaxdWLg+4w==} + peerDependencies: + '@firebase/app': 0.x + + '@firebase/performance-compat@0.2.9': + resolution: {integrity: sha512-dNl95IUnpsu3fAfYBZDCVhXNkASE0uo4HYaEPd2/PKscfTvsgqFAOxfAXzBEDOnynDWiaGUnb5M1O00JQ+3FXA==} + peerDependencies: + '@firebase/app-compat': 0.x + + '@firebase/performance-types@0.2.2': + resolution: {integrity: sha512-gVq0/lAClVH5STrIdKnHnCo2UcPLjJlDUoEB/tB4KM+hAeHUxWKnpT0nemUPvxZ5nbdY/pybeyMe8Cs29gEcHA==} + + '@firebase/performance@0.6.9': + resolution: {integrity: sha512-PnVaak5sqfz5ivhua+HserxTJHtCar/7zM0flCX6NkzBNzJzyzlH4Hs94h2Il0LQB99roBqoE5QT1JqWqcLJHQ==} + peerDependencies: + '@firebase/app': 0.x + + '@firebase/remote-config-compat@0.2.9': + resolution: {integrity: sha512-AxzGpWfWFYejH2twxfdOJt5Cfh/ATHONegTd/a0p5flEzsD5JsxXgfkFToop+mypEL3gNwawxrxlZddmDoNxyA==} + peerDependencies: + '@firebase/app-compat': 0.x + + '@firebase/remote-config-types@0.3.2': + resolution: {integrity: sha512-0BC4+Ud7y2aPTyhXJTMTFfrGGLqdYXrUB9sJVAB8NiqJswDTc4/2qrE/yfUbnQJhbSi6ZaTTBKyG3n1nplssaA==} + + '@firebase/remote-config@0.4.9': + resolution: {integrity: sha512-EO1NLCWSPMHdDSRGwZ73kxEEcTopAxX1naqLJFNApp4hO8WfKfmEpmjxmP5TrrnypjIf2tUkYaKsfbEA7+AMmA==} + peerDependencies: + '@firebase/app': 0.x + + '@firebase/storage-compat@0.3.12': + resolution: {integrity: sha512-hA4VWKyGU5bWOll+uwzzhEMMYGu9PlKQc1w4DWxB3aIErWYzonrZjF0icqNQZbwKNIdh8SHjZlFeB2w6OSsjfg==} + peerDependencies: + '@firebase/app-compat': 0.x + + '@firebase/storage-types@0.8.2': + resolution: {integrity: sha512-0vWu99rdey0g53lA7IShoA2Lol1jfnPovzLDUBuon65K7uKG9G+L5uO05brD9pMw+l4HRFw23ah3GwTGpEav6g==} + peerDependencies: + '@firebase/app-types': 0.x + '@firebase/util': 1.x + + '@firebase/storage@0.13.2': + resolution: {integrity: sha512-fxuJnHshbhVwuJ4FuISLu+/76Aby2sh+44ztjF2ppoe0TELIDxPW6/r1KGlWYt//AD0IodDYYA8ZTN89q8YqUw==} + peerDependencies: + '@firebase/app': 0.x + '@firebase/util@1.10.0': resolution: {integrity: sha512-xKtx4A668icQqoANRxyDLBLz51TAbDP9KRfpbKGxiCAW346d0BeJe5vN6/hKxxmWwnZ0mautyv39JxviwwQMOQ==} + '@firebase/vertexai-preview@0.0.4': + resolution: {integrity: sha512-EBSqyu9eg8frQlVU9/HjKtHN7odqbh9MtAcVz3WwHj4gLCLOoN9F/o+oxlq3CxvFrd3CNTZwu6d2mZtVlEInng==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@firebase/app': 0.x + '@firebase/app-types': 0.x + + '@firebase/webchannel-wrapper@1.0.1': + resolution: {integrity: sha512-jmEnr/pk0yVkA7mIlHNnxCi+wWzOFUg0WyIotgkKAb2u1J7fAeDBcVNSTjTihbAYNusCLQdW5s9IJ5qwnEufcQ==} + '@google-cloud/firestore@7.10.0': resolution: {integrity: sha512-VFNhdHvfnmqcHHs6YhmSNHHxQqaaD64GwiL0c+e1qz85S8SWZPC2XFRf8p9yHRTF40Kow424s1KBU9f0fdQa+Q==} engines: {node: '>=14.0.0'} @@ -758,6 +931,10 @@ packages: resolution: {integrity: sha512-bgxdZmgTrJZX50OjyVwz3+mNEnCTNkh3cIqGPWVNeW9jX6bn1ZkU80uPd+67/ZpIJIjRQ9qaHCjhavyoWYxumg==} engines: {node: '>=12.10.0'} + '@grpc/grpc-js@1.9.15': + resolution: {integrity: sha512-nqE7Hc0AzI+euzUwDAy0aY5hCp10r734gMGRdU+qOPX0XSceI2ULrcXB5U2xSc5VkWwalCj4M7GzCAygZl2KoQ==} + engines: {node: ^8.13.0 || >=10.10.0} + '@grpc/proto-loader@0.7.13': resolution: {integrity: sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==} engines: {node: '>=6'} @@ -2422,6 +2599,9 @@ packages: peerDependencies: firebase-admin: ^11.10.0 || ^12.0.0 + firebase@10.14.1: + resolution: {integrity: sha512-0KZxU+Ela9rUCULqFsUUOYYkjh7OM1EWdIfG6///MtXd0t2/uUIf0iNV5i0KariMhRQ5jve/OY985nrAXFaZeQ==} + flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -2691,6 +2871,9 @@ packages: peerDependencies: postcss: ^8.1.0 + idb@7.1.1: + resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==} + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -4586,6 +4769,10 @@ packages: undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + undici@6.19.7: + resolution: {integrity: sha512-HR3W/bMGPSr90i8AAp2C4DM3wChFdJPLrWYpIS++LxS8K+W535qftjt+4MyjNYHeWabMj1nvtmLIi7l++iq91A==} + engines: {node: '>=18.17'} + undici@6.20.1: resolution: {integrity: sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==} engines: {node: '>=18.17'} @@ -5332,17 +5519,114 @@ snapshots: '@fastify/busboy@3.0.0': {} + '@firebase/analytics-compat@0.2.14(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13)': + dependencies: + '@firebase/analytics': 0.10.8(@firebase/app@0.10.13) + '@firebase/analytics-types': 0.8.2 + '@firebase/app-compat': 0.2.43 + '@firebase/component': 0.6.9 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + transitivePeerDependencies: + - '@firebase/app' + + '@firebase/analytics-types@0.8.2': {} + + '@firebase/analytics@0.10.8(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/component': 0.6.9 + '@firebase/installations': 0.6.9(@firebase/app@0.10.13) + '@firebase/logger': 0.4.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + + '@firebase/app-check-compat@0.3.15(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13)': + dependencies: + '@firebase/app-check': 0.8.8(@firebase/app@0.10.13) + '@firebase/app-check-types': 0.5.2 + '@firebase/app-compat': 0.2.43 + '@firebase/component': 0.6.9 + '@firebase/logger': 0.4.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + transitivePeerDependencies: + - '@firebase/app' + '@firebase/app-check-interop-types@0.3.2': {} + '@firebase/app-check-types@0.5.2': {} + + '@firebase/app-check@0.8.8(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/component': 0.6.9 + '@firebase/logger': 0.4.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + + '@firebase/app-compat@0.2.43': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/component': 0.6.9 + '@firebase/logger': 0.4.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + '@firebase/app-types@0.9.2': {} + '@firebase/app@0.10.13': + dependencies: + '@firebase/component': 0.6.9 + '@firebase/logger': 0.4.2 + '@firebase/util': 1.10.0 + idb: 7.1.1 + tslib: 2.8.0 + + '@firebase/auth-compat@0.5.14(@firebase/app-compat@0.2.43)(@firebase/app-types@0.9.2)(@firebase/app@0.10.13)': + dependencies: + '@firebase/app-compat': 0.2.43 + '@firebase/auth': 1.7.9(@firebase/app@0.10.13) + '@firebase/auth-types': 0.12.2(@firebase/app-types@0.9.2)(@firebase/util@1.10.0) + '@firebase/component': 0.6.9 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + undici: 6.19.7 + transitivePeerDependencies: + - '@firebase/app' + - '@firebase/app-types' + - '@react-native-async-storage/async-storage' + '@firebase/auth-interop-types@0.2.3': {} + '@firebase/auth-types@0.12.2(@firebase/app-types@0.9.2)(@firebase/util@1.10.0)': + dependencies: + '@firebase/app-types': 0.9.2 + '@firebase/util': 1.10.0 + + '@firebase/auth@1.7.9(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/component': 0.6.9 + '@firebase/logger': 0.4.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + undici: 6.19.7 + '@firebase/component@0.6.9': dependencies: '@firebase/util': 1.10.0 tslib: 2.8.0 + '@firebase/data-connect@0.1.0(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/auth-interop-types': 0.2.3 + '@firebase/component': 0.6.9 + '@firebase/logger': 0.4.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + '@firebase/database-compat@1.0.8': dependencies: '@firebase/component': 0.6.9 @@ -5367,14 +5651,196 @@ snapshots: faye-websocket: 0.11.4 tslib: 2.8.0 + '@firebase/firestore-compat@0.3.38(@firebase/app-compat@0.2.43)(@firebase/app-types@0.9.2)(@firebase/app@0.10.13)': + dependencies: + '@firebase/app-compat': 0.2.43 + '@firebase/component': 0.6.9 + '@firebase/firestore': 4.7.3(@firebase/app@0.10.13) + '@firebase/firestore-types': 3.0.2(@firebase/app-types@0.9.2)(@firebase/util@1.10.0) + '@firebase/util': 1.10.0 + tslib: 2.8.0 + transitivePeerDependencies: + - '@firebase/app' + - '@firebase/app-types' + + '@firebase/firestore-types@3.0.2(@firebase/app-types@0.9.2)(@firebase/util@1.10.0)': + dependencies: + '@firebase/app-types': 0.9.2 + '@firebase/util': 1.10.0 + + '@firebase/firestore@4.7.3(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/component': 0.6.9 + '@firebase/logger': 0.4.2 + '@firebase/util': 1.10.0 + '@firebase/webchannel-wrapper': 1.0.1 + '@grpc/grpc-js': 1.9.15 + '@grpc/proto-loader': 0.7.13 + tslib: 2.8.0 + undici: 6.19.7 + + '@firebase/functions-compat@0.3.14(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13)': + dependencies: + '@firebase/app-compat': 0.2.43 + '@firebase/component': 0.6.9 + '@firebase/functions': 0.11.8(@firebase/app@0.10.13) + '@firebase/functions-types': 0.6.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + transitivePeerDependencies: + - '@firebase/app' + + '@firebase/functions-types@0.6.2': {} + + '@firebase/functions@0.11.8(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/app-check-interop-types': 0.3.2 + '@firebase/auth-interop-types': 0.2.3 + '@firebase/component': 0.6.9 + '@firebase/messaging-interop-types': 0.2.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + undici: 6.19.7 + + '@firebase/installations-compat@0.2.9(@firebase/app-compat@0.2.43)(@firebase/app-types@0.9.2)(@firebase/app@0.10.13)': + dependencies: + '@firebase/app-compat': 0.2.43 + '@firebase/component': 0.6.9 + '@firebase/installations': 0.6.9(@firebase/app@0.10.13) + '@firebase/installations-types': 0.5.2(@firebase/app-types@0.9.2) + '@firebase/util': 1.10.0 + tslib: 2.8.0 + transitivePeerDependencies: + - '@firebase/app' + - '@firebase/app-types' + + '@firebase/installations-types@0.5.2(@firebase/app-types@0.9.2)': + dependencies: + '@firebase/app-types': 0.9.2 + + '@firebase/installations@0.6.9(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/component': 0.6.9 + '@firebase/util': 1.10.0 + idb: 7.1.1 + tslib: 2.8.0 + '@firebase/logger@0.4.2': dependencies: tslib: 2.8.0 + '@firebase/messaging-compat@0.2.12(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13)': + dependencies: + '@firebase/app-compat': 0.2.43 + '@firebase/component': 0.6.9 + '@firebase/messaging': 0.12.12(@firebase/app@0.10.13) + '@firebase/util': 1.10.0 + tslib: 2.8.0 + transitivePeerDependencies: + - '@firebase/app' + + '@firebase/messaging-interop-types@0.2.2': {} + + '@firebase/messaging@0.12.12(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/component': 0.6.9 + '@firebase/installations': 0.6.9(@firebase/app@0.10.13) + '@firebase/messaging-interop-types': 0.2.2 + '@firebase/util': 1.10.0 + idb: 7.1.1 + tslib: 2.8.0 + + '@firebase/performance-compat@0.2.9(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13)': + dependencies: + '@firebase/app-compat': 0.2.43 + '@firebase/component': 0.6.9 + '@firebase/logger': 0.4.2 + '@firebase/performance': 0.6.9(@firebase/app@0.10.13) + '@firebase/performance-types': 0.2.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + transitivePeerDependencies: + - '@firebase/app' + + '@firebase/performance-types@0.2.2': {} + + '@firebase/performance@0.6.9(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/component': 0.6.9 + '@firebase/installations': 0.6.9(@firebase/app@0.10.13) + '@firebase/logger': 0.4.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + + '@firebase/remote-config-compat@0.2.9(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13)': + dependencies: + '@firebase/app-compat': 0.2.43 + '@firebase/component': 0.6.9 + '@firebase/logger': 0.4.2 + '@firebase/remote-config': 0.4.9(@firebase/app@0.10.13) + '@firebase/remote-config-types': 0.3.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + transitivePeerDependencies: + - '@firebase/app' + + '@firebase/remote-config-types@0.3.2': {} + + '@firebase/remote-config@0.4.9(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/component': 0.6.9 + '@firebase/installations': 0.6.9(@firebase/app@0.10.13) + '@firebase/logger': 0.4.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + + '@firebase/storage-compat@0.3.12(@firebase/app-compat@0.2.43)(@firebase/app-types@0.9.2)(@firebase/app@0.10.13)': + dependencies: + '@firebase/app-compat': 0.2.43 + '@firebase/component': 0.6.9 + '@firebase/storage': 0.13.2(@firebase/app@0.10.13) + '@firebase/storage-types': 0.8.2(@firebase/app-types@0.9.2)(@firebase/util@1.10.0) + '@firebase/util': 1.10.0 + tslib: 2.8.0 + transitivePeerDependencies: + - '@firebase/app' + - '@firebase/app-types' + + '@firebase/storage-types@0.8.2(@firebase/app-types@0.9.2)(@firebase/util@1.10.0)': + dependencies: + '@firebase/app-types': 0.9.2 + '@firebase/util': 1.10.0 + + '@firebase/storage@0.13.2(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/component': 0.6.9 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + undici: 6.19.7 + '@firebase/util@1.10.0': dependencies: tslib: 2.8.0 + '@firebase/vertexai-preview@0.0.4(@firebase/app-types@0.9.2)(@firebase/app@0.10.13)': + dependencies: + '@firebase/app': 0.10.13 + '@firebase/app-check-interop-types': 0.3.2 + '@firebase/app-types': 0.9.2 + '@firebase/component': 0.6.9 + '@firebase/logger': 0.4.2 + '@firebase/util': 1.10.0 + tslib: 2.8.0 + + '@firebase/webchannel-wrapper@1.0.1': {} + '@google-cloud/firestore@7.10.0': dependencies: '@opentelemetry/api': 1.9.0 @@ -5427,13 +5893,17 @@ snapshots: '@js-sdsl/ordered-map': 4.4.2 optional: true + '@grpc/grpc-js@1.9.15': + dependencies: + '@grpc/proto-loader': 0.7.13 + '@types/node': 22.7.7 + '@grpc/proto-loader@0.7.13': dependencies: lodash.camelcase: 4.3.0 long: 5.2.3 protobufjs: 7.4.0 yargs: 17.7.2 - optional: true '@humanwhocodes/config-array@0.13.0': dependencies: @@ -7793,6 +8263,39 @@ snapshots: transitivePeerDependencies: - supports-color + firebase@10.14.1: + dependencies: + '@firebase/analytics': 0.10.8(@firebase/app@0.10.13) + '@firebase/analytics-compat': 0.2.14(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13) + '@firebase/app': 0.10.13 + '@firebase/app-check': 0.8.8(@firebase/app@0.10.13) + '@firebase/app-check-compat': 0.3.15(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13) + '@firebase/app-compat': 0.2.43 + '@firebase/app-types': 0.9.2 + '@firebase/auth': 1.7.9(@firebase/app@0.10.13) + '@firebase/auth-compat': 0.5.14(@firebase/app-compat@0.2.43)(@firebase/app-types@0.9.2)(@firebase/app@0.10.13) + '@firebase/data-connect': 0.1.0(@firebase/app@0.10.13) + '@firebase/database': 1.0.8 + '@firebase/database-compat': 1.0.8 + '@firebase/firestore': 4.7.3(@firebase/app@0.10.13) + '@firebase/firestore-compat': 0.3.38(@firebase/app-compat@0.2.43)(@firebase/app-types@0.9.2)(@firebase/app@0.10.13) + '@firebase/functions': 0.11.8(@firebase/app@0.10.13) + '@firebase/functions-compat': 0.3.14(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13) + '@firebase/installations': 0.6.9(@firebase/app@0.10.13) + '@firebase/installations-compat': 0.2.9(@firebase/app-compat@0.2.43)(@firebase/app-types@0.9.2)(@firebase/app@0.10.13) + '@firebase/messaging': 0.12.12(@firebase/app@0.10.13) + '@firebase/messaging-compat': 0.2.12(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13) + '@firebase/performance': 0.6.9(@firebase/app@0.10.13) + '@firebase/performance-compat': 0.2.9(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13) + '@firebase/remote-config': 0.4.9(@firebase/app@0.10.13) + '@firebase/remote-config-compat': 0.2.9(@firebase/app-compat@0.2.43)(@firebase/app@0.10.13) + '@firebase/storage': 0.13.2(@firebase/app@0.10.13) + '@firebase/storage-compat': 0.3.12(@firebase/app-compat@0.2.43)(@firebase/app-types@0.9.2)(@firebase/app@0.10.13) + '@firebase/util': 1.10.0 + '@firebase/vertexai-preview': 0.0.4(@firebase/app-types@0.9.2)(@firebase/app@0.10.13) + transitivePeerDependencies: + - '@react-native-async-storage/async-storage' + flat-cache@3.2.0: dependencies: flatted: 3.3.1 @@ -8137,6 +8640,8 @@ snapshots: dependencies: postcss: 8.4.47 + idb@7.1.1: {} + ieee754@1.2.1: {} ignore@5.3.2: {} @@ -10515,6 +11020,8 @@ snapshots: undici-types@6.19.8: {} + undici@6.19.7: {} + undici@6.20.1: {} unified@10.1.2: From 1c1da736daf314f53d2cabfe8126b4aa9f8b7a3f Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 06:10:29 +0900 Subject: [PATCH 11/16] =?UTF-8?q?Firestore=E3=81=AE=E3=83=A6=E3=83=BC?= =?UTF-8?q?=E3=83=86=E3=82=A3=E3=83=AA=E3=83=86=E3=82=A3=E5=9E=8B=E3=82=92?= =?UTF-8?q?=E4=BD=9C=E6=88=90=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/shared/src/index.ts | 1 + packages/shared/src/types/firebase.ts | 6 ++++++ packages/shared/src/types/index.ts | 1 + 3 files changed, 8 insertions(+) create mode 100644 packages/shared/src/index.ts create mode 100644 packages/shared/src/types/firebase.ts create mode 100644 packages/shared/src/types/index.ts diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts new file mode 100644 index 0000000..314a00e --- /dev/null +++ b/packages/shared/src/index.ts @@ -0,0 +1 @@ +export * from './types/index.js'; diff --git a/packages/shared/src/types/firebase.ts b/packages/shared/src/types/firebase.ts new file mode 100644 index 0000000..1143547 --- /dev/null +++ b/packages/shared/src/types/firebase.ts @@ -0,0 +1,6 @@ +import type { Timestamp as ClientTimestamp } from 'firebase/firestore'; +import type { Timestamp as AdminTimestamp } from 'firebase-admin/firestore'; + +export type WithId = Data & { id: string }; + +export type Timestamp = ClientTimestamp | AdminTimestamp; diff --git a/packages/shared/src/types/index.ts b/packages/shared/src/types/index.ts new file mode 100644 index 0000000..367eec0 --- /dev/null +++ b/packages/shared/src/types/index.ts @@ -0,0 +1 @@ +export * from './firebase.js'; From d7d63b86cb15397008f24acd74aabd84161ff77d Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 06:11:54 +0900 Subject: [PATCH 12/16] pnpm -w add @local/shared && pnpm functions add @local/shared --- functions/package.json | 1 + package.json | 1 + pnpm-lock.yaml | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/functions/package.json b/functions/package.json index 5605ca1..43ccf74 100644 --- a/functions/package.json +++ b/functions/package.json @@ -18,6 +18,7 @@ }, "main": "lib/index.js", "dependencies": { + "@local/shared": "workspace:^", "firebase-admin": "^12.6.0", "firebase-functions": "^6.0.1" }, diff --git a/package.json b/package.json index 9103919..330798c 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "deploy:functions": "pnpm functions deploy:default" }, "dependencies": { + "@local/shared": "workspace:^", "@remix-run/node": "^2.13.1", "@remix-run/react": "^2.13.1", "isbot": "^4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e398827..7fa4156 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@local/shared': + specifier: workspace:^ + version: link:packages/shared '@remix-run/node': specifier: ^2.13.1 version: 2.13.1(typescript@5.6.3) @@ -96,6 +99,9 @@ importers: functions: dependencies: + '@local/shared': + specifier: workspace:^ + version: link:../packages/shared firebase-admin: specifier: ^12.6.0 version: 12.6.0 From 8f000c8b4a25993114af5c223460265a92e79abd Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 06:14:15 +0900 Subject: [PATCH 13/16] =?UTF-8?q?Functions=E3=82=92=E3=83=87=E3=83=97?= =?UTF-8?q?=E3=83=AD=E3=82=A4=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- firebase.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/firebase.json b/firebase.json index 7b44192..3467dd0 100644 --- a/firebase.json +++ b/firebase.json @@ -7,7 +7,8 @@ "source": "**", "destination": "/index.html" } - ] + ], + "predeploy": ["rm -rf .firebase"] }, "functions": [ { @@ -21,8 +22,16 @@ "*.local" ], "predeploy": [ - "npm --prefix \"$RESOURCE_DIR\" run lint", - "npm --prefix \"$RESOURCE_DIR\" run build" + "pnpm functions lint", + "pnpm build:shared", + "pnpm shared pack --pack-destination ../../functions", + "pnpm functions add ./local-shared-1.0.0.tgz", + "pnpm functions build" + ], + "postdeploy": [ + "rm -rf functions/local-shared-1.0.0.tgz", + "pnpm functions remove @local/shared", + "pnpm functions add @local/shared" ] } ] From 55683cfb6b3d327fae7b05da936a8a15b0844a97 Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 08:28:02 +0900 Subject: [PATCH 14/16] fix a bit --- packages/shared/.eslintrc.cjs | 5 ++++- packages/shared/.prettierrc.cjs | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/shared/.eslintrc.cjs b/packages/shared/.eslintrc.cjs index 260b7ed..dc77725 100644 --- a/packages/shared/.eslintrc.cjs +++ b/packages/shared/.eslintrc.cjs @@ -48,6 +48,9 @@ module.exports = { 'error', { prefer: 'type-imports' }, ], - '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], + '@typescript-eslint/no-unused-vars': [ + 'warn', + { argsIgnorePattern: '^_' }, + ], }, }; diff --git a/packages/shared/.prettierrc.cjs b/packages/shared/.prettierrc.cjs index 1c4cae2..1472c88 100644 --- a/packages/shared/.prettierrc.cjs +++ b/packages/shared/.prettierrc.cjs @@ -1,9 +1,10 @@ /** @type {import("prettier").Config} */ module.exports = { - // NOTE: 書籍にコードを載せやすくするためにprintWidthを短めに設定してます printWidth: 76, + // NOTE: 書籍にコードを載せやすくするためにprintWidthを短めに設定してます + printWidth: 76, singleQuote: true, jsxSingleQuote: true, semi: true, - trailingComma: "all", + trailingComma: 'all', bracketSpacing: true, }; From b45c822dc94b19624029ca6b38597ce4f04801ad Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 10:45:16 +0900 Subject: [PATCH 15/16] =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB?= =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC=E3=82=B8=E3=83=93=E3=83=AB?= =?UTF-8?q?=E3=83=89=E6=99=82=E3=81=AB=E3=82=A2=E3=83=83=E3=83=97=E3=83=87?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 330798c..5a3eb21 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,10 @@ "functions": "pnpm --dir functions", "shared": "pnpm --dir packages/shared", "build": "pnpm build:shared && remix vite:build", - "build:shared": "pnpm shared build", + "build:shared": "pnpm shared build && pnpm update:shared", + "update:shared": "pnpm remove:shared || true && pnpm add:shared", + "add:shared": "pnpm -w add @local/shared && pnpm functions add @local/shared", + "remove:shared": "pnpm -w remove @local/shared && pnpm functions remove @local/shared", "dev": "remix vite:dev", "lint:hosting": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", "stylelint": "stylelint '**/*.css'", From 3dfcf08e543e8c2a31aadc192ee928d91d590e9b Mon Sep 17 00:00:00 2001 From: hiroro-work Date: Mon, 21 Oct 2024 19:52:02 +0900 Subject: [PATCH 16/16] =?UTF-8?q?predeploy=E3=81=A7node=5Fmodules=E3=82=92?= =?UTF-8?q?=E5=86=8D=E4=BD=9C=E6=88=90=E3=81=97=E3=81=A6.pnpm=E3=81=AE?= =?UTF-8?q?=E3=82=AD=E3=83=A3=E3=83=83=E3=82=B7=E3=83=A5=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- firebase.json | 2 ++ package.json | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/firebase.json b/firebase.json index 3467dd0..a607843 100644 --- a/firebase.json +++ b/firebase.json @@ -22,6 +22,8 @@ "*.local" ], "predeploy": [ + "rm -rf node_modules", + "pnpm install", "pnpm functions lint", "pnpm build:shared", "pnpm shared pack --pack-destination ../../functions", diff --git a/package.json b/package.json index 5a3eb21..330798c 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,7 @@ "functions": "pnpm --dir functions", "shared": "pnpm --dir packages/shared", "build": "pnpm build:shared && remix vite:build", - "build:shared": "pnpm shared build && pnpm update:shared", - "update:shared": "pnpm remove:shared || true && pnpm add:shared", - "add:shared": "pnpm -w add @local/shared && pnpm functions add @local/shared", - "remove:shared": "pnpm -w remove @local/shared && pnpm functions remove @local/shared", + "build:shared": "pnpm shared build", "dev": "remix vite:dev", "lint:hosting": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", "stylelint": "stylelint '**/*.css'",