Skip to content

Commit d4be2a3

Browse files
patrykkopycinskimistickibanamachinejbudz
authored
Replace deprecated node-sass with sass #2 (elastic#173942)
## Summary The previous PR elastic#161813 was reverted due to the broken webpack config elastic@eef1afc --------- Co-authored-by: Tiago Costa <[email protected]> Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Jon <[email protected]>
1 parent b04dace commit d4be2a3

File tree

36 files changed

+167
-393
lines changed

36 files changed

+167
-393
lines changed

WORKSPACE.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ yarn_install(
6060
"GECKODRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
6161
"CHROMEDRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
6262
"CHROMEDRIVER_CDNBINARIESURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
63-
"SASS_BINARY_SITE": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass",
6463
"RE2_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2",
6564
"CYPRESS_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/cypress",
6665
}

kbn_pm/src/lib/bazel.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ export async function installYarnDeps(log, opts = undefined) {
150150
offline: opts?.offline,
151151
quiet: opts?.quiet,
152152
env: {
153-
SASS_BINARY_SITE:
154-
'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass',
155153
RE2_DOWNLOAD_MIRROR:
156154
'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2',
157155
},

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,6 @@
15971597
"mutation-observer": "^1.0.3",
15981598
"native-hdr-histogram": "^1.0.0",
15991599
"nock": "12.0.3",
1600-
"node-sass": "^8.0.0",
16011600
"null-loader": "^3.0.0",
16021601
"nyc": "^15.1.0",
16031602
"oboe": "^2.1.4",
@@ -1625,7 +1624,8 @@
16251624
"regenerate": "^1.4.0",
16261625
"resolve": "^1.22.0",
16271626
"rxjs-marbles": "^7.0.1",
1628-
"sass-loader": "^10.4.1",
1627+
"sass-embedded": "^1.69.5",
1628+
"sass-loader": "^10.5.1",
16291629
"selenium-webdriver": "^4.16.0",
16301630
"simple-git": "^3.16.0",
16311631
"sinon": "^7.4.2",

packages/kbn-dom-drag-drop/src/sass/drag_drop.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ $reorderItemMargin: $euiSizeS;
9999
position: absolute;
100100
width: 100%;
101101
top: 0;
102-
height: calc(100% + #{$reorderItemMargin / 2});
102+
height: calc(100% + #{calc($reorderItemMargin / 2)});
103103
}
104104

105105
.domDragDrop-translatableDrop {

packages/kbn-optimizer/src/worker/webpack.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,12 @@ export function getWebpackConfig(
185185
)
186186
)};\n${content}`;
187187
},
188-
webpackImporter: false,
189-
implementation: require('node-sass'),
188+
implementation: require('sass-embedded'),
190189
sassOptions: {
191-
outputStyle: worker.dist ? 'compressed' : 'nested',
190+
outputStyle: worker.dist ? 'compressed' : 'expanded',
192191
includePaths: [Path.resolve(worker.repoRoot, 'node_modules')],
193-
sourceMapRoot: `/${bundle.type}:${bundle.id}`,
192+
sourceMap: true,
193+
quietDeps: true,
194194
},
195195
},
196196
},

packages/kbn-storybook/src/webpack.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,10 @@ export default ({ config: storybookConfig }: { config: Configuration }) => {
115115
resolve(REPO_ROOT, 'src/core/public/styles/core_app/_globals_v8light.scss')
116116
)};\n${content}`;
117117
},
118-
implementation: require('node-sass'),
118+
implementation: require('sass-embedded'),
119119
sassOptions: {
120120
includePaths: [resolve(REPO_ROOT, 'node_modules')],
121+
quietDeps: true,
121122
},
122123
},
123124
},

packages/kbn-unified-field-list/src/containers/unified_field_list_sidebar/field_list_sidebar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
.unifiedFieldListSidebar .unifiedFieldListItemButton {
5555
&.kbnFieldButton {
56-
margin-bottom: $euiSizeXS / 2;
56+
margin-bottom: calc($euiSizeXS / 2);
5757
}
5858

5959
&.domDragDrop-isDraggable {

renovate.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
{
363363
"groupName": "scss",
364364
"packageNames": [
365-
"node-sass"
365+
"sass-embedded"
366366
],
367367
"reviewers": [
368368
"team:kibana-operations"
@@ -673,4 +673,4 @@
673673
"enabled": true
674674
}
675675
]
676-
}
676+
}

src/dev/build/tasks/install_dependencies_task.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ export const InstallDependencies: Task = {
3232
{
3333
cwd: build.resolvePath(),
3434
env: {
35-
SASS_BINARY_SITE:
36-
'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass',
3735
RE2_DOWNLOAD_MIRROR:
3836
'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2',
3937
},

src/dev/license_checker/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,5 @@ export const LICENSE_OVERRIDES = {
8888
'@elastic/[email protected]': ['SSPL-1.0 OR Elastic License 2.0'],
8989
'[email protected]': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
9090
'[email protected]': ['MIT'], // license in importing module https://www.npmjs.com/package/binary
91+
'@bufbuild/[email protected]': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause)
9192
};

0 commit comments

Comments
 (0)