Skip to content

feat(date-util, workflows): default calendar comparisons to UTC and added release drafter and npm publish flow#11

Merged
nachiketa-vadera-at-quicko merged 23 commits into
mainfrom
feature/date-util-time-zone
Apr 9, 2026
Merged

feat(date-util, workflows): default calendar comparisons to UTC and added release drafter and npm publish flow#11
nachiketa-vadera-at-quicko merged 23 commits into
mainfrom
feature/date-util-time-zone

Conversation

@shubham-thanki-at-sandbox

@shubham-thanki-at-sandbox shubham-thanki-at-sandbox commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces a comprehensive release automation and validation workflow for the repository, along with several improvements to the build process, package configuration, and documentation. The main changes include adding GitHub Actions for pull request validation, automated release drafting, and npm publishing, refactoring the Rollup build configuration for better modularity and environment targeting, updating the package scripts and dependencies, and clarifying the release flow in the documentation.

Release Automation and Workflow Integration

  • Added GitHub Actions workflows for pull request validation (pull-request.yml), automated release draft updates on main branch pushes (draft-or-update-next-release.yml), and publishing to npm when a GitHub release is published (publish.yml). [1] [2] [3]
  • Introduced a Release Drafter configuration (.github/release-drafter.yml) to automate changelog generation and versioning based on PR labels.

Build System and Configuration Improvements

  • Refactored rollup.config.js to use a modular build function, added rollup-plugin-node-externals for better dependency handling, and improved environment-specific module resolution. [1] [2] [3]
  • Enhanced the clean npm script to remove node_modules, package-lock.json, and dist for a more thorough cleanup.

Package and Dependency Updates

  • Added missing test and build dependencies (jest, ts-jest, @types/jest, rollup-plugin-node-externals) to package.json. [1] [2]
  • Removed typesVersions and engines fields from package.json to simplify package metadata.

Documentation Enhancements

  • Updated README.md to clearly describe the new release flow, including steps for publishing and the role of GitHub Actions.

Code Quality and Schema Adjustments

  • Improved DateUtil methods to consistently use DateUtil.fromMillis for number-to-date conversion. [1] [2] [3]
  • Refined the JSON schema for SortOrder and moved metadata for better schema compliance. [1] [2] [3]

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the DateUtil.addDuration API to support time zone–aware calendar arithmetic (via TZDate), adds IST-focused month-end/leap-year coverage, and modernizes the Rollup build by centralizing module build configuration and relying on rollup-plugin-node-externals for externalization.

Changes:

  • Added optional timeZone parameter to DateUtil.addDuration to apply duration math in a specified IANA time zone.
  • Added IST month-end/leap-year test cases to validate clamping and local day-boundary alignment.
  • Refactored Rollup configuration to reduce manual externals logic and simplify per-environment builds; updated package manifests accordingly.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/DateUtil.test.ts Adds IST-focused addDuration tests for month-end and leap-year clamping behavior.
src/utils/date/DateUtil.ts Extends addDuration overloads/implementation to optionally use TZDate for calendar math in a given time zone.
rollup.config.js Simplifies builds via a shared factory and rollup-plugin-node-externals; switches to globSync.
package.json Removes typesVersions and cleans up/adds build/test dev dependencies (incl. node externals plugin).
package-lock.json Updates lockfile for version bump and new dev dependency tree.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/DateUtil.test.ts Outdated
Comment thread rollup.config.js
Comment thread package.json
Comment thread src/utils/date/DateUtil.ts
Comment thread src/utils/date/DateUtil.ts Outdated
@shubham-thanki-at-sandbox shubham-thanki-at-sandbox changed the title Enhance addDuration method and streamline Rollup configuration feat(date-util, workflows): default calendar comparisons to UTC and added release drafter and npm publish flow Apr 9, 2026
@nachiketa-vadera-at-quicko nachiketa-vadera-at-quicko merged commit ddbb276 into main Apr 9, 2026
1 check passed
@nachiketa-vadera-at-quicko nachiketa-vadera-at-quicko deleted the feature/date-util-time-zone branch April 9, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants