Skip to content

feat: fixing deprecation messages in sass - #3203

Merged
ommeirelles merged 10 commits into
canary-v2from
feat/sass-deprecations
Feb 20, 2026
Merged

ommeirelles merged 10 commits into
canary-v2from
feat/sass-deprecations

Conversation

@ommeirelles

@ommeirelles ommeirelles commented Feb 9, 2026 •

Copy link
Copy Markdown
Contributor

Fixing sass dart deprecations usage.

This Fix deprecations warnings from sass on the new dart version.

Caveats:

  • include-media uses a lot of sass if and this is deprecated, as we cant do anything to fix it right now the warning for this deprecation only was disabled: if-function
  • Next uses a load sass ja api depracated, as we cant change it this warning was also disabled legacy-js-api
  • Before we imported the utilities in every sass file. This increased our style as we include in some files that didnt needed it. now this is not true anymore, any sass usage that require a utility must import it and prefix the mixins and variables with the module name. THIS RESULTS IN A BREAKING CHANGE FOR CLIENTS THAT PRESUME THAT UTILITIES ARE PRESENT AT ALL TIME.

BEFORE vs AFTER

image

Summary by CodeRabbit

  • Chores

    • Updated styling system to use the Sass module/meta loader and unified how component styles and utilities are applied, improving consistency across responsive and utility-driven styles.
    • Adjusted Sass importer behavior to improve import resolution and suppress certain deprecation warnings.
  • Dependencies

    • Upgraded Sass and include-media; reorganized dependency vs. dev/peer placements across packages for clearer runtime vs. development usage.

@ommeirelles
ommeirelles requested a review from a team as a code owner February 9, 2026 17:13
@ommeirelles
ommeirelles requested review from hellofanny and lemagnetic and removed request for a team February 9, 2026 17:13
@coderabbitai

coderabbitai Bot commented Feb 9, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Next.js Sass config now uses sass.NodePackageImporter and silences specific deprecations; the repo-wide SCSS files migrate from legacy @import to @use + meta.load-css and namespace mixins under a utilities module; CLI package-manager helpers are made async with package resolution utilities; multiple package manifests updated.

Changes

