Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated node-sass with sass #2 #173942

Merged
merged 30 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8d42da3
Replace deprecated node-sass with sass
patrykkopycinski Jul 12, 2023
4757eff
fix
patrykkopycinski Jul 13, 2023
eb127d3
fix
patrykkopycinski Jul 13, 2023
69d3dfb
decrease timeout
patrykkopycinski Jul 13, 2023
9724bd9
revert
patrykkopycinski Jul 13, 2023
3179c11
timeout
patrykkopycinski Jul 13, 2023
e6bf726
fix
patrykkopycinski Jul 14, 2023
0bd8025
timeout
patrykkopycinski Jul 14, 2023
c918a67
Merge branch 'main' into chore/replace-node-sass
mistic Jul 15, 2023
d2b44de
sass-embedded
patrykkopycinski Jul 20, 2023
c061e79
Merge branch 'main' of github.com:elastic/kibana into chore/replace-n…
patrykkopycinski Jul 20, 2023
fcb95da
Update casing_check_config.js
patrykkopycinski Jul 20, 2023
acd566a
Update renovate.json
patrykkopycinski Jul 20, 2023
34e02fe
add license
patrykkopycinski Jul 20, 2023
bce1d9a
Merge branch 'main' of github.com:elastic/kibana into feat/mermaid-ma…
patrykkopycinski Dec 7, 2023
33e3f7c
test
patrykkopycinski Dec 7, 2023
17532ad
fix
patrykkopycinski Dec 7, 2023
4f1c6d1
fix
patrykkopycinski Dec 7, 2023
bd47e8b
fix
patrykkopycinski Dec 7, 2023
3fc60a6
Merge branch 'main' into chore/replace-node-sass
patrykkopycinski Dec 13, 2023
0f89f75
Merge branch 'main' into chore/replace-node-sass
mistic Dec 16, 2023
ab38475
Merge branch 'main' of github.com:elastic/kibana into chore/replace-n…
patrykkopycinski Dec 19, 2023
df12625
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Dec 19, 2023
eef1afc
fix sassOptions
patrykkopycinski Dec 23, 2023
c2a364b
Merge branch 'main' of github.com:elastic/kibana into chore/replace-n…
patrykkopycinski Dec 23, 2023
2a5b394
Merge branch 'main' into chore/replace-node-sass
jbudz Dec 26, 2023
ebdf24a
test
patrykkopycinski Dec 26, 2023
5f6de30
Merge branch 'chore/replace-node-sass' of github.com:patrykkopycinski…
patrykkopycinski Dec 26, 2023
093ec2e
Merge branch 'main' of github.com:elastic/kibana into feat/mermaid-ma…
patrykkopycinski Dec 27, 2023
ffaae42
update sass-loader
patrykkopycinski Dec 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ yarn_install(
"GECKODRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"CHROMEDRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"CHROMEDRIVER_CDNBINARIESURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"SASS_BINARY_SITE": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass",
"RE2_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2",
"CYPRESS_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/cypress",
}
Expand Down
2 changes: 0 additions & 2 deletions kbn_pm/src/lib/bazel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ export async function installYarnDeps(log, opts = undefined) {
offline: opts?.offline,
quiet: opts?.quiet,
env: {
SASS_BINARY_SITE:
'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass',
RE2_DOWNLOAD_MIRROR:
'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2',
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,6 @@
"mutation-observer": "^1.0.3",
"native-hdr-histogram": "^1.0.0",
"nock": "12.0.3",
"node-sass": "^8.0.0",
"null-loader": "^3.0.0",
"nyc": "^15.1.0",
"oboe": "^2.1.4",
Expand Down Expand Up @@ -1625,7 +1624,8 @@
"regenerate": "^1.4.0",
"resolve": "^1.22.0",
"rxjs-marbles": "^7.0.1",
"sass-loader": "^10.4.1",
"sass-embedded": "^1.69.5",
"sass-loader": "^10.5.1",
"selenium-webdriver": "^4.16.0",
"simple-git": "^3.16.0",
"sinon": "^7.4.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-dom-drag-drop/src/sass/drag_drop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ $reorderItemMargin: $euiSizeS;
position: absolute;
width: 100%;
top: 0;
height: calc(100% + #{$reorderItemMargin / 2});
height: calc(100% + #{calc($reorderItemMargin / 2)});
}

.domDragDrop-translatableDrop {
Expand Down
8 changes: 4 additions & 4 deletions packages/kbn-optimizer/src/worker/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ export function getWebpackConfig(
)
)};\n${content}`;
},
webpackImporter: false,
implementation: require('node-sass'),
implementation: require('sass-embedded'),
sassOptions: {
outputStyle: worker.dist ? 'compressed' : 'nested',
outputStyle: worker.dist ? 'compressed' : 'expanded',
includePaths: [Path.resolve(worker.repoRoot, 'node_modules')],
sourceMapRoot: `/${bundle.type}:${bundle.id}`,
sourceMap: true,
quietDeps: true,
},
},
},
Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-storybook/src/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ export default ({ config: storybookConfig }: { config: Configuration }) => {
resolve(REPO_ROOT, 'src/core/public/styles/core_app/_globals_v8light.scss')
)};\n${content}`;
},
implementation: require('node-sass'),
implementation: require('sass-embedded'),
sassOptions: {
includePaths: [resolve(REPO_ROOT, 'node_modules')],
quietDeps: true,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

.unifiedFieldListSidebar .unifiedFieldListItemButton {
&.kbnFieldButton {
margin-bottom: $euiSizeXS / 2;
margin-bottom: calc($euiSizeXS / 2);
}

&.domDragDrop-isDraggable {
Expand Down
4 changes: 2 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@
{
"groupName": "scss",
"packageNames": [
"node-sass"
"sass-embedded"
],
"reviewers": [
"team:kibana-operations"
Expand Down Expand Up @@ -673,4 +673,4 @@
"enabled": true
}
]
}
}
2 changes: 0 additions & 2 deletions src/dev/build/tasks/install_dependencies_task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ export const InstallDependencies: Task = {
{
cwd: build.resolvePath(),
env: {
SASS_BINARY_SITE:
'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass',
RE2_DOWNLOAD_MIRROR:
'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2',
},
Expand Down
1 change: 1 addition & 0 deletions src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,5 @@ export const LICENSE_OVERRIDES = {
'@elastic/eui@91.0.0-backport.0': ['SSPL-1.0 OR Elastic License 2.0'],
'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary
'@bufbuild/protobuf@1.2.1': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause)
};
2 changes: 1 addition & 1 deletion src/plugins/console/public/styles/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
padding: 0 $euiSizeS;
display: inline-block;
text-decoration: none;
border-radius: $euiBorderRadius / 2;
border-radius: calc($euiBorderRadius / 2);
white-space: nowrap;
vertical-align: middle;
cursor: default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
}

.optionsList__actionsRow {
margin: ($euiSizeS / 2) 0 !important;
margin: calc($euiSizeS / 2) 0 !important;

.optionsList__actionBarDivider {
height: $euiSize;
Expand Down Expand Up @@ -97,4 +97,4 @@
color: $euiTextSubduedColor;
padding: $euiSizeM;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
dt {
background-color: transparentize(shade($euiColorPrimary, 20%), .9);
color: $euiTextColor;
padding: ($euiSizeXS / 2) $euiSizeXS;
padding: calc($euiSizeXS / 2) $euiSizeXS;
margin-right: $euiSizeXS;
word-break: normal;
border-radius: $euiBorderRadius;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/kibana_react/public/markdown/_markdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$kbnDefaultFontSize: 14px;

@function canvasToEm($size) {
@return #{$size / $kbnDefaultFontSize}em;
@return #{calc($size / $kbnDefaultFontSize)}em;
}

.kbnMarkdown__body {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
line-height: $euiSize;
border: none;
color: $euiTextColor;
padding-top: $euiSizeM / 2 + 1px;
padding-bottom: $euiSizeM / 2 + 1px;
padding-top: calc($euiSizeM / 2) + 1px;
padding-bottom: calc($euiSizeM / 2) + 1px;
white-space: normal; /* 1 */

&:not(.globalFilterItem-isDisabled) {
Expand Down Expand Up @@ -54,8 +54,8 @@
left: 0;
width: $euiSizeXS;
background-color: $kbnGlobalFilterItemBorderColor;
border-top-left-radius: $euiBorderRadius / 2;
border-bottom-left-radius: $euiBorderRadius / 2;
border-top-left-radius: calc($euiBorderRadius / 2);
border-bottom-left-radius: calc($euiBorderRadius / 2);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
}

.kbnSavedQueryManagement__text {
padding: $euiSizeM $euiSizeM ($euiSizeM / 2) $euiSizeM;
padding: $euiSizeM $euiSizeM calc($euiSizeM / 2) $euiSizeM;
}

.kbnSavedQueryManagement__list {
@include euiYScrollWithShadows;
max-height: inherit; // Fixes overflow for applied max-height
// Left/Right padding is calculated to match the left alignment of the
// popover text and buttons
padding: ($euiSizeM / 2) $euiSizeXS !important; // Override flush
padding: calc($euiSizeM / 2) $euiSizeXS !important; // Override flush
}
2 changes: 1 addition & 1 deletion src/plugins/vis_default_editor/public/_agg_params.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.visEditorAggParam--half {
margin: $euiSize 0;
display: inline-block;
width: calc(50% - #{$euiSizeS / 2});
width: calc(50% - #{calc($euiSizeS / 2)});
}

.visEditorAggParam--half-size {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
> .tvbVis {
// Apply the minimum height on the vis itself so it doesn't interfere with flex calculations
// Gauges are not completely square, so the height is just slightly less than the width
min-height: $euiSize * 12 / 1.25;
min-height: calc($euiSize * 12 / 1.25);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
.tvbVisMetric__label--additional {
@include euiTextTruncate;
font-size: .25em; /* 1 */
padding: ($euiSizeXS / 2) 0 0;
padding: calc($euiSizeXS / 2) 0 0;
text-align: center;
color: $tvbValueColor;
line-height: 1.2; // Ensure the descenders don't get cut off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
}

.slice {
stroke-width: $euiSizeXS / 2;
stroke-width: calc($euiSizeXS / 2);
stroke: $euiColorEmptyShade;

&:hover {
Expand Down
7 changes: 3 additions & 4 deletions x-pack/plugins/canvas/shareable_runtime/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module.exports = {
{
loader: 'sass-loader',
options: {
implementation: require('node-sass'),
implementation: require('sass-embedded'),
sourceMap: !isProd,
},
},
Expand Down Expand Up @@ -147,10 +147,9 @@ module.exports = {
path.resolve(KIBANA_ROOT, 'src/core/public/styles/core_app/_globals_v8light.scss')
)};\n${content}`;
},
implementation: require('node-sass'),
webpackImporter: false,
implementation: require('sass-embedded'),
sassOptions: {
outputStyle: 'nested',
outputStyle: 'expanded',
includePaths: [path.resolve(KIBANA_ROOT, 'node_modules')],
},
},
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/storybook/canvas_webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const canvasWebpack = {
{
loader: 'sass-loader',
options: {
implementation: require('node-sass'),
implementation: require('sass-embedded'),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
font-weight: normal;
text-align: left;
line-height: 1.1;
font-size: #{$euiFontSizeL / 2}; // 10px
font-size: #{calc($euiFontSizeL / 2)}; // 10px
}

.dataGridChart__legend--numeric {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
.gphGuidancePanel__itemIcon {
position: absolute;
left: 0;
top: -($euiSizeXS / 2);
top: -(calc($euiSizeXS / 2));
width: $euiSizeL;
height: $euiSizeL;
padding: $euiSizeXS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
flex: 0 0 auto;
height: $lnsSuggestionHeight;
margin-right: $euiSizeS;
margin-left: $euiSizeXS / 2;
margin-bottom: $euiSizeXS / 2;
margin-left: calc($euiSizeXS / 2);
margin-bottom: calc($euiSizeXS / 2);
padding: 0 $euiSizeS;
box-shadow: none !important; // sass-lint:disable-line no-important

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
background-color: $euiColorEmptyShade;
border: $euiBorderThin;
color: $euiTextColor;
border-radius: $euiBorderRadius / 2;
border-radius: calc($euiBorderRadius / 2);
height: $euiSize;
width: $euiSizeXL;
line-height: $euiSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}

.progress-bar {
height: $euiSizeXS / 2;
height: calc($euiSizeXS / 2);
margin-top: $euiSizeM;
text-align: right;
line-height: 18px; // SASSTODO: Calc proper value
Expand Down Expand Up @@ -96,7 +96,7 @@
font-size: 11px;
line-height: 14px;
border-radius: $euiBorderRadius;
padding: $euiSizeXS / 2;
padding: calc($euiSizeXS / 2);
margin-top: $euiSizeXS;
display: inline-block;
border: $euiBorderThin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

// SASSTODO: Dangerous EUI overwrite
.scope-field-checkbox {
margin-right: $euiSizeXS / 2;
margin-right: calc($euiSizeXS / 2);

.euiCheckbox {
margin-top: $euiSizeXS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
rect.selected-interval {
fill: rgba(200, 200, 200, .1);
stroke: $euiColorDarkShade;
stroke-width: $euiSizeXS / 2;
stroke-width: calc($euiSizeXS / 2);
stroke-opacity: .8;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ $mlAnnotationRectDefaultFillOpacity: .05;
}

.mlAnnotationRect-isBlur {
stroke-opacity: $mlAnnotationRectDefaultStrokeOpacity / 2;
stroke-opacity: calc($mlAnnotationRectDefaultStrokeOpacity / 2);
transition: stroke-opacity $euiAnimSpeedFast;

fill-opacity: $mlAnnotationRectDefaultFillOpacity / 2;
fill-opacity: calc($mlAnnotationRectDefaultFillOpacity / 2);
transition: fill-opacity $euiAnimSpeedFast;
}

Expand Down Expand Up @@ -95,9 +95,9 @@ $mlAnnotationRectDefaultFillOpacity: .05;
}

.mlContextAnnotationRect-isBlur {
stroke-opacity: $mlAnnotationRectDefaultStrokeOpacity / 2;
stroke-opacity: calc($mlAnnotationRectDefaultStrokeOpacity / 2);
transition: stroke-opacity $euiAnimSpeedFast;

fill-opacity: $mlAnnotationRectDefaultFillOpacity / 2;
fill-opacity: calc($mlAnnotationRectDefaultFillOpacity / 2);
transition: fill-opacity $euiAnimSpeedFast;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
margin: $euiSizeS;
border: 1px solid $euiColorMediumShade;
border-radius: $euiSizeXS;
padding: $euiSizeXS / 2 0;
padding: calc($euiSizeXS / 2) 0;

&.monChild--index {
border-left: $euiSizeXS solid $euiColorSuccess;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.monStatusIcon {
display: inline-block;
margin-left: $euiSizeXS;
padding: ($euiSizeXS / 2) $euiSizeS;
padding: calc($euiSizeXS / 2) $euiSizeS;
border-radius: $euiBorderRadius;
color: $euiColorGhost;
min-width: 1.9em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.snapshotRestore__policyForm__stepSettings {
.euiFormRow--hasEmptyLabelSpace {
min-height: auto;
margin-top: $euiFontSizeXS + $euiSizeS + ($euiSizeXXL / 4);
margin-top: $euiFontSizeXS + $euiSizeS + calc($euiSizeXXL / 4);
}
}

Expand All @@ -13,4 +13,4 @@
*/
.snapshotRestore__policyForm__stepSettings__indicesFieldWrapper .euiFormLabel {
width: 100%;
}
}
Loading
Loading