release(COMPT-79): bump version to 0.1.0, rewrite README, add changeset#8
Merged
saadmoumou merged 1 commit intodevelopfrom Apr 10, 2026
Merged
Conversation
- package.json: 0.0.0 -> 0.1.0 - README: full documentation (decorators, dynamic API, concurrency guard, error handling, async config, cron helpers, API reference) - .changeset/scheduler-kit-v0-1-0.md: minor bump for initial feature release
There was a problem hiding this comment.
Pull request overview
Prepares the initial @ciscode/scheduler-kit feature release by updating package metadata, adding a Changeset, and replacing the template README with end-user documentation for the scheduler module/service and helpers.
Changes:
- Bumps
package.jsonversion to0.1.0. - Rewrites
README.mdwith usage docs (module registration, decorators, dynamic scheduling, concurrency guard, error handling, async config, cron helpers, API reference). - Adds a Changeset describing the
v0.1.0minor release.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| README.md | Replaces template README with package documentation and examples. |
| package.json | Updates package version for release. |
| .changeset/scheduler-kit-v0-1-0.md | Adds a Changeset entry for the initial feature release. |
| ## Features | ||
|
|
||
| ## 📦 Installation | ||
| - **Declarative scheduling** — `@Cron`, `@Interval`, `@Timeout` class decorators |
Comment on lines
+15
to
+16
| - **Cron helpers** — `CronExpression` enum and `cron()` fluent builder | ||
| - **Async configuration** — `registerAsync()` for factory-based options (e.g. `ConfigService`) |
| // src/dto/create-example.dto.ts | ||
| import { IsString, IsNotEmpty } from "class-validator"; | ||
| Every job is wrapped in an automatic concurrency guard. If a handler is still | ||
| executing when its next tick fires, that tick is **silently skipped** and a |
Comment on lines
+366
to
+368
| cron?: string; // present for cron jobs | ||
| lastRun?: string; // ISO timestamp of last completed run | ||
| nextRun?: string; // ISO timestamp of next scheduled run (cron only) |
| - Automatic concurrency guard — overlapping executions are silently skipped | ||
| - Per-job error isolation — handler errors are caught and reported; the scheduler continues running | ||
| - `CronExpression` enum of named cron constants | ||
| - `cron()` fluent builder with `at()`, `on()`, and `everyMinutes()` helpers |
| { | ||
| "name": "@ciscode/scheduler-kit", | ||
| "version": "0.0.0", | ||
| "version": "0.1.0", |
Zaiidmo
added a commit
that referenced
this pull request
Apr 10, 2026
* ops: updated sonar variable * Feat/compt 75 typed job definitions ischeduler interface (#3) * feat(COMPT-75): define typed scheduled job contracts and IScheduler port - Add ScheduledJob type: name, handler, and one of cron | interval | timeout - Add IScheduler interface: schedule, unschedule, reschedule, list - Add ScheduledJobStatus type: name, cron, lastRun, nextRun, isRunning - Add DuplicateJobError thrown when registering a duplicate job name - Enforce cron/interval/timeout mutual exclusivity via discriminated union - Add CronExpression named constants for human-readable schedules - Add cron fluent builder: dailyAt, weeklyOn, monthlyOn, every().minutes() - Update tsconfig.build.json: CommonJS output, Task 1 files only - Update package.json: name @ciscode/scheduler-kit, version 0.0.0 * test(COMPT-75): add unit tests for CronExpression and cron builder * feat(COMPT-75): add ScheduledJobStatus type and status/listStatus methods - Add ScheduledJobStatus type: name, cron, lastRun, nextRun, isRunning - Add status(name) and listStatus() to IScheduler interface and SchedulerService - Track lastRun timestamp after each execution - Store cronJob reference for nextRun via cronJob.nextDate() - Export ScheduledJobStatus from public API - Fix lint: no-misused-promises, no-floating-promises, prettier formatting * style(COMPT-75): format all files with prettier --------- Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * Feat/compt 76 nestjs scheduler module and service (#4) * feat(COMPT-76): NestJS SchedulerModule and SchedulerService integration - SchedulerModule.register() and registerAsync() dynamic module factories - SchedulerService: schedule(), reschedule(), unschedule(), list(), status(), listStatus() - @Cron, @interval, @timeout decorators with optional job name - MetadataScanner auto-discovers decorated provider methods on onModuleInit - DuplicateJobError guard against double registration - IScheduler interface and ScheduledJobStatus type - CronExpression constants and cron fluent builder - Full unit test coverage across module, service and decorators * test(COMPT-76): add unit tests for CronExpression and cron builder --------- Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * Feat/compt 77 dynamic scheduling error handling (#5) * chore(COMPT-77): scope index.ts and tsconfig.build.json to COMPT-77 files only * test(COMPT-77): add tests for status, listStatus, cron jobs and default onJobError * chore(COMPT-77): restore index.ts and tsconfig.build.json to develop baseline --------- Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * test(COMPT-78): full coverage with Jest fake timers for all schedulin… (#7) * test(COMPT-78): full coverage with Jest fake timers for all scheduling behaviors - jest.useFakeTimers() for all time-based tests — no real waiting - @interval: fires every N ms, stops after unschedule, does not fire before interval - @timeout: fires exactly once, removes itself from registry, does not fire early - schedule(): job added and fires on tick - unschedule(): timer cleared, handler not called after removal - reschedule(): new schedule applied atomically, old timer cancelled - Job error: caught via onJobError, scheduler continues — other jobs unaffected - Concurrent guard: second execution skipped when first still running (isRunning lock) - status() / listStatus(): reflect isRunning and lastRun correctly - @Cron: registered and unscheduled without throwing - Default onJobError: delegates to Logger.error - Coverage: 98.63% statements, 98.11% branches, 95.34% functions (threshold 85%) * fix(COMPT-78): resolve SonarCloud S1186 and S4524 issues - cron-builder.ts: parseInt -> Number.parseInt (Sonar S4524 x3) - scheduler.decorators.spec.ts: add comments to empty stub methods (Sonar S1186 x6) - scheduler.module.spec.ts: add comments to empty stub methods and class (Sonar S1186 x6) --------- Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * release(COMPT-79): bump version to 0.1.0, rewrite README, add changeset (#8) - package.json: 0.0.0 -> 0.1.0 - README: full documentation (decorators, dynamic API, concurrency guard, error handling, async config, cron helpers, API reference) - .changeset/scheduler-kit-v0-1-0.md: minor bump for initial feature release Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * Feat/compt 79 readme changeset publish v0.1.0 (#10) * release(COMPT-79): bump version to 0.1.0, rewrite README, add changeset - package.json: 0.0.0 -> 0.1.0 - README: full documentation (decorators, dynamic API, concurrency guard, error handling, async config, cron helpers, API reference) - .changeset/scheduler-kit-v0-1-0.md: minor bump for initial feature release * fix(COMPT-79): add sonar-project.properties to fix SonarCloud quality gate - sonar.exclusions: exclude spec files from source analysis - sonar.tests + sonar.test.inclusions: declare spec files as test code - fixes 31.9% coverage on new code and 4.8% duplication failures --------- Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> --------- Co-authored-by: Zaiidmo <zaiidmoumnii@gmail.com> Co-authored-by: saad moumou <saad.moumou.coder@gmail.com>
Zaiidmo
added a commit
that referenced
this pull request
Apr 10, 2026
* ops: updated sonar variable * Feat/compt 75 typed job definitions ischeduler interface (#3) * feat(COMPT-75): define typed scheduled job contracts and IScheduler port - Add ScheduledJob type: name, handler, and one of cron | interval | timeout - Add IScheduler interface: schedule, unschedule, reschedule, list - Add ScheduledJobStatus type: name, cron, lastRun, nextRun, isRunning - Add DuplicateJobError thrown when registering a duplicate job name - Enforce cron/interval/timeout mutual exclusivity via discriminated union - Add CronExpression named constants for human-readable schedules - Add cron fluent builder: dailyAt, weeklyOn, monthlyOn, every().minutes() - Update tsconfig.build.json: CommonJS output, Task 1 files only - Update package.json: name @ciscode/scheduler-kit, version 0.0.0 * test(COMPT-75): add unit tests for CronExpression and cron builder * feat(COMPT-75): add ScheduledJobStatus type and status/listStatus methods - Add ScheduledJobStatus type: name, cron, lastRun, nextRun, isRunning - Add status(name) and listStatus() to IScheduler interface and SchedulerService - Track lastRun timestamp after each execution - Store cronJob reference for nextRun via cronJob.nextDate() - Export ScheduledJobStatus from public API - Fix lint: no-misused-promises, no-floating-promises, prettier formatting * style(COMPT-75): format all files with prettier --------- Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * Feat/compt 76 nestjs scheduler module and service (#4) * feat(COMPT-76): NestJS SchedulerModule and SchedulerService integration - SchedulerModule.register() and registerAsync() dynamic module factories - SchedulerService: schedule(), reschedule(), unschedule(), list(), status(), listStatus() - @Cron, @interval, @timeout decorators with optional job name - MetadataScanner auto-discovers decorated provider methods on onModuleInit - DuplicateJobError guard against double registration - IScheduler interface and ScheduledJobStatus type - CronExpression constants and cron fluent builder - Full unit test coverage across module, service and decorators * test(COMPT-76): add unit tests for CronExpression and cron builder --------- Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * Feat/compt 77 dynamic scheduling error handling (#5) * chore(COMPT-77): scope index.ts and tsconfig.build.json to COMPT-77 files only * test(COMPT-77): add tests for status, listStatus, cron jobs and default onJobError * chore(COMPT-77): restore index.ts and tsconfig.build.json to develop baseline --------- Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * test(COMPT-78): full coverage with Jest fake timers for all schedulin… (#7) * test(COMPT-78): full coverage with Jest fake timers for all scheduling behaviors - jest.useFakeTimers() for all time-based tests — no real waiting - @interval: fires every N ms, stops after unschedule, does not fire before interval - @timeout: fires exactly once, removes itself from registry, does not fire early - schedule(): job added and fires on tick - unschedule(): timer cleared, handler not called after removal - reschedule(): new schedule applied atomically, old timer cancelled - Job error: caught via onJobError, scheduler continues — other jobs unaffected - Concurrent guard: second execution skipped when first still running (isRunning lock) - status() / listStatus(): reflect isRunning and lastRun correctly - @Cron: registered and unscheduled without throwing - Default onJobError: delegates to Logger.error - Coverage: 98.63% statements, 98.11% branches, 95.34% functions (threshold 85%) * fix(COMPT-78): resolve SonarCloud S1186 and S4524 issues - cron-builder.ts: parseInt -> Number.parseInt (Sonar S4524 x3) - scheduler.decorators.spec.ts: add comments to empty stub methods (Sonar S1186 x6) - scheduler.module.spec.ts: add comments to empty stub methods and class (Sonar S1186 x6) --------- Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * release(COMPT-79): bump version to 0.1.0, rewrite README, add changeset (#8) - package.json: 0.0.0 -> 0.1.0 - README: full documentation (decorators, dynamic API, concurrency guard, error handling, async config, cron helpers, API reference) - .changeset/scheduler-kit-v0-1-0.md: minor bump for initial feature release Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * Feat/compt 79 readme changeset publish v0.1.0 (#10) * release(COMPT-79): bump version to 0.1.0, rewrite README, add changeset - package.json: 0.0.0 -> 0.1.0 - README: full documentation (decorators, dynamic API, concurrency guard, error handling, async config, cron helpers, API reference) - .changeset/scheduler-kit-v0-1-0.md: minor bump for initial feature release * fix(COMPT-79): add sonar-project.properties to fix SonarCloud quality gate - sonar.exclusions: exclude spec files from source analysis - sonar.tests + sonar.test.inclusions: declare spec files as test code - fixes 31.9% coverage on new code and 4.8% duplication failures --------- Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * patch lock file deps * chore(tsconfig): silence TS6 deprecation warnings --------- Co-authored-by: saadmoumou <s.moumou@ciscod.com> Co-authored-by: saad moumou <saad.moumou.coder@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Checklist
npm run lintpassesnpm run typecheckpassesnpm testpassesnpm run buildpassesnpx changeset) if this affects consumersNotes