Cohort / File(s) Summary
Next config & core manifest
packages/core/next.config.js, packages/core/package.json
Removed global additionalData Sass injection; added importers: [new (require('sass').NodePackageImporter)()] and silenceDeprecations: ['if-function','legacy-js-api']; bumped/reshuffled sass, moved React entries to peer/dev where appropriate.
Sass module migration (core)
packages/core/src/styles/*, packages/core/src/customizations/.../custom-mixins.scss, `packages/core/src/components/**/*.(scss
module.scss)`
Sass module migration (ui)
packages/ui/src/components/**/**/*.scss, packages/ui/src/styles/base/*.scss, packages/ui/src/styles/global.scss
Added @use "../../../styles/base/utilities" where needed; migrated mixins/functions (media, rem, focus-ring, truncate-title) to utilities.*; converted base modules to @use; refactored include-media integration and breakpoint maps.
UI package manifest
packages/ui/package.json
Added SCSS public export "./*.scss": { "sass":"./src/*.scss" }; bumped include-media and added sass devDependency; removed a peer entry.
CLI async & package helpers
packages/cli/src/utils/commands.ts, packages/cli/src/utils/dependencies.ts, packages/cli/src/**/
Made getPreferredPackageManager() async and added helpers: getPackageRootDir, loadPackageJsonAt, getDepPackageJSON; updated callers to await PM resolution; installDependencies became async.
CLI command tweaks
packages/cli/src/commands/*.ts, packages/cli/src/utils/*.ts, packages/cli/tsconfig.json
Updated calls to await package-manager resolution; removed duplicate imports; improved command logging and added ES2021 lib in tsconfig.
Other manifests
packages/cli/package.json, packages/components/package.json, packages/sdk/package.json, packages/core/package.json
Various dependency reorganizations (catalog vs workspace), moved tabbable to peerDeps, moved react to sdk devDeps, promoted/demoted @lhci/cli and others.
High-impact style files
large SCSS cohorts
Many component/section SCSS files updated consistently to meta.load-css and utilities namespacing — review for build-time load order and any implicit global side-effects.

Sequence Diagram(s)

sequenceDiagram
  participant CLI as CLI command
  participant Utils as getPreferredPackageManager()
  participant FS as Filesystem
  participant NI as `@antfu/ni` (bin)

  CLI->>Utils: call getPreferredPackageManager()
  Utils->>FS: getPackageRootDir('@antfu/ni')
  FS-->>Utils: path or not found
  alt package root found
    Utils->>FS: loadPackageJsonAt(pkgRoot + '/package.json')
    FS-->>Utils: package.json (with bin)
    alt NI bin exists
      Utils->>NI: run node <ni-bin> --version
      NI-->>Utils: agent string (yarn/npm/pnpm)
      Utils-->>CLI: resolved agent
    else no ni bin
      Utils-->>CLI: fallback agent ('yarn')
    end
  else not found
    Utils-->>CLI: fallback agent ('yarn')
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • hellofanny
  • lemagnetic
  • lariciamota

Poem

✨ Mixins renamed, imports set anew,
Meta loads hum as style sheets flew,
CLI asks nicely, then waits for reply,
Packages shuffled — build and tests, oh my!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: fixing deprecation messages in sass' clearly describes the main change: addressing Sass deprecation warnings through configuration and import refactoring.

✏️ 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
  • Commit unit tests in branch feat/sass-deprecations

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.

@codesandbox-ci

codesandbox-ci Bot commented Feb 9, 2026 •

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@ommeirelles
ommeirelles changed the base branch from feat/multilanguage to canary-v2 February 9, 2026 17:18

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 8

Caution

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

⚠️ Outside diff range comments (3)
packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss (1)

120-124: ⚠️ Potential issue | 🔴 Critical

Missing utilities. namespace prefix — this will fail to compile.

Line 121 uses @include media("<tablet") but every other breakpoint mixin in this file correctly uses @include utilities.media(...). Since the old global @import is removed, bare media is undefined here.

🐛 Proposed fix
       [data-fs-reorder-button] {
-        `@include` media("<tablet") {
+        `@include` utilities.media("<tablet") {
           display: none;
         }
       }
packages/ui/src/components/molecules/SearchDropdown/styles.scss (1)

46-55: ⚠️ Potential issue | 🟡 Minor

overflow: hidden on the search dropdown at >=notebook may clip content.

The dropdown is absolutely positioned and likely has dynamic content (search suggestions). overflow: hidden (line 50) will clip any content that exceeds the container's bounds. If the dropdown list grows beyond the visible area, items will be cut off with no scroll. Was this intentional? If you want rounded corners without clipping scrollable content, consider overflow: auto or applying border-radius via a wrapper/pseudo-element instead.

packages/ui/src/components/molecules/SkuSelector/styles.scss (1)

160-168: ⚠️ Potential issue | 🟡 Minor

Rename to --fs-sku-selector-option-color-bkg-color for consistency.

The property --data-fs-sku-selector-option-color-bkg-color is set dynamically in the React component (packages/components/src/molecules/SkuSelector/SkuSelector.tsx) via inline styles, so it's functional. However, the --data-fs- prefix is inconsistent with the project's convention; all other design tokens in this component use --fs-*. Renaming to --fs-sku-selector-option-color-bkg-color would align with the codebase standards.

🤖 Fix all issues with AI agents
In `@packages/core/src/components/account/MyAccountMenu/styles.scss`:
- Line 1: Remove the unused `@use` import for utilities: delete the line that
reads `@use` "@faststore/ui/src/styles/base/utilities"; and ensure there are no
other active references to the utilities symbol (you may also remove the
entirely commented-out `@include` utilities.media(...) block if you want to avoid
keeping dead code).
- Around line 95-130: The commented-out responsive notebook breakpoint using
utilities.media(">=notebook") is dead code that either needs to be
restored/migrated or removed; decide which: if you want to keep desktop/tablet
styles, migrate that block to the current `@use-based` utilities.media() syntax
and re-enable it so .menu, .nav, .navItem and .avatar receive their desktop
grid, column direction and avatar sizing; ensure the corresponding `@use` import
for utilities.media is present at the top; otherwise delete the entire commented
block and also remove the unused `@use` import to avoid dead imports and a layout
regression for MyAccountMenu.

In `@packages/core/src/components/account/security/styles.module.scss`:
- Around line 6-11: Multiple shared component styles are being inlined
repeatedly via meta.load-css (e.g., meta.load-css(".../Button/styles.scss"),
Input, Overlay, SlideOver), causing duplication; create a single consolidated
base stylesheet (e.g., base-shared-components.scss) that `@use/`@forward or
meta.load-css all shared atom/organism styles once, update this module
(styles.module.scss) and other files to load only that consolidated entry
instead of per-component meta.load-css calls, and ensure selectors remain
correct (watch .section scoping and data-fs-button / [data-fs-button] selectors)
so shared styles are not duplicated across the 28+ files.

In `@packages/core/src/components/common/Alert/section.module.scss`:
- Around line 8-11: Update the project's Sass config to allow resolving pkg:
URLs by adding the NodePackageImporter to the Sass importers and setting the
recommended deprecation silencing: configure sassOptions to include importers
with new NodePackageImporter() (from require('sass')) and silenceDeprecations
for 'if-function' and 'legacy-js-api'; also review the .section selector in
section.module.scss where the four meta.load-css includes (meta.load-css calls
for Icon, Button, Link, Alert) are nested—confirm that emitting rules under
.section (e.g., resulting selectors like .section [data-fs-icon]) is intentional
and won't break downstream overrides.

In `@packages/core/src/components/sections/Navbar/section.module.scss`:
- Around line 10-38: Remove the two unused style import lines in
section.module.scss that reference "@include
meta.load-css('pkg:`@faststore/ui/src/components/molecules/SkuSelector/styles.scss`');"
and "@include
meta.load-css('pkg:`@faststore/ui/src/components/molecules/Table/styles.scss`');"—delete
those include statements from the Navbar section.module.scss, verify no
remaining references to SkuSelector or Table styles in Navbar-related components
(e.g., SearchDropdown, SKUMatrix, QuantitySelector), and run the style
build/linter to ensure no import errors remain.

In `@packages/core/src/components/sections/ProductGallery/section.module.scss`:
- Around line 42-75: The meta.load-css calls for Skeleton, ProductCardSkeleton,
ProductComparison, and SlideOver in section.module.scss are missing the .scss
extension; update the four include statements (the `@include` meta.load-css(...)
lines referencing "atoms/Skeleton/styles",
"molecules/ProductCardSkeleton/styles", "organisms/ProductComparison/styles",
and "organisms/SlideOver/styles") to use the consistent "styles.scss" filename
so they match the other imports.

In `@packages/core/src/components/sections/ProductShelf/section.module.scss`:
- Around line 22-35: The Sass build is failing because section.module.scss uses
meta.load-css() with pkg: URLs which require Dart Sass >=1.71.0 and the
NodePackageImporter; update the Sass dependency in packages/core/package.json to
a version >=1.71.0 (or compatible caret range) and add the importer to your
Next.js config by configuring sassOptions.importers with new
(require('sass')).NodePackageImporter() in next.config.js so the pkg: scheme
resolves; target the meta.load-css usages in ProductShelf/section.module.scss
when validating the fix.

In `@packages/core/src/styles/global/index.scss`:
- Around line 1-14: The `@layer` ordering declaration ("@layer base, components,
theme;") appears after several `@use` imports that may already emit their own
`@layer` blocks, so the explicit ordering may be ineffective; fix by moving the
"@layer base, components, theme;" declaration to the very top of this stylesheet
(before any `@use`) or by creating/including a tiny module that declares the
layers first and then `@use` the other modules; update the file so the "@layer
base, components, theme;" declaration precedes the "@use" lines (e.g., the `@use`
of global.scss and the other component styles) to guarantee the intended layer
priority.
🧹 Nitpick comments (23)
packages/core/src/styles/main.scss (1)

1-5: Clean migration to @use — one small nit on the comment.

The @import → @use switch is correct and preserves load order. Since these are entry-point stylesheets whose side-effect CSS output matters (not namespace member access), the as aliases work fine even if unused directly.

Line 2: the comment still says "should be import before" — consider updating to "should be loaded before" to stay consistent with the new @use syntax.

✏️ Suggested comment tweak
 // The import order of these stylesheets does affect in the layers override
-// global/index.scss should be import before themes/index.scss
+// global/index.scss should be loaded before themes/index.scss
 `@use` "./global/index.scss" as global;
packages/ui/src/components/atoms/Input/styles.scss (1)

1-1: Inconsistent: .scss extension included in @use path.

Other files in this PR (e.g., FilterSkeleton/styles.scss, Modal/styles.scss) omit the extension: @use "../../../styles/base/utilities". This file includes it. While both work, dropping the extension keeps the migration consistent.

Proposed fix
-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/atoms/Checkbox/styles.scss (1)

1-2: Inconsistent file extension in @use directive.

This file uses @use "../../../styles/base/utilities.scss" with the .scss extension, while other files in this PR (e.g., Toast's styles.scss, MyAccountTable's styles.scss) omit it. Sass resolves both, but consistency across the codebase is preferred.

Suggested diff
-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/molecules/ProductCard/styles.scss (1)

1-2: Same .scss extension inconsistency as noted in Checkbox.

Consider dropping the extension for consistency with other files in this PR.

Suggested diff
-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/molecules/SearchProducts/styles.scss (1)

1-1: Minor inconsistency: explicit .scss extension in @use path.

Other files in this PR (e.g., MyAccountLayout/styles.scss) use the extensionless form @use "@faststore/ui/src/styles/base/utilities". This works but is inconsistent — consider dropping the extension for uniformity.

Suggested change
-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/core/next.config.js (1)

23-25: Silencing legacy-js-api is a stopgap — track the Next.js migration to the modern Sass API.

if-function is fine since it comes from include-media. However, legacy-js-api is silenced because Next.js still uses the old Sass JS API internally. When Next.js ships support for the modern sass compiler API, this suppression should be removed to avoid masking real deprecation issues in your own code.

Consider adding a // TODO: comment here so this doesn't get lost.

packages/ui/src/styles/base/tokens.scss (1)

228-232: Breakpoint CSS custom properties now use map.get(utilities.$breakpoints, ...).

This is consistent and correct. One thing to watch: if a breakpoint key is ever misspelled or removed from $breakpoints, map.get returns null silently (no compile error). If Sass map.get with a missing key is a concern, consider using map-get with error handling or a helper that throws on missing keys — though this is low risk given these are stable, well-known keys.

packages/core/src/components/sections/ProductTiles/section.module.scss (1)

5-17: Inconsistent file extensions vs. ProductDetails/section.module.scss.

This file omits .scss extensions in meta.load-css paths (e.g., "pkg:...Badge/styles"), while ProductDetails/section.module.scss includes them (e.g., "pkg:...Badge/styles.scss"). Both approaches work, but the inconsistency across sibling section files could cause confusion. Pick one convention and apply it uniformly.

packages/ui/src/styles/base/utilities.scss (1)

120-136: Orphaned comment in focus-ring-visible.

Line 129 (// due to Safari's lack of support) is dangling after the &:focus block closes but before @supports closes. It reads as if it should be part of the comment block starting at line 122–124. Consider moving it inline with the other Safari comments or removing the duplication.

Suggested cleanup
 `@mixin` focus-ring-visible {
   `@media` not all and (min-resolution: .001dpcm) {
     // Target only Safari browsers
     `@supports` (-webkit-appearance:none) {
-      // Use `focus` instead of `focus-visible`
+      // Use `focus` instead of `focus-visible` due to Safari's lack of support
       &:focus {
         `@include` focus-ring;
       }
-
-      // due to Safari's lack of support
     }
   }
 
   &:focus-visible {
     `@include` focus-ring;
   }
 }
packages/ui/src/components/molecules/Toggle/styles.scss (1)

1-1: Unnecessary .scss extension in @use path.

Other files in this PR import utilities without the extension (@use "../../../styles/base/utilities"). This file includes it. Sass resolves either form, but for consistency drop the extension.

Suggested fix
-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/atoms/Radio/styles.scss (1)

1-1: Nit: Drop the .scss extension from @use.

Sass recommends omitting file extensions in @use rules. Other files in this same PR (e.g., CartItem/styles.scss, Footer/styles.scss) already use @use "../../../styles/base/utilities" without the extension. Keep it consistent.

-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/molecules/BuyButton/styles.scss (1)

1-1: Nit: Drop the .scss extension for consistency.

Same as Radio/styles.scss — other files in this PR omit the extension.

-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/atoms/Textarea/styles.scss (1)

1-1: Nit: Drop the .scss extension for consistency.

Same pattern as the other two files — prefer @use "../../../styles/base/utilities".

-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/atoms/Link/styles.scss (1)

1-1: Inconsistent .scss extension in @use import.

All other files in this PR use @use "../../../styles/base/utilities" without the .scss extension. This one includes it. While Sass resolves both, keeping it consistent avoids confusion.

Suggested fix
-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/organisms/EmptyState/styles.scss (1)

35-37: Redundant align-items: center inside media query.

Line 28 already sets align-items: center unconditionally on the base selector, so the >=notebook override on line 36 is a no-op. Consider removing the entire media block if this was the only property inside it.

Suggested fix
-  `@include` utilities.media(">=notebook") {
-    align-items: center;
-  }
packages/ui/src/components/molecules/InputField/styles.scss (2)

1-1: Inconsistent @use path — includes .scss extension unlike all other files.

Every other file in this PR omits the extension (e.g., @use "../../../styles/base/utilities"). Keeping it consistent avoids confusion.

Suggested fix
-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";

54-57: Consider documenting the intentional CSS variable exposure.

The --fs-input-padding variable on line 55 is declared but unused within the InputField component itself (line 57 uses --fs-input-field-padding directly). This pattern appears intentional—exposing the variable as a CSS custom property for external override—but adding a brief comment clarifying this design choice would improve maintainability.

packages/ui/src/styles/base/typography.scss (1)

5-5: Inconsistent @use import style: .scss extension included here but omitted elsewhere.

Other files in this PR (e.g., ProductGallery/styles.scss, BannerText/styles.scss, Tiles/styles.scss) use @use "..." without the .scss extension. This file and Button/styles.scss include it. Pick one convention for consistency.

Suggested fix
-@use "./utilities.scss";
+@use "./utilities";
packages/ui/src/components/molecules/TextareaField/styles.scss (1)

1-1: Same .scss extension inconsistency as noted in typography.scss.

For consistency with the majority of files in this PR, drop the extension.

Suggested fix
-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/atoms/Button/styles.scss (1)

1-1: Same .scss extension inconsistency — drop it for uniformity.

Suggested fix
-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/atoms/Select/styles.scss (1)

1-2: Inconsistent .scss extension in @use import.

This file uses @use "../../../styles/base/utilities.scss" with the explicit .scss extension, while other files in this PR (e.g., Hero/styles.scss, Newsletter/styles.scss, SKUMatrix/styles.scss) use @use "../../../styles/base/utilities" without the extension. Both work, but pick one convention for consistency across the codebase.

Proposed fix for consistency
-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/molecules/SearchInputField/styles.scss (1)

1-2: Same .scss extension inconsistency as noted in Select/styles.scss.

Consider dropping the extension for consistency with other files in this PR.

Proposed fix
-@use "../../../styles/base/utilities.scss";
+@use "../../../styles/base/utilities";
packages/ui/src/components/organisms/Newsletter/styles.scss (1)

72-76: Consider logical properties for multilanguage/RTL support.

Lines 74 and 123 use text-align: left and margin-left: auto — physical direction properties. Since the target branch is feat/multilanguage, consider using text-align: start and margin-inline-start: auto for proper RTL support. This may be pre-existing, but since these lines are touched, it's a good opportunity.

Proposed logical property migration
     `@include` utilities.media(">=notebook") {
       align-content: flex-start;
-      text-align: left;
+      text-align: start;
     }
       [data-fs-button] {
         width: auto;
         min-width: 40%;
-        margin-left: auto;
+        margin-inline-start: auto;
       }

Also applies to: 123-124

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/core/src/components/account/MyAccountMenu/styles.scss`:
- Line 36: Fix the possessive typo in the comment text: locate the comment
containing "While it's use case is not implemented" in MyAccountMenu styles (the
SCSS comment shown in the diff) and change "it's" to the possessive "its" so the
comment reads "While its use case is not implemented".
🧹 Nitpick comments (2)
packages/core/src/components/account/MyAccountMenu/styles.scss (1)

72-72: Nit: missing spaces around child combinator >

> a, is more readable and consistent with common SCSS formatting conventions than >a,. Minor readability nit.

-  >a,
+  > a,
packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss (1)

48-48: Minor formatting inconsistency in mixin calls.

Some calls have a space before the parenthesis (utilities.media (">=notebook") on lines 48, 60, 66, 127) while others don't (utilities.media(">=notebook") on lines 82, 93, 115). Pick one style for consistency within the file.

Also applies to: 82-82

@hellofanny hellofanny added the enhancement New feature or request label Feb 10, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 16

Caution

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

⚠️ Outside diff range comments (2)
packages/cli/src/utils/generate.ts (1)

471-490: ⚠️ Potential issue | 🔴 Critical

forEach with async callback silently drops promises — dependencies may not be installed before build starts.

Array.prototype.forEach ignores the return value of its callback, so the Promise from each async iteration is discarded. await installDependencies(...) only awaits within the callback scope, but forEach itself returns void synchronously. This means validateAndInstallMissingDependencies resolves before any installation finishes, and the spinner stops prematurely.

Use for...of (sequential) or Promise.all + .map (parallel):

Fix (sequential — preserves current intent)
-  missingDependencies.forEach(async ({ feature, dependencies }) => {
+  for (const { feature, dependencies } of missingDependencies) {
     const dependenciesToInstall = dependencies.filter((dependency) => {
       const dependencyName = dependency.split('@')[0]
       return !userPackageJson.dependencies[dependencyName]
     })

     if (dependenciesToInstall.length > 0) {
       const spinner = ora(
         `Installing ${feature} missing dependencies\n`
       ).start()

       await installDependencies({
         dependencies: dependenciesToInstall,
         cwd: userDir,
         errorMessage: `failed to install ${feature} dependencies`,
       })

       spinner.stop()
     }
-  })
+  }
packages/cli/src/commands/test.ts (1)

