Compare commits

...

52 commits

Author SHA1 Message Date
deepak1556 fd5a9ead20 Merge remote-tracking branch 'origin' into electron-16.x.y 2021-11-26 15:21:32 +09:00
deepak1556 7b17ffac5d ci: update to gcc-4.9 for remote
Refs https://github.com/microsoft/vscode/issues/137659
2021-11-26 15:16:22 +09:00
deepak1556 54d2202e88 chore: bump @vscode/sqlite3@5.0.7 2021-11-26 13:36:59 +09:00
deepak1556 4b91694320 Merge remote-tracking branch 'origin' into electron-16.x.y 2021-11-26 13:25:23 +09:00
Benjamin Pasero 69c531abd4
:chore: update to electron@16.0.2 2021-11-25 10:37:05 +01:00
deepak1556 283fe75ad1 chore: fix merge conflict 2021-11-23 15:51:48 +09:00
deepak1556 d6fa4da469 Merge remote-tracking branch 'origin' into electron-16.x.y 2021-11-23 15:33:56 +09:00
deepak1556 f6e73cc935 Merge remote-tracking branch 'origin' into electron-16.x.y 2021-11-22 23:08:38 +09:00
deepak1556 8a284f3bfe chore: bump azure cache 2021-11-22 20:41:05 +09:00
deepak1556 6a0ee1245a ci: better fix for remote build 2021-11-22 20:13:59 +09:00
deepak1556 7949b72a90 ci: fix remote build in github ci 2021-11-22 19:27:08 +09:00
deepak1556 7ada167103 Merge remote-tracking branch 'origin' into electron-16.x.y 2021-11-22 18:56:53 +09:00
deepak1556 9aed22ce2d ci: update github ci cache 2021-11-22 18:31:12 +09:00
deepak1556 21b98f9772 ci: fix linux build 2021-11-22 18:23:36 +09:00
deepak1556 43f1a0ba82 chore: update linux compile flags
Refs 797723ec83
2021-11-22 17:58:39 +09:00
deepak1556 4bc2923797 Merge remote-tracking branch 'origin' into electron-16.x.y 2021-11-22 15:42:41 +09:00
Benjamin Pasero 55306871ac
add AbortSignal to core types 2021-11-22 07:32:21 +01:00
Benjamin Pasero e18a431efa
fix layer issue 2021-11-22 07:06:39 +01:00
deepak1556 ec4837ac58 chore: bump @vscode/sqlite3@5.0.5
Refs https://github.com/microsoft/vscode/issues/137496
2021-11-22 14:47:35 +09:00
deepak1556 f20ebff2fe Merge remote-tracking branch 'origin' into electron-16.x.y 2021-11-22 14:42:30 +09:00
Benjamin Pasero 6b34356f77
update electron types to 16.x 2021-11-20 08:12:52 +01:00
Benjamin Pasero e9d46ffcf1
Merge branch 'main' into electron-16.x.y 2021-11-19 10:38:10 +01:00
Benjamin Pasero 627f1b2efb
enable stack dumping 2021-11-19 09:21:26 +01:00
deepak1556 4f44039136 ci: update node version 2021-11-19 15:16:51 +09:00
Benjamin Pasero 87b312de64 watcher - fix unhandled rejection (fix #137416) 2021-11-19 15:16:51 +09:00
deepak1556 ce3e969b04 chore: update module cache 2021-11-19 15:16:51 +09:00
Benjamin Pasero cb9fff569b smoke - fix compile issue 2021-11-19 15:16:51 +09:00
Benjamin Pasero 38abf6cd7e update todo for type casts 2021-11-19 15:16:51 +09:00
Benjamin Pasero 97022eed93 fix layers check to account for duplicated types from node.js 2021-11-19 15:16:51 +09:00
deepak1556 863eb7c888 chore: bump @vscode/sqlite3@5.0.4 2021-11-19 15:16:48 +09:00
Benjamin Pasero f47d3af9d4 💄 2021-11-19 15:16:27 +09:00
Benjamin Pasero 735c398aa1 adopt more fs.rm 2021-11-19 15:16:27 +09:00
Benjamin Pasero 9d9c462cfe align with changes 2021-11-19 15:16:27 +09:00
Benjamin Pasero 385b69f460 some 💄 changes 2021-11-19 15:16:27 +09:00
deepak1556 afc24461eb chore: update chromium version for clang downloader 2021-11-19 15:16:27 +09:00
deepak1556 99435252b0 Revert "temp(macOS): kill test instances in OSS"
This reverts commit b0d796c8d64227a5ec012c060bbbee7d9da27568.
2021-11-19 15:16:27 +09:00
deepak1556 2a08926f65 temp(macOS): kill test instances in OSS 2021-11-19 15:16:27 +09:00
deepak1556 e35f169e42 chore: bump electron@16.0.0 2021-11-19 15:16:27 +09:00
deepak1556 4d6c1806cf chore: bump electron@15.3.2 2021-11-19 15:16:27 +09:00
deepak1556 72b19a7f98 chore: fix integration tests 2021-11-19 15:16:27 +09:00
deepak1556 0cb6aa508a fix: adopt fs api changes 2021-11-19 15:16:27 +09:00
deepak1556 ef62374ef7 chore: fix perf hook integration with node environment 2021-11-19 15:16:27 +09:00
deepak1556 ee611fec9a spec: skip non-context aware module unittests 2021-11-19 15:16:27 +09:00
deepak1556 287cce6822 chore: bump @vscode/sqlite3@5.0.3 2021-11-19 15:16:24 +09:00
deepak1556 d4425c05b0 chore: update api changes 2021-11-19 15:15:26 +09:00
deepak1556 0f34870fa2 chore: bump electron@15.3.1 2021-11-19 15:15:26 +09:00
deepak1556 c977b4fbbe chore: enable crashpad on linux 2021-11-19 15:15:26 +09:00
deepak1556 7a4e1bc51e Revert "watcher - enable crash reports on linux (#136264)"
This reverts commit af261488f8.
2021-11-19 15:15:26 +09:00
deepak1556 61e5c442da Revert "watcher - use type property for crash reporter location"
This reverts commit bfa488dd8f.
2021-11-19 15:15:26 +09:00
deepak1556 8f1fd6f17b chore: enable render process reuse 2021-11-19 15:15:26 +09:00
deepak1556 6f7b1db536 chore: bump node@16.x 2021-11-19 15:15:26 +09:00
deepak1556 a49ca732ec chore: bump electron@15.3.0 2021-11-19 15:15:25 +09:00
118 changed files with 458 additions and 523 deletions

View file

@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
- uses: actions/setup-python@v2
with:
@ -113,7 +113,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
- name: Compute node modules cache key
id: nodeModulesCacheKey
@ -123,8 +123,8 @@ jobs:
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModules14-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules14-
key: ${{ runner.os }}-cacheNodeModules18-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules18-
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@ -136,12 +136,34 @@ jobs:
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-yarnCacheDir-
- name: Compile build tools
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: |
yarn --cwd build
yarn --cwd build compile
- 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
run: |
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/96.0.4664.45/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
# Download libcxx headers and objects from upstream electron releases
DEBUG=libcxx-fetcher \
VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \
VSCODE_LIBCXX_HEADERS_DIR=$PWD/.build/libcxx_headers \
VSCODE_LIBCXXABI_HEADERS_DIR=$PWD/.build/libcxxabi_headers \
VSCODE_ARCH="x64" \
node build/linux/libcxx-fetcher.js
# Set compiler toolchain
export CC=$PWD/.build/CR_Clang/bin/clang
export CXX=$PWD/.build/CR_Clang/bin/clang++
export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -isystem$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit"
export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -fsplit-lto-unit -L$PWD/.build/libcxx-objects -lc++abi"
export VSCODE_REMOTE_CC=$(which gcc)
export VSCODE_REMOTE_CXX=$(which g++)
yarn --frozen-lockfile --network-timeout 180000
- name: Compile and Download
run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
@ -185,7 +207,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
- name: Compute node modules cache key
id: nodeModulesCacheKey
@ -195,8 +217,8 @@ jobs:
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModules14-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules14-
key: ${{ runner.os }}-cacheNodeModules18-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules18-
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@ -259,7 +281,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
- name: Compute node modules cache key
id: nodeModulesCacheKey
@ -269,8 +291,8 @@ jobs:
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModules14-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules14-
key: ${{ runner.os }}-cacheNodeModules18-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules18-
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}

