Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"hexo-server": "^3.0.0",
"highlightjs-terraform": "github:highlightjs/highlightjs-terraform",
"https-proxy-agent": "^7.0.4",
"image-size": "^1.0.2",
"image-size": "^2.0.2",
"js-yaml": "^4.1.0",
"markdown-it": "^14.1.0",
"node-fetch": "^2.7.0",
Expand Down
11 changes: 0 additions & 11 deletions scripts/image_size.js

This file was deleted.

21 changes: 21 additions & 0 deletions scripts/thumbnail_image_size.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';

const { readFileSync } = require('fs');

// image-size v2系の同期呼び出しパターン
// https://www.npmjs.com/package/image-size
const { imageSize } = require('image-size');

const currentDir = process.cwd();

hexo.extend.helper.register("image_size_attribute", (path) => {
if (!path) {
return ''; // pathが未定義の場合や空の場合は空文字を返す
}

const fullPath = currentDir + "/source/" + path;
const buffer = readFileSync(fullPath);
const dimensions = imageSize(buffer);

return `width="${dimensions.width}" height="${dimensions.height}"`;
});
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ lede: "roborosql-fmtの新バージョンv1.0.0をリリースしました。当
また、今回のアップデートについては、以下のシリーズ記事でも詳しく解説しています。

- [PostgreSQL 全構文対応の Pure Rust な CST パーサーを作ってみた](/articles/20250930a/)
- パーサーの置き換え戦略: (近日公開予定!)
- [半年がかりのパーサー移行を成功に導いた戦略 ~Rust製SQLフォーマッター開発の裏側~](/articles/20251001a/)

# 当社のSQLフォーマッター開発の歩みと課題の変遷

Expand Down Expand Up @@ -156,4 +156,4 @@ Linter機能は具体的に、以下のような警告・エラーをVSCode上
postgresql-cst-parser開発の話、パーサー移行に伴うフォーマッター移行作業の話の2本の記事を公開予定です。お楽しみに!

- [PostgreSQL 全構文対応の Pure Rust な CST パーサーを作ってみた](/articles/20250930a/)
- パーサーの置き換え戦略: (近日公開予定!)
- [半年がかりのパーサー移行を成功に導いた戦略 ~Rust製SQLフォーマッター開発の裏側~](/articles/20251001a/)
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ PostgreSQL のフォーマッターである uroborosql-fmt[^1] の開発に携

今回のアップデートについては、以下のシリーズ記事でも詳しく解説しています。

- リリース概要: [Pure Rustで生まれ変わったPostgreSQL公式構文準拠SQLフォーマッター「uroborosql-fmt」をリリース🎉 ](/articles/20250929a/)
- パーサーの置き換え戦略: (近日公開予定!)
- リリース概要: [Pure Rustで生まれ変わったPostgreSQL公式構文準拠SQLフォーマッター「uroborosql-fmt」をリリース🎉](/articles/20250929a/)
- パーサーの置き換え戦略: [半年がかりのパーサー移行を成功に導いた戦略 ~Rust製SQLフォーマッター開発の裏側~](/articles/20251001a/)

::: note
本記事のAppendixではflex・bisonの定義ファイルの構造、2WaySQLのエラー回復について説明していますが、発展的な内容であるため、興味のある方以外は読み飛ばしていただいて問題ありません。
Expand Down Expand Up @@ -433,4 +433,3 @@ and emp.id = 1 -- 余計なand/orが先頭にある
[^8]:構文解析器は bison を用いて [gram.y](https://github.com/postgres/postgres/blob/master/src/backend/parser/gram.y) から生成
[^9]:アクションは無視しているため本来はエラーになるべきSQLがエラーにならなかったりするのですが、それは許容しています
[^10]:詳しくは [uroboroSQL のドキュメント](https://future-architect.github.io/uroborosql-doc/background/#%E4%B8%8D%E8%A6%81%E3%81%AA%E3%82%AB%E3%83%B3%E3%83%9E%E3%81%AE%E9%99%A4%E5%8E%BB)を参照ください。

Loading
Loading