Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a81b523
Add CI workflow for Tempo project
magmacomputing Apr 25, 2026
b4ba0e7
Refactor CI workflow for Node.js setup and tests
magmacomputing Apr 25, 2026
c6d7a15
bump vitest
magmacomputing Apr 26, 2026
12eceea
working on ci.yml
magmacomputing Apr 26, 2026
fdc351e
review 1st pass
magmacomputing Apr 26, 2026
64299a9
patch env in CI.yml
magmacomputing Apr 26, 2026
06aabcd
debug in compact.time
magmacomputing Apr 26, 2026
4fadfc7
debug in tempo.class
magmacomputing Apr 26, 2026
23d7c89
debug Intl.Locale
magmacomputing Apr 26, 2026
c4c6e39
test Intl.Local('en-us')
magmacomputing Apr 26, 2026
79d38a6
mdy Fallback list
magmacomputing Apr 26, 2026
e8ad9e9
clean-up timeZones fallback
magmacomputing Apr 26, 2026
ce08a9b
more debug fallback timeZones
magmacomputing Apr 26, 2026
0100a75
cut down on debug
magmacomputing Apr 26, 2026
725f66f
isMonthDay
magmacomputing Apr 26, 2026
987ee49
fix to $setEvents
magmacomputing Apr 26, 2026
fad7235
add bench/ for CI testing
magmacomputing Apr 26, 2026
f9d2997
Options grouping, isMonthDay
magmacomputing Apr 27, 2026
430563b
merge with main
magmacomputing Apr 27, 2026
7d2ae4a
complete merge
magmacomputing Apr 27, 2026
25e667f
post-merge baseline
magmacomputing Apr 27, 2026
a2ca7eb
rm spyOn from test-scripts
magmacomputing Apr 27, 2026
2f77c22
Tempo.config
magmacomputing Apr 27, 2026
a4f06f0
test-cases passing
magmacomputing Apr 28, 2026
69349bf
doc/tempo.month-day
magmacomputing Apr 28, 2026
bca222b
test sbox
magmacomputing Apr 28, 2026
40714f9
draw a line... layout ordering
magmacomputing Apr 28, 2026
980b249
new scripts in package.json
magmacomputing Apr 28, 2026
68dd00a
PR review #1 updates
magmacomputing Apr 28, 2026
dcaf82c
PR review #2 updates
magmacomputing Apr 28, 2026
e40dda0
PR review #3 updates
magmacomputing Apr 29, 2026
da96de0
#library
magmacomputing Apr 29, 2026
4537efa
resolve some final typings
magmacomputing Apr 29, 2026
c93f67f
realign test-scripts
magmacomputing Apr 29, 2026
a9db3f1
plan
magmacomputing Apr 30, 2026
6dbcfcf
PR review #4 updates
magmacomputing Apr 30, 2026
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
26 changes: 7 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('packages/tempo/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
cache: 'npm'
- name: Install monorepo dependencies
run: npm ci
working-directory: ${{ github.workspace }}
Expand All @@ -51,32 +45,26 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('packages/tempo/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
cache: 'npm'
- name: Install monorepo dependencies
run: npm ci
working-directory: ${{ github.workspace }}
- name: Write parsePrefilter setup file
run: |
echo "import { Tempo } from '../src/tempo.index.ts';\nTempo.init({ parsePrefilter: true });" > packages/tempo/test/ci.prefilter.setup.js
- name: Run all tests with parsePrefilter
run: npm test
working-directory: packages/tempo
env:
TEMPO_PREFILTER_CI: 'true'
- name: Run end-to-end benchmark
run: npx tsx --conditions=development bench/bench.parse.prefilter.e2e.ts > bench-output.json
run: npx tsx --conditions=development bench/bench.parse.prefilter.e2e.ts > bench-output.json 2> bench-error.log
working-directory: packages/tempo
- name: Upload benchmark output
if: always()
uses: actions/upload-artifact@v4
with:
name: bench-parse-prefilter-e2e
path: packages/tempo/bench-output.json
path: |
packages/tempo/bench-output.json
packages/tempo/bench-error.log
- name: Validate benchmark output
run: |
node -e "const r=require('./packages/tempo/bench-output.json');if(!r.success){console.error('Benchmark failed:',r.errors);process.exit(1)}else{console.log('Benchmark passed.')}"
Expand Down
39 changes: 35 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,50 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.4.0] - 2026-04-24
## [2.7.0] - 2026-04-27

### Added
- **Sandbox Factory Mode**: Introduced `Tempo.create()`, a static factory method for creating isolated `Tempo` subclasses with independent configurations and registries, preventing global state leakage.
- **Layout Controller Framework**: Added a classification-based layout controller to `engine.layout`, enabling future input-aware parsing optimizations.
- **Grouped Configuration Options**: Consolidated `monthDay` and `relativeTime` options into nested objects.
- **Internal layout detection**: Added `isMonthDay` detection for improved regional layout resolution.
- **CI Benchmarks**: Added performance benchmarking suite to CI.

### Fixed
- **Event Overrides**: Fixed `$setEvents` logic to correctly handle custom event overrides.
- **TimeZone Fallbacks**: Improved and cleaned up the IANA TimeZone fallback list.
- **Intl.Locale Debugging**: Enhanced diagnostic logging for locale resolution.

## [2.6.0] - 2026-04-25

### Added
- **Standardized UTC Offsets**: Added `normalizeUtcOffset` utility for transforming informal UTC-offset strings.
- **Custom Layout Order**: Added `layoutOrder` option to customize parsing element precedence.

### Changed
- **Layout Order Resolver**: Extracted layout-ordering logic into a dedicated module to improve maintainability and testability.
- **Season Scope Simplification (Breaking)**: Removed Chinese-specific object from `term.season` scope.
- **Refined TimeZone Normalization**: Improved UTC offset handling during initialization.

### Fixed
- **Layout Pattern Resolution**: Fixed ordering to respect intended sequence.

## [2.5.0] - 2026-04-24

### Added
- **Sandbox Factory Mode**: Introduced `Tempo.create()`, a static factory method for creating isolated `Tempo` subclasses with independent configurations and registries.
- **Layout Order Resolver Module**: Extracted layout-ordering decision logic into a dedicated `engine.layout` module.
- **Layout Controller Framework**: Implemented minimal controller-map infrastructure for future input-class pre-filtering.
- **Debug Layout Order Visibility**: Added optional debug output in `Tempo.#swapLayout` to emit the resolved layout order for diagnostics.

### Changed
- **Internal Layout Resolution**: Refactored `Tempo.#swapLayout` to delegate ordering to the external resolver.
- **Alias Precedence**: User-defined `event` and `period` aliases now take precedence over built-in aliases.
- **Module Path Flattening**: Relocated core modules to `src/module/` for a flatter, more intuitive internal architecture.

### Fixed
- **Determinism Coverage**: Added comprehensive unit tests for layout resolution and multi-pair swap handling.

## [2.4.0] - (Skipped)

_Version 2.4.0 was not released; the project merged new functionality from 2.4.0 into 2.5.0._

## [2.3.0] - 2026-04-22

Expand Down
Loading
Loading