Skip to content

Upgrade dependencies and improve testing for Node and TypeScript#33

Merged
zac1st1k merged 8 commits intomainfrom
chore/update-dependencies-and-pipelines
Apr 8, 2026
Merged

Upgrade dependencies and improve testing for Node and TypeScript#33
zac1st1k merged 8 commits intomainfrom
chore/update-dependencies-and-pipelines

Conversation

@zac1st1k
Copy link
Copy Markdown
Collaborator

@zac1st1k zac1st1k commented Apr 8, 2026

This pull request introduces several improvements and updates across the codebase. The main changes include modernizing the Node.js version, updating dependencies, refining the release workflow, improving test coverage, and making minor fixes to locale-specific formatting and test data.

Release workflow and CI improvements:

  • Changed the release workflow in .github/workflows/release.yml to trigger on tag pushes (matching v*) instead of manual dispatch with version bump selection. The workflow no longer handles version bumping or git commits/tags, and now uses the pushed tag directly for releases. [1] [2] [3]
  • Upgraded the Node.js version in .nvmrc from 23.10.0 to 24.14.1 to ensure compatibility with the latest features and dependencies.

Dependency and build updates:

  • Updated several development dependencies in package.json (including eslint, typescript, and globals), increased the package version to 0.3.0, and improved the exports field for better type and module resolution. The checks script now includes a build step. [1] [2]
  • Adjusted the Webpack configuration to explicitly set ts-loader options, ensuring proper TypeScript compilation and output.

Testing improvements:

  • Added a new smoke test suite in src/index.dist.test.ts to verify that all expected APIs are exported from the CJS bundle and that all distribution bundles exist and are non-empty.

Locale and formatting fixes:

  • Updated test data and expectations for the Korean locale to use "AM" instead of "오전" in both code and test fixtures, aligning with actual output. [1] [2]
  • Adjusted German duration formatting in test fixtures to use "2h" instead of "2 Std." for consistency with output.

Minor code fixes:

  • Fixed a TypeScript initialization issue in formatDurationByOptions by removing the unnecessary initialization of durationString.

Rovo Dev code review: Rovo Dev has reviewed this pull request
Any suggestions or improvements have been posted as pull request comments.

Comment thread src/index.test.ts
expect(formatDateTimeByOptions(option, new Date(2004, 7, 3, 4), 'zh-CN')).toBe('2004年8月3日 04:00');
expect(formatDateTimeByOptions(option, new Date(2004, 7, 3, 4), 'ja-JP')).toBe('2004/08/03 4:00');
expect(formatDateTimeByOptions(option, new Date(2004, 7, 3, 4), 'ko-KR')).toBe('2004. 8. 3. 오전 4:00');
expect(formatDateTimeByOptions(option, new Date(2004, 7, 3, 4), 'ko-KR')).toBe('2004. 8. 3. AM 4:00');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this expected? I have no knowledge about the Korean language.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, caused by node upgrade.

@zac1st1k zac1st1k merged commit bd297a0 into main Apr 8, 2026
5 checks passed
@zac1st1k zac1st1k deleted the chore/update-dependencies-and-pipelines branch April 8, 2026 06:19
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.

3 participants