Conversation
- Improved type safety in `src/utils/dot-env.ts` by adding explicit types and type predicates. - Resolved multiple `@ts-expect-error` directives in `src/utils/dev.ts` by typing parameters and handling optional properties. - Enhanced `src/utils/telemetry/report-error.ts` with types from `@bugsnag/js` and safer error handling. - Fixed a `catch` block error in `src/utils/command-helpers.ts` with a type guard. - Updated `src/utils/types.ts` and `src/lib/build.ts` to support stricter environment variable and configuration types. - Verified changes with `npm run typecheck` and unit tests. Co-authored-by: serhalp <1377702+serhalp@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Improved type safety in `src/utils/dot-env.ts` by adding explicit types and type predicates. - Resolved multiple `@ts-expect-error` directives in `src/utils/dev.ts` by typing parameters and handling optional properties safely. - Enhanced `src/utils/telemetry/report-error.ts` with types from `@bugsnag/js` and safer error handling. - Fixed a `catch` block error in `src/utils/command-helpers.ts` with a type guard. - Updated `src/utils/types.ts` and `src/lib/build.ts` to support stricter environment variable and configuration types. - Fixed ESLint errors including misused promises, unnecessary conditions, and base-to-string conversions. - Verified changes with `npm run typecheck`, `npm run lint`, and unit tests. Co-authored-by: serhalp <1377702+serhalp@users.noreply.github.com>
- Improved type safety in `src/utils/dot-env.ts` by adding explicit types and type predicates. - Resolved multiple `@ts-expect-error` directives in `src/utils/dev.ts` by typing parameters and handling optional properties safely. - Enhanced `src/utils/telemetry/report-error.ts` with types from `@bugsnag/js` and safer error handling. - Fixed a `catch` block error in `src/utils/command-helpers.ts` with a type guard. - Updated `src/utils/types.ts` and `src/lib/build.ts` to support stricter environment variable and configuration types. - Fixed ESLint errors including misused promises, unnecessary conditions, and base-to-string conversions. - Ensured code is formatted with Prettier. - Verified changes with `npm run typecheck`, `npm run lint`, and unit tests. Co-authored-by: serhalp <1377702+serhalp@users.noreply.github.com>
- Improved type safety in `src/utils/dot-env.ts` with explicit types and type predicates. - Resolved `@ts-expect-error` directives in `src/utils/dev.ts` and handled optional properties. - Enhanced `src/utils/telemetry/report-error.ts` with types from `@bugsnag/js`. - Fixed error handling in `src/utils/command-helpers.ts` with type guards. - Updated `src/utils/types.ts` and `src/lib/build.ts` for consistency. - Resolved several ESLint and formatting issues. Co-authored-by: serhalp <1377702+serhalp@users.noreply.github.com>
- Improved type safety in `src/utils/dot-env.ts` with explicit types and type predicates. - Enhanced robustness in `src/utils/dev.ts` with fallbacks for site information and account IDs. - Integrated `@bugsnag/js` types in `src/utils/telemetry/report-error.ts`. - Added type guards in `src/utils/command-helpers.ts` for error handling. - Resolved ESLint and formatting issues. Co-authored-by: serhalp <1377702+serhalp@users.noreply.github.com>
- Improved type safety in `src/utils/dot-env.ts` by defining proper result types and using type predicates. - Refactored `src/utils/telemetry/report-error.ts` to use `unknown` for errors and properly normalize them into `Error` objects. - Resolved `@ts-expect-error` in `src/utils/command-helpers.ts` with a type guard. - Added explicit types to multiple functions in `src/utils/dev.ts` and improved robustness by handling missing `site.root`. - Updated `EnvironmentVariableSource` in `src/utils/types.ts` to allow custom sources while maintaining autocompletion. - Fixed numerous `@ts-expect-error` directives and implicit `any` across the modified files. - Ensured all changes pass type checking, linting, and relevant integration tests. Co-authored-by: serhalp <1377702+serhalp@users.noreply.github.com>
- Improved type safety in `src/utils/dot-env.ts` by defining proper result types and using type predicates. - Refactored `src/utils/telemetry/report-error.ts` to use `unknown` for errors and properly normalize them into `Error` objects. - Resolved `@ts-expect-error` in `src/utils/command-helpers.ts` with a type guard. - Added explicit types to multiple functions in `src/utils/dev.ts` and improved robustness by handling missing `site.root`. - Updated `EnvironmentVariableSource` in `src/utils/types.ts` to allow custom sources while maintaining autocompletion. - Fixed numerous `@ts-expect-error` directives and implicit `any` across the modified files. - Ensured all changes pass type checking, linting, formatting and relevant integration tests. Co-authored-by: serhalp <1377702+serhalp@users.noreply.github.com>
- Improved type safety in `src/utils/dot-env.ts` by defining proper result types and using type predicates. - Refactored `src/utils/telemetry/report-error.ts` to use `unknown` for errors and properly normalize them into `Error` objects, with robustness against circularity. - Resolved `@ts-expect-error` in `src/utils/command-helpers.ts` with a type guard. - Added explicit types to multiple functions in `src/utils/dev.ts` and improved robustness by handling missing `site.root` (CWD fallback) and `site.id`. - Updated `EnvironmentVariableSource` in `src/utils/types.ts` to allow custom sources while maintaining autocompletion. - Fixed numerous `@ts-expect-error` directives and implicit `any` across the modified files. - Ensured `processOnExit` safely handles async handlers without misused-promises lint errors. - Ensured all changes pass type checking, linting, formatting and relevant unit tests. Co-authored-by: serhalp <1377702+serhalp@users.noreply.github.com>
This submission improves type safety in several utility modules (leaf nodes) by resolving
@ts-expect-errordirectives, implicitanytypes, and unsafe property access. Key changes include:src/utils/dot-env.ts: DefinedDotEnvResulttypes and used type predicates for safe filtering.src/utils/dev.ts: Added types togetDotEnvVariablesand other helpers, resolving unused@ts-expect-errortags.src/utils/telemetry/report-error.ts: Integrated@bugsnag/jstypes forNotifiableErrorandEvent.src/utils/command-helpers.ts: Added a type guard for errors inpollForToken.src/utils/types.ts: UpdatedEnvironmentVariableSourceto support custom string sources while maintaining literal autocompletion.src/lib/build.ts: ExpandedCachedConfigto include missingenvFilesandenv_filesproperties.PR created automatically by Jules for task 10752538661482729364 started by @serhalp