Skip to content

nestjs-redis/scheduler - #18

Closed
CSenshi wants to merge 20 commits into
mainfrom
feat/cron
Closed

CSenshi wants to merge 20 commits into
mainfrom
feat/cron

Conversation

@CSenshi

@CSenshi CSenshi commented Apr 9, 2026

Copy link
Copy Markdown
Owner

Description

Brief description of changes

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

  • Tests added/updated

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Tests pass locally
  • Documentation updated (if needed)
  • Conventional commit format used

@nx-cloud

nx-cloud Bot commented Apr 9, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit b5ace0a

Command Status Duration Result
nx affected -t lint test build --exclude=@examp... ✅ Succeeded 10s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-09 18:39:58 UTC

@nx-cloud nx-cloud Bot 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.

✅ The fix from Nx Cloud was applied

We've fixed the scheduler:test failure by adding const __dirname = import.meta.dirname; to packages/scheduler/jest.config.ts. Since the workspace uses "module": "nodenext", Jest config files run as ES modules where __dirname is not globally available, causing the ReferenceError at startup. This aligns the scheduler package with the pattern used by all other packages in the monorepo.

Tip

✅ We verified this fix by re-running scheduler:test.

Suggested Fix changes
diff --git a/packages/scheduler/jest.config.ts b/packages/scheduler/jest.config.ts
index 8c5f4ed..1bb5361 100644
--- a/packages/scheduler/jest.config.ts
+++ b/packages/scheduler/jest.config.ts
@@ -1,8 +1,9 @@
 import { readFileSync } from 'fs';
 
+const __dirname = import.meta.dirname;
+
 // Reading the SWC compilation config for the spec files
 const swcJestConfig = JSON.parse(
-  // eslint-disable-next-line @typescript-eslint/no-require-imports
   readFileSync(`${__dirname}/.spec.swcrc`, 'utf-8'),
 );
 

Revert fix via Nx Cloud  

View interactive diff ↗

➡️ This fix was applied by Saba Pochkhua

🎓 Learn more about Self-Healing CI on nx.dev

@CSenshi CSenshi closed this Apr 10, 2026
@CSenshi
CSenshi deleted the feat/cron branch April 11, 2026 12:25
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.

1 participant