View file

@ -24,7 +24,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
- name: Install dependencies
if: steps.caching-stage.outputs.cache-hit != 'true'

View file

@ -1,4 +1,4 @@
disturl "https://electronjs.org/headers"
target "13.5.2"
target "16.0.2"
runtime "electron"
build_from_source "true"

View file

@ -1 +1 @@
2021-11-24T12:04:58.681Z
2021-11-26T04:23:38.159Z

View file

@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"

View file

@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"

View file

@ -11,7 +11,7 @@ pr:
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"

View file

@ -7,7 +7,7 @@ pr: none
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"

View file

@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"

View file

@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
@ -75,7 +75,7 @@ steps:
if [ -z "$CC" ] || [ -z "$CXX" ]; then
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/91.0.4472.164/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
curl -s https://raw.githubusercontent.com/chromium/chromium/96.0.4664.45/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
# Download libcxx headers and objects from upstream electron releases
DEBUG=libcxx-fetcher \
VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \
@ -86,13 +86,13 @@ steps:
# Set compiler toolchain
export CC=$PWD/.build/CR_Clang/bin/clang
export CXX=$PWD/.build/CR_Clang/bin/clang++
export CXXFLAGS="-nostdinc++ -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -D__NO_INLINE__ -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit"
export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -isystem$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit"
export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -fsplit-lto-unit -L$PWD/.build/libcxx-objects -lc++abi"
fi
if [ "$VSCODE_ARCH" == "x64" ]; then
export VSCODE_REMOTE_CC=$(which gcc-4.8)
export VSCODE_REMOTE_CXX=$(which g++-4.8)
export VSCODE_REMOTE_CC=$(which gcc-4.9)
export VSCODE_REMOTE_CXX=$(which g++-4.9)
fi
for i in {1..3}; do # try 3 times, for Terrapin

View file

@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: DownloadPipelineArtifact@0
displayName: "Download Pipeline Artifact"

View file

@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"

View file

@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: AzureCLI@2
inputs:

View file

@ -12,7 +12,7 @@ pool:
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- bash: |
TAG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)

View file

@ -47,7 +47,7 @@ stages:
outputFormat: "pre"
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
@ -138,7 +138,7 @@ stages:
toolMajorVersion: "V2"
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
@ -183,7 +183,7 @@ stages:
if [ -z "$CC" ] || [ -z "$CXX" ]; then
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/91.0.4472.164/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
curl -s https://raw.githubusercontent.com/chromium/chromium/96.0.4664.45/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
# Download libcxx headers and objects from upstream electron releases
DEBUG=libcxx-fetcher \
VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \
@ -194,13 +194,13 @@ stages:
# Set compiler toolchain
export CC=$PWD/.build/CR_Clang/bin/clang
export CXX=$PWD/.build/CR_Clang/bin/clang++
export CXXFLAGS="-nostdinc++ -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit"
export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -isystem$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit"
export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -fsplit-lto-unit -L$PWD/.build/libcxx-objects -lc++abi"
fi
if [ "$VSCODE_ARCH" == "x64" ]; then
export VSCODE_REMOTE_CC=$(which gcc-4.8)
export VSCODE_REMOTE_CXX=$(which g++-4.8)
export VSCODE_REMOTE_CC=$(which gcc-4.9)
export VSCODE_REMOTE_CXX=$(which g++-4.9)
fi
for i in {1..3}; do # try 3 times, for Terrapin

View file

@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"

View file

@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
versionSpec: "16.x"
- task: UsePythonVersion@0
inputs:

View file

