Skip to content

Update dependencies, ESLint configuration, and add pull request template#81

Merged
YunchuWang merged 4 commits intomainfrom
torosent/fix-js-issues
Feb 2, 2026
Merged

Update dependencies, ESLint configuration, and add pull request template#81
YunchuWang merged 4 commits intomainfrom
torosent/fix-js-issues

Conversation

@torosent
Copy link
Member

@torosent torosent commented Jan 31, 2026

Summary

What changed?

  • Updated ESLint from v8 to v9.39.2 with new flat config format (eslint.config.mjs)
  • Updated Prettier from v2 to v3.5.3
  • Removed deprecated ESLint plugins and replaced with typescript-eslint v8.54.0
  • Fixed unsafe stack trace access in pb-helper.util.ts (e.stack?.toString() ?? "")
  • Removed useless try-catch blocks in client.ts
  • Removed sensitive data (activity output) from log messages in activity-executor.ts
  • Fixed type imports in worker-builder.ts to use package exports instead of any
  • Deleted duplicate/stale worker file src/worker/task-hub-grpc-worker.ts
  • Updated example imports to use package exports instead of relative paths
  • Fixed pre-existing tsconfig build issue by adding baseUrl to azuremanaged package
  • Added PR template

Why is this change needed?

  • ESLint v8 is deprecated; v9 uses the new flat config format
  • Code quality fixes identified during code review
  • Standardize PR process with template

Issues / work items

  • Related #N/A

Project checklist

  • Release notes are not required for the next release
  • Backport is not required
  • All required tests have been added/updated (unit tests, E2E tests)
  • Breaking change?
    • No breaking changes

AI-assisted code disclosure (required)

Was an AI tool used? (select one)

  • No
  • Yes, AI helped write parts of this PR (e.g., GitHub Copilot)
  • Yes, an AI agent generated most of this PR

If AI was used:

  • Tool(s): GitHub Copilot (Claude)
  • AI-assisted areas/files: ESLint config migration, code fixes, PR template
  • What you changed after AI output: Reviewed and validated all changes

AI verification (required if AI was used):

  • I understand the code and can explain it
  • I verified referenced APIs/types exist and are correct
  • I reviewed edge cases/failure paths (timeouts, retries, cancellation, exceptions)
  • I reviewed concurrency/async behavior
  • I checked for unintended breaking or behavior changes

Testing

Automated tests

  • Result: Passed (138 tests: 84 in durabletask-js + 54 in durabletask-js-azuremanaged)

Manual validation (only if runtime/behavior changed)

  • N/A - No runtime behavior changes

Notes for reviewers

  • The duplicate file src/worker/task-hub-grpc-worker.ts was stale and used an older promisify pattern vs the current callWithMetadata approach
  • ESLint now uses the flat config format (.mjs extension to avoid module warning)

Tomer Rosenthal added 2 commits January 30, 2026 17:04
- Updated ESLint and Prettier dependencies in package.json for improved linting and formatting.
- Removed specific file extensions from ESLint linting command to simplify usage.
- Added new ESLint configuration file (eslint.config.mjs) with custom rules and settings.
- Refactored TypeScript imports to use ES module syntax and removed unnecessary require statements.
- Enhanced error handling and logging in TaskHubGrpcClient methods.
- Cleaned up code by removing commented-out sections and unused variables.
- Deleted deprecated TaskHubGrpcWorker class to streamline the codebase.
- Updated TypeScript configuration to include baseUrl for module resolution.
@torosent torosent requested a review from Copilot January 31, 2026 01:10
Copy link

Copilot AI left a comment

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 modernizes linting/tooling, updates dependencies, and streamlines internal structure by centralizing imports on the published @microsoft/durabletask-js package and adding a standardized pull request template.

Changes:

  • Replace legacy ESLint config (.eslintrc.json / .eslintignore) with a flat-config-based eslint.config.mjs and update related dev dependencies and scripts.
  • Consolidate imports to @microsoft/durabletask-js, clean up types and logging, and add small robustness improvements (e.g., safer stack trace handling).
  • Add a PR template and update the durabletask protobuf submodule reference.

Reviewed changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
submodules/durabletask-protobuf Updates the durabletask protobuf submodule reference to a new commit.
src/worker/task-hub-grpc-worker.ts Removes the legacy worker implementation from the old src layout, likely superseded by the packages/durabletask-js implementation.
packages/durabletask-js/src/worker/registry.ts Adds an ESLint suppression to allow using Function in _getFunctionName under the new lint rules.
packages/durabletask-js/src/worker/activity-executor.ts Simplifies activity completion logging to avoid dumping full outputs while still logging payload size.
packages/durabletask-js/src/utils/pb-helper.util.ts Makes failure detail stack trace handling more robust when e.stack is undefined.
packages/durabletask-js/src/task/index.ts Adds an ESLint suppression for the Function-typed getName helper.
packages/durabletask-js/src/client/client.ts Simplifies error handling in wait-for-instance methods by removing redundant try/catch wrappers around promise races.
packages/durabletask-js-azuremanaged/tsconfig.build.json Sets baseUrl for proper path mapping to the @microsoft/durabletask-js dist output.
packages/durabletask-js-azuremanaged/src/worker-builder.ts Switches to importing worker and function types directly from @microsoft/durabletask-js rather than local type aliases.
packages/durabletask-js-azuremanaged/src/user-agent.ts Cleans up a now-unnecessary ESLint suppression around require("../package.json").
packages/durabletask-js-azuremanaged/src/options.ts Removes now-unnecessary ESLint suppressions around require usage for os and crypto.
package.json Updates dev dependency versions (ESLint, Prettier, TypeScript-ESLint, etc.) and simplifies the lint script for the new flat config.
examples/hello-world/human_interaction.ts Updates the example to import from the @microsoft/durabletask-js package instead of local source paths.
examples/hello-world/fanout-fanin.ts Same as above: centralizes imports on @microsoft/durabletask-js.
examples/hello-world/activity-sequence.ts Same as above: centralizes imports on @microsoft/durabletask-js.
eslint.config.mjs Introduces a flat ESLint config using @eslint/js, typescript-eslint, and globals, with updated rules and ignore patterns.
.github/PULL_REQUEST_TEMPLATE.md Adds a structured PR template including AI-assistance disclosure and testing checklist.
.eslintrc.json Removes the legacy ESLint configuration in favor of the new flat config.
.eslintignore Removes the legacy ESLint ignore file, with ignore patterns now encoded in eslint.config.mjs.

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

@torosent torosent marked this pull request as ready for review January 31, 2026 01:14
.eslintignore Outdated
Copy link
Member

Choose a reason for hiding this comment

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

good catch, this is the recommended way to put this in eslint.config

Copy link
Member

Choose a reason for hiding this comment

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

submodule is not used

@YunchuWang YunchuWang merged commit 480eb2d into main Feb 2, 2026
7 checks passed
@YunchuWang YunchuWang deleted the torosent/fix-js-issues branch February 2, 2026 17:34
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