79-79: ⚠️ Potential issue | 🟡 Minor

storeTest(tmpDir) is not awaited — unhandled rejection risk.

If getPreferredPackageManager() (or any other async call inside storeTest) throws, the resulting promise rejection will be unhandled. Consider awaiting or attaching a .catch().

Proposed fix
-    storeTest(tmpDir)
+    storeTest(tmpDir).catch((err) => {
+      testAbortController.abort()
+      this.error(err)
+    })
🤖 Fix all issues with AI agents
In `@packages/cli/src/utils/commands.ts`:
- Around line 44-52: The return type of loadPackageJsonAt currently requires a
non-optional bin field which is incorrect; make bin optional by changing its
type to bin?: Record<string, string> in the function's declared return type so
callers no longer have a required bin property to guard against—update the type
definition inside the Promise<...> union in loadPackageJsonAt accordingly.
- Around line 23-42: In getPackageRootDir, fix the infinite-loop and off-by-one
path bug: inside the while loop decrement depth each iteration and ensure
pkgJson is loaded from the same directory assigned to pkgPath (don't call
loadPackageJsonAt(join(pkgPath, '..')) after already moving pkgPath up); update
pkgPath to its parent, load pkgJson from that parent, and continue until depth
expires so the returned pkgPath corresponds to the directory that contains the
matching package.json (referencing getPackageRootDir, pkgPath, pkgJson, and
depth).
- Around line 9-18: The function getPreferredPackageManager builds binNA using
getPackageRootDir and getDepPackageJSON but falls back to an empty string so
binNA can point at the package directory; before calling fsExtra.existsSync and
spawnSync, guard against an empty/missing bin path by checking that the resolved
bin segment (from (await getDepPackageJSON('@antfu/ni'))?.bin?.['na']) is a
non-empty string (trimmed) and only then construct binNA and proceed; if the bin
is empty or falsy, return the default agent immediately to avoid running node on
a directory. Ensure you reference getPreferredPackageManager, binNA,
getPackageRootDir, getDepPackageJSON, fsExtra.existsSync and spawnSync when
locating the change.

