Skip to content

Commit f590f9c

Browse files
authored
Fix security issues. Change to using less instead of sass (as it has … (microsoft#5566)
* Fix security issues. Change to using less instead of sass (as it has a tar dependency) * Fix functional tests
1 parent 927f254 commit f590f9c

File tree

8 files changed

+1425
-2085
lines changed

8 files changed

+1425
-2085
lines changed

news/3 Code Health/5538.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix security issues.

package-lock.json

Lines changed: 1404 additions & 2069 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.datascience-ui.dependencies.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"base16",
2525
"bintrees",
2626
"bootstrap",
27+
"bootstrap-less",
2728
"character-entities-legacy",
2829
"character-reference-invalid",
2930
"classnames",

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,11 +2186,11 @@
21862186
"@babel/core": "^7.1.0",
21872187
"@babel/preset-env": "^7.1.0",
21882188
"@babel/preset-react": "^7.0.0",
2189+
"@nteract/plotly": "^1.47.1",
21892190
"@nteract/transform-dataresource": "^4.3.5",
21902191
"@nteract/transform-geojson": "^3.2.3",
21912192
"@nteract/transform-model-debug": "^3.2.3",
21922193
"@nteract/transform-plotly": "^5.0.0",
2193-
"@nteract/plotly": "^1.47.1",
21942194
"@nteract/transforms": "^4.4.4",
21952195
"@types/chai": "^4.1.2",
21962196
"@types/chai-arrays": "^1.0.2",
@@ -2240,6 +2240,7 @@
22402240
"babel-plugin-transform-runtime": "^6.23.0",
22412241
"babel-polyfill": "^6.26.0",
22422242
"bootstrap": "^4.3.1",
2243+
"bootstrap-less": "^3.3.8",
22432244
"chai": "^4.1.2",
22442245
"chai-arrays": "^2.0.0",
22452246
"chai-as-promised": "^7.1.1",
@@ -2259,7 +2260,7 @@
22592260
"gulp": "^4.0.0",
22602261
"gulp-azure-storage": "^0.9.0",
22612262
"gulp-filter": "^5.1.0",
2262-
"gulp-inline-source": "^3.2.0",
2263+
"gulp-inline-source": "^4.0.0",
22632264
"gulp-json-editor": "^2.2.2",
22642265
"gulp-rename": "^1.4.0",
22652266
"gulp-sourcemaps": "^2.6.4",
@@ -2271,14 +2272,15 @@
22712272
"istanbul": "^0.4.5",
22722273
"jsdom": "^12.2.0",
22732274
"json-loader": "^0.5.7",
2275+
"less": "^3.9.0",
2276+
"less-loader": "^5.0.0",
22742277
"loader-utils": "^1.1.0",
2275-
"mocha": "^6.0.2",
2278+
"mocha": "^6.1.4",
22762279
"mocha-junit-reporter": "^1.17.0",
22772280
"mocha-multi-reporters": "^1.1.7",
22782281
"node-has-native-dependencies": "^1.0.2",
22792282
"node-html-parser": "^1.1.13",
2280-
"node-sass": "^4.11.0",
2281-
"nyc": "^13.3.0",
2283+
"nyc": "^14.1.0",
22822284
"raw-loader": "^0.5.1",
22832285
"react": "^16.5.2",
22842286
"react-codemirror": "^1.0.0",
@@ -2309,10 +2311,10 @@
23092311
"url-loader": "^1.1.1",
23102312
"uuid": "^3.3.2",
23112313
"vsce": "^1.59.0",
2312-
"vscode": "^1.1.30",
2314+
"vscode": "^1.1.33",
23132315
"vscode-debugadapter-testsupport": "^1.27.0",
23142316
"webpack": "^4.20.2",
2315-
"webpack-bundle-analyzer": "^3.0.3",
2317+
"webpack-bundle-analyzer": "^3.3.2",
23162318
"webpack-cli": "^3.1.2",
23172319
"webpack-fix-default-import-plugin": "^1.0.3",
23182320
"webpack-merge": "^4.1.4",

src/datascience-ui/history-react/variableExplorer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { VariableExplorerEmptyRowsView } from './variableExplorerEmptyRows';
1616

1717
import * as AdazzleReactDataGrid from 'react-data-grid';
1818

19-
import './variableExplorerGrid.scss';
19+
import './variableExplorerGrid.less';
2020

2121
interface IVariableExplorerProps {
2222
baseTheme: string;

src/datascience-ui/history-react/variableExplorerGrid.scss renamed to src/datascience-ui/history-react/variableExplorerGrid.less

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/* Import bootstrap, but prefix it all with our grid div so we don't clobber our history windows styles */
2-
#variable-explorer-data-grid {
3-
@import "~bootstrap/dist/css/bootstrap";
2+
#variable-explorer-data-grid {
3+
@import "~bootstrap-less/bootstrap/bootstrap.less";
44
}
55

66
#variable-explorer-data-grid .form-control {
7-
height: auto;
7+
height: auto;
88
padding: 0px;
99
font-size: inherit;
1010
font-weight: inherit;
11-
line-height: inherit;
11+
line-height: inherit;
1212
border-radius: 0px;
1313
}
1414

src/test/vscode-mock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export function initialize() {
4040
if (request === 'vscode-extension-telemetry') {
4141
return { default: vscMockTelemetryReporter };
4242
}
43-
// scss files need to be in import statements to be converted to css
43+
// less files need to be in import statements to be converted to css
4444
// But we don't want to try to load them in the mock vscode
45-
if (/\.scss$/.test(request)) {
45+
if (/\.less$/.test(request)) {
4646
return;
4747
}
4848
return originalLoad.apply(this, arguments);

webpack.datascience-ui.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,13 @@ module.exports = [
8888
}
8989
]
9090
},
91+
{ test: /\.(png|woff|woff2|eot|ttf)$/, loader: 'url-loader?limit=100000' },
9192
{
92-
test: /\.scss$/,
93+
test: /\.less$/,
9394
use: [
9495
'style-loader',
9596
'css-loader',
96-
'sass-loader'
97+
'less-loader'
9798
]
9899
}
99100
]

0 commit comments

Comments
 (0)