feat(build): exclude files#793
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (21)
✅ Files skipped from review due to trivial changes (21)
Summary by CodeRabbit
WalkthroughAdds a Changesbuild.ignore glob-pattern exclusion
Release version update
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/configuration/src/runtime/ConfigurationBuilder.ts`:
- Around line 34-35: The code at lines 34-35 in ConfigurationBuilder.ts assigns
shared references from DefaultValues.BUILD and DefaultValues.BUILD_IGNORE
directly to the configuration object. To prevent mutations in one build from
affecting subsequent builds, create independent copies of these default objects
instead of reusing the shared references. When assigning to configuration.build
and configuration.build.ignore, use a cloning or spreading mechanism to ensure
each configuration instance gets its own copy of the default values rather than
a shared reference.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: f505940c-36d7-4094-b9c1-fed2b16fc01b
📒 Files selected for processing (11)
documentation/docs/build/configuration.mdpackages/build/src/BuildHelper.tspackages/build/src/BuildManager.tspackages/build/src/ProjectFileManager.tspackages/configuration/src/runtime/ConfigurationBuilder.tspackages/configuration/src/runtime/definitions/RuntimeConfiguration.tspackages/configuration/test/runtime/ConfigurationBuilder.spec.tspackages/configuration/test/runtime/fixtures/configuration.fixture.tspackages/configuration/test/runtime/fixtures/filenames.fixture.tspackages/configuration/test/runtime/fixtures/files.fixture.tspackages/sourcing/src/files/FileManager.ts
| configuration.build ??= DefaultValues.BUILD; | ||
| configuration.build.ignore ??= DefaultValues.BUILD_IGNORE; |
There was a problem hiding this comment.
Avoid sharing mutable defaults across builds.
Line 34 and Line 35 assign shared object/array references from DefaultValues. If configuration.build.ignore is mutated later, subsequent build() calls can inherit stale ignore patterns.
Suggested fix
- configuration.build ??= DefaultValues.BUILD;
- configuration.build.ignore ??= DefaultValues.BUILD_IGNORE;
+ configuration.build ??= { ignore: [...DefaultValues.BUILD_IGNORE] };
+ configuration.build.ignore ??= [...DefaultValues.BUILD_IGNORE];📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| configuration.build ??= DefaultValues.BUILD; | |
| configuration.build.ignore ??= DefaultValues.BUILD_IGNORE; | |
| configuration.build ??= { ...DefaultValues.BUILD, ignore: [...DefaultValues.BUILD_IGNORE] }; | |
| configuration.build.ignore ??= [...DefaultValues.BUILD_IGNORE]; |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/configuration/src/runtime/ConfigurationBuilder.ts` around lines 34 -
35, The code at lines 34-35 in ConfigurationBuilder.ts assigns shared references
from DefaultValues.BUILD and DefaultValues.BUILD_IGNORE directly to the
configuration object. To prevent mutations in one build from affecting
subsequent builds, create independent copies of these default objects instead of
reusing the shared references. When assigning to configuration.build and
configuration.build.ignore, use a cloning or spreading mechanism to ensure each
configuration instance gets its own copy of the default values rather than a
shared reference.
|


Fixes #768
Changes proposed in this pull request:
@MaskingTechnology/jitar