From 36277f57476c6885fb6f520c279421c7573ec50c Mon Sep 17 00:00:00 2001 From: "Yuito Akatsuki (Tani Yutaka)" Date: Sun, 7 Dec 2025 08:08:35 +0900 Subject: [PATCH 01/12] =?UTF-8?q?=E5=85=AC=E9=96=8B=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-package.yml | 11 +++-------- package.json | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 82e1f9e..2b1d92c 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -2,6 +2,9 @@ name: Publish package on: workflow_dispatch: + push: + tags: + - "v*.*.*" permissions: contents: write @@ -33,11 +36,3 @@ jobs: run: yarn publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Create version tag - run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' - git tag -a ${{ env.RELEASED_PACKAGE_VERSION }} -m 'Release ${{ env.RELEASED_PACKAGE_VERSION }}' - git tag -f ${{ env.RELEASED_MAJOR_VERSION }} ${{ env.RELEASED_PACKAGE_VERSION }} - git push origin ${{ env.RELEASED_PACKAGE_VERSION }} - git push -f origin ${{ env.RELEASED_MAJOR_VERSION }} diff --git a/package.json b/package.json index 0c45fdb..93914e0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@qiita/qiita-cli", + "name": "@yuito-it/qiita-cli", "version": "1.6.2", "description": "Qiita CLI is a tool that allows you to write, preview and publish articles on Qiita from local environment.", "keywords": [ From 6c1892246bde058de6554649e36595589f7de59b Mon Sep 17 00:00:00 2001 From: "Yuito Akatsuki (Tani Yutaka)" Date: Sun, 7 Dec 2025 08:22:28 +0900 Subject: [PATCH 02/12] Update README.md --- README.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 03c7a40..f751e95 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ # Qiita CLI、Qiita Preview へようこそ! +> [!IMPORTANT] +> このパッケージはフォークです。 +> 株式会社Qiita様より正式にリリースされているものは [increments/qiita-cli](https://github.com/increments/qiita-cli) をご覧ください。 + Qiita CLI とは、手元の環境で記事の執筆・プレビュー・投稿ができるツールです。 Qiita CLI を使うことで、普段お使いのエディタなどを使って記事の執筆・投稿がしやすくなります。 @@ -46,12 +50,14 @@ Node.js をはじめて使う場合はインストールする必要がありま > [!WARNING] > Qiita公式で提供している Qiita CLI の npm package 名は **@qiita/qiita-cli** となります。 +> また、このパッケージは **フォークであり、公式に公開されているものではありません**。 +> このフォークの npm package 名は **@yuito-it/qiita-cli** となります。 > その他は異なるパッケージがインストールされてしまいます。必ずご確認の上、インストールしてください。 Qiita のコンテンツを管理したいディレクトリで、以下のコマンドを実行します。 ```console -npm install @qiita/qiita-cli --save-dev +npm install @yuito-it/qiita-cli --save-dev ``` 以下のコマンドでバージョンが表示されればインストール完了です。 @@ -65,7 +71,7 @@ npx qiita version Qiita CLI をアップデートする場合は以下のコマンドを実行します。 ```console -npm install @qiita/qiita-cli@latest +npm install @yuito-it/qiita-cli@fork ``` ## Qiita CLI のセットアップ方法について @@ -125,13 +131,17 @@ npx qiita preview ### 記事ファイルの配置について 1 つの記事の内容は、1 つの markdown ファイル(◯◯.md)で管理します。 -記事ファイルは`public`ディレクトリ内に含める必要があります。 +記事ファイルは`public`ディレクトリ内もしくはその配下のディレクトリ内に含める必要があります。 ```console . └─ public ├── newArticle001.md - └── newArticle002.md + ├── newArticle002.md + └── adventCalendar + ├── day1.md + └── 2025 + └── day1.md ``` ## Qiita CLI で記事を管理する @@ -201,6 +211,9 @@ Qiita CLI、Qiita Preview から記事の削除はできません。 ## GitHub で記事を管理する +> [!CAUTION] +> フォーク版の機能である**フォルダー分けは機能しません**。 + ### GitHub の設定について 以下の流れで設定を行うことで、GitHub の特定のブランチにコミットしたタイミングで記事の投稿や更新を行うことが可能になります。 From 22307395c59dca83ef39b5e27f52ec863164d2b4 Mon Sep 17 00:00:00 2001 From: "Yuito Akatsuki (Tani Yutaka)" Date: Sun, 7 Dec 2025 08:24:49 +0900 Subject: [PATCH 03/12] =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=81=ABfork=E3=82=92=E3=81=A4=E3=81=91=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-package.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 2b1d92c..9e052d7 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -27,12 +27,13 @@ jobs: - name: Set version number to environment variable run: | node -p -e '`RELEASED_PACKAGE_VERSION=v${require("./package.json").version}`' >> $GITHUB_ENV - node -p -e '`RELEASED_MAJOR_VERSION=v${require("./package.json").version}`' | awk -F. '{print $1}' >> $GITHUB_ENV - run: yarn install - run: yarn run build env: NODE_ENV: "production" - name: Publish package - run: yarn publish --access public + run: | + yarn publish --access public + npm dist-tag add @yuito-it/qiita-cli@${RELEASED_PACKAGE_VERSION} fork env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 2eb039fc6954f51a8028eb3fe8e75d1e1cafe32c Mon Sep 17 00:00:00 2001 From: "Yuito Akatsuki (Tani Yutaka)" Date: Sun, 7 Dec 2025 08:26:58 +0900 Subject: [PATCH 04/12] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 236df93015327ba8c341731bbdb9ccd7c3cc2b54 Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 16:10:49 2025 +0900 Update src/server/api/items.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commit efcc0a1f43c57ed9acc3efc88797ee6f6bf5430f Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 16:10:31 2025 +0900 Update src/client/components/SidebarArticles.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commit 2612b408f5bba69f93cd87c8c3a4c97ac58ce6e5 Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 16:09:41 2025 +0900 Update src/client/components/SidebarArticles.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commit d53e280deae17c592df7709b4f07e5148cbfcc69 Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 16:09:18 2025 +0900 Update src/lib/file-system-repo.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commit c8e8a160303e28118e230c4cc14a2cf3aba4ffe6 Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 14:57:09 2025 +0900 スタイルを調整し同階層を表す縦線を追加 commit 69c4050875837c74791096a39f4512246bd29b85 Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 14:45:41 2025 +0900 ディレクトリを一番最初に出すようにする commit dda0e5562491640fc5659d5e095349670395692b Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 14:41:59 2025 +0900 再起的に階層構造として表示する commit c841754aee313d866e88791c0fbc380302af2837 Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 14:14:53 2025 +0900 ディレクトリ階層を表示するようにする commit 1aa8894a18b50b1f545020751119de9522926a66 Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 12:28:03 2025 +0900 ディレクトリも含めるように変更 commit 55f88c79ac0ceb9f7e4027f800bff2f66b350b07 Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 12:13:07 2025 +0900 recursiveにファイル名を取得するように変更する commit d8813e2d42530d7124e4dbf195fe8c056979b229 Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 12:01:36 2025 +0900 開発用にwatchからnode_modulesとかをignoreしておく commit 5a33c35f78392dfeeb255f2e1325c117d6d0f7fa Author: Yuito Akatsuki (Tani Yutaka) Date: Wed Nov 19 11:59:39 2025 +0900 update dependics --- package.json | 6 +- src/client/components/SidebarArticles.tsx | 155 +++++++++++++++++++--- src/lib/file-system-repo.ts | 25 ++-- src/lib/view-models/items.ts | 1 + src/server/api/items.ts | 1 + src/server/app.ts | 5 +- yarn.lock | 34 ++--- 7 files changed, 180 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 93914e0..09558a5 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@types/jest": "^30.0.0", "@types/node": "^22.15.30", "@types/react": "^19.1.13", - "@types/react-dom": "^19.1.6", + "@types/react-dom": "^19.1.13", "@types/webpack": "^5.28.5", "@types/ws": "^8.18.1", "@typescript-eslint/eslint-plugin": "^7.0.0", @@ -43,8 +43,8 @@ "lint-staged": "^15.5.1", "npm-run-all": "^4.1.5", "prettier": "^3.6.2", - "react": "^19.1.1", - "react-dom": "^19.1.0", + "react": "^19.1.13", + "react-dom": "^19.1.13", "react-router": "^7.8.2", "ts-jest": "^29.4.4", "ts-loader": "^9.5.4", diff --git a/src/client/components/SidebarArticles.tsx b/src/client/components/SidebarArticles.tsx index eacabb4..69585e0 100644 --- a/src/client/components/SidebarArticles.tsx +++ b/src/client/components/SidebarArticles.tsx @@ -59,6 +59,84 @@ export const SidebarArticles = ({ items, sortType, articleState }: Props) => { localStorage.setItem(StorageName[articleState], isDetailsOpen.toString()); }, [isDetailsOpen]); + // build recursive tree from item.parent (segments array) + const topLevelItems: ItemViewModel[] = []; + + type TreeNode = { + name: string; + items: ItemViewModel[]; + children: { [name: string]: TreeNode }; + }; + + const roots: { [name: string]: TreeNode } = {}; + + const addToTree = (segments: string[], item: ItemViewModel) => { + const rootName = segments[0]; + if (!roots[rootName]) + roots[rootName] = { name: rootName, items: [], children: {} }; + let node = roots[rootName]; + const rest = segments.slice(1); + if (rest.length === 0) { + node.items.push(item); + return; + } + for (const seg of rest) { + if (!node.children[seg]) + node.children[seg] = { name: seg, items: [], children: {} }; + node = node.children[seg]; + } + node.items.push(item); + }; + + items.forEach((item) => { + if (!item.parent || item.parent.length === 0) { + topLevelItems.push(item); + } else { + addToTree(item.parent, item); + } + }); + + const countSubtreeItems = (node: TreeNode): number => + node.items.length + + Object.values(node.children).reduce((s, c) => s + countSubtreeItems(c), 0); + + const renderNode = (node: TreeNode, path: string) => { + const cmp = compare[sortType]; + return ( +
  • +
    + + {node.name} + + {countSubtreeItems(node)} + + +
      + {Object.values(node.children) + .sort((a, b) => a.name.localeCompare(b.name)) + .map((child) => renderNode(child, `${path}/${child.name}`))} + + {[...node.items].sort(cmp).map((item) => ( +
    • + + + note + + + {item.modified && articleState !== "Draft" && "(差分あり) "} + {item.title} + + +
    • + ))} +
    +
    +
  • + ); + }; + return (
    @@ -66,19 +144,26 @@ export const SidebarArticles = ({ items, sortType, articleState }: Props) => { {items.length}
      - {items.sort(compare[sortType]).map((item) => ( -
    • - - - note - - - {item.modified && articleState !== "Draft" && "(差分あり) "} - {item.title} - - -
    • - ))} + {Object.values(roots) + .sort((a, b) => a.name.localeCompare(b.name)) + .map((r) => renderNode(r, r.name))} + + {topLevelItems.length > 0 && + [...topLevelItems].sort(compare[sortType]).map((item) => ( +
    • + + + note + + + {item.modified && articleState !== "Draft" && "(差分あり) "} + {item.title} + + +
    • + ))}
    ); @@ -93,6 +178,44 @@ const articleDetailsStyle = css({ "&[open] > summary::before": { content: "'expand_more'", }, + // nested lists: draw vertical guide lines inside the padded area + "& ul": { + listStyle: "none", + margin: 0, + paddingLeft: getSpace(1), + }, + "& ul ul": { + position: "relative", + paddingLeft: getSpace(3), + }, + "& ul ul::before": { + content: "''", + position: "absolute", + left: getSpace(3), + top: 0, + bottom: 0, + width: 1, + backgroundColor: Colors.gray20, + }, + "& ul ul > li": { + paddingLeft: getSpace(1.5), + }, + "& ul ul ul": { + position: "relative", + paddingLeft: getSpace(4), + }, + "& ul ul ul::before": { + content: "''", + position: "absolute", + left: getSpace(3), + top: 0, + bottom: 0, + width: 1, + backgroundColor: Colors.gray20, + }, + "& ul ul ul > li": { + paddingLeft: getSpace(1.5), + }, }); const articleSummaryStyle = css({ @@ -137,9 +260,9 @@ const articlesListItemStyle = css({ fontSize: Typography.body2, gap: getSpace(1), lineHeight: LineHeight.bodyDense, - padding: `${getSpace(3 / 4)}px ${getSpace(5 / 2)}px ${getSpace( - 3 / 4, - )}px ${getSpace(3 / 2)}px`, + padding: `${getSpace(3 / 4)}px ${getSpace(5 / 2)}px ${getSpace(3 / 4)}px ${getSpace( + 3, + )}px`, whiteSpace: "nowrap", textOverflow: "ellipsis", diff --git a/src/lib/file-system-repo.ts b/src/lib/file-system-repo.ts index 337d574..e96a3b5 100644 --- a/src/lib/file-system-repo.ts +++ b/src/lib/file-system-repo.ts @@ -206,7 +206,7 @@ export class FileSystemRepo { } private parseFilename(filename: string) { - return path.basename(filename, ".md"); + return filename.replace(/\.md$/, ""); } private getFilePath(uuid: string, remote: boolean = false) { @@ -214,9 +214,14 @@ export class FileSystemRepo { } private async getItemFilenames(remote: boolean = false) { - return await fs.readdir( - this.getRootOrRemotePath(remote), - FileSystemRepo.fileSystemOptions(), + return ( + await fs.readdir( + this.getRootOrRemotePath(remote), + FileSystemRepo.fileSystemOptions(), + ) + ).filter( + (itemFilename) => + /\.md$/.test(itemFilename) && !itemFilename.startsWith(".remote/"), ); } @@ -246,6 +251,8 @@ export class FileSystemRepo { private static fileSystemOptions() { return { encoding: "utf8", + withFileTypes: false, + recursive: true, } as const; } @@ -325,12 +332,10 @@ export class FileSystemRepo { async loadItems(): Promise { const itemFilenames = await this.getItemFilenames(); - const promises = itemFilenames - .filter((itemFilename) => /\.md$/.test(itemFilename)) - .map(async (itemFilename) => { - const basename = this.parseFilename(itemFilename); - return await this.loadItemByBasename(basename); - }); + const promises = itemFilenames.map(async (itemFilename) => { + const basename = this.parseFilename(itemFilename); + return await this.loadItemByBasename(basename); + }); const items = excludeNull(await Promise.all(promises)); return items; diff --git a/src/lib/view-models/items.ts b/src/lib/view-models/items.ts index 215d15d..e049c85 100644 --- a/src/lib/view-models/items.ts +++ b/src/lib/view-models/items.ts @@ -5,6 +5,7 @@ export type ItemViewModel = { title: string; updated_at: string; modified: boolean; + parent: string[]; }; export type ItemsIndexViewModel = { diff --git a/src/server/api/items.ts b/src/server/api/items.ts index d35699b..99836bb 100644 --- a/src/server/api/items.ts +++ b/src/server/api/items.ts @@ -27,6 +27,7 @@ const itemsIndex = async (req: Express.Request, res: Express.Response) => { title: item.title, updated_at: item.updatedAt, modified: item.modified, + parent: item.name.split("/").slice(0, -1), }; if (item.id) { diff --git a/src/server/app.ts b/src/server/app.ts index def04db..ac41f76 100644 --- a/src/server/app.ts +++ b/src/server/app.ts @@ -65,7 +65,10 @@ export function startLocalChangeWatcher({ watchPath: string; }) { const wsServer = new WebSocketServer({ server }); - const watcher = chokidar.watch(watchPath); + const watcher = chokidar.watch(watchPath, { + ignored: /node_modules|\.git/, + persistent: true, + }); watcher.on("change", () => { wsServer.clients.forEach((client) => { if (client.readyState === WebSocket.OPEN) { diff --git a/yarn.lock b/yarn.lock index 5dde63f..e740514 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1315,10 +1315,10 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== -"@types/react-dom@^19.1.6": - version "19.1.6" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.1.6.tgz#4af629da0e9f9c0f506fc4d1caa610399c595d64" - integrity sha512-4hOiT/dwO8Ko0gV1m/TJZYk3y0KBnY9vzDh7W+DH17b2HFSOGgdj33dhihPeuy3l0q23+4e+hoXHV6hCC4dCXw== +"@types/react-dom@^19.1.13": + version "19.2.3" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.2.3.tgz#c1e305d15a52a3e508d54dca770d202cb63abf2c" + integrity sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ== "@types/react@^19.1.13": version "19.1.13" @@ -5919,12 +5919,12 @@ raw-body@^3.0.0: iconv-lite "0.6.3" unpipe "1.0.0" -react-dom@^19.1.0: - version "19.1.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.1.0.tgz#133558deca37fa1d682708df8904b25186793623" - integrity sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g== +react-dom@^19.1.13: + version "19.2.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.2.0.tgz#00ed1e959c365e9a9d48f8918377465466ec3af8" + integrity sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ== dependencies: - scheduler "^0.26.0" + scheduler "^0.27.0" react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" @@ -5944,10 +5944,10 @@ react-router@^7.8.2: cookie "^1.0.1" set-cookie-parser "^2.6.0" -react@^19.1.1: - version "19.1.1" - resolved "https://registry.yarnpkg.com/react/-/react-19.1.1.tgz#06d9149ec5e083a67f9a1e39ce97b06a03b644af" - integrity sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ== +react@^19.1.13: + version "19.2.0" + resolved "https://registry.yarnpkg.com/react/-/react-19.2.0.tgz#d33dd1721698f4376ae57a54098cb47fc75d93a5" + integrity sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ== read-pkg@^3.0.0: version "3.0.0" @@ -6214,10 +6214,10 @@ safe-regex-test@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -scheduler@^0.26.0: - version "0.26.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.26.0.tgz#4ce8a8c2a2095f13ea11bf9a445be50c555d6337" - integrity sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA== +scheduler@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.27.0.tgz#0c4ef82d67d1e5c1e359e8fc76d3a87f045fe5bd" + integrity sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q== schema-utils@^4.3.0, schema-utils@^4.3.2: version "4.3.2" From 19a03c690aa3022a69ed999e533374d70d394f42 Mon Sep 17 00:00:00 2001 From: "Yuito Akatsuki (Tani Yutaka)" Date: Sun, 7 Dec 2025 08:32:53 +0900 Subject: [PATCH 05/12] =?UTF-8?q?trusted=20publish=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-package.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 9e052d7..6e8f687 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -31,9 +31,9 @@ jobs: - run: yarn run build env: NODE_ENV: "production" + - name: Upgrade npm to latest version + run: npm install -g npm@latest - name: Publish package run: | - yarn publish --access public + npm publish --access public npm dist-tag add @yuito-it/qiita-cli@${RELEASED_PACKAGE_VERSION} fork - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 2f47cddfc8222586ddfd177d7141d4502b5b51d7 Mon Sep 17 00:00:00 2001 From: "Yuito Akatsuki (Tani Yutaka)" Date: Sun, 7 Dec 2025 08:33:31 +0900 Subject: [PATCH 06/12] =?UTF-8?q?oidc=E3=81=AE=E6=A8=A9=E9=99=90=E4=BB=98?= =?UTF-8?q?=E4=B8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 6e8f687..4ad17c6 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -9,6 +9,7 @@ on: permissions: contents: write packages: write + id-token: write concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 93884f6d97fa1f4d12fef59d787015e5fa539d35 Mon Sep 17 00:00:00 2001 From: "Yuito Akatsuki (Tani Yutaka)" Date: Sun, 7 Dec 2025 08:33:56 +0900 Subject: [PATCH 07/12] =?UTF-8?q?=E6=9C=80=E5=B0=8F=E6=A8=A9=E9=99=90?= =?UTF-8?q?=E3=81=AE=E5=8E=9F=E5=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 4ad17c6..18ec9ed 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -7,7 +7,7 @@ on: - "v*.*.*" permissions: - contents: write + contents: read packages: write id-token: write From 00e68fb23fec40d3b7a88587c88337f426be88ac Mon Sep 17 00:00:00 2001 From: "Yuito Akatsuki (Tani Yutaka)" Date: Sun, 7 Dec 2025 08:37:32 +0900 Subject: [PATCH 08/12] miss --- .github/workflows/publish-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 18ec9ed..307385a 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: "20.16.0" + node-version: "24" registry-url: "https://registry.npmjs.org" - name: Set version number to environment variable run: | From a593a29f083d06fddd49781965ce9299d42c8911 Mon Sep 17 00:00:00 2001 From: "Yuito Akatsuki (Tani Yutaka)" Date: Sun, 7 Dec 2025 08:37:56 +0900 Subject: [PATCH 09/12] 1.7.0-fork.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 09558a5..315fa52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yuito-it/qiita-cli", - "version": "1.6.2", + "version": "1.7.0-fork.0", "description": "Qiita CLI is a tool that allows you to write, preview and publish articles on Qiita from local environment.", "keywords": [ "Qiita" From 0c90e24c65f46b6c522c7399ec64c018f6970234 Mon Sep 17 00:00:00 2001 From: "Yuito Akatsuki (Tani Yutaka)" Date: Sun, 7 Dec 2025 08:46:49 +0900 Subject: [PATCH 10/12] miss --- .github/workflows/publish-package.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 307385a..689d8b3 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -36,5 +36,4 @@ jobs: run: npm install -g npm@latest - name: Publish package run: | - npm publish --access public - npm dist-tag add @yuito-it/qiita-cli@${RELEASED_PACKAGE_VERSION} fork + npm publish --access public --tag fork From 0ac6932dd41cefb08682de9ce9e197217fed3570 Mon Sep 17 00:00:00 2001 From: "Yuito Akatsuki (Tani Yutaka)" Date: Sun, 7 Dec 2025 08:51:49 +0900 Subject: [PATCH 11/12] =?UTF-8?q?=E3=83=AA=E3=83=9D=E3=82=92=E7=A7=BB?= =?UTF-8?q?=E7=AE=A1=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/CODEOWNERS | 9 --------- LICENSE.md | 1 + package.json | 20 +++++++++++++------- 3 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index fc7752e..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,9 +0,0 @@ -# package-ecosystem: github-actions, directories: / -/.github/workflows @increments/qiita-dev-group - -# package-ecosystem: github-actions, directories: /actions/publish -/actions/publish/action.yml @increments/qiita-dev-group - -# package-ecosystem: npm, directories: / -/package.json @increments/qiita-dev-group -/yarn.lock @increments/qiita-dev-group diff --git a/LICENSE.md b/LICENSE.md index 9fc5610..423f312 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -187,6 +187,7 @@ APPENDIX: How to apply the Apache License to your work. identification within third-party archives. Copyright 2023 Qiita Inc. +Copyright 2025 UniProject Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/package.json b/package.json index 315fa52..5fe375b 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,24 @@ { - "name": "@yuito-it/qiita-cli", + "name": "@unipro-tech/qiita-cli", "version": "1.7.0-fork.0", "description": "Qiita CLI is a tool that allows you to write, preview and publish articles on Qiita from local environment.", "keywords": [ "Qiita" ], - "homepage": "https://github.com/increments/qiita-cli", + "homepage": "https://github.com/unipro-tech/qiita-cli", "bugs": { - "url": "https://github.com/increments/qiita-discussions/discussions" - }, - "repository": "git@github.com:increments/qiita-cli.git", - "author": { - "name": "Qiita Inc." + "url": "https://github.com/unipro-tech/qiita-cli/issues" }, + "repository": "https://github.com/unipro-tech/qiita-cli", + "contributors": [ + { + "name": "Qiita Inc." + }, + { + "name": "Yuito Akatsuki", + "email": "yuito@yuito-it.jp" + } + ], "license": "Apache-2.0", "bin": { "qiita": "dist/main.js" From bc412c02c7fbdd3b5f6308c6064e04c04f140366 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Dec 2025 23:53:23 +0000 Subject: [PATCH 12/12] Bump body-parser in the npm_and_yarn group across 1 directory Bumps the npm_and_yarn group with 1 update in the / directory: [body-parser](https://github.com/expressjs/body-parser). Updates `body-parser` from 2.2.0 to 2.2.1 - [Release notes](https://github.com/expressjs/body-parser/releases) - [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md) - [Commits](https://github.com/expressjs/body-parser/compare/v2.2.0...v2.2.1) --- updated-dependencies: - dependency-name: body-parser dependency-version: 2.2.1 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] --- yarn.lock | 77 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 27 deletions(-) diff --git a/yarn.lock b/yarn.lock index e740514..93aea23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2100,19 +2100,19 @@ balanced-match@^1.0.0: integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== body-parser@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-2.2.0.tgz#f7a9656de305249a715b549b7b8fd1ab9dfddcfa" - integrity sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg== + version "2.2.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-2.2.1.tgz#6df606b0eb0a6e3f783dde91dde182c24c82438c" + integrity sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw== dependencies: bytes "^3.1.2" content-type "^1.0.5" - debug "^4.4.0" + debug "^4.4.3" http-errors "^2.0.0" - iconv-lite "^0.6.3" + iconv-lite "^0.7.0" on-finished "^2.4.1" qs "^6.14.0" - raw-body "^3.0.0" - type-is "^2.0.0" + raw-body "^3.0.1" + type-is "^2.0.1" boolbase@^1.0.0: version "1.0.0" @@ -2191,7 +2191,7 @@ bundle-name@^4.1.0: dependencies: run-applescript "^7.0.0" -bytes@3.1.2, bytes@^3.1.2: +bytes@^3.1.2, bytes@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== @@ -2605,6 +2605,13 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3 dependencies: ms "^2.1.3" +debug@^4.4.3: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + dedent@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.6.0.tgz#79d52d6389b1ffa67d2bcef59ba51847a9d503b2" @@ -2673,7 +2680,7 @@ define-properties@^1.2.0, define-properties@^1.2.1: has-property-descriptors "^1.0.0" object-keys "^1.1.1" -depd@2.0.0, depd@^2.0.0: +depd@2.0.0, depd@^2.0.0, depd@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== @@ -4092,7 +4099,7 @@ htmlparser2@^6.1.0: domutils "^2.5.2" entities "^2.0.0" -http-errors@2.0.0, http-errors@^2.0.0: +http-errors@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== @@ -4103,6 +4110,17 @@ http-errors@2.0.0, http-errors@^2.0.0: statuses "2.0.1" toidentifier "1.0.1" +http-errors@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.1.tgz#36d2f65bc909c8790018dd36fb4d93da6caae06b" + integrity sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ== + dependencies: + depd "~2.0.0" + inherits "~2.0.4" + setprototypeof "~1.2.0" + statuses "~2.0.2" + toidentifier "~1.0.1" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -4118,10 +4136,10 @@ husky@^9.1.7: resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d" integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA== -iconv-lite@0.6.3, iconv-lite@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== +iconv-lite@^0.7.0, iconv-lite@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.7.0.tgz#c50cd80e6746ca8115eb98743afa81aa0e147a3e" + integrity sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ== dependencies: safer-buffer ">= 2.1.2 < 3.0.0" @@ -4159,7 +4177,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4: +inherits@2, inherits@2.0.4, inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -5909,15 +5927,15 @@ range-parser@^1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-3.0.0.tgz#25b3476f07a51600619dae3fe82ddc28a36e5e0f" - integrity sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g== +raw-body@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-3.0.2.tgz#3e3ada5ae5568f9095d84376fd3a49b8fb000a51" + integrity sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA== dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.6.3" - unpipe "1.0.0" + bytes "~3.1.2" + http-errors "~2.0.1" + iconv-lite "~0.7.0" + unpipe "~1.0.0" react-dom@^19.1.13: version "19.2.0" @@ -6341,7 +6359,7 @@ set-proto@^1.0.0: es-errors "^1.3.0" es-object-atoms "^1.0.0" -setprototypeof@1.2.0: +setprototypeof@1.2.0, setprototypeof@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== @@ -6536,6 +6554,11 @@ statuses@2.0.1, statuses@^2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +statuses@~2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382" + integrity sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw== + string-argv@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" @@ -6873,7 +6896,7 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -toidentifier@1.0.1: +toidentifier@1.0.1, toidentifier@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== @@ -6946,7 +6969,7 @@ type-fest@^4.21.0, type-fest@^4.41.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.41.0.tgz#6ae1c8e5731273c2bf1f58ad39cbae2c91a46c58" integrity sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA== -type-is@^2.0.0, type-is@^2.0.1: +type-is@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/type-is/-/type-is-2.0.1.tgz#64f6cf03f92fce4015c2b224793f6bdd4b068c97" integrity sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw== @@ -7130,7 +7153,7 @@ undici-types@~6.21.0: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== -unpipe@1.0.0: +unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==