@openstack_dev/gatsby-theme-marketing-oif-core 1.0.40 → 1.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,140 @@
1
+ {
2
+ "version": 1,
3
+ "include": [
4
+ "**/*.ts",
5
+ "**/*.tsx",
6
+ "**/*.js",
7
+ "**/*.jsx",
8
+ "**/*.py",
9
+ "**/*.go",
10
+ "**/*.rs",
11
+ "**/*.java",
12
+ "**/*.c",
13
+ "**/*.h",
14
+ "**/*.cpp",
15
+ "**/*.hpp",
16
+ "**/*.cc",
17
+ "**/*.cxx",
18
+ "**/*.cs",
19
+ "**/*.php",
20
+ "**/*.rb",
21
+ "**/*.swift",
22
+ "**/*.kt",
23
+ "**/*.kts",
24
+ "**/*.dart",
25
+ "**/*.svelte",
26
+ "**/*.liquid",
27
+ "**/*.pas",
28
+ "**/*.dpr",
29
+ "**/*.dpk",
30
+ "**/*.lpr",
31
+ "**/*.dfm",
32
+ "**/*.fmx"
33
+ ],
34
+ "exclude": [
35
+ "**/.git/**",
36
+ "**/node_modules/**",
37
+ "**/vendor/**",
38
+ "**/Pods/**",
39
+ "**/dist/**",
40
+ "**/build/**",
41
+ "**/out/**",
42
+ "**/bin/**",
43
+ "**/obj/**",
44
+ "**/target/**",
45
+ "**/*.min.js",
46
+ "**/*.bundle.js",
47
+ "**/.next/**",
48
+ "**/.nuxt/**",
49
+ "**/.svelte-kit/**",
50
+ "**/.output/**",
51
+ "**/.turbo/**",
52
+ "**/.cache/**",
53
+ "**/.parcel-cache/**",
54
+ "**/.vite/**",
55
+ "**/.astro/**",
56
+ "**/.docusaurus/**",
57
+ "**/.gatsby/**",
58
+ "**/.webpack/**",
59
+ "**/.nx/**",
60
+ "**/.yarn/cache/**",
61
+ "**/.pnpm-store/**",
62
+ "**/storybook-static/**",
63
+ "**/.expo/**",
64
+ "**/web-build/**",
65
+ "**/ios/Pods/**",
66
+ "**/ios/build/**",
67
+ "**/android/build/**",
68
+ "**/android/.gradle/**",
69
+ "**/__pycache__/**",
70
+ "**/.venv/**",
71
+ "**/venv/**",
72
+ "**/site-packages/**",
73
+ "**/dist-packages/**",
74
+ "**/.pytest_cache/**",
75
+ "**/.mypy_cache/**",
76
+ "**/.ruff_cache/**",
77
+ "**/.tox/**",
78
+ "**/.nox/**",
79
+ "**/*.egg-info/**",
80
+ "**/.eggs/**",
81
+ "**/go/pkg/mod/**",
82
+ "**/target/debug/**",
83
+ "**/target/release/**",
84
+ "**/.gradle/**",
85
+ "**/.m2/**",
86
+ "**/generated-sources/**",
87
+ "**/.kotlin/**",
88
+ "**/.dart_tool/**",
89
+ "**/.vs/**",
90
+ "**/.nuget/**",
91
+ "**/artifacts/**",
92
+ "**/publish/**",
93
+ "**/cmake-build-*/**",
94
+ "**/CMakeFiles/**",
95
+ "**/bazel-*/**",
96
+ "**/vcpkg_installed/**",
97
+ "**/.conan/**",
98
+ "**/Debug/**",
99
+ "**/Release/**",
100
+ "**/x64/**",
101
+ "**/release/**",
102
+ "**/*.app/**",
103
+ "**/*.asar",
104
+ "**/DerivedData/**",
105
+ "**/.build/**",
106
+ "**/.swiftpm/**",
107
+ "**/xcuserdata/**",
108
+ "**/Carthage/Build/**",
109
+ "**/SourcePackages/**",
110
+ "**/__history/**",
111
+ "**/__recovery/**",
112
+ "**/*.dcu",
113
+ "**/.composer/**",
114
+ "**/storage/framework/**",
115
+ "**/bootstrap/cache/**",
116
+ "**/.bundle/**",
117
+ "**/tmp/cache/**",
118
+ "**/public/assets/**",
119
+ "**/public/packs/**",
120
+ "**/.yardoc/**",
121
+ "**/coverage/**",
122
+ "**/htmlcov/**",
123
+ "**/.nyc_output/**",
124
+ "**/test-results/**",
125
+ "**/.coverage/**",
126
+ "**/.idea/**",
127
+ "**/logs/**",
128
+ "**/tmp/**",
129
+ "**/temp/**",
130
+ "**/_build/**",
131
+ "**/docs/_build/**",
132
+ "**/site/**"
133
+ ],
134
+ "languages": [],
135
+ "frameworks": [],
136
+ "maxFileSize": 1048576,
137
+ "extractDocstrings": true,
138
+ "trackCallSites": true,
139
+ "enableEmbeddings": true
140
+ }
@@ -0,0 +1,144 @@
1
+ # Sass-Loader Modern Compiler API Configuration Plan
2
+
3
+ Created: 2026-03-31
4
+ Author: smarcet@gmail.com
5
+ Status: COMPLETE
6
+ Approved: Yes
7
+ Iterations: 0
8
+ Worktree: No
9
+ Type: Feature
10
+
11
+ ## Summary
12
+
13
+ **Goal:** Upgrade sass-loader from 10.5.2 to v16 and configure it to use the `modern-compiler` API for faster Sass compilation.
14
+ **Architecture:** Use yarn resolutions to override gatsby-plugin-sass's pinned sass-loader dependency, then pass the `api: "modern-compiler"` option through gatsby-plugin-sass's config in gatsby-config.js.
15
+ **Tech Stack:** sass-loader v16, sass 1.98.0 (already installed), gatsby-plugin-sass 6.16.0
16
+
17
+ ## Scope
18
+
19
+ ### In Scope
20
+
21
+ - Upgrade sass-loader from 10.5.2 to v16 via yarn resolutions
22
+ - Configure `api: "modern-compiler"` in gatsby-plugin-sass options
23
+ - Verify build works with the new configuration
24
+
25
+ ### Out of Scope
26
+
27
+ - Upgrading gatsby-plugin-sass itself (stays at 6.16.0)
28
+ - Installing sass-embedded (sass 1.98.0 already supports the modern-compiler API)
29
+ - Custom sassOptions beyond the API selection
30
+ - Changes to SCSS files
31
+
32
+ ## Approach
33
+
34
+ **Chosen:** Yarn resolutions to force sass-loader v16 + gatsby-config.js plugin options
35
+ **Why:** Simplest approach — 2 file edits, no webpack config manipulation needed. gatsby-plugin-sass's source code already spreads `...sassLoaderOptions` into the sass-loader options object, so passing `api: "modern-compiler"` through the plugin config naturally flows to sass-loader.
36
+ **Alternatives considered:**
37
+ - **gatsby-node.js webpack override** — Install sass-loader v16 as direct dependency, use `getConfig()` in `onCreateWebpackConfig` to find and replace sass-loader entries. Rejected: more complex, fragile (depends on webpack rule structure), and unnecessary given the rest-spread passthrough in gatsby-plugin-sass.
38
+ - **gatsby-node.js + resolutions** — Combine both approaches. Rejected: redundant, since resolutions alone handle the version upgrade cleanly.
39
+
40
+ ## Context for Implementer
41
+
42
+ > Write for an implementer who has never seen the codebase.
43
+
44
+ - **Patterns to follow:** gatsby-config.js plugin configuration pattern at `gatsby-config.js:141-149`
45
+ - **Conventions:** Plugin options are objects passed in the `options` key of each plugin entry
46
+ - **Key files:**
47
+ - `package.json` — add resolutions field
48
+ - `gatsby-config.js:141-149` — gatsby-plugin-sass options (currently has `cssLoaderOptions` only)
49
+ - `node_modules/gatsby-plugin-sass/gatsby-node.js:15-33` — how the plugin constructs sass-loader options (the `...sassLoaderOptions` rest spread on line 19 captures `api` and spreads it into sass-loader options on line 32)
50
+ - **Gotchas:**
51
+ - `gatsby-plugin-sass@6.16.0` pins `sass-loader@^10.4.1` in its own dependencies. Without resolutions, yarn will always install 10.5.2 regardless of what's in the project's package.json.
52
+ - sass-loader v16 defaults to `modern-compiler` API, but we explicitly set it for clarity and to survive potential future default changes.
53
+ - In the modern-compiler API, the `sassOptions` format differs from legacy: `outputStyle` → `style`, `includePaths` → `loadPaths`. This project doesn't pass custom sassOptions, so no migration needed.
54
+ - The plugin's Joi schema uses `.unknown(true)` so it accepts the `api` key without validation errors.
55
+
56
+ ## Assumptions
57
+
58
+ - sass 1.98.0 (declared in package.json) is compatible with sass-loader v16's modern-compiler API — supported by [sass-loader docs](https://webpack.js.org/loaders/sass-loader/#api) stating `sass >= 1.3.0` is a valid peer dependency — Task 1, Task 2 depend on this
59
+ - gatsby-plugin-sass's rest-spread pattern (`...sassLoaderOptions`) correctly forwards the `api` option to sass-loader — supported by reading `node_modules/gatsby-plugin-sass/gatsby-node.js:19,32` — Task 2 depends on this
60
+ - sass-loader v16 is compatible with webpack 5 (Gatsby 5's bundler) — supported by sass-loader's peer deps declaring `webpack ^5.0.0` — Task 1 depends on this
61
+
62
+ ## Risks and Mitigations
63
+
64
+ | Risk | Likelihood | Impact | Mitigation |
65
+ |------|-----------|--------|------------|
66
+ | sass-loader v16 introduces breaking changes incompatible with gatsby-plugin-sass's loader construction | Low | High | The plugin only passes `sourceMap`, `sassOptions`, `additionalData` — all valid in v16. Verify with `gatsby build`. |
67
+ | yarn resolutions cause other packages to get unexpected sass-loader version | Low | Medium | Scope the resolution to `gatsby-plugin-sass/sass-loader` only, not a global override |
68
+
69
+ ## Goal Verification
70
+
71
+ ### Truths
72
+
73
+ 1. `yarn install` resolves sass-loader to v16.x (not 10.x)
74
+ 2. `gatsby build` completes without sass-loader errors
75
+ 3. The sass-loader config in the webpack output includes `api: "modern-compiler"`
76
+
77
+ ### Artifacts
78
+
79
+ - `package.json` — contains `resolutions` field with sass-loader override
80
+ - `gatsby-config.js` — gatsby-plugin-sass options include `api: "modern-compiler"`
81
+
82
+ ## Progress Tracking
83
+
84
+ - [x] Task 1: Add yarn resolutions for sass-loader v16
85
+ - [x] Task 2: Configure modern-compiler API in gatsby-plugin-sass options
86
+ **Total Tasks:** 2 | **Completed:** 2 | **Remaining:** 0
87
+
88
+ ## Implementation Tasks
89
+
90
+ ### Task 1: Add yarn resolutions for sass-loader v16
91
+
92
+ **Objective:** Force sass-loader to v16.x via yarn resolutions, overriding gatsby-plugin-sass's `^10.4.1` pin.
93
+ **Dependencies:** None
94
+
95
+ **Files:**
96
+
97
+ - Modify: `package.json`
98
+
99
+ **Key Decisions / Notes:**
100
+
101
+ - Use scoped resolution `"gatsby-plugin-sass/sass-loader": "^16.0.0"` to only affect the sass-loader resolved through gatsby-plugin-sass
102
+ - Add `resolutions` field at top level of package.json (doesn't exist yet). If it exists in the future, merge the sass-loader entry into the existing object.
103
+ - Run `yarn install` after adding the resolution to apply it
104
+
105
+ **Definition of Done:**
106
+
107
+ - [ ] `package.json` has a `resolutions` field with `"gatsby-plugin-sass/sass-loader": "^16.0.0"`
108
+ - [ ] `yarn install` completes without errors
109
+ - [ ] `node -e "console.log(require('sass-loader/package.json').version)"` outputs 16.x
110
+
111
+ **Verify:**
112
+
113
+ - `node -e "console.log(require('sass-loader/package.json').version)"` — should output 16.x
114
+ - `grep -A 2 'sass-loader@' yarn.lock | head -6` — confirm resolved version in dependency graph
115
+
116
+ ### Task 2: Configure modern-compiler API in gatsby-plugin-sass options
117
+
118
+ **Objective:** Pass `api: "modern-compiler"` through gatsby-plugin-sass's plugin options so it reaches sass-loader via the rest-spread pattern.
119
+ **Dependencies:** Task 1
120
+
121
+ **Files:**
122
+
123
+ - Modify: `gatsby-config.js`
124
+
125
+ **Key Decisions / Notes:**
126
+
127
+ - Add `api: "modern-compiler"` to the existing gatsby-plugin-sass options object at `gatsby-config.js:142-149`
128
+ - The option goes alongside the existing `cssLoaderOptions` — NOT inside it
129
+ - gatsby-plugin-sass destructures known options (`cssLoaderOptions`, `sassOptions`, `postCssPlugins`, etc.) and passes the rest (`...sassLoaderOptions`) directly to sass-loader (see `node_modules/gatsby-plugin-sass/gatsby-node.js:19,32`)
130
+ - The plugin's Joi schema at line 120 uses `.unknown(true)`, so `api` passes validation
131
+
132
+ **Definition of Done:**
133
+
134
+ - [ ] gatsby-config.js gatsby-plugin-sass options include `api: "modern-compiler"` alongside existing `cssLoaderOptions`
135
+ - [ ] `gatsby build` passes through webpack config phase without sass-loader errors (full build requires API data, so config initialization is the meaningful check)
136
+ - [ ] SCSS files compile successfully during build
137
+
138
+ **Verify:**
139
+
140
+ - `node --trace-warnings node_modules/.bin/gatsby build` (verify build passes webpack config and SCSS compilation; an axios error in onPreBootstrap is expected and unrelated — it's a data fetch issue)
141
+
142
+ ## Open Questions
143
+
144
+ None — the path is clear.
package/gatsby-config.js CHANGED
@@ -140,15 +140,12 @@ const plugins = [
140
140
  */
141
141
  resolve: "gatsby-plugin-sass",
142
142
  options: {
143
+ api: "modern-compiler",
143
144
  cssLoaderOptions: {
144
145
  esModule: false,
145
146
  modules: {
146
147
  namedExport: false
147
148
  }
148
- },
149
- sassOptions: {
150
- api: "modern-compiler",
151
- silenceDeprecations: ["legacy-js-api"]
152
149
  }
153
150
  }
154
151
  },
@@ -249,8 +246,7 @@ const plugins = [
249
246
  ],
250
247
  display: "swap"
251
248
  }
252
- },
253
- "gatsby-plugin-netlify" // make sure to keep it last in the array
249
+ }
254
250
  ];
255
251
 
256
252
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openstack_dev/gatsby-theme-marketing-oif-core",
3
- "version": "1.0.40",
3
+ "version": "1.0.42",
4
4
  "description": "Base theme for Marketing Sites",
5
5
  "author": "smarcet",
6
6
  "keywords": [
@@ -22,6 +22,9 @@
22
22
  "*.{js,jsx}": "eslint --fix",
23
23
  "**/*": "prettier --write --ignore-unknown"
24
24
  },
25
+ "resolutions": {
26
+ "gatsby-plugin-sass/sass-loader": "^16.0.0"
27
+ },
25
28
  "dependencies": {
26
29
  "@babel/core": "^7.26.10",
27
30
  "@babel/preset-env": "^7.26.9",
@@ -1 +1 @@
1
- {"staticJsonFilesBuildTime":[],"lastBuild":1774023818781}
1
+ {"staticJsonFilesBuildTime":[],"lastBuild":1774934531441}