[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [FIX] SCSS: Silence deprecation warnings and align build configuration with modern standards

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69a5c4a16a23c_3b187acc9115c@gitlab-sidekiq-low-urgency-cpu-bound-v2-768fff574d-5c4wb.mail>

Benoit Grégoire pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki


Commits:
fd413749 by MAGENE Sem Joel at 2026-03-02T17:02:49+00:00
[FIX] SCSS: Silence deprecation warnings and align build configuration with modern standards
---
* [FIX] SCSS: Silence deprecation warnings and align build configuration with modern standards

See merge request tikiwiki/tiki!9673

- - - - -


3 changed files:

- package-lock.json
- src/js/vite.config.mjs
- src/scss/package.json


Changes:

=====================================
package-lock.json
=====================================
@@ -3313,9 +3313,9 @@
       "license": "MIT"
     },
     "node_modules/bootswatch": {
-      "version": "5.3.3",
-      "resolved": "https://registry.npmjs.org/bootswatch/-/bootswatch-5.3.3.tgz",
-      "integrity": "sha512-cJLhobnZsVCelU7zdH/L7wpcXAyUoTX4/5l2dWQ0JXgaVK80BdTQNU/ImWwoyIGBeyms4iQDAdNtOfPQZf0Atg==",
+      "version": "5.3.8",
+      "resolved": "https://registry.npmjs.org/bootswatch/-/bootswatch-5.3.8.tgz",
+      "integrity": "sha512-88mnH9tv+x6DV+scBxYFOpM4YSDVhyfEgbhqaEfvkHNctKI9qRcACxIP9nmBZ5mSeLXtsgax1VsRkUs1eWjlAQ==",
       "dev": true,
       "license": "MIT"
     },
@@ -10429,9 +10429,9 @@
       "license": "MIT"
     },
     "node_modules/sass": {
-      "version": "1.85.0",
-      "resolved": "https://registry.npmjs.org/sass/-/sass-1.85.0.tgz",
-      "integrity": "sha512-3ToiC1xZ1Y8aU7+CkgCI/tqyuPXEmYGJXO7H4uqp0xkLXUqp88rQQ4j1HmP37xSJLbCJPaIiv+cT1y+grssrww==",
+      "version": "1.97.3",
+      "resolved": "https://registry.npmjs.org/sass/-/sass-1.97.3.tgz",
+      "integrity": "sha512-fDz1zJpd5GycprAbu4Q2PV/RprsRtKC/0z82z0JLgdytmcq0+ujJbJ/09bPGDxCLkKY3Np5cRAOcWiVkLXJURg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -12698,8 +12698,8 @@
       "version": "1.0.0",
       "license": "ISC",
       "devDependencies": {
-        "bootswatch": "^5.3.3",
-        "sass": "^1.77.5"
+        "bootswatch": "^5.3.8",
+        "sass": "^1.97.0"
       }
     }
   }


=====================================
src/js/vite.config.mjs
=====================================
@@ -188,6 +188,13 @@ export default defineConfig(({ command, mode }) => {
             },
         },
         css: {
+            preprocessorOptions: {
+                scss: {
+                    // Vite 5.4.x defaults to the legacy Sass API, which triggers 'legacy-js-api' deprecation warnings when using Sass 1.79.0+. This explicitly opts into the modern API to silence those warnings.
+                    // NOTE: This is obsolete and SHOULD be removed when upgrading to Vite 6 or higher, as Vite 6+ defaults to the modern API.
+                    api: "modern-compiler",
+                },
+            },
             postcss: {
                 plugins: [postcssRootToHost()],
             },


=====================================
src/scss/package.json
=====================================
@@ -3,12 +3,15 @@
   "version": "1.0.0",
   "description": "Sass (scss) build system for themes.  Note that for themes in _custom to actually work, you also need the main vite js build to run to copy the assets (images, fonts, etc.)",
   "type": "module",
+  "scriptsComments": {
+    "build/watch": "The flags --silence-deprecation=color-functions,global-builtin,import,if-function are there because as of 2026-03-01, bootstrap 5.3.8 hasn't fixed everything.  See https://github.com/orgs/twbs/discussions/41370.  In addition, our own code requires ignoring @import deprecation, because we can't run px sass-migrator module --migrate-deps --load-path=../../templates --load-path=../../themes ../../themes/**/**/*.scss on our own codebase until bootstrap is fixed. Jomagene 2026-03-01"
+  },
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
     "prebuild": "node scripts/check_custom.js",
     "prewatch": "node scripts/check_custom.js",
-    "build": "sass --update --load-path=../../templates --load-path=../../themes ../../themes ../../_custom:../../public/generated/_custom",
-    "watch": "sass --watch --load-path=../../templates --load-path=../../themes ../../themes ../../_custom:../../public/generated/_custom",
+    "build": "sass --load-path=../../templates --load-path=../../themes ../../themes ../../_custom:../../public/generated/_custom --silence-deprecation=color-functions,global-builtin,import,if-function",
+    "watch": "sass --watch --load-path=../../templates --load-path=../../themes ../../themes ../../_custom:../../public/generated/_custom --silence-deprecation=color-functions,global-builtin,import,if-function",
     "clean": "git clean -f -x \"../../themes/**/*.css\" \"../../themes/**/*.css.map\" \"../../public/generated/_custom/**/*.css\" \"../../public/generated/_custom/**/*.css.map\""
 
   },
@@ -19,7 +22,7 @@
     "sass": "Changelog: https://github.com/sass/dart-sass/blob/main/CHANGELOG.md"
   },
   "devDependencies": {
-    "bootswatch": "^5.3.3",
-    "sass": "^1.77.5"
+    "bootswatch": "^5.3.8",
+    "sass": "^1.97.0"
   }
 }
\ No newline at end of file



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/fd4137493c6d8280929556c5ddc02eea97c40294

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/fd4137493c6d8280929556c5ddc02eea97c40294
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.