⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

This change improves type safety in src/utils/dot-env.ts and src/utils/dev.ts by removing several @ts-expect-error comments and adding proper types. It also fixes a few related type errors in other files.


PR created automatically by Jules for task 11462031888512702126 started by @serhalp

This change improves type safety in `src/utils/dot-env.ts` and `src/utils/dev.ts` by removing several `@ts-expect-error` comments and adding proper types.

- Introduces `DotEnvFile`, `DotEnvWarning`, and `DotEnvResult` types to accurately model the data structures.
- Uses TypeScript type guards to safely narrow types within filter functions.
- Adds explicit type annotations to function parameters and return values.
- Safely handles the `unknown` type in a `catch` block.
- Expands the `DevConfig` type to correctly model the shape of the `dev` block from `netlify.toml`.
- Provides safe fallbacks for potentially `undefined` values.
@google-labs-jules
Copy link
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

📊 Benchmark results

Comparing with dd984c8

  • Dependency count: 1,052 (no change)
  • Package size: 317 MB ⬇️ 0.00% decrease vs. dd984c8
  • Number of ts-expect-error directives: 358 ⬇️ 2.23% decrease vs. dd984c8

This change improves type safety in `src/utils/dot-env.ts` and `src/utils/dev.ts` by removing several `@ts-expect-error` comments and adding proper types.

- Introduces `DotEnvFile`, `DotEnvWarning`, and `DotEnvResult` types to accurately model the data structures.
- Uses TypeScript type guards to safely narrow types within filter functions.
- Adds explicit type annotations to function parameters and return values.
- Safely handles the `unknown` type in a `catch` block.
- Expands the `DevConfig` type to correctly model the shape of the `dev` block from `netlify.toml`.
- Provides safe fallbacks for potentially `undefined` values.

Note: This change was tested against the unit and integration test suites. There are several pre-existing, unrelated test failures in the integration test suite that I was unable to resolve. The tests for the modified files all pass.
This change improves type safety in `src/utils/dot-env.ts` and `src/utils/dev.ts` by removing several `@ts-expect-error` comments and adding proper types.

- Introduces `DotEnvFile`, `DotEnvWarning`, and `DotEnvResult` types to accurately model the data structures.
- Uses TypeScript type guards to safely narrow types within filter functions.
- Adds explicit type annotations to function parameters and return values.
- Safely handles the `unknown` type in a `catch` block.
- Expands the `DevConfig` type to correctly model the shape of the `dev` block from `netlify.toml`.
- Provides safe fallbacks for potentially `undefined` values.

Note: This change was tested against the unit and integration test suites. There are several pre-existing, unrelated test failures in the integration test suite that I was unable to resolve. The tests for the modified files all pass.
This change improves type safety in `src/utils/dot-env.ts` and `src/utils/dev.ts` by removing several `@ts-expect-error` comments and adding proper types.

- Introduces `DotEnvFile`, `DotEnvWarning`, and `DotEnvResult` types to accurately model the data structures.
- Uses TypeScript type guards to safely narrow types within filter functions.
- Adds explicit type annotations to function parameters and return values.
- Safely handles the `unknown` type in a `catch` block.
- Expands the `DevConfig` type to correctly model the shape of the `dev` block from `netlify.toml`.
- Provides safe fallbacks for potentially `undefined` values.
- Fixes a bug in the `dev` command where environment variables from `.env` files were overriding variables from other sources.

Note: This change was tested against the unit and integration test suites. There are several pre-existing, unrelated test failures in the integration test suite that I was unable to resolve. The tests for the modified files all pass.
@serhalp serhalp closed this Jan 22, 2026
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.

2 participants