In `@packages/cli/src/utils/runCommandSync.ts`:
- Around line 20-22: The log currently uses JSON.stringify(cmd, null, 2) which
wraps the command string in quotes; update the logger.log call in runCommandSync
(the line using `${chalk.magenta('DEBUG')} - $ ${JSON.stringify(cmd, null, 2)}
error root ↓`) to log the raw cmd value (or a clearer template like `"${cmd}"`)
instead of JSON.stringify so the command prints without literal JSON quotes;
keep the rest of the message intact.
- Around line 41-43: In runCommandSync, the logger.log call is using
JSON.stringify on a plain string command (same issue fixed in showError); update
the log in the runCommandSync function (the line calling logger.log with
chalk.magenta('DEBUG') and cmd) to avoid JSON.stringify and instead interpolate
or pass cmd directly (e.g., `${chalk.magenta('DEBUG')} - $ ${cmd} warn root ↓`)
so the command prints cleanly without extra quotes/escaping.

In `@packages/core/package.json`:
- Around line 85-86: The package.json currently lists "@lhci/cli" under
"dependencies" which should be a development-only tool; move the "@lhci/cli"
entry from the "dependencies" object into the "devDependencies" object in
packages/core/package.json so it is installed only for development/CI. Ensure
you remove the entry from "dependencies" and add the same version string (e.g.
"^0.15.1") under "devDependencies", keeping formatting and any trailing commas
consistent.

