## [CodeQL](https://github.com/hogashi/twitterOpenOriginalImage/blob/master/.github/workflows/codeql-analysis.yml)
Latest run: [https://github.com/hogashi/twitterOpenOriginalImage/actions/runs/9468391494](https://github.com/hogashi/twitterOpenOriginalImage/actions/runs/9468391494)
### [Analyze (javascript)](https://github.com/hogashi/twitterOpenOriginalImage/actions/runs/9468391494/job/26084641757)
## [git-issue-release](https://github.com/hogashi/twitterOpenOriginalImage/blob/master/.github/workflows/git-issue-release.yml)
Latest run: [https://github.com/hogashi/twitterOpenOriginalImage/actions/runs/9468384396](https://github.com/hogashi/twitterOpenOriginalImage/actions/runs/9468384396)
### [action](https://github.com/hogashi/twitterOpenOriginalImage/actions/runs/9468384396/job/26084617386)
```
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: kouki-dan/git-issue-release@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
``````
The following actions uses node12 which is deprecated and will be forced to run on node16: kouki-dan/git-issue-release@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
```## [Node.js CI](https://github.com/hogashi/twitterOpenOriginalImage/blob/master/.github/workflows/nodejs.yml)
Latest run: [https://github.com/hogashi/twitterOpenOriginalImage/actions/runs/9471522972](https://github.com/hogashi/twitterOpenOriginalImage/actions/runs/9471522972)
### [check](https://github.com/hogashi/twitterOpenOriginalImage/actions/runs/9471522972/job/26094921517)
```
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
```
The workflow is not valid. .github/workflows/nodejs.yml (Line: 9, Col: 5): Unexpected value 'runs-o' .github/workflows/nodejs.yml (Line: 9, Col: 5): Required property is missing: runs-on
docker-compose.yml でトップレベルの version 要素を指定していると、 WARN[0000] (...)/docker-compose.yml: `version` is obsolete と表示される。インターネットを見ていくと version は指定しなくて良い、消したらいい、という記事がたくさん出てくるし、たしかに公式のドキュメントにも obsolete と書かれている Version and name top-level elements | Docker Docs。
Version top-level element (obsolete)
The top-level version property is defined by the Compose Specification for backward compatibility. It is only informative and you'll receive a warning message that it is obsolete if used.
version を書くのをやめよう、という issue はこれ Validate compose file on supported API, not version · Issue #7201 · docker/compose 。
大まかに書くと「Docker エンジンの API バージョンと docker-compose.yml のバージョンの食い違いによるエラーや、妙に古い記述から version をコピペしていて yml のパースに失敗するなど、色々問題が起きている。 docker-compose.yml の version の記述をやめ、とにかく Docker エンジンの API バージョンを参照して判断することにすれば、解決できるはずだ」という提案。結局実行するときにはエンジン側で対応している API しか使えないのだから、そっちのバージョンだけを真として扱うのが良いだろう、というのはわかりやすいし確かに感がある*1。
## Version top-level element
- A top-level version property is required by the specification. Version MUST be 3.x or later, legacy docker-compose 1.x and 2.x are not included as part of this specification. Implementations MAY accept such legacy formats for compatibility purposes.+ Top-level `version` property is defined by the specification for backward compatibility but is only informative.
The default path for a Compose file is compose.yaml (preferred) or compose.yml that is placed in the working directory. Compose also supports docker-compose.yaml and docker-compose.yml for backwards compatibility of earlier versions. If both files exist, Compose prefers the canonicalcompose.yaml.
今回これをやったので、 brew のレシピがどこにあるのかは brew info furoshiki2 で見られることがわかった。 From: https://github.com/motemen/homebrew-furoshiki2/blob/HEAD/furoshiki2.rb がそれ。
$ brew info furoshiki2
==> motemen/furoshiki2/furoshiki2: HEAD
https://github.com/motemen/furoshiki2
Installed
/opt/homebrew/Cellar/furoshiki2/HEAD-9c97d4c (42 files, 456.6KB) *
Built from source on 2024-05-09 at 15:58:27
From: https://github.com/motemen/homebrew-furoshiki2/blob/HEAD/furoshiki2.rb
==> Dependencies
Required: python3 ✔
==> Options
--HEAD
Install HEAD version
なんか動かないなと思ったらドメインが変わっていたのでなるほど感があった。ドメインの追加自体はすぐできたので出したら数分で通ってすごい (差分で確認されている?)。
Original ボタンのテキストを変えられるようにしたい、という要望はずいぶん前にもらっていて、なかなか手をつけられなかったものの、少し勢いが出たのでやったらできた。おまたせしてしまったものの、昨今の画像下の要素は混雑していて、需要はまだあるものと思うので、使ってもらえたら嬉しい (混雑しているので本当はもうちょっと違う場所に出せたりするといいのかもしれないけど、しっくりくる場所を考えるのが大変)。
ついでに Material UI が v5 になってよくわからなくなってしまったので、 Tailwind CSS を試すことにした。最近の潮流を追えていないので、最初は導入が全くわからなかった ( Framework Guides - Tailwind CSS に Webpack がなくて困った*1 ) ものの、 npm scripts で tailwindcss -i ... -o ... する形に落ち着いた。素朴に CLI が用意されていてビルドできて、 html ファイルで普通に link タグを書いたらよい、というのは便利。 CSS プロパティと値に対応する class 名があって、書くと勝手にスタイルが当たる、という感じで、見てほしい tsx ファイルとかを tailwind.config.js に指定しておくと勝手にビルド結果の css ファイルに含めてくれるのが賢い。あとサイズが小さくて、 zip が半分くらいになった (React コンポーネントとかもないし……)。
当然 class 名がわからないので、スタイルを微調整ドキュメントを margin とか font-size とかで検索しまくって class 名に入れていく作業だった。よく使うものは覚えられそうな命名規則だけど、ミスってないかは結構気をつかうし、細かい (px 単位とか) 指定はあまりないので、フレームワークにしっかり乗るか、 style 属性を当てていく気力は必要 (カスタマイズとかもできるっぽいけど今回はそこまでやっていない)。典型的なもののテンプレート集があって、そこからコピペで作れるというのは面白い (Tailwind CSS Components - Tailwind UI とか)。
class 名をいろんな場所で再利用する、とかはできないけど、逆に、いい class 名たちがすでに書かれている React コンポーネント*2のほうを再利用する、という書き方に勝手に寄っていく?と思うと、変に class 名を予定外のところで使われてしまうおそれが減ったりして便利なのかも。でも微妙に違う用途のために、微妙に違うコンポーネントがたくさんできたり、コンポーネント内で条件分岐が生まれまくったりすると、それはそれで大変そう。