From cbc666f6aab76e4a3f051af06780949cf1b8bb12 Mon Sep 17 00:00:00 2001 From: Dongkyu Kim Date: Mon, 6 Nov 2023 22:57:42 +0900 Subject: [PATCH] =?UTF-8?q?build:=20build=20release=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A6=BD=ED=8A=B8=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=20=EC=8B=9C=20=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0?= =?UTF-8?q?=20(#5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: lint 설정 파일 문제 해결 * ci: add release lint test * fix(docs): docs build error fix * build: release script 추가 * ci: release publish script command change * chore: changeset --- .changeset/sharp-carrots-tap.md | 6 +++++ .github/workflows/release.yml | 18 +++++++++++++- .../eslintrc.json => apps/docs/.eslintrc.json | 0 apps/docs/package.json | 3 +-- apps/docs/src/components/Map.tsx | 2 ++ apps/docs/src/components/Marker.tsx | 2 ++ apps/docs/src/pages/middleware.ts | 1 - apps/react/.eslintrc.json | 3 +++ apps/react/package.json | 7 +++--- apps/vue/.eslintrc.json | 3 +++ apps/vue/package.json | 6 +++-- package.json | 1 + packages/types/.eslintrc.json | 3 +++ packages/types/package.json | 4 ---- yarn.lock | 24 ++++++++++++++++--- 15 files changed, 67 insertions(+), 16 deletions(-) create mode 100644 .changeset/sharp-carrots-tap.md rename packages/types/eslintrc.json => apps/docs/.eslintrc.json (100%) delete mode 100644 apps/docs/src/pages/middleware.ts create mode 100644 apps/react/.eslintrc.json create mode 100644 apps/vue/.eslintrc.json create mode 100644 packages/types/.eslintrc.json diff --git a/.changeset/sharp-carrots-tap.md b/.changeset/sharp-carrots-tap.md new file mode 100644 index 0000000..1cb2890 --- /dev/null +++ b/.changeset/sharp-carrots-tap.md @@ -0,0 +1,6 @@ +--- +"@naver-maps/react": patch +"@naver-maps/vue": patch +--- + +package.json release 스크립트 추가 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 133c457..43bd062 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,23 @@ on: concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.18.2 + + - name: Install Dependencies + run: yarn install --immutable --immutable-cache + + - name: Build + run: yarn lint + release: + needs: build name: Release runs-on: ubuntu-latest steps: @@ -23,7 +39,7 @@ jobs: - name: Create Release Pull Request uses: changesets/action@v1 with: - publish: yarn changeset publish + publish: yarn release version: yarn changeset version commit: "chore(release): version packages" env: diff --git a/packages/types/eslintrc.json b/apps/docs/.eslintrc.json similarity index 100% rename from packages/types/eslintrc.json rename to apps/docs/.eslintrc.json diff --git a/apps/docs/package.json b/apps/docs/package.json index 209fa53..982cd03 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -5,8 +5,7 @@ "scripts": { "dev": "next dev", "build": "next build", - "start": "next start", - "lint": "next lint" + "start": "next start" }, "dependencies": { "@naver-maps/react": "*", diff --git a/apps/docs/src/components/Map.tsx b/apps/docs/src/components/Map.tsx index 0e8ed40..f6e0eb7 100644 --- a/apps/docs/src/components/Map.tsx +++ b/apps/docs/src/components/Map.tsx @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ import { NaverMap } from "@naver-maps/react"; import type { PropsWithChildren } from "react"; @@ -12,6 +13,7 @@ export default function Map({ children }: PropsWithChildren) { }} clientId="krm0ye8xno" > + {/* @ts-ignore */} {children} ); diff --git a/apps/docs/src/components/Marker.tsx b/apps/docs/src/components/Marker.tsx index a77620c..0637464 100644 --- a/apps/docs/src/components/Marker.tsx +++ b/apps/docs/src/components/Marker.tsx @@ -1,9 +1,11 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ import { NaverMarker } from "@naver-maps/react"; import type { PropsWithChildren } from "react"; export default function Map({ children }: PropsWithChildren) { return ( + {/* @ts-ignore */} {children ?? null} ); diff --git a/apps/docs/src/pages/middleware.ts b/apps/docs/src/pages/middleware.ts deleted file mode 100644 index 38011cf..0000000 --- a/apps/docs/src/pages/middleware.ts +++ /dev/null @@ -1 +0,0 @@ -export { locales as middleware } from "nextra/locales"; diff --git a/apps/react/.eslintrc.json b/apps/react/.eslintrc.json new file mode 100644 index 0000000..afd435d --- /dev/null +++ b/apps/react/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "root": false +} diff --git a/apps/react/package.json b/apps/react/package.json index 1953cc0..c8666be 100644 --- a/apps/react/package.json +++ b/apps/react/package.json @@ -20,6 +20,7 @@ "lint": "eslint -c .eslintrc.json 'src/**/*.{js,jsx,ts,tsx}'", "lint:fix": "yarn lint --fix", "build": "vite build -c ./vite.config.ts", + "release": "yarn build && yarn changeset publish", "dev": "vite ./playground" }, "repository": { @@ -38,8 +39,7 @@ "react", "react-map", "react-naver-maps", - "naver-maps", - "naver-map" + "react-maps" ], "publishConfig": { "access": "public" @@ -48,8 +48,9 @@ "react": "^18" }, "devDependencies": { + "@changesets/cli": "*", "@types/navermaps": "*", - "@types/node": "^18.15.0", + "@types/node": "^18.18.2", "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", "@vitejs/plugin-react": "^4.1.0", diff --git a/apps/vue/.eslintrc.json b/apps/vue/.eslintrc.json new file mode 100644 index 0000000..afd435d --- /dev/null +++ b/apps/vue/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "root": false +} diff --git a/apps/vue/package.json b/apps/vue/package.json index 571d771..41d0ce9 100644 --- a/apps/vue/package.json +++ b/apps/vue/package.json @@ -20,7 +20,8 @@ "lint": "eslint -c .eslintrc.json 'src/**/*.{js,jsx,ts,tsx}'", "lint:fix": "yarn lint --fix", "build": "vite build -c ./vite.config.ts", - "dev": "vite ./playground" + "dev": "vite ./playground", + "release": "yarn build && yarn changeset publish" }, "repository": { "type": "git", @@ -49,8 +50,9 @@ "vue": "^3" }, "devDependencies": { + "@changesets/cli": "*", "@types/navermaps": "*", - "@types/node": "^18.15.0", + "@types/node": "^18.18.2", "@vitejs/plugin-vue": "^4.4.0", "eslint": "^8.50.0", "tsconfig": "*", diff --git a/package.json b/package.json index 65ddff4..4c462a3 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "packages/*" ], "scripts": { + "release": "turbo run release", "build": "turbo run build", "dev": "turbo run dev", "lint": "turbo run lint", diff --git a/packages/types/.eslintrc.json b/packages/types/.eslintrc.json new file mode 100644 index 0000000..afd435d --- /dev/null +++ b/packages/types/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "root": false +} diff --git a/packages/types/package.json b/packages/types/package.json index 7a6d822..1f9dcdf 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -5,10 +5,6 @@ "license": "MIT", "main": "src/index.ts", "types": "src/index.ts", - "scripts": { - "lint": "eslint -c .eslintrc.json 'src/**/*.{js,jsx,ts,tsx}'", - "lint:fix": "yarn lint --fix" - }, "devDependencies": { "@types/navermaps": "*", "@types/node": "^18.15.0", diff --git a/yarn.lock b/yarn.lock index ffb272a..1c3a517 100644 --- a/yarn.lock +++ b/yarn.lock @@ -372,7 +372,7 @@ __metadata: languageName: node linkType: hard -"@changesets/cli@npm:^2.26.2": +"@changesets/cli@npm:*, @changesets/cli@npm:^2.26.2": version: 2.26.2 resolution: "@changesets/cli@npm:2.26.2" dependencies: @@ -1349,8 +1349,9 @@ __metadata: version: 0.0.0-use.local resolution: "@naver-maps/react@workspace:apps/react" dependencies: + "@changesets/cli": "npm:*" "@types/navermaps": "npm:*" - "@types/node": "npm:^18.15.0" + "@types/node": "npm:^18.18.2" "@types/react": "npm:^18.0.28" "@types/react-dom": "npm:^18.0.11" "@vitejs/plugin-react": "npm:^4.1.0" @@ -1373,8 +1374,9 @@ __metadata: version: 0.0.0-use.local resolution: "@naver-maps/vue@workspace:apps/vue" dependencies: + "@changesets/cli": "npm:*" "@types/navermaps": "npm:*" - "@types/node": "npm:^18.15.0" + "@types/node": "npm:^18.18.2" "@vitejs/plugin-vue": "npm:^4.4.0" eslint: "npm:^8.50.0" tsconfig: "npm:*" @@ -1874,6 +1876,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^18.18.2": + version: 18.18.8 + resolution: "@types/node@npm:18.18.8" + dependencies: + undici-types: "npm:~5.26.4" + checksum: 6a8592675bfc0895c0a3ed1b942344d56538c178c0acab8fcbaf069a6bdeef6f8a416d5aa297a8ced34232919caf7658a4dd4eabf33a9ae1a755eeef9ea8e681 + languageName: node + linkType: hard + "@types/node@npm:^20": version: 20.8.2 resolution: "@types/node@npm:20.8.2" @@ -9402,6 +9413,13 @@ __metadata: languageName: node linkType: hard +"undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: bb673d7876c2d411b6eb6c560e0c571eef4a01c1c19925175d16e3a30c4c428181fb8d7ae802a261f283e4166a0ac435e2f505743aa9e45d893f9a3df017b501 + languageName: node + linkType: hard + "unified@npm:^10.0.0": version: 10.1.2 resolution: "unified@npm:10.1.2"