In `@packages/core/src/components/account/MyAccountLayout/styles.scss`:
- Around line 19-26: The grid definition inside the `@include`
utilities.media(">=notebook") block uses "grid-template-columns: max(300px) 80%"
which can overflow; change it to allocate remaining space with a flexible column
instead — e.g. "grid-template-columns: max(300px) 1fr" or
"grid-template-columns: max(300px) minmax(0, 1fr)"; if you need to cap the
content width, use a minmax with a max cap like "max(300px) minmax(0, min(900px,
1fr))" so the content column never forces horizontal overflow.

In
`@packages/core/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/section.module.scss`:
- Around line 4-22: The meta.load-css(...) calls include ".scss" extensions
which violate the scss/load-partial-extension rule; edit every meta.load-css
invocation in this module (e.g.,
meta.load-css("~@faststore/ui/src/components/atoms/Button/styles.scss"),
meta.load-css("./MyAccountFilterFacetDateRange/styles.scss"), etc.) to remove
the ".scss" suffix (e.g.,
meta.load-css("~@faststore/ui/src/components/atoms/Button/styles")), do the same
for all 19 entries here (and apply the same pattern across other files flagged),
then run the stylelint/CI check to confirm the scss/load-partial-extension
warning is resolved.

In `@packages/core/src/components/common/PreviewTag/section.module.scss`:
- Around line 5-7: The three meta.load-css imports in section.module.scss
include explicit “.scss” extensions which triggers Stylelint
scss/load-partial-extension; remove the “.scss” extension from the calls to
meta.load-css (the three lines referencing
"~@faststore/ui/src/components/atoms/Badge/styles",
"~@faststore/ui/src/components/atoms/Icon/styles", and
"~@faststore/ui/src/components/molecules/Tag/styles") so they rely on Sass
partial resolution without extensions.

In `@packages/core/src/components/sections/Footer/section.module.scss`:
- Around line 7-14: The meta.load-css calls in section.module.scss include
explicit .scss extensions which violate stylelint's scss/load-partial-extension
rule; update every meta.load-css invocation (e.g., the calls to meta.load-css
for Button, Link, List, Logo, Accordion, PaymentMethods, Incentives, Footer) to
remove the ".scss" extension from the path strings so they match the project's
other modules and satisfy the linter.

In `@packages/core/src/components/sections/Incentives/section.module.scss`:
- Around line 7-9: Stylelint flags the three meta.load-css calls because they
include the .scss extension; remove the file extensions in the meta.load-css
invocations so Sass module resolution uses partials without extensions (update
the three calls that reference
"~@faststore/ui/src/components/atoms/Icon/styles.scss",
"~@faststore/ui/src/components/atoms/List/styles.scss", and
"~@faststore/ui/src/components/organisms/Incentives/styles.scss" to omit
".scss"). Ensure you only change the string literals passed to meta.load-css and
keep the rest of the line unchanged.

