Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TypeScript inclusion in tsconfig.json for cli-v3 init #1105

Merged
merged 2 commits into from
May 21, 2024

Conversation

alexandredev3
Copy link
Contributor

Closes #1017

✅ Checklist

  • I have followed every step in the contributing guide
  • The PR title follows the convention.
  • I ran and tested the code works

Testing

  1. Ensure that the tsconfig.json file does not contain an explicit include directive.
  2. Run pnpm exec triggerdev init.
  3. Verify if the trigger.config.ts file is not included in the include tsconfig directive.
  4. Next, manually add an include directive to the tsconfig.json file.
  5. Once the include directive is added, run pnpm exec triggerdev init again.
  6. Check if trigger.config.ts is included in the include directive tsconfig, as it should be based on the presence of the include directive.

Changelog

This pull request addresses an issue specific to the cli-v3 init where TypeScript files were mistakenly included in the project directory when no include directive was present in tsconfig.json. Previously, the cli init added trigger.config.ts to the inclusion list by default, resulting in TypeScript compilation errors for other files within the project.

To resolve this issue, the proposed fix ensures that trigger.config.ts is only added to the inclusion list if there's an existing include directive present in tsconfig.json. This prevents unintended TypeScript compilation errors for other files and maintains the expected behavior of the TypeScript compiler.


💯

Copy link

changeset-bot bot commented May 16, 2024

🦋 Changeset detected

Latest commit: 81e8c85

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

alexandredev3 and others added 2 commits May 21, 2024 14:40
Fixed an issue where TypeScript files were included in the project directory when no include directive was present in tsconfig.json. Previously, the CLI added trigger.config.ts to the inclusion list by default, causing TypeScript compilation errors for other files. The fix ensures that trigger.config.ts is only added to the inclusion list if there's an existing include directive present in tsconfig.json
@ericallam ericallam merged commit a86f36c into triggerdotdev:main May 21, 2024
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.

[TRI-2209] CLI init: If there's no include in the tsconfig.ts file then don't add trigger.config.ts to it (v3)
2 participants