Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4e0db1d
feat: enhance addDuration method to support time zone-aware calendar …
shubham-thanki-at-sandbox Apr 2, 2026
9577506
chore: update package lock
shubham-thanki-at-sandbox Apr 2, 2026
7142a1c
chore: remove unused typesVersions section and clean up dependencies …
shubham-thanki-at-sandbox Apr 2, 2026
221d5b0
refactor: streamline rollup configuration by consolidating module bui…
shubham-thanki-at-sandbox Apr 2, 2026
91b9ba4
chore: add rollup-plugin-node-externals to package-lock.json
shubham-thanki-at-sandbox Apr 2, 2026
f550ca5
feat: update addDuration test to include timezone support
shubham-thanki-at-sandbox Apr 2, 2026
2070ea0
chore: remove node engine requirement and clean up rollup environment…
shubham-thanki-at-sandbox Apr 2, 2026
c05cc91
feat: add optional time zone parameter to date calculation methods
shubham-thanki-at-sandbox Apr 2, 2026
9b7b6d6
feat: add timezone support for calendar boundaries in days, months, a…
shubham-thanki-at-sandbox Apr 2, 2026
fe68eb6
feat: update monthsInBetween method documentation to clarify time zon…
shubham-thanki-at-sandbox Apr 2, 2026
5344d57
feat: enhance date calculations with optional time zone support for d…
shubham-thanki-at-sandbox Apr 4, 2026
635401d
feat: add default UTC calendar boundaries for days, months, and years…
shubham-thanki-at-sandbox Apr 4, 2026
be47c58
feat: restructure JSON schema to include SortOrder as objects and rep…
shubham-thanki-at-sandbox Apr 5, 2026
89ac2ff
feat: add GitHub workflows for release drafting, publishing, and pull…
shubham-thanki-at-sandbox Apr 5, 2026
2788ba7
docs: update README to enhance clarity on installation and release flow
shubham-thanki-at-sandbox Apr 5, 2026
96a618c
refactor: remove baseUrl and paths from tsconfig for cleaner module r…
shubham-thanki-at-sandbox Apr 5, 2026
c9951b9
feat: enhance release drafter configuration with additional labels an…
shubham-thanki-at-sandbox Apr 9, 2026
c7b1847
refactor: replace Date constructor with fromMillis for better date ha…
shubham-thanki-at-sandbox Apr 9, 2026
5a975b3
fix: update clean script to remove node_modules and package-lock.json
shubham-thanki-at-sandbox Apr 9, 2026
95b2a0a
refactor: unify test command across workflows and update README for c…
shubham-thanki-at-sandbox Apr 9, 2026
4c20bf9
fix: update clean script to only remove dist directory
shubham-thanki-at-sandbox Apr 9, 2026
d344acd
fix: update version to 2.0.5 in package.json
shubham-thanki-at-sandbox Apr 9, 2026
7cb89bd
refactor: simplify release drafter configuration and add package vers…
shubham-thanki-at-sandbox Apr 9, 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
45 changes: 45 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
categories:
- title: 'Features'
labels:
- feat
- add
- feature
- enhancement
- title: 'Fixes'
labels:
- fix
- bug
- bugfix
- title: 'Performance'
labels:
- perf
- title: 'Refactors & Cleanup'
labels:
- ref
- cln
- mov
- rem
- rev
- title: 'Maintenance'
labels:
- chore
- lint
- merge
- ci
- build
- test
- docs
- deps
- dependencies
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&'
exclude-labels:
- skip-changelog
template: |
## Summary

$CHANGES

## Contributors

$CONTRIBUTORS
38 changes: 38 additions & 0 deletions .github/workflows/draft-or-update-next-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Draft Or Update Next Release

concurrency: draft_or_update_next_release

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write
pull-requests: read

jobs:
prepare-release:
name: Draft Or Update Next Release
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Capture package version
shell: bash
run: |
PACKAGE_VERSION=$(node -p 'require("./package.json").version')
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_ENV"

- name: Update release draft
uses: release-drafter/release-drafter@v6
with:
name: v${{ env.PACKAGE_VERSION }}
tag: v${{ env.PACKAGE_VERSION }}
version: ${{ env.PACKAGE_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69 changes: 69 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release

on:
release:
types: [published]

permissions:
contents: read
id-token: write

jobs:
publish:
name: Publish To npm
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org
cache: npm

- name: Capture release metadata
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "RELEASE_NPM_TAG=${{ github.event.release.prerelease && 'alpha' || 'latest' }}" >> $GITHUB_ENV

- name: Verify release tag matches package version
shell: bash
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
EXPECTED_TAG="v${PACKAGE_VERSION}"

if [ "$RELEASE_VERSION" != "$EXPECTED_TAG" ]; then
echo "Release tag ${RELEASE_VERSION} does not match package.json version ${PACKAGE_VERSION}."
exit 1
fi

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

- name: Build package
run: npm run build

- name: Skip publish if version already exists
id: version_check
shell: bash
run: |
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")

if npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" version >/dev/null 2>&1; then
echo "already_published=true" >> "$GITHUB_OUTPUT"
else
echo "already_published=false" >> "$GITHUB_OUTPUT"
fi

- name: Publish to npm
if: steps.version_check.outputs.already_published == 'false'
run: npm publish --access public --tag $RELEASE_NPM_TAG --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pull Request

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
validate:
name: Validate
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

- name: Build package
run: npm run build
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
# core
Foundational Node.js library built with TypeScript used across Quicko

## 📦 Installation
Foundational Node.js library built with TypeScript used across Quicko.

## Installation

```bash
npm install @org-quicko/core
```
```

## Release Flow

This repository uses GitHub Actions to separate pull request validation, release drafting, and npm publishing.

- Pull requests run install, date util tests, and build validation.
- Pushes to `main` update the next draft release using Release Drafter.
- Publishing happens only when a GitHub release is published.
- PR titles are used directly in the drafted release notes, so keep them clear and specific.
- PR labels influence both release note grouping and version bump resolution.

### Publishing A New Version

1. Update the version in `package.json`.
2. Merge the change into `main`.
3. Review the drafted GitHub release.
4. Publish the release with a tag that matches the package version, for example `v2.0.4`.

When the release is published, GitHub Actions will:

- verify the release tag matches `package.json`
- run install, tests, and build
- skip publish if that version already exists on npm
- publish the package to npm using the configured `NPM_TOKEN`
Loading
Loading