In `@packages/core/src/components/sections/Newsletter/section.module.scss`:
- Around line 5-12: Remove the explicit ".scss" extensions from all
meta.load-css calls in the section.module.scss for Newsletter (and the other
affected section.module.scss files such as BannerNewsletter, ProductDetails,
ProductGallery, Navbar, Footer) so Sass partial resolution is used; update each
`@include` meta.load-css("~@faststore/ui/src/components/.../styles.scss") to
`@include` meta.load-css("~@faststore/ui/src/components/.../styles") for the
listed imports (notably the uses in Newsletter for Button, Icon, Input, Link,
List, RichText, InputField, and Newsletter organism) to satisfy the
scss/load-partial-extension lint rule.

In `@packages/core/src/components/sections/ProductGallery/section.module.scss`:
- Around line 42-75: The meta.load-css calls are inconsistent: some include the
".scss" extension while others omit it, causing stylelint rules to flag the ones
that include the extension; update every meta.load-css(...) argument in this
file (and other SCSS files in the PR) to remove the ".scss" extension so all
imports are extensionless (e.g., change
"~@faststore/ui/src/components/atoms/Badge/styles.scss" to
"~@faststore/ui/src/components/atoms/Badge/styles"), leaving the same module
paths and only removing the ".scss" suffix in calls like meta.load-css used
throughout (e.g., for Skeleton/styles, ProductCardSkeleton/styles,
ProductComparison/styles, SlideOver/styles and all others), then re-run
stylelint to confirm the rule scss/load-partial-extension is satisfied.

In `@packages/core/src/components/sections/RegionBar/section.module.scss`:
- Around line 5-7: The meta.load-css calls include explicit ".scss" extensions
which should be removed to follow Dart Sass/@use conventions and satisfy the
scss/load-partial-extension lint rule; update each meta.load-css invocation
(e.g., meta.load-css("~@faststore/ui/src/components/atoms/Icon/styles.scss")) to
remove the ".scss" suffix
(meta.load-css("~@faststore/ui/src/components/atoms/Icon/styles")) while keeping
the surrounding quotes and import string intact, and apply the same change to
the Button and RegionBar load-css calls (and any other meta.load-css occurrences
in the file).

In `@packages/core/src/components/sections/ScrollToTopButton/section.module.scss`:
- Around line 9-10: The two `@include` meta.load-css calls in section.module.scss
are using explicit “.scss” extensions which triggers the
scss/load-partial-extension Stylelint rule; remove the “.scss” extension from
the import paths in the `@include` meta.load-css calls (i.e., change
"~@faststore/ui/src/components/atoms/Icon/styles.scss" and
"~@faststore/ui/src/components/atoms/Button/styles.scss" to the same paths
without the .scss extension) so meta.load-css is called with extension-free
partial paths.

In `@packages/core/src/styles/global/index.scss`:
- Around line 7-16: The meta.load-css calls currently include the .scss
extension which triggers the scss/load-partial-extension Stylelint rule; update
each meta.load-css invocation (e.g.,
meta.load-css("~@faststore/ui/src/styles/global.scss"),
meta.load-css("~@faststore/ui/src/components/atoms/Skeleton/styles.scss"),
meta.load-css("~@faststore/ui/src/components/atoms/Overlay/styles.scss"),
meta.load-css("~@faststore/ui/src/components/atoms/SROnly/styles.scss"),
meta.load-css("src/components/sections/Section/section.scss"),
meta.load-css("~@faststore/ui/src/components/molecules/Dropdown/styles.scss"))
to remove the .scss suffix (use the same paths without the extension) so
Stylelint no longer flags them and auto-fixes will match the rest of the
codebase.
🧹 Nitpick comments (6)
packages/ui/src/styles/base/reset.scss (1)

6-9: The ~ prefix pattern is established throughout the codebase.

While pkg:modern-normalize would align better with Dart Sass conventions, the entire codebase consistently uses ~ with meta.load-css() across hundreds of imports—both local paths (~@faststore/ui/...) and npm packages. Changing this single instance to pkg: would create inconsistency unless done as part of a broader migration. If a codebase-wide migration to pkg: is planned, coordinate it separately to maintain pattern consistency.

packages/core/src/components/sections/Navbar/section.module.scss (1)

1-2: Nit: @use order.

Convention is typically to place built-in Sass modules (sass:meta) before third-party imports. Not a functional issue — just consistency with most other files in this PR where sass:meta comes first.

Suggested order
-@use "@faststore/ui/src/styles/base/utilities";
-@use "sass:meta";
+@use "sass:meta";
+@use "@faststore/ui/src/styles/base/utilities";
packages/core/src/components/common/Alert/section.module.scss (1)

2-2: Inconsistent path prefix: @use omits ~ but meta.load-css includes it.

Line 2 uses @use "@faststore/ui/..." (no tilde), while Lines 10–13 use meta.load-css("~@faststore/ui/...") (with tilde). The ~ prefix is a webpack/sass-loader convention for resolving node_modules. Mixing the two styles works only if both the Sass importer and sass-loader are configured to handle both forms, but it's fragile and confusing.

