Add back eslint and tsec to basic checks (#23637)

* Add back eslint and tsec to basic checks

* ext

* enable tsec

* Add comments

* Add check-clean-git-state

* Make executable

* update build & distro

* Update size

* distro
This commit is contained in:
Charles Gagnon
2023-07-05 17:15:27 -07:00
committed by GitHub
parent 76232ffb25
commit 0dda36cd6e
18 changed files with 150 additions and 118 deletions

View File

@@ -70,108 +70,111 @@ jobs:
id: electron-integration-tests
run: DISPLAY=:10 ./scripts/test-integration.sh
# {{SQL CARBON TODO}} Bring back "Hygiene and Layering" and "Warm up node modules cache"
# hygiene:
# if: github.ref != 'refs/heads/main'
# name: Hygiene and Layering
# runs-on: ubuntu-latest
# timeout-minutes: 40
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# steps:
# - uses: actions/checkout@v3
hygiene:
if: github.ref != 'refs/heads/main'
name: Hygiene and Layering
runs-on: ubuntu-latest
timeout-minutes: 40
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 16
- uses: actions/setup-node@v3
with:
node-version: 16
# - name: Compute node modules cache key
# id: nodeModulesCacheKey
# run: echo "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)"
# - name: Cache node modules
# id: cacheNodeModules
# uses: actions/cache@v3
# with:
# path: "**/node_modules"
# key: ${{ runner.os }}-cacheNodeModules23-${{ steps.nodeModulesCacheKey.outputs.value }}
# restore-keys: ${{ runner.os }}-cacheNodeModules23-
# - name: Get yarn cache directory path
# id: yarnCacheDirPath
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# run: echo "::set-output name=dir::$(yarn cache dir)"
# - name: Cache yarn directory
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# uses: actions/cache@v3
# with:
# path: ${{ steps.yarnCacheDirPath.outputs.dir }}
# key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
# restore-keys: ${{ runner.os }}-yarnCacheDir-
# - name: Execute yarn
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# env:
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
# ELECTRON_SKIP_BINARY_DOWNLOAD: 1
# run: yarn --frozen-lockfile --network-timeout 180000
# {{SQL CARBON TODO}} Update node modules caching to work with our cache keys
# - name: Compute node modules cache key
# id: nodeModulesCacheKey
# run: echo "value=$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT
# - name: Cache node modules
# id: cacheNodeModules
# uses: actions/cache@v3
# with:
# path: "**/node_modules"
# key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
# - name: Get yarn cache directory path
# id: yarnCacheDirPath
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
# - name: Cache yarn directory
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# uses: actions/cache@v3
# with:
# path: ${{ steps.yarnCacheDirPath.outputs.dir }}
# key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
# restore-keys: ${{ runner.os }}-yarnCacheDir-
- name: Execute yarn
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} {{SQL CARBON TODO}} Update node modules caching to work with our cache keys
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
run: yarn --frozen-lockfile --network-timeout 180000
# - name: Run Hygiene Checks
# run: yarn gulp hygiene
- name: Run Hygiene Checks
run: yarn gulp hygiene
# - name: Run Valid Layers Checks
# run: yarn valid-layers-check
- name: Run Valid Layers Checks
run: yarn valid-layers-check
# - name: Compile /build/
# run: yarn --cwd build compile
- name: Compile /build/
run: yarn --cwd build compile
# - name: Check clean git state
# run: ./.github/workflows/check-clean-git-state.sh
- name: Check clean git state
run: ./.github/workflows/check-clean-git-state.sh
# - name: Run eslint
# run: yarn eslint
- name: Run eslint
run: yarn eslint
# - name: Run vscode-dts Compile Checks
# run: yarn vscode-dts-compile-check
# {{SQL CARBON EDIT}} Add linting for our folders
- name: Run sqllint
run: yarn sqllint
# - name: Run Trusted Types Checks
# run: yarn tsec-compile-check
- name: Run vscode-dts Compile Checks
run: yarn vscode-dts-compile-check
# warm-cache:
# name: Warm up node modules cache
# if: github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# timeout-minutes: 40
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# steps:
# - uses: actions/checkout@v3
- name: Run Trusted Types Checks
run: yarn tsec-compile-check
# - uses: actions/setup-node@v3
# with:
# node-version: 16
# {{SQL CARBON TODO}} Update node modules caching to work with our cache keys
# warm-cache:
# name: Warm up node modules cache
# if: github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# timeout-minutes: 40
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# steps:
# - uses: actions/checkout@v3
# - name: Compute node modules cache key
# id: nodeModulesCacheKey
# run: echo "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)"
# - name: Cache node modules
# id: cacheNodeModules
# uses: actions/cache@v3
# with:
# path: "**/node_modules"
# key: ${{ runner.os }}-cacheNodeModules23-${{ steps.nodeModulesCacheKey.outputs.value }}
# restore-keys: ${{ runner.os }}-cacheNodeModules23-
# - name: Get yarn cache directory path
# id: yarnCacheDirPath
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# run: echo "::set-output name=dir::$(yarn cache dir)"
# - name: Cache yarn directory
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# uses: actions/cache@v3
# with:
# path: ${{ steps.yarnCacheDirPath.outputs.dir }}
# key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
# restore-keys: ${{ runner.os }}-yarnCacheDir-
# - name: Execute yarn
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# env:
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
# ELECTRON_SKIP_BINARY_DOWNLOAD: 1
# run: yarn --frozen-lockfile --network-timeout 180000
# - uses: actions/setup-node@v3
# with:
# node-version: 16
# - name: Compute node modules cache key
# id: nodeModulesCacheKey
# run: echo "value=$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT
# - name: Cache node modules
# id: cacheNodeModules
# uses: actions/cache@v3
# with:
# path: "**/node_modules"
# key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
# - name: Get yarn cache directory path
# id: yarnCacheDirPath
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
# - name: Cache yarn directory
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# uses: actions/cache@v3
# with:
# path: ${{ steps.yarnCacheDirPath.outputs.dir }}
# key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
# restore-keys: ${{ runner.os }}-yarnCacheDir-
# - name: Execute yarn
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# env:
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
# ELECTRON_SKIP_BINARY_DOWNLOAD: 1
# run: yarn --frozen-lockfile --network-timeout 180000

6
.github/workflows/check-clean-git-state.sh vendored Executable file
View File

@@ -0,0 +1,6 @@
R=`git status --porcelain | wc -l`
if [ "$R" -ne "0" ]; then
echo "The git repo is not clean after compiling the /build/ folder. Did you forget to commit .js output for .ts files?";
git status --porcelain
exit 1;
fi

View File

@@ -1,7 +1,7 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");

View File

@@ -1,7 +1,7 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");

View File

@@ -1,7 +1,7 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");

View File

@@ -1,7 +1,7 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");

View File

@@ -1,7 +1,7 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVersion = void 0;

View File

@@ -1,7 +1,7 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.assetFromGithub = void 0;

View File

@@ -1,7 +1,7 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.remote = void 0;

View File

@@ -1,7 +1,7 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Mangler = void 0;

View File

@@ -1,7 +1,7 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVariableNameValidator = void 0;

View File

@@ -1,7 +1,7 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.generatePackageDeps = void 0;

View File

@@ -1,7 +1,7 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.generatePackageDeps = void 0;

View File

@@ -1,6 +1,6 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -1,7 +1,7 @@
{
"name": "azuredatastudio",
"version": "1.45.0",
"distro": "68d0c9ce66941b734b19080ad335cb69d3ae2e4a",
"distro": "72f281cdcc5d92e168d3ce089814978e9701a67e",
"author": {
"name": "Microsoft Corporation"
},
@@ -39,7 +39,7 @@
"download-builtin-extensions-cg": "node build/lib/builtInExtensionsCG.js",
"monaco-compile-check": "tsc -p src/tsconfig.monaco.json --noEmit",
"strict-initialization-watch": "tsc --watch -p src/tsconfig.json --noEmit --strictPropertyInitialization",
"tsec-compile-check": "node node_modules/tsec/bin/tsec -p src/tsconfig.tsec.json",
"tsec-compile-check": "node --max_old_space_size=8191 node_modules/tsec/bin/tsec -p src/tsconfig.tsec.json",
"vscode-dts-compile-check": "tsc -p src/tsconfig.vscode-dts.json && tsc -p src/tsconfig.vscode-proposed-dts.json",
"valid-layers-check": "node --max_old_space_size=8192 build/lib/layersChecker.js",
"update-distro": "node build/npm/update-distro.mjs",
@@ -240,7 +240,7 @@
"temp-write": "^3.4.0",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"tsec": "0.1.4",
"tsec": "0.2.7",
"typemoq": "^0.3.2",
"typescript": "^5.2.0-dev.20230524",
"typescript-formatter": "7.1.0",

View File

@@ -397,7 +397,7 @@ export class FilterDialog extends Modal {
this.filterTable.layout(new DOM.Dimension(600, (tableData.length + 2) * TableRowHeight));
this._description = DOM.append(body, DOM.$('.filter-dialog-description'));
this._description.innerHTML = this._properties[0].description;
this._description.innerText = this._properties[0].description;
}
protected layout(height?: number): void {

View File

@@ -1,15 +1,22 @@
{
"ban-document-execcommand": [
"vs/workbench/contrib/codeEditor/electron-sandbox/inputClipboardActions.ts",
"vs/editor/contrib/clipboard/browser/clipboard.ts",
"sql/workbench/contrib/notebook/browser/cellViews/textCell.component.ts",
"sql/workbench/contrib/notebook/browser/cellViews/markdownToolbar.component.ts"
],
"ban-eval-calls": [
"vs/workbench/api/worker/extHostExtensionService.ts",
"vs/base/worker/workerMain"
"vs/base/worker/workerMain.ts"
],
"ban-function-calls": [
"vs/workbench/api/worker/extHostExtensionService.ts",
"vs/base/worker/workerMain",
"vs/base/worker/workerMain.ts",
"vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts",
"vs/workbench/services/keybinding/test/node/keyboardMapperTestUtils.ts"
],
"ban-trustedtypes-createpolicy": [
"vs/amdX.ts",
"vs/base/browser/trustedTypes.ts",
"vs/base/worker/workerMain.ts",
"vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts"
@@ -18,7 +25,26 @@
"vs/base/browser/defaultWorkerFactory.ts",
"vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts"
],
"ban-worker-importscripts": [
"vs/amdX.ts",
"vs/workbench/services/extensions/worker/polyfillNestedWorker.ts",
"vs/workbench/api/worker/extensionHostWorker.ts",
"vs/base/worker/workerMain.ts"
],
"ban-domparser-parsefromstring": [
"vs/base/browser/markdownRenderer.ts",
"vs/base/test/browser/markdownRenderer.test.ts"
],
"ban-element-setattribute": [
"**/*.ts"
],
"ban-element-insertadjacenthtml": [
"**/*.ts"
],
// {{SQL CARBON EDIT}} Add our exemptions
"ban-element-innerhtml-assignments": [
// Unsure why this one file isn't being hit in VS Code, but VS Code has the same code so marking it as exempted
"vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.ts",
"sql/workbench/browser/modal/modal.ts",
"sql/base/browser/ui/panel/panel.ts",
"sql/base/browser/ui/selectBox/selectBox.ts",
@@ -45,8 +71,5 @@
],
"ban-script-content-assignments": [
"sql/workbench/services/notebook/browser/outputs/renderers.ts"
],
"ban-domparser-parsefromstring": [
"vs/base/browser/markdownRenderer.ts",
]
}

View File

@@ -9735,10 +9735,10 @@ ts-node@^10.9.1:
v8-compile-cache-lib "^3.0.1"
yn "3.1.1"
tsec@0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/tsec/-/tsec-0.1.4.tgz#dc8743c28ad01230ea4692e326866e0d54487f3f"
integrity sha512-7r6m7gmRE11si2FeM0pPoLfGV3AZTRcJJxx2bS5MYtvwaEMNqq2QlaVAEYaH1RqICeN3ODe2jVBJkC+JYQ/gtQ==
tsec@0.2.7:
version "0.2.7"
resolved "https://registry.yarnpkg.com/tsec/-/tsec-0.2.7.tgz#be530025907037ed57f37fc7625b6a7e3658fe43"
integrity sha512-Pj9DuBBWLEo8p7QsbrEdXzW/u6QJBcib0ZGOTXkeSDx+PLXFY7hwyZE9Tfhp3TA3LQNpYouyT0WmzXRyUW4otQ==
dependencies:
glob "^7.1.1"
minimatch "^3.0.3"