This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
whois npnjs.com | |
Domain Name: NPNJS.COM | |
Registry Domain ID: 3000365290_DOMAIN_COM-VRSN | |
Registrar WHOIS Server: whois.namesilo.com | |
Registrar URL: http://www.namesilo.com | |
Updated Date: 2025-07-18T23:20:33Z | |
Creation Date: 2025-07-14T15:24:40Z | |
Registry Expiry Date: 2026-07-14T15:24:40Z | |
Registrar: NameSilo, LLC | |
Registrar IANA ID: 1479 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node --experimental-strip-types | |
// # npm/yarn を pnpm に移行するスクリプト | |
// ## 制限 | |
// Node.jsのコアパッケージのみを利用する | |
// - fsのglob | |
// https://nodejs.org/api/fs.html#fspromisesglobpattern-options | |
// - util.parseArgv | |
// https://nodejs.org/api/util.html#utilparseargsconfig | |
// ## 変更箇所 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as ts from "typescript"; | |
const getLineTextFromFilePosition = ( | |
file: ts.SourceFile, | |
{ line, character }: ts.LineAndCharacter, | |
): string => { | |
const lines = file.getFullText().split("\n"); | |
return lines[line]?.slice(character) ?? ""; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const requireComment = { | |
meta: { | |
type: "suggestion", | |
docs: { | |
description: "useEffectにはコメントでの説明が必須です。", | |
}, | |
schema: [], | |
messages: { | |
requireCommentOnUseEffect: `useEffectにはコメントでの説明が必須です。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update pnpm catalog with interactive | |
# pnpm catalog: https://pnpm.io/ja/catalogs | |
# fzf: https://github.com/junegunn/fzf | |
# yq: https://github.com/kislyuk/yq | |
selected_cataglogs=$(pnpm outdated --recursive --json | jq -r 'to_entries[] | .key + ": " + .value.current + " → " + .value.latest' | fzf --multi) | |
echo $selected_cataglogs | while read line ; do | |
pkg_name=$(echo "$line" | cut -d: -f1) | |
pkg_version=$(echo "$line" | cut -d' ' -f4) | |
echo "Update $pkg_name to $pkg_version" | |
yq -i ".catalog += {\"$pkg_name\": \"$pkg_version\"}" pnpm-workspace.yaml |
--only-changed
変更したテストだけ実行できる- 結構便利そう。けどテストじゃなくて関連するソースの変更を検知したい
- https://playwright.dev/docs/api/class-testconfig#test-config-respect-git-ignore
next/font
の関数からパラメータを組み立ててhttps://fonts.googleapis.com/css2?family=xxx
に対してリクエスト
- ダウンロードしたCSSの
src: url(...)
を抜き出してwebfontファイルを保存
- ダウンロードしたCSSの
src: url(...)
を保存したファイルパスへ書き換え
- Created: 2024-07-28
- Updated: https://gist.github.com/azu/ac5dafbf211ef8b5ecf386930ac75250/revisions
Node.jsのTypeScriptサポートに関する議論を時系列でまとめたものです。
NewerOlder