@ -50,7 +50,22 @@ const CORE_TYPES = [
'self',
'trimLeft',
'trimRight',
'queueMicrotask'
'queueMicrotask',
'Array',
'Uint8Array',
'Uint16Array',
'Uint32Array',
'Int8Array',
'Int16Array',
'Int32Array',
'Float32Array',
'Float64Array',
'Uint8ClampedArray',
'BigUint64Array',
'BigInt64Array',
'btoa',
'atob',
'AbortSignal'
];
// Types that are defined in a common layer but are known to be only
// available in native environments should not be allowed in browser
@ -85,8 +100,8 @@ const RULES = [
// Common: vs/platform/environment/common/*
{
target: '**/vs/platform/environment/common/*.ts',
disallowedTypes: [ /* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedTypes: [ /* Ignore native types that are defined from here */],
disallowedDefinitions: [
'lib.dom.d.ts',
'@types/node' // no node.js
@ -95,8 +110,8 @@ const RULES = [
// Common: vs/platform/windows/common/windows.ts
{
target: '**/vs/platform/windows/common/windows.ts',
disallowedTypes: [ /* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedTypes: [ /* Ignore native types that are defined from here */],
disallowedDefinitions: [
'lib.dom.d.ts',
'@types/node' // no node.js
@ -105,8 +120,8 @@ const RULES = [
// Common: vs/platform/native/common/native.ts
{
target: '**/vs/platform/native/common/native.ts',
disallowedTypes: [ /* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedTypes: [ /* Ignore native types that are defined from here */],
disallowedDefinitions: [
'lib.dom.d.ts',
'@types/node' // no node.js
@ -141,6 +156,9 @@ const RULES = [
target: '**/vs/**/browser/**',
allowedTypes: CORE_TYPES,
disallowedTypes: NATIVE_TYPES,
allowedDefinitions: [
'@types/node/stream/consumers.d.ts' // node.js started to duplicate types from lib.dom.d.ts so we have to account for that
],
disallowedDefinitions: [
'@types/node' // no node.js
]
@ -224,13 +242,20 @@ function checkFile(program, sourceFile, rule) {
if (symbol) {
const declarations = symbol.declarations;
if (Array.isArray(declarations)) {
for (const declaration of declarations) {
DeclarationLoop: for (const declaration of declarations) {
if (declaration) {
const parent = declaration.parent;
if (parent) {
const parentSourceFile = parent.getSourceFile();
if (parentSourceFile) {
const definitionFileName = parentSourceFile.fileName;
if (rule.allowedDefinitions) {
for (const allowedDefinition of rule.allowedDefinitions) {
if (definitionFileName.indexOf(allowedDefinition) >= 0) {
continue DeclarationLoop;
}
}
}
if (rule.disallowedDefinitions) {
for (const disallowedDefinition of rule.disallowedDefinitions) {
if (definitionFileName.indexOf(disallowedDefinition) >= 0) {

View file

@ -51,7 +51,22 @@ const CORE_TYPES = [
'self',
'trimLeft',
'trimRight',
'queueMicrotask'
'queueMicrotask',
'Array',
'Uint8Array',
'Uint16Array',
'Uint32Array',
'Int8Array',
'Int16Array',
'Int32Array',
'Float32Array',
'Float64Array',
'Uint8ClampedArray',
'BigUint64Array',
'BigInt64Array',
'btoa',
'atob',
'AbortSignal'
];
// Types that are defined in a common layer but are known to be only
@ -92,8 +107,8 @@ const RULES = [
// Common: vs/platform/environment/common/*
{
target: '**/vs/platform/environment/common/*.ts',
disallowedTypes: [/* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedTypes: [/* Ignore native types that are defined from here */],
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
@ -103,8 +118,8 @@ const RULES = [
// Common: vs/platform/windows/common/windows.ts
{
target: '**/vs/platform/windows/common/windows.ts',
disallowedTypes: [/* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedTypes: [/* Ignore native types that are defined from here */],
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
@ -114,8 +129,8 @@ const RULES = [
// Common: vs/platform/native/common/native.ts
{
target: '**/vs/platform/native/common/native.ts',
disallowedTypes: [/* Ignore native types that are defined from here */],
allowedTypes: CORE_TYPES,
disallowedTypes: [/* Ignore native types that are defined from here */],
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
@ -154,6 +169,9 @@ const RULES = [
target: '**/vs/**/browser/**',
allowedTypes: CORE_TYPES,
disallowedTypes: NATIVE_TYPES,
allowedDefinitions: [
'@types/node/stream/consumers.d.ts' // node.js started to duplicate types from lib.dom.d.ts so we have to account for that
],
disallowedDefinitions: [
'@types/node' // no node.js
]
@ -227,6 +245,7 @@ interface IRule {
target: string;
skip?: boolean;
allowedTypes?: string[];
allowedDefinitions?: string[];
disallowedDefinitions?: string[];
disallowedTypes?: string[];
}
@ -260,13 +279,20 @@ function checkFile(program: ts.Program, sourceFile: ts.SourceFile, rule: IRule)
if (symbol) {
const declarations = symbol.declarations;
if (Array.isArray(declarations)) {
for (const declaration of declarations) {
DeclarationLoop: for (const declaration of declarations) {
if (declaration) {
const parent = declaration.parent;
if (parent) {
const parentSourceFile = parent.getSourceFile();
if (parentSourceFile) {
const definitionFileName = parentSourceFile.fileName;
if (rule.allowedDefinitions) {
for (const allowedDefinition of rule.allowedDefinitions) {
if (definitionFileName.indexOf(allowedDefinition) >= 0) {
continue DeclarationLoop;
}
}
}
if (rule.disallowedDefinitions) {
for (const disallowedDefinition of rule.disallowedDefinitions) {
if (definitionFileName.indexOf(disallowedDefinition) >= 0) {

View file

@ -29,7 +29,7 @@
"@types/minimist": "^1.2.1",
"@types/mkdirp": "^1.0.1",
"@types/mocha": "^8.2.0",
"@types/node": "14.x",
"@types/node": "16.x",
"@types/p-limit": "^2.2.0",
"@types/plist": "^3.0.2",
"@types/pump": "^1.0.1",

View file

@ -486,10 +486,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb"
integrity sha512-El3+WJk2D/ppWNd2X05aiP5l2k4EwF7KwheknQZls+I26eSICoWRhRIJ56jGgw2dqNGQ5LtNajmBU2ajS28EvQ==
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@types/p-limit@^2.2.0":
version "2.2.0"

View file

@ -6,7 +6,7 @@
"git": {
"name": "chromium",
"repositoryUrl": "https://chromium.googlesource.com/chromium/src",
"commitHash": "8a33e05d162c4f39afa2dcb150e8c2548aa4ccea"
"commitHash": "a1b736be4457e29ad09b24233308cbad9cc42748"
}
},
"licenseDetail": [
@ -40,7 +40,7 @@
"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
],
"isOnlyProductionDependency": true,
"version": "91.0.4472.164"
"version": "96.0.4664.45"
},
{
"component": {
@ -48,11 +48,11 @@
"git": {
"name": "nodejs",
"repositoryUrl": "https://github.com/nodejs/node",
"commitHash": "bd60e93357a118204ea238d94e7a9e4209d93062"
"commitHash": "711e073596f29b047086e2f3d4ab3706b98462f7"
}
},
"isOnlyProductionDependency": true,
"version": "14.16.0"
"version": "16.9.1"
},
{
"component": {
@ -60,12 +60,12 @@
"git": {
"name": "electron",
"repositoryUrl": "https://github.com/electron/electron",
"commitHash": "e64966641c6aa10450ae1122efd3dac1f29eba21"
"commitHash": "e029f65fe162c9c97c97694ec88e557b0f5967b7"
}
},
"isOnlyProductionDependency": true,
"license": "MIT",
"version": "13.5.1"
"version": "16.0.2"
},
{
"component": {

View file

@ -140,7 +140,7 @@
]
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"repository": {
"type": "git",

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
jsonc-parser@^2.2.1:
version "2.2.1"

View file

@ -14,7 +14,7 @@ export function getNodeFSRequestService(): RequestService {
}
}
return {
getContent(location: string, encoding?: string) {
getContent(location: string, encoding?: BufferEncoding) {
ensureFileUri(location);
return new Promise((c, e) => {
const uri = Uri.parse(location);

View file

@ -852,7 +852,7 @@
"vscode-uri": "^3.0.2"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"repository": {
"type": "git",

View file

@ -16,7 +16,7 @@
},
"devDependencies": {
"@types/mocha": "^8.2.0",
"@types/node": "14.x"
"@types/node": "16.x"
},
"scripts": {
"compile": "gulp compile-extension:css-language-features-server",

View file

@ -16,7 +16,7 @@ export function getNodeFSRequestService(): RequestService {
}
}
return {
getContent(location: string, encoding?: string) {
getContent(location: string, encoding?: BufferEncoding) {
ensureFileUri(location);
return new Promise((c, e) => {
const uri = Uri.parse(location);

View file

@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44"
integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ==
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
vscode-css-languageservice@^5.1.8:
version "5.1.8"

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
balanced-match@^1.0.0:
version "1.0.0"

View file

@ -36,7 +36,7 @@
"vscode-nls": "^4.0.0"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"prettier": {
"printWidth": 100,

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
vscode-nls@^4.0.0:
version "4.0.0"

View file

@ -153,7 +153,7 @@
"vscode-nls": "^4.0.0"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"repository": {
"type": "git",

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
vscode-nls@^4.0.0:
version "4.0.0"

View file

@ -500,7 +500,7 @@
"deps": "yarn add @vscode/emmet-helper"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"dependencies": {
"@emmetio/abbreviation": "^2.2.0",

View file

@ -53,10 +53,10 @@
resolved "https://registry.yarnpkg.com/@emmetio/stream-reader/-/stream-reader-2.2.0.tgz#46cffea119a0a003312a21c2d9b5628cb5fcd442"
integrity sha1-Rs/+oRmgoAMxKiHC2bVijLX81EI=
"@types/node@14.x":
version "14.17.27"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.27.tgz#5054610d37bb5f6e21342d0e6d24c494231f3b85"
integrity sha512-94+Ahf9IcaDuJTle/2b+wzvjmutxXAEXU6O81JHblYXUg2BDG+dnBy7VxIPHKAyEEDHzCMQydTJuWvrE+Aanzw==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@vscode/emmet-helper@^2.3.0":
version "2.8.2"

View file

@ -68,7 +68,7 @@
},
"devDependencies": {
"@types/markdown-it": "0.0.2",
"@types/node": "14.x"
"@types/node": "16.x"
},
"repository": {
"type": "git",

View file

@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.2.tgz#5d9ad19e6e6508cdd2f2596df86fd0aade598660"
integrity sha1-XZrRnm5lCM3S8llt+G/Qqt5ZhmA=
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@types/node@^6.0.46":
version "6.0.78"

View file

@ -2380,7 +2380,7 @@
"@types/byline": "4.2.31",
"@types/file-type": "^5.2.1",
"@types/mocha": "^8.2.0",
"@types/node": "14.x",
"@types/node": "16.x",
"@types/which": "^1.0.28"
},
"repository": {

View file

@ -7,6 +7,7 @@ import { promises as fs, exists, realpath } from 'fs';
import * as path from 'path';
import * as os from 'os';
import * as cp from 'child_process';
import { fileURLToPath } from 'url';
import * as which from 'which';
import { EventEmitter } from 'events';
import * as iconv from 'iconv-lite-umd';
@ -581,8 +582,9 @@ export class Git {
GIT_PAGER: 'cat'
});
if (options.cwd) {
options.cwd = sanitizePath(options.cwd);
const cwd = this.getCwd(options);
if (cwd) {
options.cwd = sanitizePath(cwd);
}
if (options.log !== false) {
@ -592,6 +594,19 @@ export class Git {
return cp.spawn(this.path, args, options);
}
private getCwd(options: SpawnOptions): string | undefined {
const cwd = options.cwd;
if (typeof cwd === 'undefined' || typeof cwd === 'string') {
return cwd;
}
if (cwd.protocol === 'file:') {
return fileURLToPath(cwd);
}
return undefined;
}
private log(output: string): void {
this._onOutput.emit('log', output);
}

View file

@ -26,10 +26,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb"
integrity sha512-El3+WJk2D/ppWNd2X05aiP5l2k4EwF7KwheknQZls+I26eSICoWRhRIJ56jGgw2dqNGQ5LtNajmBU2ajS28EvQ==
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@types/which@^1.0.28":
version "1.0.28"

View file

@ -65,7 +65,7 @@
"vscode-tas-client": "^0.1.22"
},
"devDependencies": {
"@types/node": "14.x",
"@types/node": "16.x",
"@types/node-fetch": "^2.5.7",
"@types/uuid": "8.0.0"
},

View file

@ -15,10 +15,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.5.tgz#3d03acd3b3414cf67faf999aed11682ed121f22b"
integrity sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@types/uuid@8.0.0":
version "8.0.0"

View file

@ -77,7 +77,7 @@
"vscode-nls": "^4.1.2"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"repository": {
"type": "git",

View file

@ -99,10 +99,10 @@
dependencies:
"@types/node" ">= 8"
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@types/node@>= 8":
version "14.0.23"

View file

@ -20,7 +20,7 @@
"vscode-nls": "^4.0.0"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"main": "./out/main",
"activationEvents": [

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
vscode-nls@^4.0.0:
version "4.0.0"

View file

@ -20,7 +20,7 @@
"vscode-nls": "^4.0.0"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"main": "./out/main",
"activationEvents": [

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
vscode-nls@^4.0.0:
version "4.0.0"

View file

@ -14,7 +14,7 @@ export function getNodeFSRequestService(): RequestService {
}
}
return {
getContent(location: string, encoding?: string) {
getContent(location: string, encoding?: BufferEncoding) {
ensureFileUri(location);
return new Promise((c, e) => {
const uri = Uri.parse(location);

View file

@ -260,7 +260,7 @@
"vscode-nls": "^5.0.0"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"repository": {
"type": "git",

View file

@ -18,7 +18,7 @@
},
"devDependencies": {
"@types/mocha": "^8.2.0",
"@types/node": "14.x"
"@types/node": "16.x"
},
"scripts": {
"compile": "npx gulp compile-extension:html-language-features-server",

View file

@ -16,7 +16,7 @@ export function getNodeFSRequestService(): RequestService {
}
}
return {
getContent(location: string, encoding?: string) {
getContent(location: string, encoding?: BufferEncoding) {
ensureFileUri(location);
return new Promise((c, e) => {
const uri = Uri.parse(location);

View file

@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44"
integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ==
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
vscode-css-languageservice@^5.1.8:
version "5.1.8"

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
balanced-match@^1.0.0:
version "1.0.0"

View file

@ -20,7 +20,7 @@
"vscode-nls": "^4.0.0"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"main": "./out/main",
"activationEvents": [

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
vscode-nls@^4.0.0:
version "4.0.0"

View file

@ -142,7 +142,7 @@
"vscode-nls": "^5.0.0"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"repository": {
"type": "git",

View file

@ -20,7 +20,7 @@
},
"devDependencies": {
"@types/mocha": "^8.2.0",
"@types/node": "14.x"
"@types/node": "16.x"
},
"scripts": {
"prepublishOnly": "npm run clean && npm run compile",

View file

@ -36,7 +36,7 @@ function getHTTPRequestService(): RequestService {
function getFileRequestService(): RequestService {
return {
getContent(location: string, encoding?: string) {
getContent(location: string, encoding?: BufferEncoding) {
return new Promise((c, e) => {
const uri = Uri.parse(location);
fs.readFile(uri.fsPath, encoding, (err, buf) => {

View file

@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44"
integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ==
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
jsonc-parser@^3.0.0:
version "3.0.0"

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
balanced-match@^1.0.0:
version "1.0.0"

View file

@ -159,7 +159,7 @@
"vscode-nls": "^5.0.0"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"repository": {
"type": "git",

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
vscode-nls@^5.0.0:
version "5.0.0"

View file

@ -44,7 +44,7 @@
"watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose"
},
"devDependencies": {
"@types/node": "14.x",
"@types/node": "16.x",
"@types/node-fetch": "^2.5.7",
"@types/randombytes": "^2.0.0",
"@types/sha.js": "^2.4.0",

View file

@ -15,10 +15,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.23.tgz#676fa0883450ed9da0bb24156213636290892806"
integrity sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw==
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@types/randombytes@^2.0.0":
version "2.0.0"

View file

@ -28,7 +28,7 @@
},
"devDependencies": {
"@types/minimatch": "^3.0.3",
"@types/node": "14.x",
"@types/node": "16.x",
"@types/which": "^2.0.0"
},
"resolutions": {

View file

@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@types/which@^2.0.0":
version "2.0.0"

View file

@ -78,7 +78,7 @@
"which": "^2.0.2"
},
"devDependencies": {
"@types/node": "14.x",
"@types/node": "16.x",
"@types/which": "^2.0.0"
},
"repository": {

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@types/which@^2.0.0":
version "2.0.0"

View file

@ -43,7 +43,7 @@
"vscode-nls": "^5.0.0"
},
"devDependencies": {
"@types/node": "14.x",
"@types/node": "16.x",
"@types/semver": "^5.5.0"
},
"scripts": {

View file

@ -69,5 +69,5 @@ export function activate(
}
export function deactivate() {
fs.rmdirSync(temp.getInstanceTempDir(), { recursive: true });
fs.rmSync(temp.getInstanceTempDir(), { recursive: true, force: true });
}

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@types/semver@^5.5.0":
version "5.5.0"

View file

@ -202,7 +202,7 @@
},
"devDependencies": {
"@types/mocha": "^8.2.0",
"@types/node": "14.x"
"@types/node": "16.x"
},
"repository": {
"type": "git",

View file

@ -7,7 +7,7 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44"
integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ==
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==

View file

@ -20,7 +20,7 @@
"jsonc-parser": "2.2.1"
},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"contributes": {
"semanticTokenTypes": [

View file

@ -2,10 +2,10 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
jsonc-parser@2.2.1:
version "2.2.1"

View file

@ -22,7 +22,7 @@
},
"devDependencies": {
"@types/mocha": "^8.2.0",
"@types/node": "14.x",
"@types/node": "16.x",
"@types/p-limit": "^2.2.0"
},
"contributes": {

View file

@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.3.tgz#bbeb55fbc73f28ea6de601fbfa4613f58d785323"
integrity sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@types/p-limit@^2.2.0":
version "2.2.0"

View file

@ -33,7 +33,7 @@
},
"dependencies": {},
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"contributes": {
"commands": [

View file

@ -2,7 +2,7 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==

View file

@ -31,7 +31,7 @@
],
"main": "./out/extension",
"devDependencies": {
"@types/node": "14.x"
"@types/node": "16.x"
},
"capabilities": {
"untrustedWorkspaces": {

View file

@ -16,14 +16,14 @@ export function terminateProcess(p: cp.ChildProcess, extensionPath: string): Ter
const options: any = {
stdio: ['pipe', 'pipe', 'ignore']
};
cp.execFileSync('taskkill', ['/T', '/F', '/PID', p.pid.toString()], options);
cp.execFileSync('taskkill', ['/T', '/F', '/PID', p.pid!.toString()], options);
} catch (err) {
return { success: false, error: err };
}
} else if (process.platform === 'darwin' || process.platform === 'linux') {
try {
const cmd = path.join(extensionPath, 'scripts', 'terminateProcess.sh');
const result = cp.spawnSync(cmd, [p.pid.toString()]);
const result = cp.spawnSync(cmd, [p.pid!.toString()]);
if (result.error) {
return { success: false, error: result.error };
}

View file

@ -2,7 +2,7 @@
# yarn lockfile v1
"@types/node@14.x":
version "14.14.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
"@types/node@16.x":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==

View file

@ -61,7 +61,7 @@
"dependencies": {
"@microsoft/applicationinsights-web": "^2.6.4",
"@parcel/watcher": "2.0.3",
"@vscode/sqlite3": "4.0.12",
"@vscode/sqlite3": "5.0.7",
"@vscode/sudo-prompt": "9.3.1",
"@vscode/vscode-languagedetection": "1.0.21",
"applicationinsights": "1.0.8",
@ -107,7 +107,7 @@
"@types/keytar": "^4.4.0",
"@types/minimist": "^1.2.1",
"@types/mocha": "^8.2.0",
"@types/node": "14.x",
"@types/node": "16.x",
"@types/sinon": "^10.0.2",
"@types/sinon-test": "^2.4.2",
"@types/trusted-types": "^1.0.6",
@ -131,7 +131,7 @@
"cssnano": "^4.1.11",
"debounce": "^1.0.0",
"deemon": "^1.4.0",
"electron": "13.5.1",
"electron": "16.0.2",
"eslint": "6.8.0",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-jsdoc": "^19.1.0",

View file

@ -1,3 +1,3 @@
disturl "http://nodejs.org/dist"
target "14.16.0"
target "16.9.1"
runtime "node"

View file

@ -33,11 +33,13 @@ yarn electron
if [[ "$OSTYPE" == "darwin"* ]]; then
cd $ROOT ; ulimit -n 4096 ; \
ELECTRON_ENABLE_LOGGING=1 \
ELECTRON_ENABLE_STACK_DUMPING=1 \
"$CODE" \
test/unit/electron/index.js --crash-reporter-directory=$VSCODECRASHDIR "$@"
else
cd $ROOT ; \
ELECTRON_ENABLE_LOGGING=1 \
ELECTRON_ENABLE_STACK_DUMPING=1 \
"$CODE" \
test/unit/electron/index.js --crash-reporter-directory=$VSCODECRASHDIR $LINUX_EXTRA_ARGS "$@"
fi

17
src/bootstrap-fork.js vendored
View file

@ -37,9 +37,6 @@ if (process.env['VSCODE_PARENT_PID']) {
terminateWhenParentTerminates();
}
// Configure Crash Reporter
configureCrashReporter();
// Load AMD entry point
require('./bootstrap-amd').load(process.env['VSCODE_AMD_ENTRYPOINT']);
@ -212,18 +209,4 @@ function terminateWhenParentTerminates() {
}
}
function configureCrashReporter() {
const crashReporterOptionsRaw = process.env['VSCODE_CRASH_REPORTER_START_OPTIONS'];
if (typeof crashReporterOptionsRaw === 'string') {
try {
const crashReporterOptions = JSON.parse(crashReporterOptionsRaw);
if (crashReporterOptions && process['crashReporter'] /* Electron only */) {
process['crashReporter'].start(crashReporterOptions);
}
} catch (error) {
console.error(error);
}
}
}
//#endregion

View file

@ -25,8 +25,6 @@ const { getUserDataPath } = require('./vs/platform/environment/node/userDataPath
const product = require('../product.json');
const { app, protocol, crashReporter } = require('electron');
app.allowRendererProcessReuse = false;
// Enable portable support
const portable = bootstrapNode.configurePortable(product);
@ -173,10 +171,7 @@ function configureCommandlineSwitchesSync(cliArgs) {
'enable-proposed-api',
// Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.
'log-level',
// Enables render process reuse. Default value is 'false'. See https://github.com/electron/electron/issues/18397
'enable-render-process-reuse'
'log-level'
];
// Read argv config
@ -221,12 +216,6 @@ function configureCommandlineSwitchesSync(cliArgs) {
process.argv.push('--log', argvValue);
}
break;
case 'enable-render-process-reuse':
if (argvValue === true) {
app.allowRendererProcessReuse = true;
}
break;
}
}
});

View file

@ -46,7 +46,7 @@
* @returns {Promise<void>}
*/
function rimraf(location) {
return new Promise((c, e) => fs.rmdir(location, { recursive: true }, err => (err && err.code !== 'ENOENT') ? e(err) : c()));
return new Promise((c, e) => fs.rm(location, { recursive: true }, err => (err && err.code !== 'ENOENT') ? e(err) : c()));
}
/**

View file

@ -44,7 +44,7 @@ async function rimraf(path: string, mode = RimRafMode.UNLINK): Promise<void> {
throw new Error('rimraf - will refuse to recursively delete root');
}
// delete: via rmDir
// delete: via rm
if (mode === RimRafMode.UNLINK) {
return rimrafUnlink(path);
}
@ -72,7 +72,7 @@ async function rimrafMove(path: string): Promise<void> {
}
async function rimrafUnlink(path: string): Promise<void> {
return Promises.rmdir(path, { recursive: true, maxRetries: 3 });
return promisify(fs.rm)(path, { recursive: true, force: true, maxRetries: 3 });
}
export function rimrafSync(path: string): void {
@ -80,7 +80,7 @@ export function rimrafSync(path: string): void {
throw new Error('rimraf - will refuse to recursively delete root');
}
fs.rmdirSync(path, { recursive: true });
fs.rmSync(path, { recursive: true, force: true, maxRetries: 3 });
}
//#endregion

View file

@ -50,7 +50,7 @@ function terminateProcess(process: cp.ChildProcess, cwd?: string): Promise<Termi
if (cwd) {
options.cwd = cwd;
}
const killProcess = cp.execFile('taskkill', ['/T', '/F', '/PID', process.pid.toString()], options);
const killProcess = cp.execFile('taskkill', ['/T', '/F', '/PID', process.pid!.toString()], options);
return new Promise(resolve => {
killProcess.once('error', (err) => {
resolve({ success: false, error: err });
@ -70,7 +70,7 @@ function terminateProcess(process: cp.ChildProcess, cwd?: string): Promise<Termi
try {
const cmd = FileAccess.asFileUri('vs/base/node/terminateProcess.sh', require).fsPath;
return new Promise(resolve => {
cp.execFile(cmd, [process.pid.toString()], { encoding: 'utf8', shell: true } as cp.ExecFileOptions, (err, stdout, stderr) => {
cp.execFile(cmd, [process.pid!.toString()], { encoding: 'utf8', shell: true } as cp.ExecFileOptions, (err, stdout, stderr) => {
if (err) {
resolve({ success: false, error: err });
} else {
@ -322,7 +322,7 @@ export abstract class AbstractProcess<TProgressData> {
public get pid(): Promise<number> {
if (this.childProcessPromise) {
return this.childProcessPromise.then(childProcess => childProcess.pid, err => -1);
return this.childProcessPromise.then(childProcess => childProcess.pid!, err => -1);
} else {
return new Promise<number>((resolve) => {
this.pidResolve = resolve;

View file

@ -7,11 +7,10 @@
// #######################################################################
// ### ###
// ### electron.d.ts types we need in a common layer for reuse ###
// ### (copied from Electron 11.x) ###
// ### (copied from Electron 16.x) ###
// ### ###
// #######################################################################
export interface MessageBoxOptions {
/**
* Content of the message box.
@ -34,6 +33,13 @@ export interface MessageBoxOptions {
* the message box opens.
*/
defaultId?: number;
/**
* Pass an instance of AbortSignal to optionally close the message box, the message
* box will behave as if it was cancelled by the user. On macOS, `signal` does not
* work with message boxes that do not have a parent window, since those message
* boxes run synchronously due to platform limitations.
*/
signal?: AbortSignal;
/**
* Title of the message box, some platforms will not show it.
*/
@ -50,7 +56,12 @@ export interface MessageBoxOptions {
* Initial checked state of the checkbox. `false` by default.
*/
checkboxChecked?: boolean;
// icon?: NativeImage;
/**
* Custom width of the text in the message box.
*
* @platform darwin
*/
textWidth?: number;
/**
* The index of the button to be used to cancel the dialog, via the `Esc` key. By
* default this is assigned to the first button with "cancel" or "no" as the label.
@ -88,21 +99,10 @@ export interface MessageBoxReturnValue {
checkboxChecked: boolean;
}
export interface OpenDevToolsOptions {
/**
* Opens the devtools with specified dock state, can be `right`, `bottom`,
* `undocked`, `detach`. Defaults to last used dock state. In `undocked` mode it's
* possible to dock back. In `detach` mode it's not.
*/
mode: ('right' | 'bottom' | 'undocked' | 'detach');
/**
* Whether to bring the opened devtools window to the foreground. The default is
* `true`.
*/
activate?: boolean;
}
export interface SaveDialogOptions {
/**
* The dialog title. Cannot be displayed on some _Linux_ desktop environments.
*/
title?: string;
/**
* Absolute directory path, absolute file path, or file name to use by default.
@ -143,6 +143,25 @@ export interface SaveDialogOptions {
securityScopedBookmarks?: boolean;
}
export interface SaveDialogReturnValue {
/**
* whether or not the dialog was canceled.
*/
canceled: boolean;
/**
* If the dialog is canceled, this will be `undefined`.
*/
filePath?: string;
/**
* Base64 encoded string which contains the security scoped bookmark data for the
* saved file. `securityScopedBookmarks` must be enabled for this to be present.
* (For return values, see table here.)
*
* @platform darwin,mas
*/
bookmark?: string;
}
export interface OpenDialogOptions {
title?: string;
defaultPath?: string;
@ -191,25 +210,6 @@ export interface OpenDialogReturnValue {
bookmarks?: string[];
}
export interface SaveDialogReturnValue {
/**
* whether or not the dialog was canceled.
*/
canceled: boolean;
/**
* If the dialog is canceled, this will be `undefined`.
*/
filePath?: string;
/**
* Base64 encoded string which contains the security scoped bookmark data for the
* saved file. `securityScopedBookmarks` must be enabled for this to be present.
* (For return values, see table here.)
*
* @platform darwin,mas
*/
bookmark?: string;
}
export interface FileFilter {
// Docs: https://electronjs.org/docs/api/structures/file-filter
@ -218,6 +218,20 @@ export interface FileFilter {
name: string;
}
export interface OpenDevToolsOptions {
/**
* Opens the devtools with specified dock state, can be `right`, `bottom`,
* `undocked`, `detach`. Defaults to last used dock state. In `undocked` mode it's
* possible to dock back. In `detach` mode it's not.
*/
mode: ('right' | 'bottom' | 'undocked' | 'detach');
/**
* Whether to bring the opened devtools window to the foreground. The default is
* `true`.
*/
activate?: boolean;
}
export interface InputEvent {
// Docs: https://electronjs.org/docs/api/structures/input-event

View file

@ -7,7 +7,7 @@
// #######################################################################
// ### ###
// ### electron.d.ts types we expose from electron-sandbox ###
// ### (copied from Electron 11.x) ###
// ### (copied from Electron 16.x) ###
// ### ###
// #######################################################################
@ -161,62 +161,6 @@ export interface ProcessMemoryInfo {
shared: number;
}
export interface CrashReporterStartOptions {
/**
* URL that crash reports will be sent to as POST.
*/
submitURL: string;
/**
* Defaults to `app.name`.
*/
productName?: string;
/**
* Deprecated alias for `{ globalExtra: { _companyName: ... } }`.
*
* @deprecated
*/
companyName?: string;
/**
* Whether crash reports should be sent to the server. If false, crash reports will
* be collected and stored in the crashes directory, but not uploaded. Default is
* `true`.
*/
uploadToServer?: boolean;
/**
* If true, crashes generated in the main process will not be forwarded to the
* system crash handler. Default is `false`.
*/
ignoreSystemCrashHandler?: boolean;
/**
* If true, limit the number of crashes uploaded to 1/hour. Default is `false`.
*
* @platform darwin,win32
*/
rateLimit?: boolean;
/**
* If true, crash reports will be compressed and uploaded with `Content-Encoding:
* gzip`. Default is `true`.
*/
compress?: boolean;
/**
* Extra string key/value annotations that will be sent along with crash reports
* that are generated in the main process. Only string values are supported.
* Crashes generated in child processes will not contain these extra parameters to
* crash reports generated from child processes, call `addExtraParameter` from the
* child process.
*/
extra?: Record<string, string>;
/**
* Extra string key/value annotations that will be sent along with any crash
* reports generated in any process. These annotations cannot be changed once the
* crash reporter has been started. If a key is present in both the global extra
* parameters and the process-specific extra parameters, then the global one will
* take precedence. By default, `productName` and the app version are included, as
* well as the Electron version.
*/
globalExtra?: Record<string, string>;
}
/**
* Additional information around a `app.on('login')` event.
*/

View file

@ -280,7 +280,7 @@ flakySuite('PFS', function () {
const linkTarget = await Promises.readlink(targetLinkMD5JSFolderLinked);
assert.strictEqual(linkTarget, targetLinkMD5JSFolder);
await Promises.rmdir(targetLinkTestFolder, { recursive: true });
await Promises.rm(targetLinkTestFolder);
}
// Copy with `preserveSymlinks: false` and verify result

View file

@ -195,7 +195,7 @@ class SharedProcessMain extends Disposable {
services.set(ILogService, logService);
// Worker
this.sharedProcessWorkerService = new SharedProcessWorkerService(logService, productService, environmentService);
this.sharedProcessWorkerService = new SharedProcessWorkerService(logService);
services.set(ISharedProcessWorkerService, this.sharedProcessWorkerService);
// Files

View file

@ -157,7 +157,7 @@ export class CodeApplication extends Disposable {
//#region Code Cache
type SessionWithCodeCachePathSupport = typeof Session & {
type SessionWithCodeCachePathSupport = Session & {
/**
* Sets code cache directory. By default, the directory will be `Code Cache` under
* the respective user data folder.

View file

@ -27,12 +27,12 @@ suite('Native Modules (all platforms)', () => {
assert.ok(typeof watchDog.start === 'function', testErrorMessage('native-watchdog'));
});
test('node-pty', async () => {
(process.type === 'renderer' ? test.skip /* TODO@electron module is not context aware yet and thus cannot load in Electron renderer used by tests */ : test)('node-pty', async () => {
const nodePty = await import('node-pty');
assert.ok(typeof nodePty.spawn === 'function', testErrorMessage('node-pty'));
});
test('spdlog', async () => {
(process.type === 'renderer' ? test.skip /* TODO@electron module is not context aware yet and thus cannot load in Electron renderer used by tests */ : test)('spdlog', async () => {
const spdlog = await import('spdlog');
assert.ok(typeof spdlog.createRotatingLogger === 'function', testErrorMessage('spdlog'));
});
@ -72,7 +72,7 @@ suite('Native Modules (all platforms)', () => {
(!isWindows ? suite.skip : suite)('Native Modules (Windows)', () => {
test('windows-mutex', async () => {
(process.type === 'renderer' ? test.skip /* TODO@electron module is not context aware yet and thus cannot load in Electron renderer used by tests */ : test)('windows-mutex', async () => {
const mutex = await import('windows-mutex');
assert.ok(mutex && typeof mutex.isActive === 'function', testErrorMessage('windows-mutex'));
assert.ok(typeof mutex.isActive === 'function', testErrorMessage('windows-mutex'));

View file

@ -55,7 +55,7 @@ class ExtensionHostProcess extends Disposable {
mixin({ cwd: cwd() }, opts),
);
const forkTime = sw.elapsed();
const pid = this._process.pid;
const pid = this._process.pid!;
this._host.logInfo(`Starting extension host with pid ${pid} (fork() took ${forkTime} ms).`);
@ -100,7 +100,7 @@ class ExtensionHostProcess extends Disposable {
if (typeof (<ProcessExt>process)._debugProcess === 'function') {
// use (undocumented) _debugProcess feature of node
(<ProcessExt>process)._debugProcess!(this._process.pid);
(<ProcessExt>process)._debugProcess!(this._process.pid!);
return true;
} else if (!platform.isWindows) {
// use KILL USR1 on non-windows platforms (fallback)

View file

@ -135,7 +135,8 @@ export class HTMLFileSystemProvider implements IFileSystemProviderWithFileReadWr
// Entire file
else {
const reader: ReadableStreamDefaultReader<Uint8Array> = file.stream().getReader();
// TODO@electron: duplicate type definitions originate from `@types/node/stream/consumers.d.ts`
const reader: ReadableStreamDefaultReader<Uint8Array> = (file.stream() as unknown as ReadableStream<Uint8Array>).getReader();
let res = await reader.read();
while (!res.done) {

Some files were not shown because too many files have changed in this diff Show more