Pick one convention and stick with it—preferably drop ~ everywhere if NodePackageImporter is configured.

Also applies to: 10-13

packages/core/src/components/sections/ProductDetails/section.module.scss (1)

72-72: Nit: missing space after > combinator.

>[data-fs-button] is valid but harder to scan. Prefer > [data-fs-button] for readability.

packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss (1)

48-48: Inconsistent spacing in utilities.media calls.

Lines 48, 60, 66, and 126 have a space before the parenthesis (utilities.media (">=notebook")), while lines 81, 92, 103, and 114 do not (utilities.media(">=notebook")). While Sass tolerates both forms, pick one for consistency — the no-space form is conventional.

Example fix
-  `@include` utilities.media (">=notebook") {
+  `@include` utilities.media(">=notebook") {

Apply to lines 48, 60, 66, and 126.

packages/core/src/components/account/orders/MyAccountListOrders/styles.module.scss (1)

17-32: Stylelint flags empty lines before custom properties (lines 27, 30).

custom-property-empty-line-before fires on the blank lines separating custom property groups. If the project enforces this rule, remove the blank lines or add a comment between groups. If the grouping is intentional, consider disabling the rule for this block or updating the Stylelint config.

Comment thread packages/cli/src/utils/commands.ts Resolved
Comment thread packages/cli/src/utils/commands.ts Resolved
Comment thread packages/cli/src/utils/commands.ts Resolved

@lariciamota lariciamota left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎉

Comment thread packages/cli/src/utils/commands.ts Resolved
Comment on lines +5 to +7
@include meta.load-css("~@faststore/ui/src/components/atoms/Badge/styles.scss");
@include meta.load-css("~@faststore/ui/src/components/atoms/Icon/styles.scss");
@include meta.load-css("~@faststore/ui/src/components/molecules/Tag/styles.scss");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ommeirelles are you getting those errors?

Comment on lines +85 to +86
"use-sync-external-store": "^1.6.0",
"@lhci/cli": "^0.15.1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ommeirelles was this on purpose?

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss`:
- Around line 5-25: The meta.load-css calls include explicit “.scss” extensions
which triggers the stylelint scss/load-partial-extension rule; update every
meta.load-css invocation (e.g.,
meta.load-css("~@faststore/ui/src/components/atoms/Icon/styles.scss"),
meta.load-css("./MyAccountReorderButton/styles.scss"),
meta.load-css("../../components/MyAccountAccordion/styles.scss"), etc.) to
remove the “.scss” suffix so they read meta.load-css(".../styles") for all 21
entries; keep paths otherwise unchanged and run the linter to confirm the rule
is satisfied.
🧹 Nitpick comments (3)
packages/cli/src/utils/commands.ts (2)

6-6: Inconsistent existsSync usage.

Line 6 destructures existsSync from fsExtra, but line 16 calls fsExtra.existsSync(binNA) directly. Also uses == false instead of the more idiomatic !. Pick one style.

-  if (!binNA || fsExtra.existsSync(binNA) == false) return agent
+  if (!existsSync(binNA)) return agent

Also applies to: 16-16


53-54: Compact ternary chain for location is hard to scan.

The boolean-expression-as-value pattern (at?.endsWith(file) && at) || (at && join(at, file)) || false mixes truthy coercion and explicit false. A simple if/else or early return would be clearer and avoid the subtle false sentinel.

♻️ Suggested simplification
-  const file = 'package.json',
-    location = (at?.endsWith(file) && at) || (at && join(at, file)) || false
-
-  if (location === false)
-    throw new Error(`Invalid searching of ${file} at ${at}`)
+  if (!at) throw new Error(`Invalid searching of package.json at ${at}`)
+
+  const location = at.endsWith('package.json') ? at : join(at, 'package.json')
packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss (1)

60-60: Inconsistent spacing on utilities.media calls.

Lines 60, 66, and 126 have a space before the parenthesis (utilities.media (">=...")), while lines 48, 81, 92, 103, and 114 omit it. Pick one style for consistency.

Suggested fix
-    `@include` utilities.media (">=tablet") {
+    `@include` utilities.media(">=tablet") {

Apply the same to lines 66 and 126.

ommeirelles and others added 3 commits February 19, 2026 12:14

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In
`@packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss`:
- Around line 5-25: The meta.load-css calls include explicit ".scss" extensions
which violate the scss/load-partial-extension rule; remove the ".scss" suffix
from every meta.load-css argument (e.g., calls referencing
"./MyAccountSummaryCard/styles.scss",
"~@faststore/ui/src/components/atoms/Icon/styles.scss", etc.) so each path ends
without the extension while keeping the same relative/module paths and quotes.

@ommeirelles
ommeirelles merged commit d6684dd into canary-v2 Feb 20, 2026
3 checks passed
@ommeirelles
ommeirelles deleted the feat/sass-deprecations branch February 20, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants