Skip to content

Ignore nested node_modules and delete postcss#1828

Merged
sapayth merged 2 commits intoweDevsOfficial:developfrom
arifulhoque7:fix/grunt-zip-node-modules-exclude
Mar 11, 2026
Merged

Ignore nested node_modules and delete postcss#1828
sapayth merged 2 commits intoweDevsOfficial:developfrom
arifulhoque7:fix/grunt-zip-node-modules-exclude

Conversation

@arifulhoque7
Copy link
Contributor

@arifulhoque7 arifulhoque7 commented Mar 10, 2026

Add an explicit '!/node_modules/' ignore pattern in Gruntfile.js so nested node_modules folders are excluded from file sets. Remove modules/user-directory/postcss.config.js (Tailwind + Autoprefixer) as the per-module PostCSS config is no longer required.

Summary by CodeRabbit

  • Chores
    • Broadened exclusion of nested dependency directories during the build copy step to avoid including unnecessary files.
    • Removed PostCSS plugin configuration from the user-directory module, simplifying its build setup.

Add an explicit '!**/node_modules/**' ignore pattern in Gruntfile.js so nested node_modules folders are excluded from file sets. Remove modules/user-directory/postcss.config.js (Tailwind + Autoprefixer) as the per-module PostCSS config is no longer required.
@arifulhoque7 arifulhoque7 requested a review from sapayth March 10, 2026 08:53
@arifulhoque7 arifulhoque7 self-assigned this Mar 10, 2026
@arifulhoque7 arifulhoque7 added the needs: dev review This PR needs review by a developer label Mar 10, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Walkthrough

Updates to build tooling: Gruntfile.js broadens the copy task's node_modules exclusion pattern; modules/user-directory/postcss.config.js has its exported PostCSS configuration removed.

Changes

Cohort / File(s) Summary
Grunt copy task
Gruntfile.js
Changed copy task src exclusion from !node_modules/** to !**/node_modules/**, expanding exclusion to nested node_modules directories.
PostCSS config removal
modules/user-directory/postcss.config.js
Removed the module.exports PostCSS configuration (plugins previously included tailwindcss and autoprefixer).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I hop through lines of build and rule,
Excluding nests of node_modules cool,
A PostCSS file slips from the scene,
My whiskers twitch at changes clean,
I stamp my paw — the tree is pruned. 🐇✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: updating grunt exclusion patterns for nested node_modules and removing the postcss config file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Simplify Gruntfile.js main.src globs by removing the duplicate '!node_modules/**' entry. The existing '!**/node_modules/**' already excludes node_modules at any depth (including top-level), so this cleans up the pattern list without changing behavior.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Gruntfile.js (1)

1-2: ⚠️ Potential issue | 🟡 Minor

CI workflow is bypassing PHPCS exclusion patterns for JavaScript files.

The PHPCS configuration already correctly excludes *.js files via <exclude-pattern>*.js</exclude-pattern> in phpcs.xml. However, the GitHub Actions workflow in .github/workflows/inspections.yml bypasses this by passing changed files directly to PHPCS on the command line. When files are specified directly, PHPCS doesn't reliably apply exclude patterns.

Update the workflow to filter out JavaScript files before passing to PHPCS, or allow PHPCS to scan based on its configuration without explicit file arguments.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Gruntfile.js` around lines 1 - 2, CI is passing changed files directly to
PHPCS which bypasses phpcs.xml exclude-patterns (e.g., *.js); update the
workflow in .github/workflows/inspections.yml to either (a) filter the
changed-files list to remove *.js before calling phpcs, or (b) stop passing file
arguments and invoke phpcs with no explicit paths so it uses phpcs.xml excludes;
locate the job/step that collects changed files (the step that builds the file
list) and add a filter for /\.js$/ removals or change that step to call phpcs
without file arguments—this will ensure JavaScript files excluded by phpcs.xml
(e.g., files under Gruntfile.js/module.exports) are not scanned.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@Gruntfile.js`:
- Around line 1-2: CI is passing changed files directly to PHPCS which bypasses
phpcs.xml exclude-patterns (e.g., *.js); update the workflow in
.github/workflows/inspections.yml to either (a) filter the changed-files list to
remove *.js before calling phpcs, or (b) stop passing file arguments and invoke
phpcs with no explicit paths so it uses phpcs.xml excludes; locate the job/step
that collects changed files (the step that builds the file list) and add a
filter for /\.js$/ removals or change that step to call phpcs without file
arguments—this will ensure JavaScript files excluded by phpcs.xml (e.g., files
under Gruntfile.js/module.exports) are not scanned.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1cc3f832-6eab-4169-94bc-1cc7d06e0ae8

📥 Commits

Reviewing files that changed from the base of the PR and between df9384c and 0e24236.

📒 Files selected for processing (1)
  • Gruntfile.js

@sapayth sapayth merged commit 81ea525 into weDevsOfficial:develop Mar 11, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs: dev review This PR needs review by a developer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants