Skip to content

Commit

Permalink
fix: 修复安全扫描的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zyprepare committed Sep 20, 2023
1 parent 3c16b3b commit 0ddf249
Show file tree
Hide file tree
Showing 15 changed files with 113 additions and 216 deletions.
7 changes: 7 additions & 0 deletions .changeset/seven-tables-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@hi-ui/core-css": patch
"@hi-ui/badge": patch
"@hi-ui/scrollbar": patch
---

fix: 升级 dart-sass 后修改语法
7 changes: 7 additions & 0 deletions .changeset/shaggy-dolphins-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@hi-ui/date-picker": minor
"@hi-ui/table": minor
"@hi-ui/request": minor
---

chore: axios 升级为 1.5.0
5 changes: 5 additions & 0 deletions .changeset/silly-cycles-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/hiui": minor
---

chore: 将 node-sas 升级为 sass
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
"concurrently": "^6.1.0",
"copyfiles": "^2.4.1",
"lerna": "^4.0.0",
"node-sass": "6.0.1",
"rimraf": "^3.0.2",
"rollup-plugin-postcss-inject-to-css": "^1.0.2",
"rucksack-css": "^1.0.2",
"sass": "^1.67.0",
"sass-loader": "10.2.1",
"storybook-addon-deps": "^2.2.0",
"storybook-addon-react-live-edit": "^2.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/core-css/src/styles/common/helper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

$valid-keys-string: $valid-keys-string + ']';

@debug '[WARNING] Use key: ' + $data-key +' is not valid, it should be in range: '+ $valid-keys-string;
@debug '[WARNING] Use key: ' + $data-key + ' is not valid, it should be in range: '+ $valid-keys-string;
}

@return $result;
Expand Down
4 changes: 3 additions & 1 deletion packages/core/core-css/src/styles/legacy-v3/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Author: Sivan[[email protected]]
// Description: define mix-ins, functions etc.

@use 'sass:list';

@import 'common';

/// Slightly lighten a color
Expand Down Expand Up @@ -156,7 +158,7 @@

// equal to `display: inline`
@if not ($display-outside == 'inline' and $display-inside == 'flow') {
font: normal $font-weight-normal #{$font-size-normal}/#{$line-height-size-normal} $font-family-sans;
font: normal $font-weight-normal list.slash($font-size-normal, $line-height-size-normal) $font-family-sans;
text-align: left;
text-decoration: none;
text-indent: 0;
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/badge/src/styles/badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $prefix: '#{$component-prefix}-badge' !default;
position: absolute;
z-index: 1;
right: 0;
top: calc(#{-(($bubbleSize + $borderSize * 2) / 2)});
top: calc(#{-(($bubbleSize + $borderSize * 2) * 0.5)});
min-width: $bubbleSize - 12px;
height: $bubbleSize;
line-height: $bubbleSize;
Expand All @@ -36,8 +36,8 @@ $prefix: '#{$component-prefix}-badge' !default;
&__dot {
position: absolute;
z-index: 1;
top: calc(#{-(($dotSize + $borderSize * 2) / 2)});
right: calc(#{-(($dotSize + $borderSize * 2) / 2)});
top: calc(#{-(($dotSize + $borderSize * 2) * 0.5)});
right: calc(#{-(($dotSize + $borderSize * 2) * 0.5)});
width: $dotSize;
height: $dotSize;
background-color: use-color-mode('danger');
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/date-picker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"@hi-ui/object-utils": "^4.0.1",
"@hi-ui/popper": "^4.0.5",
"@hi-ui/time-picker": "^4.0.8",
"axios": "^0.26.0",
"moment": "^2.29.1",
"axios": "^1.5.0",
"moment": "^2.29.4",
"react-transition-group": "^4.4.2"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/date-picker/src/styles/date-picker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $cell-class: '#{$prefix}__cell' !default;
$calendar-large-indicator-size: 40px !default;
$calendar-large-indicator-border-radius: 8px !default;
$calendar-large-diff: 6px !default;
$calendar-large-background-border-radius: $calendar-large-indicator-border-radius + $calendar-large-diff/2 !default;
$calendar-large-background-border-radius: $calendar-large-indicator-border-radius + $calendar-large-diff*0.5 !default;

.#{$prefix} {
position: relative;
Expand Down Expand Up @@ -555,14 +555,14 @@ $calendar-large-background-border-radius: $calendar-large-indicator-border-radiu

&:first-child {
.#{$cell-class}-week-indicator {
margin-left: $calendar-large-diff/2;
margin-left: $calendar-large-diff*0.5;
border-radius: $calendar-large-indicator-border-radius 0 0 $calendar-large-indicator-border-radius;
}
}

&:last-child {
.#{$cell-class}-week-indicator {
margin-left: -$calendar-large-diff/2;
margin-left: -$calendar-large-diff*0.5;
border-radius: 0 $calendar-large-indicator-border-radius $calendar-large-indicator-border-radius 0;
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/scrollbar/src/styles/scrollbar.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '~@hi-ui/core-css/lib/index.scss';
@import '~perfect-scrollbar/css/perfect-scrollbar.css';
@import '~perfect-scrollbar/css/perfect-scrollbar';

$prefix: '#{$component-prefix}-scrollbar' !default;

Expand Down Expand Up @@ -46,7 +46,7 @@ $prefix: '#{$component-prefix}-scrollbar' !default;
& > .ps__rail-y,
.ps__thumb-y {
width: $thumb-size;
border-radius: $thumb-size/2;
border-radius: $thumb-size*0.5;
right: 0;
transition: $transition;
}
Expand All @@ -68,7 +68,7 @@ $prefix: '#{$component-prefix}-scrollbar' !default;
& > .ps__rail-x,
.ps__thumb-x {
height: $thumb-size;
border-radius: $thumb-size/2;
border-radius: $thumb-size*0.5;
bottom: 0;
transition: $transition;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@hi-ui/use-toggle": "^4.0.1",
"@hi-ui/use-uncontrolled-state": "^4.0.1",
"@hi-ui/use-update-effect": "^4.0.1",
"axios": "^0.24.0",
"axios": "^1.5.0",
"react-resizable": "^3.0.4"
},
"peerDependencies": {
Expand Down
6 changes: 2 additions & 4 deletions packages/utils/request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@
"bugs": {
"url": "https://github.com/XiaoMi/hiui/issues"
},
"devDependencies": {

},
"devDependencies": {},
"dependencies": {
"axios": "^0.21.1"
"axios": "^1.5.0"
}
}
2 changes: 1 addition & 1 deletion scripts/calendar-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"author": "zhouyun1",
"license": "ISC",
"dependencies": {
"axios": "^1.3.5"
"axios": "^1.5.0"
}
}
12 changes: 6 additions & 6 deletions scripts/hi-build/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ const getRollupConfig = (input, outputPath, options, pkg) => {
],
extensions: ['.scss', '.css'],
// Extract styleInject as a external module
inject: !cssExtract ? (variableName) => {
if (isESM) {
return `;import __styleInject__ from 'style-inject';__styleInject__(${variableName});`
}
return `;var __styleInject__=require('style-inject').default;__styleInject__(${variableName});`
} : false,
inject: !cssExtract ? (variableName) => {
if (isESM) {
return `;import __styleInject__ from 'style-inject';__styleInject__(${variableName});`
}
return `;var __styleInject__=require('style-inject').default;__styleInject__(${variableName});`
} : false,
extract: cssExtract,
modules: cssModules,
}),
Expand Down
Loading

0 comments on commit 0ddf249

Please sign in to comment.