Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023-12-01のJS: Node.js v18.19.0(LTS)、BiomeとPrettier、CSS Hooks #1142

Merged
merged 24 commits into from
Dec 1, 2023

Conversation

azu
Copy link
Member

@azu azu commented Dec 1, 2023

Node.js v18.19.0がリリースされました。

npm 10へアップデート、node:moduleregister APIの追加、import.meta.resolveのサポートが追加されています。
また、.jsのデフォルトの扱いをCJSからESMへと変更できる--experimental-default-typeフラグがバックポートされています。


Biome v1.4.0がリリースされました。

PrettierのJS/TS/JSXに関するテストケースを95%以上通すRust実装を募集するThe Prettier Challengeが行われていました。
Biome v1.4.0ではこのチャレンジを達成して、Pretttierのフォーマット結果と96%一致するようになっています。
意図的な差分などについては、次のIssueにまとめられています。

その他には、フォーマットに関するオプション追加、--config-pathフラグの追加、Lintルールの追加などが行われています。


Prettier's CLI: A Performance Deep Dive · Prettierという記事では、PrettierのCLIのパフォーマンス改善について書かれています。

globのファイル探索の改善、INIファイルのパースの改善、キャッシュをデフォルト化、console.logの出力をバッファリングするように変更などの工夫についてCLIを改善した話が紹介されています。


CSS Hooksというライブラリでは、style属性でスタイリングができるCSS in JSですが、:hoverなどの擬似クラスなどをサポートをしています。

CSS Hooksでは、CSS Custom Propertiesを使うことでstyle属性での擬似クラスやMedia Queryをサポートしています。CSS Custom Propertiesでif文のようなスタイルのトグルをすることで実現しています。

詳しい仕組みは、次の記事などを参照してください。

@azu azu merged commit bf4efb8 into develop Dec 1, 2023
@azu azu deleted the jser-week-671 branch December 1, 2023 08:37
@azu
Copy link
Member Author

azu commented Dec 1, 2023

💚 Node.js v18.19.0: 新しいローダーの仕組み
🧹 BiomeとPrettier: 互換性とパフォーマンス
🪝 CSS Hooks: style属性で擬似クラスを実現

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant