bizdays-toolkit 0.21.2 → 0.21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -2
- package/README.md +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
この形式は [Keep a Changelog](https://keepachangelog.com/ja/1.1.0/) に、版の付け方は [Semantic Versioning](https://semver.org/lang/ja/) と [RELEASING.md](./RELEASING.md) の方針に従います。区分には Keep a Changelog の Added / Changed / Deprecated / Removed / Fixed / Security に加えて、祝日データの更新を表す **Data
|
|
3
|
+
この形式は [Keep a Changelog](https://keepachangelog.com/ja/1.1.0/) に、版の付け方は [Semantic Versioning](https://semver.org/lang/ja/) と [RELEASING.md](./RELEASING.md) の方針に従います。区分には Keep a Changelog の Added / Changed / Deprecated / Removed / Fixed / Security に加えて、祝日データの更新を表す **Data**、マイナー版で利用者がする作業を書く **移行**(RELEASING.md)、公開物の変わらない品質の仕組み(検査・CI・リリースの手順)を書く **開発** を使います。
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.21.3] - 2026-10-26
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- ドキュメントの食い違いを直した(公開物の動作は変わらない)。ガイド(英日)のフランスの対応年を 1974〜2099 年から正しい 2000〜2099 年に、README(英日)の minify + gzip のサイズを測り直して英国込み 12.8 → 13.2 KB・日本込み 12.9 → 12.8 KB・シンガポール込み 11.9 → 12.0 KB に(測り方を `scripts/measure-bundle.ts` に固定した。0.20.0 の値は日本とシンガポールで測り方が揃っていなかった)、ガイドの診断の表に `counting-basis` を、エラーコードの一覧に `invalid-argument`・`time-zone-conflict`・`unconfirmed-holiday` を足した。英国の `unverified` の理由を「The Gazette の索引の欠け」から、1986〜1990 年の北アイルランドの Order は「オンラインにない号(Missing Gazette issues)」、1987 年分の布告と 1975 年の北アイルランドの Order は「見つかっていない」に改めた(ガイド・README・出典の記録・フィクスチャの reason。README と decisions.md の 49 番は 13 日すべてをオンラインにない号としていた)。README の版の固定の例を英日で揃え、出典の記録に付いていた「テスト用フィクスチャのみ」の誤った括弧書きを外した
|
|
12
|
+
- ガイド(英日)の「同梱の祝日の提供元」の冒頭に、4 か国の比較表(週末に当たった祝日を返すか・振替・予測・`confirmedThrough`)を足した。英国の提供元は週末に当たった祝日を返さないので、`{ holiday: true, weekdays: [6] }` のような規則は当てはまらない
|
|
13
|
+
- `docs/decisions.md`: 決定の文書の現状に追いついていない記述を直した。18 番(対応年は 1974 年から。49 番)・6 番(契約の項目に `key`)・10 番(CI でだけ使う道具は actionlint のほかにもある)・29 番(古い TypeScript は 0.13.0 から CI で確かめている)・45 番(`docs/` のファイルの数の数え方と、README からガイドに移った説明)に追記し、12 番に判定の順番の番号(ガイドの 1〜8)を明記して 47 番の「12 番の 5・6」を「6(`"over-holiday"` なら 4)」に、13・31 番の「README に明記」を「ガイドに明記」に、28 番の監視の範囲を 4 か国に直した。22・49 番の脱字を直した。51 番(ドキュメントの数値の検査と、前の版との祝日データの差分)を追加した
|
|
14
|
+
- `RELEASING.md`: 「CI の版は次の 2 か所で管理」を直し(実際は 6 項目)、README のサイズの値の測り方を `scripts/measure-bundle.ts` に改めた。CHANGELOG の冒頭の区分の説明に「移行」「開発」を足した
|
|
15
|
+
|
|
16
|
+
### 開発
|
|
17
|
+
|
|
18
|
+
- `pnpm check`(`scripts/check-package.ts`)に、ドキュメントの数値・一覧を `dist` とソースの型と照合する検査を足した(decisions.md の 51 番)。README の提供元の表とガイドの国の節・「対応年の外」の節の対応年とタイムゾーン・`confirmedThrough`、祝日の識別子の表の key、エラーコードの一覧と診断の表のコード、README の「測った版」が今のマイナー系列であること、英日の対の文書で節ごとの数値がそろうこと。0.21.2 の文書に当てると、ガイドのフランスの対応年・README のサイズの測った版・診断の表とエラーコードの一覧の抜け・版の固定の例の英日の違いを検出する
|
|
19
|
+
- CI に `data-compare` ジョブを足した。公開済みの前の版(npm の `latest`)と今回の `dist` の同梱の提供元を、対応年が重なるすべての年で 1 日ずつ比べ(`scripts/data-compare.ts`)、`key` が変わったとき、差分があるのに CHANGELOG に Data がないとき、提供元がなくなったか対応年が狭まったときに失敗する。照合のフィクスチャのない年(予測の年など)の安全網
|
|
20
|
+
- README のサイズを測る `scripts/measure-bundle.ts` を足した(esbuild は依存にせず、パスを引数で渡す。pnpm check・CI には含めない)
|
|
21
|
+
|
|
7
22
|
## [0.21.2] - 2026-10-26
|
|
8
23
|
|
|
9
24
|
### Changed
|
|
@@ -585,7 +600,8 @@
|
|
|
585
600
|
|
|
586
601
|
- 日本: 2026 年 2 月の官報(2027 年の春分・秋分の日)まで反映(`dataVersion: "2026-02"`、`confirmedThrough: 2027`)
|
|
587
602
|
|
|
588
|
-
[Unreleased]: https://github.com/inohan77/bizdays-toolkit/compare/v0.21.
|
|
603
|
+
[Unreleased]: https://github.com/inohan77/bizdays-toolkit/compare/v0.21.3...HEAD
|
|
604
|
+
[0.21.3]: https://github.com/inohan77/bizdays-toolkit/compare/v0.21.2...v0.21.3
|
|
589
605
|
[0.21.2]: https://github.com/inohan77/bizdays-toolkit/compare/v0.21.1...v0.21.2
|
|
590
606
|
[0.21.1]: https://github.com/inohan77/bizdays-toolkit/compare/v0.21.0...v0.21.1
|
|
591
607
|
[0.21.0]: https://github.com/inohan77/bizdays-toolkit/compare/v0.20.0...v0.21.0
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ A business-day calendar that combines public holidays with company or store clos
|
|
|
24
24
|
- **Recurring rules**: "closed on the 3rd Wednesday", "every other Wednesday", "stocktaking on the last day of the month", "closed on Mondays, or the next weekday when Monday is a holiday", "the day after (or before) a holiday", each with its own behaviour on holidays and an optional effective period
|
|
25
25
|
- **Day-by-day values and combined calendars**: store hours that change by weekday, holiday and date; a business-day calendar made from such a schedule; and the days on which all (or any) of several calendars are open
|
|
26
26
|
- **Option diagnostics**: `bizdays-toolkit/diagnose` lists rules that never apply, rules that are shadowed or redundant, rules that have ended, typos in option names and options with no business day at all, without throwing. One line in a test keeps options honest
|
|
27
|
-
- **Lightweight, zero dependencies, time-zone safe**: about 11.0 KB min+gzip (about 12.
|
|
27
|
+
- **Lightweight, zero dependencies, time-zone safe**: about 11.0 KB min+gzip (about 12.8 KB with Japanese holidays, about 13.2 KB with UK bank holidays, about 11.9 KB with French holidays, about 12.0 KB with Singapore holidays; measured for 0.21.3). Standard JavaScript and `Intl` only, ESM with bundled types; tested on Node.js, Chrome, Firefox, Edge, Safari, Cloudflare Workers, Bun and Deno. Instants such as `Date` are converted to a civil date in the calendar's time zone before evaluation
|
|
28
28
|
- **Extensible to other countries and regions**: holiday providers are pluggable through the `HolidayProvider` interface, and `bizdays-toolkit/provider` exposes the calendar arithmetic (nth weekday of a month, Easter, substitute days for holidays on a weekend) that most countries' holidays are built from
|
|
29
29
|
|
|
30
30
|
## Installation
|
|
@@ -130,7 +130,7 @@ A holiday provider is an object with `id`, `timeZone`, `supportedYears` and `hol
|
|
|
130
130
|
Versioning follows [Semantic Versioning](https://semver.org/). See [RELEASING.md](https://github.com/inohan77/bizdays-toolkit/blob/main/RELEASING.md) (Japanese) for details.
|
|
131
131
|
|
|
132
132
|
- Official data updates (new, moved and one-off holidays by law, Official Gazette or proclamation, fixed equinox days in Japan, newly published years on GOV.UK, changes to the French Labour Code, newly gazetted years and revised dates in Singapore) are released as **patch** versions, so they reach you with either `^` or `~`
|
|
133
|
-
- To freeze the holiday results, pin an exact version (for example `"bizdays-toolkit": "0.
|
|
133
|
+
- To freeze the holiday results, pin an exact version (for example `"bizdays-toolkit": "0.21.3"`)
|
|
134
134
|
- The reflected data is shown by the provider's `dataVersion` (for Japan, the year and month of the Official Gazette reflected; for the UK, France and Singapore, the year and month of the GOV.UK, data.gouv.fr or data.gov.sg data reflected) and `confirmedThrough` (`jp.dataVersion`, `england.confirmedThrough` and so on). The module-level constants `dataVersion` and `confirmedThrough` in `bizdays-toolkit/jp` and `bizdays-toolkit/uk` are deprecated since 0.12.0 and will be removed in 1.0.0
|
|
135
135
|
- Before 1.0.0, minor versions may contain breaking changes. What you need to change when moving between minor versions is listed in the [migration guide](https://github.com/inohan77/bizdays-toolkit/blob/main/docs/migration.md) (Japanese) and in the "移行" (migration) part of each version in the CHANGELOG
|
|
136
136
|
- Decision reasons (`reason`), holiday kinds (`kind`), error codes and diagnostic codes may gain values in future versions. When you branch on their values, handle "anything else" too (see "互換性の約束", the compatibility promise, in [RELEASING.md](https://github.com/inohan77/bizdays-toolkit/blob/main/RELEASING.md))
|
|
@@ -141,7 +141,7 @@ Japanese holidays are verified with the "National Holidays" CSV published on the
|
|
|
141
141
|
|
|
142
142
|
UK bank holidays are verified with the GOV.UK bank holidays data (<https://www.gov.uk/bank-holidays.json>, and for earlier years the history of the official GOV.UK repositories [alphagov/calendars](https://github.com/alphagov/calendars) and [alphagov/frontend](https://github.com/alphagov/frontend)), and the Welsh names of the Wales holidays with the Welsh version of GOV.UK (the verification data is a test fixture only; not included in the package).
|
|
143
143
|
|
|
144
|
-
For 2000–2011, which predate GOV.UK's data, the authority is the bank holiday lists the government published at the time (DTI and BERR, directgov, the Scottish Executive and Government, nidirect; captured by the Wayback Machine), checked against the Royal Proclamations and Northern Ireland Orders in The Gazette (<https://www.thegazette.co.uk/>); for 1974–1999 the proclamations are the authority. Thirteen days in 1975–1990 are returned by rule but could not be checked
|
|
144
|
+
For 2000–2011, which predate GOV.UK's data, the authority is the bank holiday lists the government published at the time (DTI and BERR, directgov, the Scottish Executive and Government, nidirect; captured by the Wayback Machine), checked against the Royal Proclamations and Northern Ireland Orders in The Gazette (<https://www.thegazette.co.uk/>); for 1974–1999 the proclamations are the authority. Thirteen days in 1975–1990 are returned by rule but could not be checked (listed as `unverified` in the test fixture, with the reasons): the Northern Ireland Orders of 1986–1990 are in issues of The Gazette that are not online, and the 1987 annual proclamation and the Northern Ireland Order of 1975 were not found. The sources are listed in [docs/sources/uk-bank-holidays-1974-1999.md](https://github.com/inohan77/bizdays-toolkit/blob/main/docs/sources/uk-bank-holidays-1974-1999.md) and [docs/sources/uk-bank-holidays-2000-2011.md](https://github.com/inohan77/bizdays-toolkit/blob/main/docs/sources/uk-bank-holidays-2000-2011.md) (not included in the package).
|
|
145
145
|
|
|
146
146
|
French public holidays are verified with the "Jours fériés en France" dataset published by DINUM on data.gouv.fr (<https://www.data.gouv.fr/datasets/jours-feries-en-france>, JSON exports for the Métropole and Alsace-Moselle zones; the verification data is a test fixture only; not included in the package).
|
|
147
147
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bizdays-toolkit",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.3",
|
|
4
4
|
"description": "Holidays, business-day calendar and day-by-day schedules (e.g. store hours) with time zone support. Japanese holidays verified against the Cabinet Office data; UK bank holidays (England, Wales, Scotland, Northern Ireland) verified against GOV.UK and The Gazette; French public holidays (metropole, Alsace-Moselle) verified against data.gouv.fr; Singapore public holidays verified against data.gov.sg. / 祝日と営業日のカレンダー(タイムゾーン対応・日本の祝日は内閣府、英国の bank holidays は GOV.UK と The Gazette、フランスの祝日は data.gouv.fr、シンガポールの祝日は data.gov.sg のデータで全日照合)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bank-holidays",
|