mirror of
https://github.com/voideditor/void
synced 2026-05-22 17:08:25 +00:00
Merge b51d7373ba into de7aa66975
This commit is contained in:
commit
deab51b194
6145 changed files with 593352 additions and 216151 deletions
21
.config/1espt/PipelineAutobaseliningConfig.yml
Normal file
21
.config/1espt/PipelineAutobaseliningConfig.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.
|
||||
|
||||
pipelines:
|
||||
111:
|
||||
retail:
|
||||
source:
|
||||
credscan:
|
||||
lastModifiedDate: 2024-09-10
|
||||
eslint:
|
||||
lastModifiedDate: 2024-09-10
|
||||
psscriptanalyzer:
|
||||
lastModifiedDate: 2024-09-10
|
||||
armory:
|
||||
lastModifiedDate: 2024-09-10
|
||||
binary:
|
||||
credscan:
|
||||
lastModifiedDate: 2025-02-04
|
||||
binskim:
|
||||
lastModifiedDate: 2025-02-04
|
||||
spotbugs:
|
||||
lastModifiedDate: 2025-02-04
|
||||
255
.config/guardian/.gdnbaselines
Normal file
255
.config/guardian/.gdnbaselines
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
{
|
||||
"properties": {
|
||||
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/baselines"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"baselines": {
|
||||
"default": {
|
||||
"name": "default",
|
||||
"createdDate": "2025-01-28 06:29:05Z",
|
||||
"lastUpdatedDate": "2025-01-28 06:29:05Z"
|
||||
}
|
||||
},
|
||||
"results": {
|
||||
"ea3b2bf4f5b3d0bd8a6ad35cc61e49f2a1596660fd66d17d740e4806e7ed7dcc": {
|
||||
"signature": "ea3b2bf4f5b3d0bd8a6ad35cc61e49f2a1596660fd66d17d740e4806e7ed7dcc",
|
||||
"alternativeSignatures": [
|
||||
"ff528c0b5a010ae7b5e9178b004a8b816a429a28ba98ce8336466b490a09dcef"
|
||||
],
|
||||
"target": ".build/win32-arm64/system-setup/VSCodeSetup-arm64-1.97.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2009",
|
||||
"createdDate": "2025-01-30 19:19:49Z",
|
||||
"expirationDate": "2025-07-19 21:12:48Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-01-30 21:12:48Z"
|
||||
},
|
||||
"12babbc85192ed1c8d927693da788537c1eef199bbecbe226f940a2d0e97637c": {
|
||||
"signature": "12babbc85192ed1c8d927693da788537c1eef199bbecbe226f940a2d0e97637c",
|
||||
"alternativeSignatures": [
|
||||
"35b0519e201e56fb87fc6fb085e6fb1df5b89715142bb9086a5b2006e0fd4ced"
|
||||
],
|
||||
"target": ".build/win32-arm64/system-setup/VSCodeSetup-arm64-1.97.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2018",
|
||||
"createdDate": "2025-01-30 19:19:49Z",
|
||||
"expirationDate": "2025-07-19 21:12:48Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-01-30 21:12:48Z"
|
||||
},
|
||||
"49163bd1dc9d965d3baced1694dc8c43305b8bf96e884f478d8e4bd124454ba0": {
|
||||
"signature": "49163bd1dc9d965d3baced1694dc8c43305b8bf96e884f478d8e4bd124454ba0",
|
||||
"alternativeSignatures": [
|
||||
"aa80bcf44aa8ddd20fb9802e9032c1257048b973896a944ded70bb195f060b2a"
|
||||
],
|
||||
"target": ".build/win32-arm64/user-setup/VSCodeUserSetup-arm64-1.97.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2009",
|
||||
"createdDate": "2025-01-30 19:21:17Z",
|
||||
"expirationDate": "2025-07-19 21:12:48Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-01-30 21:12:48Z"
|
||||
},
|
||||
"c405af02e021c3a473d4e45ec4daa658db1527ea7430c6be968d182e7b50fbd1": {
|
||||
"signature": "c405af02e021c3a473d4e45ec4daa658db1527ea7430c6be968d182e7b50fbd1",
|
||||
"alternativeSignatures": [
|
||||
"619d2a1a77f55b4181493b8cfdf09be5261e539115752af2e4938f5ac04af132"
|
||||
],
|
||||
"target": ".build/win32-arm64/user-setup/VSCodeUserSetup-arm64-1.97.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2018",
|
||||
"createdDate": "2025-01-30 19:21:17Z",
|
||||
"expirationDate": "2025-07-19 21:12:48Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-01-30 21:12:48Z"
|
||||
},
|
||||
"71b8515b2eb51cfd5eace11cedb15189d51ce9e479095a5938334416088cbc03": {
|
||||
"signature": "71b8515b2eb51cfd5eace11cedb15189d51ce9e479095a5938334416088cbc03",
|
||||
"alternativeSignatures": [
|
||||
"b34279fc5fec828b8dcd9ca873804e85d7d9cd78554ec109d2dd493351a7a244"
|
||||
],
|
||||
"target": ".build/win32-x64/system-setup/VSCodeSetup-x64-1.97.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2009",
|
||||
"createdDate": "2025-01-30 19:51:51Z",
|
||||
"expirationDate": "2025-07-19 21:12:48Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-01-30 21:12:48Z"
|
||||
},
|
||||
"9238de77a5320039def14694d1b6f501cc2288f13c9c688d2e0501fc5a56ee61": {
|
||||
"signature": "9238de77a5320039def14694d1b6f501cc2288f13c9c688d2e0501fc5a56ee61",
|
||||
"alternativeSignatures": [
|
||||
"1d17616a549e9f36d814c4e802d651b1af453ce0a23d4478eef39be81adcc16b"
|
||||
],
|
||||
"target": ".build/win32-x64/system-setup/VSCodeSetup-x64-1.97.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2018",
|
||||
"createdDate": "2025-01-30 19:51:51Z",
|
||||
"expirationDate": "2025-07-19 21:12:48Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-01-30 21:12:48Z"
|
||||
},
|
||||
"bad8b698b48c1da9ece953903581c66bf98bc829ae1a6adcd3b5c2056a6fcd01": {
|
||||
"signature": "bad8b698b48c1da9ece953903581c66bf98bc829ae1a6adcd3b5c2056a6fcd01",
|
||||
"alternativeSignatures": [
|
||||
"057376d31b97e8ce3ecf6a180a553b932d7e5be6e2b07a08027d5dfabe35e82c"
|
||||
],
|
||||
"target": ".build/win32-x64/user-setup/VSCodeUserSetup-x64-1.97.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2009",
|
||||
"createdDate": "2025-01-30 19:53:13Z",
|
||||
"expirationDate": "2025-07-19 21:12:48Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-01-30 21:12:48Z"
|
||||
},
|
||||
"cc7c248b0fd4c105e9a393ae232bf0d314ec50e65357a5e7e7d68f6f10c77077": {
|
||||
"signature": "cc7c248b0fd4c105e9a393ae232bf0d314ec50e65357a5e7e7d68f6f10c77077",
|
||||
"alternativeSignatures": [
|
||||
"f3867098aff3368682df9926e85a35ec05cf905f27d0c157430021c3169f899d"
|
||||
],
|
||||
"target": ".build/win32-x64/user-setup/VSCodeUserSetup-x64-1.97.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2018",
|
||||
"createdDate": "2025-01-30 19:53:13Z",
|
||||
"expirationDate": "2025-07-19 21:12:48Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-01-30 21:12:48Z"
|
||||
},
|
||||
"8c53250a171412b84dedcbb22cdab9ec365d9b52d74b09c070097fff45372de0": {
|
||||
"signature": "8c53250a171412b84dedcbb22cdab9ec365d9b52d74b09c070097fff45372de0",
|
||||
"alternativeSignatures": [
|
||||
"314267784b0ea867006e00b809a93498fae3264e42d1a3a7745ab13180a5b6ef"
|
||||
],
|
||||
"target": ".build/win32-arm64/system-setup/VSCodeSetup-arm64-1.98.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2009",
|
||||
"createdDate": "2025-02-04 06:16:33Z",
|
||||
"expirationDate": "2025-07-24 07:25:17Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-02-04 07:25:17Z"
|
||||
},
|
||||
"a6a58d971da858f4af219672cef73ffd0aacc47f1e2c12b8b44a428e1330d3de": {
|
||||
"signature": "a6a58d971da858f4af219672cef73ffd0aacc47f1e2c12b8b44a428e1330d3de",
|
||||
"alternativeSignatures": [
|
||||
"4e40f2f1683f0bf2245f35d0ebbcf2f446274d84b1db09d8e76ddfdcad5d4479"
|
||||
],
|
||||
"target": ".build/win32-arm64/system-setup/VSCodeSetup-arm64-1.98.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2018",
|
||||
"createdDate": "2025-02-04 06:16:33Z",
|
||||
"expirationDate": "2025-07-24 07:25:17Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-02-04 07:25:17Z"
|
||||
},
|
||||
"90e0f060e01e4a55620f609ac3241b62e8f54a059e9f4d292e93a4305fd3c39e": {
|
||||
"signature": "90e0f060e01e4a55620f609ac3241b62e8f54a059e9f4d292e93a4305fd3c39e",
|
||||
"alternativeSignatures": [
|
||||
"377fe43ff8404d07f4a6ca763175004f360397ded6cf5d55b655646ada90e39c"
|
||||
],
|
||||
"target": ".build/win32-arm64/user-setup/VSCodeUserSetup-arm64-1.98.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2009",
|
||||
"createdDate": "2025-02-04 06:17:54Z",
|
||||
"expirationDate": "2025-07-24 07:25:17Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-02-04 07:25:17Z"
|
||||
},
|
||||
"f36c3dc19566098a923877d16d6ebfcbd971f8fcd8210afb8f5558fb5ba1f203": {
|
||||
"signature": "f36c3dc19566098a923877d16d6ebfcbd971f8fcd8210afb8f5558fb5ba1f203",
|
||||
"alternativeSignatures": [
|
||||
"1af1f475c1617701e3d7a8fd465916bcc60c3125b8807af5d47d49137d9d468c"
|
||||
],
|
||||
"target": ".build/win32-arm64/user-setup/VSCodeUserSetup-arm64-1.98.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2018",
|
||||
"createdDate": "2025-02-04 06:17:54Z",
|
||||
"expirationDate": "2025-07-24 07:25:17Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-02-04 07:25:17Z"
|
||||
},
|
||||
"71193d108c53bb802f5c491276365bcff0645fb380be57288f3fbd6896166d3a": {
|
||||
"signature": "71193d108c53bb802f5c491276365bcff0645fb380be57288f3fbd6896166d3a",
|
||||
"alternativeSignatures": [
|
||||
"420cae2e6e34b93d7b74fc1ffddfdf23b57650ae989d838bb2d67f28e4e1db0e"
|
||||
],
|
||||
"target": ".build/win32-x64/system-setup/VSCodeSetup-x64-1.98.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2009",
|
||||
"createdDate": "2025-02-04 07:11:19Z",
|
||||
"expirationDate": "2025-07-24 07:25:17Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-02-04 07:25:17Z"
|
||||
},
|
||||
"444c302f49bdedcafe772322a09727b2279e3265d99deb2e307defeae3ef200b": {
|
||||
"signature": "444c302f49bdedcafe772322a09727b2279e3265d99deb2e307defeae3ef200b",
|
||||
"alternativeSignatures": [
|
||||
"4ff6ccbdb0745d43d3b61f82fb2f4d8a64fe9787525df81a6d7b825e79282085"
|
||||
],
|
||||
"target": ".build/win32-x64/system-setup/VSCodeSetup-x64-1.98.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2018",
|
||||
"createdDate": "2025-02-04 07:11:19Z",
|
||||
"expirationDate": "2025-07-24 07:25:17Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-02-04 07:25:17Z"
|
||||
},
|
||||
"4670c7c096a69ca428429ffa1f5250aac9f2e07beac0ffe587ffb37bdb1da4d4": {
|
||||
"signature": "4670c7c096a69ca428429ffa1f5250aac9f2e07beac0ffe587ffb37bdb1da4d4",
|
||||
"alternativeSignatures": [
|
||||
"7cead96cb508ab6e37e27bcc0f8b7ed8d0761b77f4793958c46c5ff3892ab1b6"
|
||||
],
|
||||
"target": ".build/win32-x64/user-setup/VSCodeUserSetup-x64-1.98.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2009",
|
||||
"createdDate": "2025-02-04 07:13:22Z",
|
||||
"expirationDate": "2025-07-24 07:25:17Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-02-04 07:25:17Z"
|
||||
},
|
||||
"a359b4a5ed2378a73f3bba93e3fb1c595db7423c3082635d12d101bbeb0a51b8": {
|
||||
"signature": "a359b4a5ed2378a73f3bba93e3fb1c595db7423c3082635d12d101bbeb0a51b8",
|
||||
"alternativeSignatures": [
|
||||
"125b52a21ef619a95e695085deb9492280bcf2c1decdd5e87e6416af5982d02d"
|
||||
],
|
||||
"target": ".build/win32-x64/user-setup/VSCodeUserSetup-x64-1.98.0-insider.exe",
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"tool": "binskim",
|
||||
"ruleId": "BA2018",
|
||||
"createdDate": "2025-02-04 07:13:22Z",
|
||||
"expirationDate": "2025-07-24 07:25:17Z",
|
||||
"justification": "This error is baselined with an expiration date of 180 days from 2025-02-04 07:25:17Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
46
.config/guardian/.gdnsuppress
Normal file
46
.config/guardian/.gdnsuppress
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"hydrated": false,
|
||||
"properties": {
|
||||
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/suppressions"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"suppressionSets": {
|
||||
"default": {
|
||||
"name": "default",
|
||||
"createdDate": "2025-03-17 11:52:32Z",
|
||||
"lastUpdatedDate": "2025-03-17 11:52:32Z"
|
||||
}
|
||||
},
|
||||
"results": {
|
||||
"216e2ac9cb596796224b47799f656570a01fa0d9b5f935608b47d15ab613c8e8": {
|
||||
"signature": "216e2ac9cb596796224b47799f656570a01fa0d9b5f935608b47d15ab613c8e8",
|
||||
"alternativeSignatures": [
|
||||
"07746898f43afab7cc50931b33154c2d9e1a35f82a649dbe8aecf785b3d5a813"
|
||||
],
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"createdDate": "2025-03-17 11:52:32Z"
|
||||
},
|
||||
"77797a3e44634bb2994bd13ccc95ff4575bba474585dbd2cf3068a1c16bc0624": {
|
||||
"signature": "77797a3e44634bb2994bd13ccc95ff4575bba474585dbd2cf3068a1c16bc0624",
|
||||
"alternativeSignatures": [
|
||||
"4a6cb67bd4b401e9669c13a2162660aaefc0a94a4122e5b50c198414db545672"
|
||||
],
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"createdDate": "2025-03-17 11:52:32Z"
|
||||
},
|
||||
"30418bcc5269eaeb2832a2404465784431d4e72a2af332320c2b1db4768902ad": {
|
||||
"signature": "30418bcc5269eaeb2832a2404465784431d4e72a2af332320c2b1db4768902ad",
|
||||
"alternativeSignatures": [
|
||||
"b7b9eb974d7d3a4ae14df8695ca5a62592c8c9d20b7eda70a6535d50cbda3e7f"
|
||||
],
|
||||
"memberOf": [
|
||||
"default"
|
||||
],
|
||||
"createdDate": "2025-03-17 11:52:32Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -18,17 +18,6 @@ properties:
|
|||
id: OpenJS.NodeJS.LTS
|
||||
version: "20.14.0"
|
||||
source: winget
|
||||
- resource: NpmDsc/NpmPackage
|
||||
id: yarn
|
||||
dependsOn:
|
||||
- npm
|
||||
directives:
|
||||
description: Install Yarn
|
||||
allowPrerelease: true
|
||||
settings:
|
||||
Name: 'yarn'
|
||||
Global: true
|
||||
PackageDirectory: '${WinGetConfigRoot}\..\'
|
||||
- resource: Microsoft.WinGet.DSC/WinGetPackage
|
||||
directives:
|
||||
description: Install Python 3.10
|
||||
|
|
@ -56,7 +45,7 @@ properties:
|
|||
includeRecommended: true
|
||||
components:
|
||||
- Microsoft.VisualStudio.Workload.VCTools
|
||||
- resource: YarnDsc/YarnInstall
|
||||
- resource: NpmDsc/NpmInstall
|
||||
dependsOn:
|
||||
- npm
|
||||
directives:
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"alias": false,
|
||||
"resolveExtensions": [
|
||||
".js",
|
||||
".jsx",
|
||||
".ts",
|
||||
".tsx",
|
||||
".vue",
|
||||
".scss",
|
||||
".less"
|
||||
],
|
||||
"entryFilePath": "/src/vs/code/electron-main/main.ts"
|
||||
}
|
||||
|
|
@ -7,8 +7,8 @@ RUN git config --system codespaces-theme.hide-status 1
|
|||
|
||||
USER node
|
||||
RUN npm install -g node-gyp
|
||||
RUN YARN_CACHE="$(yarn cache dir)" && rm -rf "$YARN_CACHE" && ln -s /vscode-dev/yarn-cache "$YARN_CACHE"
|
||||
RUN NPM_CACHE="$(npm config get cache)" && rm -rf "$NPM_CACHE" && ln -s /vscode-dev/npm-cache "$NPM_CACHE"
|
||||
RUN echo 'export DISPLAY="${DISPLAY:-:1}"' | tee -a ~/.bashrc >> ~/.zshrc
|
||||
|
||||
USER root
|
||||
CMD chown node:node /vscode-dev && sudo -u node mkdir -p /vscode-dev/yarn-cache && sleep inf
|
||||
CMD chown node:node /vscode-dev && sudo -u node mkdir -p /vscode-dev/npm-cache && sleep inf
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Code - OSS Development Container
|
||||
|
||||
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode)
|
||||
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode)
|
||||
|
||||
This repository includes configuration for a development container for working with Code - OSS in a local container or using [GitHub Codespaces](https://github.com/features/codespaces).
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ If you already have VS Code and Docker installed, you can click the badge above
|
|||
|
||||
4. Press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>F1</kbd> and select **Dev Containers: Clone Repository in Container Volume...**.
|
||||
|
||||
> **Tip:** While you can use your local source tree instead, operations like `yarn install` can be slow on macOS or when using the Hyper-V engine on Windows. We recommend using the WSL filesystem on Windows or the "clone repository in container" approach on Windows and macOS instead since it uses "named volume" rather than the local filesystem.
|
||||
> **Tip:** While you can use your local source tree instead, operations like `npm i` can be slow on macOS or when using the Hyper-V engine on Windows. We recommend using the WSL filesystem on Windows or the "clone repository in container" approach on Windows and macOS instead since it uses "named volume" rather than the local filesystem.
|
||||
|
||||
5. Type `https://github.com/microsoft/vscode` (or a branch or PR URL) in the input box and press <kbd>Enter</kbd>.
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ Next: **[Try it out!](#try-it)**
|
|||
|
||||
You may see improved VNC responsiveness when accessing a codespace from VS Code client since you can use a [VNC Viewer][def]. Here's how to do it.
|
||||
|
||||
1. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the the [GitHub Codespaces extension](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces).
|
||||
1. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [GitHub Codespaces extension](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces).
|
||||
|
||||
> **Note:** The GitHub Codespaces extension requires the Visual Studio Code distribution of Code - OSS.
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ To start working with Code - OSS, follow these steps:
|
|||
1. In your local VS Code client, open a terminal (<kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>\`</kbd>) and type the following commands:
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
npm i
|
||||
bash scripts/code.sh
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "LineMage",
|
||||
"name": "Code - OSS",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
|
|
|
|||
0
.devcontainer/install-vscode.sh
Normal file → Executable file
0
.devcontainer/install-vscode.sh
Normal file → Executable file
4
.devcontainer/post-create.sh
Normal file → Executable file
4
.devcontainer/post-create.sh
Normal file → Executable file
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
yarn install --network-timeout 180000
|
||||
yarn electron
|
||||
npm i
|
||||
npm run electron
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@
|
|||
**/extensions/markdown-math/notebook-out/**
|
||||
**/extensions/notebook-renderers/renderer-out/index.js
|
||||
**/extensions/simple-browser/media/index.js
|
||||
**/extensions/terminal-suggest/src/completions/upstream/**
|
||||
**/extensions/terminal-suggest/src/shell/zshBuiltinsCache.ts
|
||||
**/extensions/terminal-suggest/src/shell/fishBuiltinsCache.ts
|
||||
**/extensions/terminal-suggest/third_party/**
|
||||
**/extensions/typescript-language-features/test-workspace/**
|
||||
**/extensions/typescript-language-features/extension.webpack.config.js
|
||||
**/extensions/typescript-language-features/extension-browser.webpack.config.js
|
||||
|
|
@ -30,15 +34,8 @@
|
|||
**/src/vs/*/**/*.d.ts
|
||||
**/src/vs/base/test/common/filters.perf.data.js
|
||||
**/src/vs/loader.js
|
||||
**/src2/**/dompurify.js
|
||||
**/src2/**/marked.js
|
||||
**/src2/**/semver.js
|
||||
**/src2/typings/**/*.d.ts
|
||||
**/src2/vs/*/**/*.d.ts
|
||||
**/src2/vs/base/test/common/filters.perf.data.js
|
||||
**/src2/vs/loader.js
|
||||
**/test/unit/assert.js
|
||||
**/test/unit/assert-esm.js
|
||||
**/test/automation/out/**
|
||||
**/typings/**
|
||||
**/.build/**
|
||||
!.vscode
|
||||
|
|
@ -12,7 +12,8 @@ export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
|
|||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
amdX: 'Use `import type` for import declarations, use `amdX#importAMDNodeModule` for import expressions'
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -50,7 +51,7 @@ export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
|
|||
node,
|
||||
messageId: 'amdX'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
['ImportExpression Literal']: checkImport,
|
||||
|
|
@ -8,7 +8,8 @@ import * as eslint from 'eslint';
|
|||
export = new class DeclareServiceBrand implements eslint.Rule.RuleModule {
|
||||
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
fixable: 'code'
|
||||
fixable: 'code',
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -18,7 +19,7 @@ export = new class DeclareServiceBrand implements eslint.Rule.RuleModule {
|
|||
node,
|
||||
message: `The '_serviceBrand'-property should not have a value`,
|
||||
fix: (fixer) => {
|
||||
return fixer.replaceText(node, 'declare _serviceBrand: undefined;')
|
||||
return fixer.replaceText(node, 'declare _serviceBrand: undefined;');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -12,7 +12,9 @@ export = new class EnsureNoDisposablesAreLeakedInTestSuite implements eslint.Rul
|
|||
type: 'problem',
|
||||
messages: {
|
||||
ensure: 'Suites should include a call to `ensureNoDisposablesAreLeakedInTestSuite()` to ensure no disposables are leaked in tests.'
|
||||
}
|
||||
},
|
||||
fixable: 'code',
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -25,11 +27,15 @@ export = new class EnsureNoDisposablesAreLeakedInTestSuite implements eslint.Rul
|
|||
|
||||
return {
|
||||
[`Program > ExpressionStatement > CallExpression[callee.name='suite']`]: (node: Node) => {
|
||||
const src = context.getSourceCode().getText(node)
|
||||
const src = context.getSourceCode().getText(node);
|
||||
if (!src.includes('ensureNoDisposablesAreLeakedInTestSuite(')) {
|
||||
context.report({
|
||||
node,
|
||||
messageId: 'ensure',
|
||||
fix: (fixer) => {
|
||||
const updatedSrc = src.replace(/(suite\(.*\n)/, '$1\n\tensureNoDisposablesAreLeakedInTestSuite();\n');
|
||||
return fixer.replaceText(node, updatedSrc);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
import * as path from 'path';
|
||||
import minimatch from 'minimatch';
|
||||
import { createImportRuleListener } from './utils';
|
||||
|
|
@ -12,19 +12,19 @@ import { createImportRuleListener } from './utils';
|
|||
const REPO_ROOT = path.normalize(path.join(__dirname, '../'));
|
||||
|
||||
interface ConditionalPattern {
|
||||
when?: 'hasBrowser' | 'hasNode' | 'test';
|
||||
when?: 'hasBrowser' | 'hasNode' | 'hasElectron' | 'test';
|
||||
pattern: string;
|
||||
}
|
||||
|
||||
interface RawImportPatternsConfig {
|
||||
target: string;
|
||||
layer?: 'common' | 'worker' | 'browser' | 'electron-sandbox' | 'node' | 'electron-main';
|
||||
layer?: 'common' | 'worker' | 'browser' | 'electron-sandbox' | 'node' | 'electron-utility' | 'electron-main';
|
||||
test?: boolean;
|
||||
restrictions: string | (string | ConditionalPattern)[];
|
||||
}
|
||||
|
||||
interface LayerAllowRule {
|
||||
when: 'hasBrowser' | 'hasNode' | 'test';
|
||||
when: 'hasBrowser' | 'hasNode' | 'hasElectron' | 'test';
|
||||
allow: string[];
|
||||
}
|
||||
|
||||
|
|
@ -44,11 +44,14 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
badImport: 'Imports violates \'{{restrictions}}\' restrictions. See https://github.com/microsoft/vscode/wiki/Source-Code-Organization',
|
||||
badFilename: 'Missing definition in `code-import-patterns` for this file. Define rules at https://github.com/microsoft/vscode/blob/main/.eslintrc.json'
|
||||
badFilename: 'Missing definition in `code-import-patterns` for this file. Define rules at https://github.com/microsoft/vscode/blob/main/eslint.config.js',
|
||||
badAbsolute: 'Imports have to be relative to support ESM',
|
||||
badExtension: 'Imports have to end with `.js` or `.css` to support ESM',
|
||||
},
|
||||
docs: {
|
||||
url: 'https://github.com/microsoft/vscode/wiki/Source-Code-Organization'
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -77,13 +80,14 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
return this._optionsCache.get(options)!;
|
||||
}
|
||||
|
||||
type Layer = 'common' | 'worker' | 'browser' | 'electron-sandbox' | 'node' | 'electron-main';
|
||||
type Layer = 'common' | 'worker' | 'browser' | 'electron-sandbox' | 'node' | 'electron-utility' | 'electron-main';
|
||||
|
||||
interface ILayerRule {
|
||||
layer: Layer;
|
||||
deps: string;
|
||||
isBrowser?: boolean;
|
||||
isNode?: boolean;
|
||||
isElectron?: boolean;
|
||||
}
|
||||
|
||||
function orSegment(variants: Layer[]): string {
|
||||
|
|
@ -96,11 +100,13 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
{ layer: 'browser', deps: orSegment(['common', 'browser']), isBrowser: true },
|
||||
{ layer: 'electron-sandbox', deps: orSegment(['common', 'browser', 'electron-sandbox']), isBrowser: true },
|
||||
{ layer: 'node', deps: orSegment(['common', 'node']), isNode: true },
|
||||
{ layer: 'electron-main', deps: orSegment(['common', 'node', 'electron-main']), isNode: true },
|
||||
{ layer: 'electron-utility', deps: orSegment(['common', 'node', 'electron-utility']), isNode: true, isElectron: true },
|
||||
{ layer: 'electron-main', deps: orSegment(['common', 'node', 'electron-utility', 'electron-main']), isNode: true, isElectron: true },
|
||||
];
|
||||
|
||||
let browserAllow: string[] = [];
|
||||
let nodeAllow: string[] = [];
|
||||
let electronAllow: string[] = [];
|
||||
let testAllow: string[] = [];
|
||||
for (const option of options) {
|
||||
if (isLayerAllowRule(option)) {
|
||||
|
|
@ -108,6 +114,8 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
browserAllow = option.allow.slice(0);
|
||||
} else if (option.when === 'hasNode') {
|
||||
nodeAllow = option.allow.slice(0);
|
||||
} else if (option.when === 'hasElectron') {
|
||||
electronAllow = option.allow.slice(0);
|
||||
} else if (option.when === 'test') {
|
||||
testAllow = option.allow.slice(0);
|
||||
}
|
||||
|
|
@ -135,9 +143,13 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
restrictions.push(...nodeAllow);
|
||||
}
|
||||
|
||||
if (layerRule.isElectron) {
|
||||
restrictions.push(...electronAllow);
|
||||
}
|
||||
|
||||
for (const rawRestriction of rawRestrictions) {
|
||||
let importPattern: string;
|
||||
let when: 'hasBrowser' | 'hasNode' | 'test' | undefined = undefined;
|
||||
let when: 'hasBrowser' | 'hasNode' | 'hasElectron' | 'test' | undefined = undefined;
|
||||
if (typeof rawRestriction === 'string') {
|
||||
importPattern = rawRestriction;
|
||||
} else {
|
||||
|
|
@ -147,6 +159,7 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
if (typeof when === 'undefined'
|
||||
|| (when === 'hasBrowser' && layerRule.isBrowser)
|
||||
|| (when === 'hasNode' && layerRule.isNode)
|
||||
|| (when === 'hasElectron' && layerRule.isElectron)
|
||||
) {
|
||||
restrictions.push(importPattern.replace(/\/\~$/, `/${layerRule.deps}/**`));
|
||||
testRestrictions.push(importPattern.replace(/\/\~$/, `/test/${layerRule.deps}/**`));
|
||||
|
|
@ -181,8 +194,8 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
|
||||
if (targetIsVS) {
|
||||
// Always add "vs/nls" and "vs/amdX"
|
||||
restrictions.push('vs/nls');
|
||||
restrictions.push('vs/amdX'); // TODO@jrieken remove after ESM is real
|
||||
restrictions.push('vs/nls.js');
|
||||
restrictions.push('vs/amdX.js'); // TODO@jrieken remove after ESM is real
|
||||
}
|
||||
|
||||
if (targetIsVS && option.layer) {
|
||||
|
|
@ -212,13 +225,32 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
}
|
||||
|
||||
private _checkImport(context: eslint.Rule.RuleContext, config: ImportPatternsConfig, node: TSESTree.Node, importPath: string) {
|
||||
const targetIsVS = /^src\/vs\//.test(getRelativeFilename(context));
|
||||
if (targetIsVS) {
|
||||
|
||||
// ESM: check for import ending with ".js" or ".css"
|
||||
if (importPath[0] === '.' && !importPath.endsWith('.js') && !importPath.endsWith('.css')) {
|
||||
context.report({
|
||||
loc: node.loc,
|
||||
messageId: 'badExtension',
|
||||
});
|
||||
}
|
||||
|
||||
// check for import being relative
|
||||
if (importPath.startsWith('vs/')) {
|
||||
context.report({
|
||||
loc: node.loc,
|
||||
messageId: 'badAbsolute',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// resolve relative paths
|
||||
if (importPath[0] === '.') {
|
||||
const relativeFilename = getRelativeFilename(context);
|
||||
importPath = path.posix.join(path.posix.dirname(relativeFilename), importPath);
|
||||
if (/^src\/vs\//.test(importPath)) {
|
||||
// resolve using AMD base url
|
||||
// resolve using base url
|
||||
importPath = importPath.substring('src/'.length);
|
||||
}
|
||||
}
|
||||
|
|
@ -20,7 +20,18 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
},
|
||||
docs: {
|
||||
url: 'https://github.com/microsoft/vscode/wiki/Source-Code-Organization'
|
||||
}
|
||||
},
|
||||
schema: [
|
||||
{
|
||||
type: 'object',
|
||||
additionalProperties: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
70
.eslint-plugin-local/code-limited-top-functions.ts
Normal file
70
.eslint-plugin-local/code-limited-top-functions.ts
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { dirname, relative } from 'path';
|
||||
import minimatch from 'minimatch';
|
||||
|
||||
export = new class implements eslint.Rule.RuleModule {
|
||||
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
layerbreaker: 'You are only allowed to define limited top level functions.'
|
||||
},
|
||||
schema: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'object',
|
||||
additionalProperties: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
let fileRelativePath = relative(dirname(__dirname), context.getFilename());
|
||||
if (!fileRelativePath.endsWith('/')) {
|
||||
fileRelativePath += '/';
|
||||
}
|
||||
const ruleArgs = <Record<string, string[]>>context.options[0];
|
||||
|
||||
const matchingKey = Object.keys(ruleArgs).find(key => fileRelativePath.startsWith(key) || minimatch(fileRelativePath, key));
|
||||
if (!matchingKey) {
|
||||
// nothing
|
||||
return {};
|
||||
}
|
||||
|
||||
const restrictedFunctions = ruleArgs[matchingKey];
|
||||
|
||||
return {
|
||||
FunctionDeclaration: (node: any) => {
|
||||
const isTopLevel = node.parent.type === 'Program';
|
||||
const functionName = node.id.name;
|
||||
if (isTopLevel && !restrictedFunctions.includes(node.id.name)) {
|
||||
context.report({
|
||||
node,
|
||||
message: `Top-level function '${functionName}' is restricted in this file. Allowed functions are: ${restrictedFunctions.join(', ')}.`
|
||||
});
|
||||
}
|
||||
},
|
||||
ExportNamedDeclaration(node: any) {
|
||||
if (node.declaration && node.declaration.type === 'FunctionDeclaration') {
|
||||
const functionName = node.declaration.id.name;
|
||||
const isTopLevel = node.parent.type === 'Program';
|
||||
if (isTopLevel && !restrictedFunctions.includes(node.declaration.id.name)) {
|
||||
context.report({
|
||||
node,
|
||||
message: `Top-level function '${functionName}' is restricted in this file. Allowed functions are: ${restrictedFunctions.join(', ')}.`
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
|
||||
const VALID_USES = new Set<TSESTree.AST_NODE_TYPES | undefined>([
|
||||
TSESTree.AST_NODE_TYPES.AwaitExpression,
|
||||
|
|
@ -12,21 +12,24 @@ const VALID_USES = new Set<TSESTree.AST_NODE_TYPES | undefined>([
|
|||
]);
|
||||
|
||||
export = new class MustUseResults implements eslint.Rule.RuleModule {
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
schema: false
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
||||
const config = <{ message: string, functions: string[] }[]>context.options[0];
|
||||
const config = <{ message: string; functions: string[] }[]>context.options[0];
|
||||
const listener: eslint.Rule.RuleListener = {};
|
||||
|
||||
for (const { message, functions } of config) {
|
||||
for (const fn of functions) {
|
||||
const query = `CallExpression[callee.property.name='${fn}'], CallExpression[callee.name='${fn}']`
|
||||
const query = `CallExpression[callee.property.name='${fn}'], CallExpression[callee.name='${fn}']`;
|
||||
listener[query] = (node: any) => {
|
||||
const cast: TSESTree.CallExpression = node;
|
||||
if (!VALID_USES.has(cast.parent?.type)) {
|
||||
context.report({ node, message });
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ export = new class NoAsyncSuite implements eslint.Rule.RuleModule {
|
|||
return;
|
||||
}
|
||||
|
||||
const body = context.getSourceCode().getText(node)
|
||||
const body = context.getSourceCode().getText(node);
|
||||
|
||||
if (body.includes('super.dispose')) {
|
||||
return;
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
|
||||
export = new class NoDangerousTypeAssertions implements eslint.Rule.RuleModule {
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ export = new class NoDangerousTypeAssertions implements eslint.Rule.RuleModule {
|
|||
|
||||
context.report({
|
||||
node,
|
||||
message: "Don't use type assertions for creating objects as this can hide type errors."
|
||||
message: `Don't use type assertions for creating objects as this can hide type errors.`
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
@ -25,6 +25,6 @@ export = new class NoGlobalDocumentListener implements eslint.Rule.RuleModule {
|
|||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
@ -10,7 +10,8 @@ export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
|
|||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
slow: 'Native private fields are much slower and should only be used when needed. Ignore this warning if you know what you are doing, use compile-time private otherwise. See https://github.com/microsoft/vscode/issues/185991#issuecomment-1614468158 for details',
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -12,7 +12,8 @@ export = new class NoNlsInStandaloneEditorRule implements eslint.Rule.RuleModule
|
|||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
noNls: 'Not allowed to import vs/nls in standalone editor modules. Use standaloneStrings.ts'
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -23,7 +24,7 @@ export = new class NoNlsInStandaloneEditorRule implements eslint.Rule.RuleModule
|
|||
|| /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone(\/|\\)/.test(fileName)
|
||||
|| /vs(\/|\\)editor(\/|\\)editor.api/.test(fileName)
|
||||
|| /vs(\/|\\)editor(\/|\\)editor.main/.test(fileName)
|
||||
|| /vs(\/|\\)editor(\/|\\)editor.worker/.test(fileName)
|
||||
|| /vs(\/|\\)editor(\/|\\)editor.worker.start/.test(fileName)
|
||||
) {
|
||||
return createImportRuleListener((node, path) => {
|
||||
// resolve relative paths
|
||||
|
|
@ -16,13 +16,13 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
layerbreaker: 'You are only allowed to import {{import}} from here using `import type ...`.'
|
||||
},
|
||||
schema: {
|
||||
type: "array",
|
||||
type: 'array',
|
||||
items: {
|
||||
type: "object",
|
||||
type: 'object',
|
||||
additionalProperties: {
|
||||
type: "array",
|
||||
type: 'array',
|
||||
items: {
|
||||
type: "string"
|
||||
type: 'string'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -15,7 +15,8 @@ export = new class NoNlsInStandaloneEditorRule implements eslint.Rule.RuleModule
|
|||
},
|
||||
docs: {
|
||||
url: 'https://github.com/microsoft/vscode/wiki/Source-Code-Organization'
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -37,7 +38,7 @@ export = new class NoNlsInStandaloneEditorRule implements eslint.Rule.RuleModule
|
|||
|| /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone(\/|\\)/.test(path)
|
||||
|| /vs(\/|\\)editor(\/|\\)editor.api/.test(path)
|
||||
|| /vs(\/|\\)editor(\/|\\)editor.main/.test(path)
|
||||
|| /vs(\/|\\)editor(\/|\\)editor.worker/.test(path)
|
||||
|| /vs(\/|\\)editor(\/|\\)editor.worker.start/.test(path)
|
||||
) {
|
||||
context.report({
|
||||
loc: node.loc,
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
|
||||
/**
|
||||
* WORKAROUND for https://github.com/evanw/esbuild/issues/3823
|
||||
|
|
@ -15,7 +15,7 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
|
||||
function checkProperty(inNode: any) {
|
||||
|
||||
const classDeclaration = context.getAncestors().find(node => node.type === 'ClassDeclaration');
|
||||
const classDeclaration = context.sourceCode.getAncestors(inNode).find(node => node.type === 'ClassDeclaration');
|
||||
const propertyDefinition = <TSESTree.PropertyDefinition>inNode;
|
||||
|
||||
if (!classDeclaration || !classDeclaration.id?.name) {
|
||||
|
|
@ -26,19 +26,19 @@ export = new class implements eslint.Rule.RuleModule {
|
|||
return;
|
||||
}
|
||||
|
||||
const classCtor = classDeclaration.body.body.find(node => node.type === 'MethodDefinition' && node.kind === 'constructor')
|
||||
const classCtor = classDeclaration.body.body.find(node => node.type === 'MethodDefinition' && node.kind === 'constructor');
|
||||
|
||||
if (!classCtor) {
|
||||
return;
|
||||
}
|
||||
|
||||
const name = classDeclaration.id.name;
|
||||
const valueText = context.getSourceCode().getText(<any>propertyDefinition.value)
|
||||
const valueText = context.sourceCode.getText(<any>propertyDefinition.value);
|
||||
|
||||
if (valueText.includes(name + '.')) {
|
||||
|
||||
if (classCtor.value?.type === 'FunctionExpression' && !classCtor.value.params.find((param: any) => param.type === 'TSParameterProperty' && param.decorators?.length > 0)) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
context.report({
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
import * as eslint from 'eslint';
|
||||
|
||||
function isCallExpression(node: TSESTree.Node): node is TSESTree.CallExpression {
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/utils';
|
||||
|
||||
function isStringLiteral(node: TSESTree.Node | null | undefined): node is TSESTree.StringLiteral {
|
||||
return !!node && node.type === AST_NODE_TYPES.Literal && typeof node.value === 'string';
|
||||
|
|
@ -24,7 +24,8 @@ export = new class NoUnexternalizedStrings implements eslint.Rule.RuleModule {
|
|||
badKey: 'The key \'{{key}}\' doesn\'t conform to a valid localize identifier.',
|
||||
duplicateKey: 'Duplicate key \'{{key}}\' with different message value.',
|
||||
badMessage: 'Message argument to \'{{message}}\' must be a string literal.'
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
import * as ESTree from 'estree';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
@ -58,7 +58,7 @@ module.exports = {
|
|||
allowTernary = config.allowTernary || false,
|
||||
allowTaggedTemplates = config.allowTaggedTemplates || false;
|
||||
|
||||
// eslint-disable-next-line jsdoc/require-description
|
||||
|
||||
/**
|
||||
* @param node any node
|
||||
* @returns whether the given node structurally represents a directive
|
||||
|
|
@ -68,7 +68,7 @@ module.exports = {
|
|||
node.expression.type === 'Literal' && typeof node.expression.value === 'string';
|
||||
}
|
||||
|
||||
// eslint-disable-next-line jsdoc/require-description
|
||||
|
||||
/**
|
||||
* @param predicate ([a] -> Boolean) the function used to make the determination
|
||||
* @param list the input list
|
||||
|
|
@ -83,7 +83,7 @@ module.exports = {
|
|||
return list.slice();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line jsdoc/require-description
|
||||
|
||||
/**
|
||||
* @param node a Program or BlockStatement node
|
||||
* @returns the leading sequence of directive nodes in the given node's body
|
||||
|
|
@ -92,7 +92,7 @@ module.exports = {
|
|||
return takeWhile(looksLikeDirective, node.body);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line jsdoc/require-description
|
||||
|
||||
/**
|
||||
* @param node any node
|
||||
* @param ancestors the given node's ancestors
|
||||
|
|
@ -141,7 +141,7 @@ module.exports = {
|
|||
|
||||
return {
|
||||
ExpressionStatement(node: TSESTree.ExpressionStatement) {
|
||||
if (!isValidExpression(node.expression) && !isDirective(node, <TSESTree.Node[]>context.getAncestors())) {
|
||||
if (!isValidExpression(node.expression) && !isDirective(node, <TSESTree.Node[]>context.sourceCode.getAncestors(node))) {
|
||||
context.report({ node: <ESTree.Node>node, message: `Expected an assignment or function call and instead saw an expression. ${node.expression}` });
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
|
||||
/**
|
||||
* Enforces that all parameter properties have an explicit access modifier (public, protected, private).
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
import { readFileSync } from 'fs';
|
||||
import { createImportRuleListener } from './utils';
|
||||
|
||||
|
|
@ -16,7 +16,8 @@ export = new class TranslationRemind implements eslint.Rule.RuleModule {
|
|||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
missing: 'Please add \'{{resource}}\' to ./build/lib/i18n.resources.json file to use translations here.'
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
16
.eslint-plugin-local/index.js
Normal file
16
.eslint-plugin-local/index.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
const glob = require('glob');
|
||||
const path = require('path');
|
||||
|
||||
require('ts-node').register({ experimentalResolver: true, transpileOnly: true });
|
||||
|
||||
// Re-export all .ts files as rules
|
||||
const rules = {};
|
||||
glob.sync(`${__dirname}/*.ts`).forEach((file) => {
|
||||
rules[path.basename(file, '.ts')] = require(file);
|
||||
});
|
||||
|
||||
exports.rules = rules;
|
||||
3
.eslint-plugin-local/package.json
Normal file
3
.eslint-plugin-local/package.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
|
||||
export function createImportRuleListener(validateImport: (node: TSESTree.Literal, value: string) => any): eslint.Rule.RuleListener {
|
||||
|
||||
|
|
@ -4,14 +4,15 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils';
|
||||
|
||||
export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
|
||||
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
noToken: 'Function lacks a cancellation token, preferable as last argument',
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -4,13 +4,14 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/utils';
|
||||
|
||||
export = new class ApiLiteralOrTypes implements eslint.Rule.RuleModule {
|
||||
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
docs: { url: 'https://github.com/microsoft/vscode/wiki/Extension-API-guidelines#creating-objects' },
|
||||
messages: { sync: '`createXYZ`-functions are constructor-replacements and therefore must return sync', }
|
||||
messages: { sync: '`createXYZ`-functions are constructor-replacements and therefore must return sync', },
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/utils';
|
||||
|
||||
export = new class ApiEventNaming implements eslint.Rule.RuleModule {
|
||||
|
||||
|
|
@ -19,7 +19,8 @@ export = new class ApiEventNaming implements eslint.Rule.RuleModule {
|
|||
verb: 'Unknown verb \'{{verb}}\' - is this really a verb? Iff so, then add this verb to the configuration',
|
||||
subject: 'Unknown subject \'{{subject}}\' - This subject has not been used before but it should refer to something in the API',
|
||||
unknown: 'UNKNOWN event declaration, lint-rule needs tweaking'
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
|
||||
export = new class ApiInterfaceNaming implements eslint.Rule.RuleModule {
|
||||
|
||||
|
|
@ -13,7 +13,8 @@ export = new class ApiInterfaceNaming implements eslint.Rule.RuleModule {
|
|||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
naming: 'Interfaces must not be prefixed with uppercase `I`',
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -4,13 +4,14 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
|
||||
export = new class ApiLiteralOrTypes implements eslint.Rule.RuleModule {
|
||||
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
docs: { url: 'https://github.com/microsoft/vscode/wiki/Extension-API-guidelines#enums' },
|
||||
messages: { useEnum: 'Use enums, not literal-or-types', }
|
||||
messages: { useEnum: 'Use enums, not literal-or-types', },
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -4,14 +4,15 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
|
||||
export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
|
||||
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
naming: 'A provider should only have functions like provideXYZ or resolveXYZ',
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
private static _providerFunctionNames = /^(provide|resolve|prepare).+/;
|
||||
|
|
@ -4,22 +4,22 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
|
||||
export = new class ApiTypeDiscrimination implements eslint.Rule.RuleModule {
|
||||
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
docs: { url: 'https://github.com/microsoft/vscode/wiki/Extension-API-guidelines' },
|
||||
messages: {
|
||||
noTypeDiscrimination: 'Do not use type descrimination properties'
|
||||
}
|
||||
noTypeDiscrimination: 'Do not use type discrimination properties'
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
return {
|
||||
['TSPropertySignature[optional=undefined] TSTypeAnnotation TSLiteralType Literal']: (node: any) => {
|
||||
|
||||
const raw = String((<TSESTree.Literal>node).raw)
|
||||
['TSPropertySignature[optional=false] TSTypeAnnotation TSLiteralType Literal']: (node: any) => {
|
||||
const raw = String((<TSESTree.Literal>node).raw);
|
||||
|
||||
if (/^('|").*\1$/.test(raw)) {
|
||||
|
||||
|
|
@ -29,6 +29,6 @@ export = new class ApiTypeDiscrimination implements eslint.Rule.RuleModule {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
32
.eslint-plugin-local/vscode-dts-use-export.ts
Normal file
32
.eslint-plugin-local/vscode-dts-use-export.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
import * as eslint from 'eslint';
|
||||
|
||||
export = new class VscodeDtsUseExport implements eslint.Rule.RuleModule {
|
||||
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
useExport: `Public api types must use 'export'`,
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
return {
|
||||
['TSModuleDeclaration :matches(TSInterfaceDeclaration, ClassDeclaration, VariableDeclaration, TSEnumDeclaration, TSTypeAliasDeclaration)']: (node: any) => {
|
||||
const parent = (<TSESTree.Node>node).parent;
|
||||
if (parent && parent.type !== TSESTree.AST_NODE_TYPES.ExportNamedDeclaration) {
|
||||
context.report({
|
||||
node,
|
||||
messageId: 'useExport'
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -10,7 +10,8 @@ export = new class ApiEventNaming implements eslint.Rule.RuleModule {
|
|||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
usage: 'Use the Thenable-type instead of the Promise type',
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -11,7 +11,8 @@ export = new class ApiVsCodeInComments implements eslint.Rule.RuleModule {
|
|||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
comment: `Don't use the term 'vs code' in comments`
|
||||
}
|
||||
},
|
||||
schema: false,
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
import { TSESTree } from '@typescript-eslint/experimental-utils';
|
||||
import * as ESTree from 'estree';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
const _positiveLookBehind = /\(\?<=.+/;
|
||||
const _negativeLookBehind = /\(\?<!.+/;
|
||||
|
||||
function _containsLookBehind(pattern: string | unknown): boolean {
|
||||
if (typeof pattern !== 'string') {
|
||||
return false;
|
||||
}
|
||||
return _positiveLookBehind.test(pattern) || _negativeLookBehind.test(pattern);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
create(context: eslint.Rule.RuleContext) {
|
||||
return {
|
||||
// /.../
|
||||
['Literal[regex]']: (node: any) => {
|
||||
type RegexLiteral = TSESTree.Literal & { regex: { pattern: string; flags: string } };
|
||||
const pattern = (<RegexLiteral>node).regex?.pattern;
|
||||
if (_containsLookBehind(pattern)) {
|
||||
context.report({
|
||||
node,
|
||||
message: 'Look behind assertions are not yet supported in all browsers'
|
||||
});
|
||||
}
|
||||
},
|
||||
// new Regex("...")
|
||||
['NewExpression[callee.name="RegExp"] Literal']: (node: ESTree.Literal) => {
|
||||
if (_containsLookBehind(node.value)) {
|
||||
context.report({
|
||||
node,
|
||||
message: 'Look behind assertions are not yet supported in all browsers'
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
const glob = require('glob');
|
||||
const path = require('path');
|
||||
|
||||
require('ts-node').register({ experimentalResolver: true, transpileOnly: true });
|
||||
|
||||
// Re-export all .ts files as rules
|
||||
const rules = {};
|
||||
glob.sync(`${__dirname}/*.ts`).forEach((file) => {
|
||||
rules[path.basename(file, '.ts')] = require(file);
|
||||
});
|
||||
|
||||
exports.rules = rules;
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as eslint from 'eslint';
|
||||
|
||||
export = new class ApiEventNaming implements eslint.Rule.RuleModule {
|
||||
|
||||
readonly meta: eslint.Rule.RuleMetaData = {
|
||||
messages: {
|
||||
comment: 'region comments should start with a camel case identifier, `:`, then either a GH issue link or owner, e.g #region myProposalName: https://github.com/microsoft/vscode/issues/<number>',
|
||||
}
|
||||
};
|
||||
|
||||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
|
||||
|
||||
const sourceCode = context.getSourceCode();
|
||||
|
||||
return {
|
||||
['Program']: (_node: any) => {
|
||||
for (const comment of sourceCode.getAllComments()) {
|
||||
if (comment.type !== 'Line') {
|
||||
continue;
|
||||
}
|
||||
if (!/^\s*#region /.test(comment.value)) {
|
||||
continue;
|
||||
}
|
||||
if (!/^\s*#region ([a-z]+): (@[a-z]+|https:\/\/github.com\/microsoft\/vscode\/issues\/\d+)/i.test(comment.value)) {
|
||||
context.report({
|
||||
node: <any>comment,
|
||||
messageId: 'comment',
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
1110
.eslintrc.json
1110
.eslintrc.json
File diff suppressed because it is too large
Load diff
|
|
@ -26,3 +26,6 @@ ee1655a82ebdfd38bf8792088a6602c69f7bbd94
|
|||
|
||||
# jrieken: new eslint-rule
|
||||
4a130c40ed876644ed8af2943809d08221375408
|
||||
|
||||
# bpasero: ESM migration
|
||||
6b924c51528e663dda5091a1493229a361676aca
|
||||
|
|
|
|||
9
.gitignore
vendored
9
.gitignore
vendored
|
|
@ -12,7 +12,7 @@ build/node_modules
|
|||
coverage/
|
||||
test_data/
|
||||
test-results/
|
||||
yarn-error.log
|
||||
test-results.xml
|
||||
vscode.lsif
|
||||
vscode.db
|
||||
/.profile-oss
|
||||
|
|
@ -21,3 +21,10 @@ vscode.db
|
|||
product.overrides.json
|
||||
*.snap.actual
|
||||
.vscode-test
|
||||
|
||||
# Void added these:
|
||||
.tmp/
|
||||
.tmp2/
|
||||
.tool-versions
|
||||
src/vs/workbench/contrib/void/browser/react/out/**
|
||||
src/vs/workbench/contrib/void/browser/react/src2/**
|
||||
|
|
|
|||
48
.idx/dev.nix
Normal file
48
.idx/dev.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# Created for Void
|
||||
# To learn more about how to use Nix to configure your environment
|
||||
# see: https://developers.google.com/idx/guides/customize-idx-env
|
||||
{pkgs}: {
|
||||
# Which nixpkgs channel to use.
|
||||
channel = "stable-23.11"; # or "unstable"
|
||||
# Use https://search.nixos.org/packages to find packages
|
||||
packages = [
|
||||
pkgs.nodejs_20
|
||||
pkgs.yarn
|
||||
pkgs.nodePackages.pnpm
|
||||
pkgs.bun
|
||||
pkgs.gh
|
||||
];
|
||||
# Sets environment variables in the workspace
|
||||
env = {};
|
||||
idx = {
|
||||
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
|
||||
extensions = [
|
||||
# "vscodevim.vim"
|
||||
];
|
||||
workspace = {
|
||||
# Runs when a workspace is first created with this `dev.nix` file
|
||||
onCreate = {
|
||||
npm-install = "npm ci --no-audit --prefer-offline --no-progress --timing";
|
||||
# Open editors for the following files by default, if they exist:
|
||||
default.openFiles = [
|
||||
# Cover all the variations of language, src-dir, router (app/pages)
|
||||
"pages/index.tsx" "pages/index.jsx"
|
||||
"src/pages/index.tsx" "src/pages/index.jsx"
|
||||
"app/page.tsx" "app/page.jsx"
|
||||
"src/app/page.tsx" "src/app/page.jsx"
|
||||
];
|
||||
};
|
||||
# To run something each time the workspace is (re)started, use the `onStart` hook
|
||||
};
|
||||
# Enable previews and customize configuration
|
||||
previews = {
|
||||
enable = true;
|
||||
previews = {
|
||||
web = {
|
||||
command = ["npm" "run" "dev" "--" "--port" "$PORT" "--hostname" "0.0.0.0"];
|
||||
manager = "web";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
1
.npmrc
Normal file
1
.npmrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
legacy-peer-deps="true"
|
||||
2
.nvmrc
2
.nvmrc
|
|
@ -1 +1 @@
|
|||
20.14.0
|
||||
22.21.1
|
||||
|
|
|
|||
16
.voidrules
Normal file
16
.voidrules
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
This is a fork of the VSCode repo called Void.
|
||||
|
||||
Most code we care about lives in src/vs/workbench/contrib/void.
|
||||
|
||||
You may often need to explore the full repo to find relevant parts of code.
|
||||
Look for services and built-in functions that you might need to use to solve the problem.
|
||||
|
||||
In typescript, do NOT cast to types if not neccessary. NEVER lazily cast to 'any'. Find the correct type to apply and use it.
|
||||
|
||||
Do not add or remove semicolons to any of my files. Just go with convention and make the least number of changes.
|
||||
|
||||
Never modify files outside src/vs/workbench/contrib/void without consulting with the user first.
|
||||
|
||||
All types that map from a value A to B should be called bOfA. For example, if you create a hashmap that goes from toolId to toolName, it should be called toolNameOfToolId, etc.
|
||||
|
||||
Do not run anything to validate your changes; tell the user what to do instead.
|
||||
|
|
@ -5,15 +5,21 @@
|
|||
|
||||
//@ts-check
|
||||
|
||||
const path = require('path');
|
||||
import { createRequire } from 'node:module';
|
||||
import { fileURLToPath } from 'url';
|
||||
import * as path from 'path';
|
||||
import * as os from 'os';
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const { defineConfig } = require('@vscode/test-cli');
|
||||
const os = require('os');
|
||||
|
||||
/**
|
||||
* A list of extension folders who have opted into tests, or configuration objects.
|
||||
* Edit me to add more!
|
||||
*
|
||||
* @type {Array<string | (Partial<import("@vscode/test-cli").TestConfiguration> & { label: string })>}
|
||||
* @type {Array<Partial<import("@vscode/test-cli").TestConfiguration> & { label: string }>}
|
||||
*/
|
||||
const extensions = [
|
||||
{
|
||||
|
|
@ -36,6 +42,16 @@ const extensions = [
|
|||
workspaceFolder: `extensions/vscode-colorize-tests/test`,
|
||||
mocha: { timeout: 60_000 }
|
||||
},
|
||||
{
|
||||
label: 'terminal-suggest',
|
||||
workspaceFolder: path.join(os.tmpdir(), `terminal-suggest-${Math.floor(Math.random() * 100000)}`),
|
||||
mocha: { timeout: 60_000 }
|
||||
},
|
||||
{
|
||||
label: 'vscode-colorize-perf-tests',
|
||||
workspaceFolder: `extensions/vscode-colorize-perf-tests/test`,
|
||||
mocha: { timeout: 6000_000 }
|
||||
},
|
||||
{
|
||||
label: 'configuration-editing',
|
||||
workspaceFolder: path.join(os.tmpdir(), `confeditout-${Math.floor(Math.random() * 100000)}`),
|
||||
|
|
@ -49,6 +65,20 @@ const extensions = [
|
|||
{
|
||||
label: 'microsoft-authentication',
|
||||
mocha: { timeout: 60_000 }
|
||||
},
|
||||
{
|
||||
label: 'vscode-api-tests-folder',
|
||||
extensionDevelopmentPath: `extensions/vscode-api-tests`,
|
||||
workspaceFolder: `extensions/vscode-api-tests/testWorkspace`,
|
||||
mocha: { timeout: 60_000 },
|
||||
files: 'extensions/vscode-api-tests/out/singlefolder-tests/**/*.test.js',
|
||||
},
|
||||
{
|
||||
label: 'vscode-api-tests-workspace',
|
||||
extensionDevelopmentPath: `extensions/vscode-api-tests`,
|
||||
workspaceFolder: `extensions/vscode-api-tests/testworkspace.code-workspace`,
|
||||
mocha: { timeout: 60_000 },
|
||||
files: 'extensions/vscode-api-tests/out/workspace-tests/**/*.test.js',
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -57,11 +87,14 @@ const defaultLaunchArgs = process.env.API_TESTS_EXTRA_ARGS?.split(' ') || [
|
|||
'--disable-telemetry', '--skip-welcome', '--skip-release-notes', `--crash-reporter-directory=${__dirname}/.build/crashes`, `--logsPath=${__dirname}/.build/logs/integration-tests`, '--no-cached-data', '--disable-updates', '--use-inmemory-secretstorage', '--disable-extensions', '--disable-workspace-trust'
|
||||
];
|
||||
|
||||
module.exports = defineConfig(extensions.map(extension => {
|
||||
const config = defineConfig(extensions.map(extension => {
|
||||
/** @type {import('@vscode/test-cli').TestConfiguration} */
|
||||
const config = typeof extension === 'object'
|
||||
? { files: `extensions/${extension.label}/out/**/*.test.js`, ...extension }
|
||||
: { files: `extensions/${extension}/out/**/*.test.js`, label: extension };
|
||||
const config = {
|
||||
platform: 'desktop',
|
||||
files: `extensions/${extension.label}/out/**/*.test.js`,
|
||||
extensionDevelopmentPath: `extensions/${extension.label}`,
|
||||
...extension,
|
||||
};
|
||||
|
||||
config.mocha ??= {};
|
||||
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||
|
|
@ -99,3 +132,5 @@ module.exports = defineConfig(extensions.map(extension => {
|
|||
|
||||
return config;
|
||||
}));
|
||||
|
||||
export default config;
|
||||
|
|
|
|||
16
.vscode/extensions/vscode-selfhost-import-aid/.vscode/launch.json
vendored
Normal file
16
.vscode/extensions/vscode-selfhost-import-aid/.vscode/launch.json
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"args": [
|
||||
"--extensionDevelopmentPath=${workspaceFolder}",
|
||||
"--enable-proposed-api=ms-vscode.vscode-selfhost-import-aid"
|
||||
],
|
||||
"name": "Launch Extension",
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
],
|
||||
"request": "launch",
|
||||
"type": "extensionHost"
|
||||
}
|
||||
]
|
||||
}
|
||||
7
.vscode/extensions/vscode-selfhost-import-aid/.vscode/settings.json
vendored
Normal file
7
.vscode/extensions/vscode-selfhost-import-aid/.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": "always"
|
||||
}
|
||||
}
|
||||
31
.vscode/extensions/vscode-selfhost-import-aid/package-lock.json
generated
vendored
Normal file
31
.vscode/extensions/vscode-selfhost-import-aid/package-lock.json
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "vscode-selfhost-import-aid",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vscode-selfhost-import-aid",
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"typescript": "5.5.4"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.88.0"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.5.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
|
||||
"integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
29
.vscode/extensions/vscode-selfhost-import-aid/package.json
vendored
Normal file
29
.vscode/extensions/vscode-selfhost-import-aid/package.json
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"name": "vscode-selfhost-import-aid",
|
||||
"displayName": "VS Code Selfhost Import Aid",
|
||||
"description": "Util to improve dealing with imports",
|
||||
"engines": {
|
||||
"vscode": "^1.88.0"
|
||||
},
|
||||
"version": "0.0.1",
|
||||
"publisher": "ms-vscode",
|
||||
"categories": [
|
||||
"Other"
|
||||
],
|
||||
"activationEvents": [
|
||||
"onLanguage:typescript"
|
||||
],
|
||||
"main": "./out/extension.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/microsoft/vscode.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"compile": "gulp compile-extension:vscode-selfhost-import-aid",
|
||||
"watch": "gulp watch-extension:vscode-selfhost-import-aid"
|
||||
},
|
||||
"dependencies": {
|
||||
"typescript": "5.5.4"
|
||||
}
|
||||
}
|
||||
234
.vscode/extensions/vscode-selfhost-import-aid/src/extension.ts
vendored
Normal file
234
.vscode/extensions/vscode-selfhost-import-aid/src/extension.ts
vendored
Normal file
|
|
@ -0,0 +1,234 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as ts from 'typescript';
|
||||
import * as path from 'path';
|
||||
|
||||
export async function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
const fileIndex = new class {
|
||||
|
||||
private _currentRun?: Thenable<void>;
|
||||
|
||||
private _disposables: vscode.Disposable[] = [];
|
||||
|
||||
private readonly _index = new Map<string, vscode.Uri>();
|
||||
|
||||
constructor() {
|
||||
const watcher = vscode.workspace.createFileSystemWatcher('**/*.ts', false, true, false);
|
||||
this._disposables.push(watcher.onDidChange(e => { this._index.set(e.toString(), e); }));
|
||||
this._disposables.push(watcher.onDidDelete(e => { this._index.delete(e.toString()); }));
|
||||
this._disposables.push(watcher);
|
||||
|
||||
this._refresh(false);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
for (const disposable of this._disposables) {
|
||||
disposable.dispose();
|
||||
}
|
||||
this._disposables = [];
|
||||
this._index.clear();
|
||||
}
|
||||
|
||||
async all(token: vscode.CancellationToken) {
|
||||
|
||||
await Promise.race([this._currentRun, new Promise<void>(resolve => token.onCancellationRequested(resolve))]);
|
||||
|
||||
if (token.isCancellationRequested) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return Array.from(this._index.values());
|
||||
}
|
||||
|
||||
private _refresh(clear: boolean) {
|
||||
// TODO@jrieken LATEST API! findFiles2New
|
||||
this._currentRun = vscode.workspace.findFiles('src/vs/**/*.ts', '{**/node_modules/**,**/extensions/**}').then(all => {
|
||||
if (clear) {
|
||||
this._index.clear();
|
||||
}
|
||||
for (const item of all) {
|
||||
this._index.set(item.toString(), item);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const selector: vscode.DocumentSelector = 'typescript';
|
||||
|
||||
function findNodeAtPosition(document: vscode.TextDocument, node: ts.Node, position: vscode.Position): ts.Node | undefined {
|
||||
if (node.getStart() <= document.offsetAt(position) && node.getEnd() >= document.offsetAt(position)) {
|
||||
return ts.forEachChild(node, child => findNodeAtPosition(document, child, position)) || node;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function findImportAt(document: vscode.TextDocument, position: vscode.Position): ts.ImportDeclaration | undefined {
|
||||
const sourceFile = ts.createSourceFile(document.fileName, document.getText(), ts.ScriptTarget.Latest, true);
|
||||
const node = findNodeAtPosition(document, sourceFile, position);
|
||||
if (node && ts.isStringLiteral(node) && ts.isImportDeclaration(node.parent)) {
|
||||
return node.parent;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const completionProvider = new class implements vscode.CompletionItemProvider {
|
||||
async provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Promise<vscode.CompletionList | undefined> {
|
||||
|
||||
const index = document.getText().lastIndexOf(' from \'');
|
||||
if (index < 0 || document.positionAt(index).line < position.line) {
|
||||
// line after last import is before position
|
||||
// -> no completion, safe a parse call
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const node = findImportAt(document, position);
|
||||
if (!node) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const range = new vscode.Range(document.positionAt(node.moduleSpecifier.pos), document.positionAt(node.moduleSpecifier.end));
|
||||
const uris = await fileIndex.all(token);
|
||||
|
||||
if (!uris) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const result = new vscode.CompletionList();
|
||||
result.isIncomplete = true;
|
||||
|
||||
for (const item of uris) {
|
||||
|
||||
if (!item.path.endsWith('.ts')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let relativePath = path.relative(path.dirname(document.uri.path), item.path);
|
||||
relativePath = relativePath.startsWith('.') ? relativePath : `./${relativePath}`;
|
||||
|
||||
const label = path.basename(item.path, path.extname(item.path));
|
||||
const insertText = ` '${relativePath.replace(/\.ts$/, '.js')}'`;
|
||||
const filterText = ` '${label}'`;
|
||||
|
||||
const completion = new vscode.CompletionItem({
|
||||
label: label,
|
||||
description: vscode.workspace.asRelativePath(item),
|
||||
});
|
||||
completion.kind = vscode.CompletionItemKind.File;
|
||||
completion.insertText = insertText;
|
||||
completion.filterText = filterText;
|
||||
completion.range = range;
|
||||
|
||||
result.items.push(completion);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
class ImportCodeActions implements vscode.CodeActionProvider {
|
||||
|
||||
static FixKind = vscode.CodeActionKind.QuickFix.append('esmImport');
|
||||
|
||||
static SourceKind = vscode.CodeActionKind.SourceFixAll.append('esmImport');
|
||||
|
||||
async provideCodeActions(document: vscode.TextDocument, range: vscode.Range | vscode.Selection, context: vscode.CodeActionContext, token: vscode.CancellationToken): Promise<vscode.CodeAction[] | undefined> {
|
||||
|
||||
if (context.only && ImportCodeActions.SourceKind.intersects(context.only)) {
|
||||
return this._provideFixAll(document, context, token);
|
||||
}
|
||||
|
||||
return this._provideFix(document, range, context, token);
|
||||
}
|
||||
|
||||
private async _provideFixAll(document: vscode.TextDocument, context: vscode.CodeActionContext, token: vscode.CancellationToken): Promise<vscode.CodeAction[] | undefined> {
|
||||
|
||||
const diagnostics = context.diagnostics
|
||||
.filter(d => d.code === 2307)
|
||||
.sort((a, b) => b.range.start.compareTo(a.range.start));
|
||||
|
||||
if (diagnostics.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const uris = await fileIndex.all(token);
|
||||
if (!uris) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const result = new vscode.CodeAction(`Fix All ESM Imports`, ImportCodeActions.SourceKind);
|
||||
result.edit = new vscode.WorkspaceEdit();
|
||||
result.diagnostics = [];
|
||||
|
||||
for (const diag of diagnostics) {
|
||||
|
||||
const actions = this._provideFixesForDiag(document, diag, uris);
|
||||
|
||||
if (actions.length === 0) {
|
||||
console.log(`ESM: no fixes for "${diag.message}"`);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (actions.length > 1) {
|
||||
console.log(`ESM: more than one fix for "${diag.message}", taking first`);
|
||||
console.log(actions);
|
||||
}
|
||||
|
||||
const [first] = actions;
|
||||
result.diagnostics.push(diag);
|
||||
|
||||
for (const [uri, edits] of first.edit!.entries()) {
|
||||
result.edit.set(uri, edits);
|
||||
}
|
||||
}
|
||||
// console.log(result.edit.get(document.uri));
|
||||
return [result];
|
||||
}
|
||||
|
||||
private async _provideFix(document: vscode.TextDocument, range: vscode.Range | vscode.Selection, context: vscode.CodeActionContext, token: vscode.CancellationToken): Promise<vscode.CodeAction[] | undefined> {
|
||||
const uris = await fileIndex.all(token);
|
||||
if (!uris) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const diag = context.diagnostics.find(d => d.code === 2307 && d.range.intersection(range));
|
||||
return diag && this._provideFixesForDiag(document, diag, uris);
|
||||
}
|
||||
|
||||
private _provideFixesForDiag(document: vscode.TextDocument, diag: vscode.Diagnostic, uris: Iterable<vscode.Uri>): vscode.CodeAction[] {
|
||||
|
||||
const node = findImportAt(document, diag.range.start)?.moduleSpecifier;
|
||||
if (!node || !ts.isStringLiteral(node)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const nodeRange = new vscode.Range(document.positionAt(node.pos), document.positionAt(node.end));
|
||||
const name = path.basename(node.text, path.extname(node.text));
|
||||
|
||||
const result: vscode.CodeAction[] = [];
|
||||
|
||||
for (const item of uris) {
|
||||
if (path.basename(item.path, path.extname(item.path)) === name) {
|
||||
let relativePath = path.relative(path.dirname(document.uri.path), item.path).replace(/\.ts$/, '.js');
|
||||
relativePath = relativePath.startsWith('.') ? relativePath : `./${relativePath}`;
|
||||
|
||||
const action = new vscode.CodeAction(`Fix to '${relativePath}'`, ImportCodeActions.FixKind);
|
||||
action.edit = new vscode.WorkspaceEdit();
|
||||
action.edit.replace(document.uri, nodeRange, ` '${relativePath}'`);
|
||||
action.diagnostics = [diag];
|
||||
result.push(action);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
context.subscriptions.push(fileIndex);
|
||||
context.subscriptions.push(vscode.languages.registerCompletionItemProvider(selector, completionProvider));
|
||||
context.subscriptions.push(vscode.languages.registerCodeActionsProvider(selector, new ImportCodeActions(), { providedCodeActionKinds: [ImportCodeActions.FixKind, ImportCodeActions.SourceKind] }));
|
||||
}
|
||||
14
.vscode/extensions/vscode-selfhost-import-aid/tsconfig.json
vendored
Normal file
14
.vscode/extensions/vscode-selfhost-import-aid/tsconfig.json
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"extends": "../../../extensions/tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out",
|
||||
"types": [
|
||||
"node",
|
||||
"mocha",
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"../../../src/vscode-dts/vscode.d.ts"
|
||||
]
|
||||
}
|
||||
101
.vscode/extensions/vscode-selfhost-test-provider/package-lock.json
generated
vendored
Normal file
101
.vscode/extensions/vscode-selfhost-test-provider/package-lock.json
generated
vendored
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
{
|
||||
"name": "vscode-selfhost-test-provider",
|
||||
"version": "0.4.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vscode-selfhost-test-provider",
|
||||
"version": "0.4.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": "^0.3.25",
|
||||
"ansi-styles": "^5.2.0",
|
||||
"cockatiel": "^3.1.3",
|
||||
"istanbul-to-vscode": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mocha": "^10.0.6",
|
||||
"@types/node": "20.x"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.88.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/resolve-uri": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
|
||||
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/sourcemap-codec": {
|
||||
"version": "1.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
|
||||
},
|
||||
"node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.25",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
|
||||
"integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
|
||||
"dependencies": {
|
||||
"@jridgewell/resolve-uri": "^3.1.0",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/istanbul-lib-coverage": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
|
||||
"integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w=="
|
||||
},
|
||||
"node_modules/@types/mocha": {
|
||||
"version": "10.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz",
|
||||
"integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.12.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz",
|
||||
"integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
|
||||
"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/cockatiel": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/cockatiel/-/cockatiel-3.1.3.tgz",
|
||||
"integrity": "sha512-xC759TpZ69d7HhfDp8m2WkRwEUiCkxY8Ee2OQH/3H6zmy2D/5Sm+zSTbPRa+V2QyjDtpMvjOIAOVjA2gp6N1kQ==",
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/istanbul-to-vscode": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-to-vscode/-/istanbul-to-vscode-2.0.1.tgz",
|
||||
"integrity": "sha512-V9Hhr7kX3UvkvkaT1lK3AmCRPkaIAIogQBrduTpNiLTkp1eVsybnJhWiDSVeCQap/3aGeZ2019oIivhX9MNsCQ==",
|
||||
"dependencies": {
|
||||
"@types/istanbul-lib-coverage": "^2.0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4,8 +4,7 @@
|
|||
"description": "Test provider for the VS Code project",
|
||||
"enabledApiProposals": [
|
||||
"testObserver",
|
||||
"testRelatedCode",
|
||||
"attributableCoverage"
|
||||
"testRelatedCode"
|
||||
],
|
||||
"engines": {
|
||||
"vscode": "^1.88.0"
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class ScriptCoverageTracker {
|
|||
}
|
||||
}
|
||||
|
||||
export class V8CoverageFile extends vscode.FileCoverage2 {
|
||||
export class V8CoverageFile extends vscode.FileCoverage {
|
||||
public details: vscode.StatementCoverage[] = [];
|
||||
|
||||
constructor(
|
||||
|
|
|
|||
|
|
@ -86,10 +86,11 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||
}, uri => ctrl.items.get(uri.toString().toLowerCase()));
|
||||
ctrl.relatedCodeProvider = graph;
|
||||
|
||||
context.subscriptions.push(
|
||||
new FailureTracker(context, folder.uri.fsPath),
|
||||
fileChangedEmitter.event(e => graph.didChange(e.uri, e.removed)),
|
||||
);
|
||||
if (context.storageUri) {
|
||||
context.subscriptions.push(new FailureTracker(context.storageUri.fsPath, folder.uri.fsPath));
|
||||
}
|
||||
|
||||
context.subscriptions.push(fileChangedEmitter.event(e => graph.didChange(e.uri, e.removed)));
|
||||
});
|
||||
|
||||
const createRunHandler = (
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ export class FailureTracker {
|
|||
private readonly logFile: string;
|
||||
private logs?: ITrackedRemediation[];
|
||||
|
||||
constructor(context: vscode.ExtensionContext, private readonly rootDir: string) {
|
||||
this.logFile = join(context.globalStorageUri.fsPath, '.build/vscode-test-failures.json');
|
||||
constructor(storageLocation: string, private readonly rootDir: string) {
|
||||
this.logFile = join(storageLocation, '.build/vscode-test-failures.json');
|
||||
mkdirSync(dirname(this.logFile), { recursive: true });
|
||||
|
||||
const oldLogFile = join(rootDir, '.build/vscode-test-failures.json');
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import * as vscode from 'vscode';
|
|||
import { TestCase, TestConstruct, TestSuite, VSCodeTest } from './testTree';
|
||||
|
||||
const suiteNames = new Set(['suite', 'flakySuite']);
|
||||
const testNames = new Set(['test']);
|
||||
|
||||
export const enum Action {
|
||||
Skip,
|
||||
|
|
@ -19,22 +20,19 @@ export const extractTestFromNode = (src: ts.SourceFile, node: ts.Node, parent: V
|
|||
return Action.Recurse;
|
||||
}
|
||||
|
||||
let lhs = node.expression;
|
||||
if (isSkipCall(lhs)) {
|
||||
const asSuite = identifyCall(node.expression, suiteNames);
|
||||
const asTest = identifyCall(node.expression, testNames);
|
||||
const either = asSuite || asTest;
|
||||
if (either === IdentifiedCall.Skipped) {
|
||||
return Action.Skip;
|
||||
}
|
||||
|
||||
if (isPropertyCall(lhs) && lhs.name.text === 'only') {
|
||||
lhs = lhs.expression;
|
||||
if (either === IdentifiedCall.Nothing) {
|
||||
return Action.Recurse;
|
||||
}
|
||||
|
||||
const name = node.arguments[0];
|
||||
const func = node.arguments[1];
|
||||
if (!name || !ts.isIdentifier(lhs) || !ts.isStringLiteralLike(name)) {
|
||||
return Action.Recurse;
|
||||
}
|
||||
|
||||
if (!func) {
|
||||
if (!name || !ts.isStringLiteralLike(name) || !func) {
|
||||
return Action.Recurse;
|
||||
}
|
||||
|
||||
|
|
@ -46,23 +44,45 @@ export const extractTestFromNode = (src: ts.SourceFile, node: ts.Node, parent: V
|
|||
);
|
||||
|
||||
const cparent = parent instanceof TestConstruct ? parent : undefined;
|
||||
if (lhs.escapedText === 'test') {
|
||||
|
||||
// we know this is either a suite or a test because we checked for skipped/nothing above
|
||||
|
||||
if (asTest) {
|
||||
return new TestCase(name.text, range, cparent);
|
||||
}
|
||||
|
||||
if (suiteNames.has(lhs.escapedText.toString())) {
|
||||
if (asSuite) {
|
||||
return new TestSuite(name.text, range, cparent);
|
||||
}
|
||||
|
||||
return Action.Recurse;
|
||||
throw new Error('unreachable');
|
||||
};
|
||||
|
||||
const enum IdentifiedCall {
|
||||
Nothing,
|
||||
Skipped,
|
||||
IsThing,
|
||||
}
|
||||
|
||||
const identifyCall = (lhs: ts.Node, needles: ReadonlySet<string>): IdentifiedCall => {
|
||||
if (ts.isIdentifier(lhs)) {
|
||||
return needles.has(lhs.escapedText || lhs.text) ? IdentifiedCall.IsThing : IdentifiedCall.Nothing;
|
||||
}
|
||||
|
||||
if (isPropertyCall(lhs) && lhs.name.text === 'skip') {
|
||||
return needles.has(lhs.expression.text) ? IdentifiedCall.Skipped : IdentifiedCall.Nothing;
|
||||
}
|
||||
|
||||
if (ts.isParenthesizedExpression(lhs) && ts.isConditionalExpression(lhs.expression)) {
|
||||
return Math.max(identifyCall(lhs.expression.whenTrue, needles), identifyCall(lhs.expression.whenFalse, needles));
|
||||
}
|
||||
|
||||
return IdentifiedCall.Nothing;
|
||||
};
|
||||
|
||||
const isPropertyCall = (
|
||||
lhs: ts.LeftHandSideExpression
|
||||
lhs: ts.Node
|
||||
): lhs is ts.PropertyAccessExpression & { expression: ts.Identifier; name: ts.Identifier } =>
|
||||
ts.isPropertyAccessExpression(lhs) &&
|
||||
ts.isIdentifier(lhs.expression) &&
|
||||
ts.isIdentifier(lhs.name);
|
||||
|
||||
const isSkipCall = (lhs: ts.LeftHandSideExpression) =>
|
||||
isPropertyCall(lhs) && suiteNames.has(lhs.expression.text) && lhs.name.text === 'skip';
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export abstract class VSCodeTestRunner {
|
|||
const cp = spawn(await this.binaryPath(), args, {
|
||||
cwd: this.repoLocation.uri.fsPath,
|
||||
stdio: 'pipe',
|
||||
env: this.getEnvironment(),
|
||||
env: this.getEnvironment(port),
|
||||
});
|
||||
|
||||
// Register a descriptor factory that signals the server when any
|
||||
|
|
@ -139,7 +139,7 @@ export abstract class VSCodeTestRunner {
|
|||
});
|
||||
}
|
||||
|
||||
protected getEnvironment(): NodeJS.ProcessEnv {
|
||||
protected getEnvironment(_remoteDebugPort?: number): NodeJS.ProcessEnv {
|
||||
return {
|
||||
...process.env,
|
||||
ELECTRON_RUN_AS_NODE: undefined,
|
||||
|
|
@ -261,9 +261,10 @@ export class BrowserTestRunner extends VSCodeTestRunner {
|
|||
}
|
||||
|
||||
/** @override */
|
||||
protected override getEnvironment() {
|
||||
protected override getEnvironment(remoteDebugPort?: number) {
|
||||
return {
|
||||
...super.getEnvironment(),
|
||||
...super.getEnvironment(remoteDebugPort),
|
||||
PLAYWRIGHT_CHROMIUM_DEBUG_PORT: remoteDebugPort ? String(remoteDebugPort) : undefined,
|
||||
ELECTRON_RUN_AS_NODE: '1',
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
"src/**/*",
|
||||
"../../../src/vscode-dts/vscode.d.ts",
|
||||
"../../../src/vscode-dts/vscode.proposed.testObserver.d.ts",
|
||||
"../../../src/vscode-dts/vscode.proposed.testRelatedCode.d.ts",
|
||||
"../../../src/vscode-dts/vscode.proposed.attributableCoverage.d.ts"
|
||||
"../../../src/vscode-dts/vscode.proposed.testRelatedCode.d.ts"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@jridgewell/resolve-uri@^3.1.0":
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6"
|
||||
integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==
|
||||
|
||||
"@jridgewell/sourcemap-codec@^1.4.14":
|
||||
version "1.4.15"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
|
||||
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
|
||||
|
||||
"@jridgewell/trace-mapping@^0.3.25":
|
||||
version "0.3.25"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0"
|
||||
integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==
|
||||
dependencies:
|
||||
"@jridgewell/resolve-uri" "^3.1.0"
|
||||
"@jridgewell/sourcemap-codec" "^1.4.14"
|
||||
|
||||
"@types/istanbul-lib-coverage@^2.0.6":
|
||||
version "2.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7"
|
||||
integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==
|
||||
|
||||
"@types/mocha@^10.0.6":
|
||||
version "10.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.6.tgz#818551d39113081048bdddbef96701b4e8bb9d1b"
|
||||
integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==
|
||||
|
||||
"@types/node@20.x":
|
||||
version "20.12.11"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.11.tgz#c4ef00d3507000d17690643278a60dc55a9dc9be"
|
||||
integrity sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==
|
||||
dependencies:
|
||||
undici-types "~5.26.4"
|
||||
|
||||
ansi-styles@^5.2.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
|
||||
integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
|
||||
|
||||
cockatiel@^3.1.3:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/cockatiel/-/cockatiel-3.1.3.tgz#bb1774a498a17e739dd994d56610dc6538b02858"
|
||||
integrity sha512-xC759TpZ69d7HhfDp8m2WkRwEUiCkxY8Ee2OQH/3H6zmy2D/5Sm+zSTbPRa+V2QyjDtpMvjOIAOVjA2gp6N1kQ==
|
||||
|
||||
istanbul-to-vscode@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/istanbul-to-vscode/-/istanbul-to-vscode-2.0.1.tgz#84994d06e604b68cac7301840f338b1e74eb888b"
|
||||
integrity sha512-V9Hhr7kX3UvkvkaT1lK3AmCRPkaIAIogQBrduTpNiLTkp1eVsybnJhWiDSVeCQap/3aGeZ2019oIivhX9MNsCQ==
|
||||
dependencies:
|
||||
"@types/istanbul-lib-coverage" "^2.0.6"
|
||||
|
||||
undici-types@~5.26.4:
|
||||
version "5.26.5"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
|
||||
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
|
||||
83
.vscode/launch.json
vendored
83
.vscode/launch.json
vendored
|
|
@ -202,6 +202,24 @@
|
|||
"order": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "extensionHost",
|
||||
"request": "launch",
|
||||
"name": "VS Code Tokenizer Performance Tests",
|
||||
"runtimeExecutable": "${execPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/extensions/vscode-colorize-perf-tests/test",
|
||||
"--extensionDevelopmentPath=${workspaceFolder}/extensions/vscode-colorize-perf-tests",
|
||||
"--extensionTestsPath=${workspaceFolder}/extensions/vscode-colorize-perf-tests/out"
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
],
|
||||
"presentation": {
|
||||
"group": "5_tests",
|
||||
"order": 6
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "chrome",
|
||||
"request": "attach",
|
||||
|
|
@ -233,7 +251,51 @@
|
|||
"timeout": 0,
|
||||
"env": {
|
||||
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null,
|
||||
"VSCODE_SKIP_PRELAUNCH": "1"
|
||||
"VSCODE_SKIP_PRELAUNCH": "1",
|
||||
},
|
||||
"cleanUp": "wholeBrowser",
|
||||
"runtimeArgs": [
|
||||
"--inspect-brk=5875",
|
||||
"--no-cached-data",
|
||||
"--crash-reporter-directory=${workspaceFolder}/.profile-oss/crashes",
|
||||
// for general runtime freezes: https://github.com/microsoft/vscode/issues/127861#issuecomment-904144910
|
||||
"--disable-features=CalculateNativeWinOcclusion",
|
||||
"--disable-extension=vscode.vscode-api-tests"
|
||||
],
|
||||
"userDataDir": "${userHome}/.vscode-oss-dev",
|
||||
"webRoot": "${workspaceFolder}",
|
||||
"cascadeTerminateToConfigurations": [
|
||||
"Attach to Extension Host"
|
||||
],
|
||||
"pauseForSourceMap": false,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
],
|
||||
"browserLaunchLocation": "workspace",
|
||||
"presentation": {
|
||||
"hidden": true,
|
||||
},
|
||||
},
|
||||
{
|
||||
// To debug observables you also need the extension "ms-vscode.debug-value-editor"
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"name": "Launch VS Code Internal (Dev Debug)",
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/code.bat"
|
||||
},
|
||||
"osx": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/code.sh"
|
||||
},
|
||||
"linux": {
|
||||
"runtimeExecutable": "${workspaceFolder}/scripts/code.sh"
|
||||
},
|
||||
"port": 9222,
|
||||
"timeout": 0,
|
||||
"env": {
|
||||
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null,
|
||||
"VSCODE_SKIP_PRELAUNCH": "1",
|
||||
"VSCODE_DEV_DEBUG": "1",
|
||||
},
|
||||
"cleanUp": "wholeBrowser",
|
||||
"runtimeArgs": [
|
||||
|
|
@ -257,10 +319,6 @@
|
|||
"presentation": {
|
||||
"hidden": true,
|
||||
},
|
||||
// This is read by the vscode-diagnostic-tools extension
|
||||
"vscode-diagnostic-tools.debuggerScripts": [
|
||||
"${workspaceFolder}/scripts/hot-reload-injected-script.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
|
|
@ -554,6 +612,21 @@
|
|||
"order": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "VS Code (Debug Observables)",
|
||||
"stopAll": true,
|
||||
"configurations": [
|
||||
"Launch VS Code Internal (Dev Debug)",
|
||||
"Attach to Main Process",
|
||||
"Attach to Extension Host",
|
||||
"Attach to Shared Process",
|
||||
],
|
||||
"preLaunchTask": "Ensure Prelaunch Dependencies",
|
||||
"presentation": {
|
||||
"group": "0_vscode",
|
||||
"order": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Search, Renderer, and Main processes",
|
||||
"configurations": [
|
||||
|
|
|
|||
2
.vscode/notebooks/api.github-issues
vendored
2
.vscode/notebooks/api.github-issues
vendored
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$REPO=repo:microsoft/vscode\n$MILESTONE=milestone:\"August 2024\""
|
||||
"value": "$REPO=repo:microsoft/vscode\n$MILESTONE=milestone:\"March 2025\""
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
|
|
|
|||
6
.vscode/notebooks/endgame.github-issues
vendored
6
.vscode/notebooks/endgame.github-issues
vendored
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$REPOS=repo:microsoft/lsprotocol repo:microsoft/monaco-editor repo:microsoft/vscode repo:microsoft/vscode-anycode repo:microsoft/vscode-autopep8 repo:microsoft/vscode-black-formatter repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-dev repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-flake8 repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-hexeditor repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-isort repo:microsoft/vscode-js-debug repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-l10n repo:microsoft/vscode-livepreview repo:microsoft/vscode-markdown-languageservice repo:microsoft/vscode-markdown-tm-grammar repo:microsoft/vscode-mypy repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-pylint repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-python-tools-extension-template repo:microsoft/vscode-references-view repo:microsoft/vscode-remote-release repo:microsoft/vscode-remote-repositories-github repo:microsoft/vscode-remote-tunnels repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-unpkg repo:microsoft/vscode-vsce\n\n$MILESTONE=milestone:\"August 2024\""
|
||||
"value": "$REPOS=repo:microsoft/lsprotocol repo:microsoft/monaco-editor repo:microsoft/vscode repo:microsoft/vscode-anycode repo:microsoft/vscode-autopep8 repo:microsoft/vscode-black-formatter repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-dev repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-flake8 repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-hexeditor repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-isort repo:microsoft/vscode-js-debug repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-l10n repo:microsoft/vscode-livepreview repo:microsoft/vscode-markdown-languageservice repo:microsoft/vscode-markdown-tm-grammar repo:microsoft/vscode-mypy repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-pylint repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-python-tools-extension-template repo:microsoft/vscode-references-view repo:microsoft/vscode-remote-release repo:microsoft/vscode-remote-repositories-github repo:microsoft/vscode-remote-tunnels repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-unpkg repo:microsoft/vscode-vsce\r\n\r\n$MILESTONE=milestone:\"March 2025\""
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$REPOS $MILESTONE is:issue is:closed reason:completed label:verification-needed -label:verified"
|
||||
"value": "$REPOS $MILESTONE is:issue is:closed reason:completed label:verification-needed -label:verified -label:on-testplan"
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$REPOS $MILESTONE is:issue is:closed reason:completed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:z-author-verified -label:unreleased -label:*not-reproducible"
|
||||
"value": "$REPOS $MILESTONE is:issue is:closed reason:completed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:z-author-verified -label:unreleased -label:*not-reproducible -label:*out-of-scope"
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
|
|
|
|||
18
.vscode/notebooks/grooming.github-issues
vendored
18
.vscode/notebooks/grooming.github-issues
vendored
File diff suppressed because one or more lines are too long
10
.vscode/notebooks/my-endgame.github-issues
vendored
10
.vscode/notebooks/my-endgame.github-issues
vendored
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$REPOS=repo:microsoft/lsprotocol repo:microsoft/monaco-editor repo:microsoft/vscode repo:microsoft/vscode-anycode repo:microsoft/vscode-autopep8 repo:microsoft/vscode-black-formatter repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-dev repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-flake8 repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-hexeditor repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-isort repo:microsoft/vscode-js-debug repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-l10n repo:microsoft/vscode-livepreview repo:microsoft/vscode-markdown-languageservice repo:microsoft/vscode-markdown-tm-grammar repo:microsoft/vscode-mypy repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-pylint repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-python-tools-extension-template repo:microsoft/vscode-references-view repo:microsoft/vscode-remote-release repo:microsoft/vscode-remote-repositories-github repo:microsoft/vscode-remote-tunnels repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-unpkg repo:microsoft/vscode-vsce\n\n$MILESTONE=milestone:\"August 2024\"\n\n$MINE=assignee:@me"
|
||||
"value": "$REPOS=repo:microsoft/lsprotocol repo:microsoft/monaco-editor repo:microsoft/vscode repo:microsoft/vscode-anycode repo:microsoft/vscode-autopep8 repo:microsoft/vscode-black-formatter repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-dev repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-flake8 repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-hexeditor repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-isort repo:microsoft/vscode-js-debug repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-l10n repo:microsoft/vscode-livepreview repo:microsoft/vscode-markdown-languageservice repo:microsoft/vscode-markdown-tm-grammar repo:microsoft/vscode-mypy repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-pylint repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-python-tools-extension-template repo:microsoft/vscode-references-view repo:microsoft/vscode-remote-release repo:microsoft/vscode-remote-repositories-github repo:microsoft/vscode-remote-tunnels repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-unpkg repo:microsoft/vscode-vsce\n\n$MILESTONE=milestone:\"March 2025\"\n\n$MINE=assignee:@me"
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:feature-request label:verification-needed -label:verified"
|
||||
"value": "$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:feature-request label:verification-needed -label:verified -label:on-testplan"
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed -assignee:@me -label:verified -label:z-author-verified label:feature-request label:verification-needed -label:verification-steps-needed -label:unreleased"
|
||||
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed -assignee:@me -label:verified -label:z-author-verified label:feature-request label:verification-needed -label:verification-steps-needed -label:unreleased -label:on-testplan"
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
|
|
@ -157,7 +157,7 @@
|
|||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:*out-of-scope -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:andreamah -author:bamurtaugh -author:bpasero -author:chrisdias -author:chrmarti -author:Chuxel -author:claudiaregio -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:DonJayamanne -author:egamma -author:fiveisprime -author:gregvanl -author:hediet -author:isidorn -author:joaomoreno -author:joyceerhl -author:jrieken -author:kieferrm -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:roblourens -author:rzhao271 -author:sandy081 -author:sbatten -author:stevencl -author:tanhakabir -author:TylerLeonhardt -author:Tyriar -author:weinand -author:amunger -author:karthiknadig -author:eleanorjboyd -author:Yoyokrazy -author:paulacamargo25 -author:ulugbekna -author:aiday-mar -author:daviddossett -author:bhavyaus -author:justschen -author:benibenj -author:luabud -author:anthonykim1 -author:joshspicer"
|
||||
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:*out-of-scope -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:andreamah -author:bamurtaugh -author:bpasero -author:chrisdias -author:chrmarti -author:Chuxel -author:claudiaregio -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:DonJayamanne -author:egamma -author:fiveisprime -author:ntrogh -author:hediet -author:isidorn -author:joaomoreno -author:joyceerhl -author:jrieken -author:kieferrm -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:roblourens -author:rzhao271 -author:sandy081 -author:sbatten -author:stevencl -author:tanhakabir -author:TylerLeonhardt -author:Tyriar -author:weinand -author:amunger -author:karthiknadig -author:eleanorjboyd -author:Yoyokrazy -author:paulacamargo25 -author:ulugbekna -author:aiday-mar -author:daviddossett -author:bhavyaus -author:justschen -author:benibenj -author:luabud -author:anthonykim1 -author:joshspicer -author:osortega -author:legomushroom"
|
||||
},
|
||||
{
|
||||
"kind": 1,
|
||||
|
|
@ -187,6 +187,6 @@
|
|||
{
|
||||
"kind": 2,
|
||||
"language": "github-issues",
|
||||
"value": "$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:feature-request -label:on-release-notes\n$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:engineering -label:on-release-notes\n$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:plan-item -label:on-release-notes"
|
||||
"value": "$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:feature-request -label:on-release-notes\r\n$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:engineering -label:on-release-notes\r\n$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:plan-item -label:on-release-notes"
|
||||
}
|
||||
]
|
||||
4
.vscode/notebooks/my-work.github-issues
vendored
4
.vscode/notebooks/my-work.github-issues
vendored
File diff suppressed because one or more lines are too long
38
.vscode/settings.json
vendored
38
.vscode/settings.json
vendored
|
|
@ -8,6 +8,7 @@
|
|||
"**/.DS_Store": true,
|
||||
".vscode-test": true,
|
||||
"cli/target": true,
|
||||
"build/**/*.js.map": true,
|
||||
"build/**/*.js": {
|
||||
"when": "$(basename).ts"
|
||||
}
|
||||
|
|
@ -34,13 +35,13 @@
|
|||
"src/vs/workbench/api/test/browser/extHostDocumentData.test.perf-data.ts": true,
|
||||
"src/vs/base/test/node/uri.test.data.txt": true,
|
||||
"src/vs/editor/test/node/diffing/fixtures/**": true,
|
||||
"build/loader.min": true
|
||||
},
|
||||
"files.readonlyInclude": {
|
||||
"**/node_modules/**/*.*": true,
|
||||
"**/yarn.lock": true,
|
||||
"**/package-lock.json": true,
|
||||
"**/Cargo.lock": true,
|
||||
"src/vs/workbench/workbench.web.main.css": true,
|
||||
"src/vs/workbench/workbench.desktop.main.css": true,
|
||||
"build/**/*.js": true,
|
||||
"out/**": true,
|
||||
"out-build/**": true,
|
||||
|
|
@ -48,10 +49,10 @@
|
|||
"out-vscode-reh/**": true,
|
||||
"extensions/**/dist/**": true,
|
||||
"extensions/**/out/**": true,
|
||||
"extensions/terminal-suggest/src/completions/upstream/**": true,
|
||||
"test/smoke/out/**": true,
|
||||
"test/automation/out/**": true,
|
||||
"test/integration/browser/out/**": true,
|
||||
"src2/**": true,
|
||||
"test/integration/browser/out/**": true
|
||||
},
|
||||
"files.readonlyExclude": {
|
||||
"build/builtin/*.js": true,
|
||||
|
|
@ -74,9 +75,8 @@
|
|||
],
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"npm.exclude": "**/extensions/**",
|
||||
"npm.packageManager": "yarn",
|
||||
"emmet.excludeLanguages": [],
|
||||
"typescript.preferences.importModuleSpecifier": "non-relative",
|
||||
"typescript.preferences.importModuleSpecifier": "relative",
|
||||
"typescript.preferences.quoteStyle": "single",
|
||||
"json.schemas": [
|
||||
{
|
||||
|
|
@ -93,13 +93,12 @@
|
|||
}
|
||||
],
|
||||
"git.ignoreLimitWarning": true,
|
||||
// we removed this for LineMage:
|
||||
// "git.branchProtection": [
|
||||
// "main",
|
||||
// "distro",
|
||||
// "release/*"
|
||||
// ],
|
||||
// "git.branchProtectionPrompt": "alwaysCommitToNewBranch",
|
||||
"git.branchProtection": [
|
||||
"main",
|
||||
"distro",
|
||||
"release/*"
|
||||
],
|
||||
"git.branchProtectionPrompt": "alwaysCommitToNewBranch",
|
||||
"git.branchRandomName.enable": true,
|
||||
"git.pullBeforeCheckout": true,
|
||||
"git.mergeEditor": true,
|
||||
|
|
@ -158,17 +157,26 @@
|
|||
"application.experimental.rendererProfiling": true,
|
||||
"editor.experimental.asyncTokenization": true,
|
||||
"editor.experimental.asyncTokenizationVerification": true,
|
||||
"terminal.integrated.suggest.enabled": true,
|
||||
"typescript.preferences.autoImportFileExcludePatterns": [
|
||||
"@xterm/xterm",
|
||||
"@xterm/headless",
|
||||
"node-pty",
|
||||
"vscode-notebook-renderer",
|
||||
"src/vs/workbench/workbench.web.main.ts"
|
||||
"src/vs/workbench/workbench.web.main.internal.ts"
|
||||
],
|
||||
"[github-issues]": {
|
||||
"editor.wordWrap": "on"
|
||||
},
|
||||
"css.format.spaceAroundSelectorSeparator": true,
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||
"inlineChat.experimental.onlyZoneWidget": true
|
||||
"eslint.useFlatConfig": true,
|
||||
"editor.occurrencesHighlightDelay": 0,
|
||||
"typescript.experimental.expandableHover": true,
|
||||
"git.diagnosticsCommitHook.Enabled": true,
|
||||
"git.diagnosticsCommitHook.Sources": {
|
||||
"*": "error",
|
||||
"ts": "warning",
|
||||
"eslint": "warning"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
18
.vscode/shared.code-snippets
vendored
18
.vscode/shared.code-snippets
vendored
|
|
@ -36,23 +36,5 @@
|
|||
"private readonly _onDid$1 = new Emitter<$2>();",
|
||||
"readonly onDid$1: Event<$2> = this._onDid$1.event;"
|
||||
],
|
||||
},
|
||||
"esm-comment": {
|
||||
"scope": "typescript,javascript",
|
||||
"prefix": "esm-comment",
|
||||
"body": [
|
||||
"// ESM-comment-begin",
|
||||
"$SELECTION$0",
|
||||
"// ESM-comment-end",
|
||||
]
|
||||
},
|
||||
"esm-uncomment": {
|
||||
"scope": "typescript,javascript",
|
||||
"prefix": "esm-uncomment",
|
||||
"body": [
|
||||
"// ESM-uncomment-begin",
|
||||
"// $SELECTION$0",
|
||||
"// ESM-uncomment-end",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
31
.vscode/tasks.json
vendored
31
.vscode/tasks.json
vendored
|
|
@ -29,6 +29,34 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{ // Void added this
|
||||
"type": "npm",
|
||||
"script": "watchreactd",
|
||||
"label": "React - Build",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "never",
|
||||
"group": "buildWatchers",
|
||||
"close": false
|
||||
},
|
||||
"problemMatcher": {
|
||||
"owner": "typescript",
|
||||
"applyTo": "closedDocuments",
|
||||
"fileLocation": [
|
||||
"absolute"
|
||||
],
|
||||
"pattern": {
|
||||
"regexp": "Error: ([^(]+)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\): (.*)$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
},
|
||||
"background": {
|
||||
"beginsPattern": "Starting compilation",
|
||||
"endsPattern": "Finished compilation"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "watch-extensionsd",
|
||||
|
|
@ -61,6 +89,7 @@
|
|||
"label": "VS Code - Build",
|
||||
"dependsOn": [
|
||||
"Core - Build",
|
||||
"React - Build",
|
||||
"Ext - Build"
|
||||
],
|
||||
"group": {
|
||||
|
|
@ -113,7 +142,7 @@
|
|||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Kill VS Code - Build, Yarn, VS Code - Build",
|
||||
"label": "Kill VS Code - Build, Npm, VS Code - Build",
|
||||
"dependsOn": [
|
||||
"Kill VS Code - Build",
|
||||
"npm: install",
|
||||
|
|
|
|||
5
.yarnrc
5
.yarnrc
|
|
@ -1,5 +0,0 @@
|
|||
disturl "https://electronjs.org/headers"
|
||||
target "30.4.0"
|
||||
ms_build_id "10073054"
|
||||
runtime "electron"
|
||||
build_from_source "true"
|
||||
186
CONTRIBUTING.md
186
CONTRIBUTING.md
|
|
@ -1,186 +0,0 @@
|
|||
|
||||
|
||||
# Contributing to LineMage
|
||||
|
||||
Welcome! 👋 This is a guide on how to contribute to LineMage. We want to make it as easy as possible to contribute, so if you have any questions or comments, reach out via email or Discord!
|
||||
|
||||
There are 3 main ways to contribute:
|
||||
|
||||
- Suggest New Features
|
||||
- Improve Documentation
|
||||
- Build New Features
|
||||
|
||||
|
||||
See the [Roadmap](#roadmap) section for a list of the most important features to build, or feel free to build your own features.
|
||||
|
||||
We use a [VSCode extension](https://code.visualstudio.com/api/get-started/your-first-extension) to implement most of LineMage's functionality. Scroll down to see 1. How to contribute to the Extension, or 2. How to contribute to the full IDE (for more native changes).
|
||||
|
||||
|
||||
|
||||
|
||||
## Roadmap
|
||||
|
||||
Here are the most important topics on our Roadmap. More ⭐'s = more important.
|
||||
|
||||
## ⭐⭐⭐ Improve diffs.
|
||||
|
||||
We define a "diff" as a single green/red codeblock that denotes a change. Here are improvements to make:
|
||||
|
||||
1. Show deletions (-) inside diffs. Right now we're only showing insertions (+). Diffs currently work by highlighting all of the new code in green with a simple text decoration. Instead, we would like to use code from VS Code's native diffEditor to show the diffs ("inline" mode). We could alternatively keep what we have and add red zones of the deleted code between lines.
|
||||
|
||||
2. Make diffs responsive. When a user accepts a diff, all of the diffs below it should be updated (because they are now on different line numbers). We're not doing this, so there is a lot of unexpected behavior.
|
||||
|
||||
3. Make diff highlighting dynamic. Right now when the user edits text, we clear all the diffs and their highlights. Instead, we should simply update the highlighting of the diff. Each diff lives on a range of lines, and all changes inside that range or intersecting with it should update its highlighting.
|
||||
|
||||
## ⭐⭐⭐ Make History work well.
|
||||
When the user submits a response or presses the apply/accept/reject button, we should add these events to the history and allow the user to use undo/redo on them. Right now there is unexpected behavior if the user tries to undo or redo their LineMage changes.
|
||||
|
||||
## ⭐⭐⭐ Build Cursor-style quick edits (ctrl+k).
|
||||
|
||||
When the user presses ctrl+k, an input box should appear inline with the code that they were selecting. This is somewhat difficult to do because an extension alone cannot do this, and it requires creating a new component in the IDE. We think you can modify vscode's built-in "codelens" or "zone widget" components, but we are open to alternatives.
|
||||
|
||||
## ⭐⭐⭐ Improve Ctrl+L.
|
||||
|
||||
Change the prompt so we output changes like `// ... rest of file`, instead of always outputting the entire file. When the user clicks "apply", the model should rewrite the file and apply diffs in the correct locations.
|
||||
|
||||
|
||||
## ⭐⭐ Integrate with Ollama.
|
||||
|
||||
We have an Ollama integration coded up in the extension, but it breaks. This is because Ollama has Node.js dependencies like 'path' and 'os' which cannot run in extensions (extensions have to be able to run in the browser). To fix this, we need to migrate LineMage's extension so that it runs natively into the VS Code editor so that we can access Node.js.
|
||||
|
||||
## ⭐ One-stars.
|
||||
|
||||
⭐ When user presses ctrl+L it should clear the sidebar's state.
|
||||
|
||||
⭐ Let the user accept / reject all Diffs in an entire file via the sidebar.
|
||||
|
||||
⭐ Allow the user to make multiple selections of code or files at once.
|
||||
|
||||
⭐ Allow user to X out of their current selection.
|
||||
|
||||
|
||||
|
||||
## 1. Contributing to the Extension
|
||||
Here's how you can start contributing to the Extension:
|
||||
|
||||
1. Clone the repository
|
||||
|
||||
`git clone https://github.com/linemagedev/linemage`
|
||||
|
||||
2. Open the extension folder
|
||||
|
||||
`cd /extensions/linemage`
|
||||
|
||||
3. Install dependencies
|
||||
|
||||
`npm run install`
|
||||
|
||||
4. Build the project
|
||||
|
||||
`npm run build`. Note: We made this build command to run React in vscode. It converts `sidebar/index.tsx` into a CSS/JS bundle in `dist/`.
|
||||
|
||||
5. Run the project
|
||||
|
||||
Press <kbd>F5</kbd>. This will start a new instance of VS Code with the extension enabled. If this does not work, you can press <kbd>F1</kbd>, select "Debug: Start Debugging", press <kbd>Enter</kbd>, and select "VS Code Extension Development".
|
||||
|
||||
If you would like to use AI features, you need to provide an API key. You can do that by going to Settings (<kbd>Ctrl+,</kbd>) and modifying `linemage > "Anthropic Api Key"`. The "Which API" environment variable controls the provider and defaults to "anthropic".
|
||||
|
||||
## 2. Contributing to the full IDE
|
||||
|
||||
Beyond the extension, we sometimes edit the IDE when we need to access more functionality. If you want to make a change to the IDE, please follow the steps below, or see VS Code's full [how to contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute) page.
|
||||
|
||||
1. Install all dependencies by running `yarn`.
|
||||
|
||||
2. Press <kbd>Ctrl+Shift+B</kbd> to start the build process - this can take some time.
|
||||
|
||||
3. Run `./scripts/code.sh` to open up the built IDE. To see new changes without restarting the build, use <kbd>Ctrl+Shift+P</kbd> and run "Reload Window".
|
||||
|
||||
To bundle the IDE, run `yarn gulp vscode-win32-x64`. Here are the full options: vscode-{win32-ia32 | win32-x64 | darwin-x64 | darwin-arm64 | linux-ia32 | linux-x64 | linux-arm}(-min)
|
||||
|
||||
If you're on Windows, we recommend running the project inside a dev container. VSCode should prompt you to do this automatically.
|
||||
|
||||
|
||||
|
||||
# Submitting a Pull Request
|
||||
|
||||
When you've made changes and want to submit them, please submit a pull request.
|
||||
|
||||
Please submit all Pull Requests to the `dev` branch.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
### Design principles
|
||||
|
||||
- Least amount of eye movement necessary; if user presses submit, show them the message where they submitted
|
||||
|
||||
|
||||
### Ctrl+L (chat)
|
||||
|
||||
|
||||
|
||||
|
||||
### Ctrl+K (inline edits)
|
||||
|
||||
- Create a new input box that takes in the user's description.
|
||||
|
||||
- Make it appear above each.
|
||||
|
||||
- The input box should appear directly above the code selection - this requires using a Zone widget.
|
||||
|
||||
|
||||
### Core
|
||||
|
||||
- Migrate the LineMage extension to live natively in VS Code. There's initial work here at `linemage.contribution.ts`.
|
||||
|
||||
- Allow access to the VS Code extension marketplace.
|
||||
|
||||
- Re-write the whole file when the user clicks "Apply" and show a gray progress indicator in the BG.
|
||||
|
||||
|
||||
|
||||
### Diffs
|
||||
|
||||
"Diffs" are the inline green/red highlights you see to approve or reject a change.
|
||||
|
||||
- Diffs are not responsive to edits right now. To make them responsive, we need to update all Diffs' ranges every time there's a change.
|
||||
|
||||
- Right now Diffs are only shown in green as a simple text decoration. We'd like to have them work better by using code from VS Code's native diffEditor ("inline" mode).
|
||||
|
||||
- **Events:** On many types of events, we should reject all the current Diffs (user submits a new chat message, clicks Apply, etc).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Ollama
|
||||
|
||||
- Ollama doesn't work now because its JS library depends on Node.js and uses imports like 'path', 'os', while extensions must be able to run in the browser. When we migrate the extension into the VS Code codebase, we'll be able to access Node.js and will uncomment the Ollama integration.
|
||||
|
||||
### Greptile
|
||||
|
||||
- Ideally we'd auto-detect -->
|
||||
155
HOW_TO_CONTRIBUTE.md
Normal file
155
HOW_TO_CONTRIBUTE.md
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
# Contributing to Void
|
||||
### Welcome! 👋
|
||||
This is the official guide on how to contribute to Void. We want to make it as easy as possible to contribute, so if you have any questions or comments, reach out via email or discord!
|
||||
|
||||
There are a few ways to contribute:
|
||||
|
||||
- 💫 Complete items on the [Roadmap](https://github.com/orgs/voideditor/projects/2).
|
||||
- 💡 Make suggestions in our [Discord](https://discord.gg/RSNjgaugJs).
|
||||
- 🪴 Start new Issues - see [Issues](https://github.com/voideditor/void/issues).
|
||||
|
||||
|
||||
|
||||
### Codebase Guide
|
||||
|
||||
We [highly recommend reading this](https://github.com/voideditor/void/blob/main/VOID_CODEBASE_GUIDE.md) guide that we put together on Void's sourcecode if you'd like to add new features.
|
||||
|
||||
The repo is not as intimidating as it first seems if you read the guide!
|
||||
|
||||
Most of Void's code lives in the folder `src/vs/workbench/contrib/void/`.
|
||||
|
||||
|
||||
|
||||
## Editing Void's Code
|
||||
|
||||
If you're making changes to Void's code as a contributor, you'll want to run a local version of Void to make sure your changes worked. Developer mode lets you do this. Here's how to use it.
|
||||
|
||||
### a. Mac - Prerequisites
|
||||
|
||||
If you're using a Mac, you need Python and XCode. You probably have these by default.
|
||||
|
||||
### b. Windows - Prerequisites
|
||||
|
||||
If you're using a Windows computer, first get [Visual Studio 2022](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community) (recommended) or [VS Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools) (not recommended). If you already have both, you might need to run the next few steps on both of them.
|
||||
|
||||
Go to the "Workloads" tab and select:
|
||||
- `Desktop development with C++`
|
||||
- `Node.js build tools`
|
||||
|
||||
Go to the "Individual Components" tab and select:
|
||||
- `MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (Latest)`
|
||||
- `C++ ATL for latest build tools with Spectre Mitigations`
|
||||
- `C++ MFC for latest build tools with Spectre Mitigations`
|
||||
|
||||
Finally, click Install.
|
||||
|
||||
### c. Linux - Prerequisites
|
||||
|
||||
First, run `npm install -g node-gyp`. Then:
|
||||
|
||||
- Debian (Ubuntu, etc): `sudo apt-get install build-essential g++ libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev python-is-python3`.
|
||||
- Red Hat (Fedora, etc): `sudo dnf install @development-tools gcc gcc-c++ make libsecret-devel krb5-devel libX11-devel libxkbfile-devel`.
|
||||
- SUSE (openSUSE, etc): `sudo zypper install patterns-devel-C-C++-devel_C_C++ krb5-devel libsecret-devel libxkbfile-devel libX11-devel`.
|
||||
- Others: see [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute).
|
||||
|
||||
### Developer Mode Instructions
|
||||
|
||||
Here's how to start changing Void's code. These steps cover everything from cloning Void, to opening a Developer Mode window where you can play around with your updates.
|
||||
|
||||
1. `git clone https://github.com/voideditor/void` to clone the repo.
|
||||
2. `npm install` to install all dependencies.
|
||||
3. Open Void or VSCode, and initialize Developer Mode (this can take ~5 min to finish, it's done when 2 of the 3 spinners turn to check marks):
|
||||
- Windows: Press <kbd>Ctrl+Shift+B</kbd>.
|
||||
- Mac: Press <kbd>Cmd+Shift+B</kbd>.
|
||||
- Linux: Press <kbd>Ctrl+Shift+B</kbd>.
|
||||
4. Open the Void Developer Mode window:
|
||||
- Windows: `./scripts/code.bat`.
|
||||
- Mac: `./scripts/code.sh`.
|
||||
- Linux: `./scripts/code.sh`.
|
||||
5. You're good to start editing Void's code!
|
||||
- You won't see your changes unless you press <kbd>Ctrl+R</kbd> (<kbd>Cmd+R</kbd>) inside the new window to reload. Alternatively, press <kbd>Ctrl+Shift+P</kbd> and `Reload Window`.
|
||||
- You might want to add the flags `--user-data-dir ./.tmp/user-data --extensions-dir ./.tmp/extensions` to the command in step 4, which lets you reset any IDE changes you made by deleting the `.tmp` folder.
|
||||
- You can kill any of the build scripts by pressing `Ctrl+D` in its terminal. If you press `Ctrl+C` the script will close but will keep running in the background.
|
||||
|
||||
If you get any errors, scroll down for common fixes.
|
||||
|
||||
#### Common Fixes
|
||||
|
||||
- Make sure you followed the prerequisite steps above.
|
||||
- Make sure you have Node version `20.18.2` (the version in `.nvmrc`).
|
||||
- You can do this without changing your global Node version using [nvm](https://github.com/nvm-sh/nvm): run `nvm install`, followed by `nvm use` to install the version in `.nvmrc` locally.
|
||||
- Make sure the path to your Void folder does not have any spaces in it.
|
||||
- If you get `"TypeError: Failed to fetch dynamically imported module"`, make sure all imports end with `.js`.
|
||||
- If you get an error with React, try running `NODE_OPTIONS="--max-old-space-size=8192" npm run buildreact`.
|
||||
- If you see missing styles, wait a few seconds and then reload.
|
||||
- If you get errors like `npm error libtool: error: unrecognised option: '-static'`, when running ./scripts/code.sh, make sure you have GNU libtool instead of BSD libtool (BSD is the default in macos)
|
||||
- If you get errors like `The SUID sandbox helper binary was found, but is not configured correctly` when running ./scripts/code.sh, run
|
||||
`sudo chown root:root .build/electron/chrome-sandbox && sudo chmod 4755 .build/electron/chrome-sandbox` and then run `./scripts/code.sh` again.
|
||||
- If you have any other questions, feel free to [submit an issue](https://github.com/voideditor/void/issues/new). You can also refer to VSCode's complete [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute) page.
|
||||
|
||||
|
||||
|
||||
#### Building Void from Terminal
|
||||
|
||||
To build Void from the terminal instead of from inside VSCode, follow the steps above, but instead of pressing <kbd>Cmd+Shift+B</kbd>, run `npm run watch`. The build is done when you see something like this:
|
||||
|
||||
```
|
||||
[watch-extensions] [00:37:39] Finished compilation extensions with 0 errors after 19303 ms
|
||||
[watch-client ] [00:38:06] Finished compilation with 0 errors after 46248 ms
|
||||
[watch-client ] [00:38:07] Starting compilation...
|
||||
[watch-client ] [00:38:07] Finished compilation with 0 errors after 5 ms
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Distributing
|
||||
Void's maintainers distribute Void on our website and in releases. Our build pipeline is a fork of VSCodium, and it works by running GitHub Actions which create the downloadables. The build repo with more instructions lives [here](https://github.com/voideditor/void-builder).
|
||||
|
||||
If you want to completely control Void's build pipeline for your own internal usage, which comes with a lot of time cost (and is typically not recommended), see our [`void-builder`](https://github.com/voideditor/void-builder) repo which builds Void and contains a few important notes about auto-updating and rebasing.
|
||||
|
||||
|
||||
#### Building a Local Executible
|
||||
We don't usually recommend building a local executible of Void - typically you should follow the steps above to distribute a complete executible with the advantages of VSCodium baked-in, or you should just use Developer Mode to run Void locally which is much faster. If you're certain this is what you want, see details below.
|
||||
|
||||
<details>
|
||||
<summary> Building Locally (not recommended)</summary>
|
||||
If you're certain you want to build a local executible of Void, follow these steps. It can take ~25 minutes.
|
||||
|
||||
Make sure you've already entered Developer Mode with Void first, then run one of the following commands. This will create a folder named `VSCode-darwin-arm64` or similar outside of the void/ repo (see below).
|
||||
|
||||
|
||||
##### Mac
|
||||
- `npm run gulp vscode-darwin-arm64` - most common (Apple Silicon)
|
||||
- `npm run gulp vscode-darwin-x64` (Intel)
|
||||
|
||||
##### Windows
|
||||
- `npm run gulp vscode-win32-x64` - most common
|
||||
- `npm run gulp vscode-win32-arm64`
|
||||
|
||||
##### Linux
|
||||
- `npm run gulp vscode-linux-x64` - most common
|
||||
- `npm run gulp vscode-linux-arm64`
|
||||
|
||||
|
||||
##### Local Executible Output
|
||||
|
||||
The local executible will be located in a folder outside of `void/`:
|
||||
```bash
|
||||
workspace/
|
||||
├── void/ # Your Void fork
|
||||
└── VSCode-darwin-arm64/ # Generated output
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
|
||||
- Please submit a pull request once you've made a change.
|
||||
- No need to submit an Issue unless you're creating a new feature that might involve multiple PRs.
|
||||
- Please don't use AI to write your PR 🙂
|
||||
|
||||
|
||||
|
||||
|
||||
26
LICENSE-VS-Code.txt
Normal file
26
LICENSE-VS-Code.txt
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
Void is a fork of VS Code, which is licensed under the MIT License (below).
|
||||
Void's additions and modifications are licensed under the Apache 2.0 License (see LICENSE.txt).
|
||||
|
||||
--------------------
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2015 - present Microsoft Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
214
LICENSE.txt
214
LICENSE.txt
|
|
@ -1,21 +1,201 @@
|
|||
MIT License
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
Copyright (c) 2015 - present Microsoft Corporation
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
1. Definitions.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2025 Glass Devtools, Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
# Useful links
|
||||
|
||||
LineMage put together this list of links to get up and running with VSCode's sourcecode. We hope it's helpful!
|
||||
|
||||
## Beginners / Getting started
|
||||
|
||||
- [VSCode UI guide](https://code.visualstudio.com/docs/getstarted/userinterface) - covers auxbar, panels, etc.
|
||||
|
||||
- [UX guide](https://code.visualstudio.com/api/ux-guidelines/overview) - covers Containers, Views, Items, etc.
|
||||
|
||||
## Contributing
|
||||
|
||||
- [How VS Code's sourcecode is organized](https://github.com/microsoft/vscode/wiki/Source-Code-Organization) - this explains where the entry point files are, what `browser/` and `common/` mean, etc. This is the most important read on this whole list! We recommend reading the whole thing.
|
||||
|
||||
|
||||
- [Every command](https://code.visualstudio.com/api/references/commands) built-in to VSCode - sometimes useful to reference.
|
||||
|
||||
|
||||
## VSCode's Extension API
|
||||
|
||||
LineMage is mostly an extension right now, and these links were very useful for us to get set up.
|
||||
|
||||
- [Files you need in an extension](https://code.visualstudio.com/api/get-started/extension-anatomy).
|
||||
|
||||
- [An extension's `package.json` schema](https://code.visualstudio.com/api/references/extension-manifest).
|
||||
|
||||
- ["Contributes" Guide](https://code.visualstudio.com/api/references/contribution-points) - the `"contributes"` part of `package.json` is how an extension mounts.
|
||||
|
||||
- [Activation events](https://code.visualstudio.com/api/references/activation-events) you can define in `package.json`.
|
||||
|
||||
- [The Full VSCode Extension API](https://code.visualstudio.com/api/references/vscode-api) - look on the right side for organization. The [bottom](https://code.visualstudio.com/api/references/vscode-api#api-patterns) of the page is easy to miss but is useful - cancellation tokens, events, disposables.
|
||||
|
||||
|
||||
51
README.md
51
README.md
|
|
@ -1,20 +1,53 @@
|
|||
# Welcome to LineMage!
|
||||
# Void - Custom Fork
|
||||
|
||||
## Description
|
||||
|
||||
LineMage is the open-source Cursor alternative. It's a fork of the of [vscode](https://github.com/microsoft/vscode) repository.
|
||||
This is my personal fork of **Void**, maintained to keep the project updated with the latest models and improvements.
|
||||
|
||||
## Build Instructions
|
||||
|
||||
To build Void from the command line, follow these steps:
|
||||
|
||||
## Contributing
|
||||
### 1. Clone the Repository
|
||||
|
||||
To contribute, see [`CONTRIBUTING.md`](https://github.com/linemagedev/linemage/blob/main/CONTRIBUTING.md).
|
||||
```bash
|
||||
git clone https://github.com/jcommaret/void.git
|
||||
cd void
|
||||
```
|
||||
|
||||
We're in very early stages and building quickly. We welcome all new contributions!
|
||||
### 2. Install Dependencies
|
||||
|
||||
## Reference
|
||||
For some useful links we've compiled see [`LINEMAGE_USEFUL_LINKS.md`](https://github.com/linemagedev/linemage/blob/main/LINEMAGE_VSCODE_GUIDE.md).
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
## Anything else
|
||||
Feel free to reach out in our Discord or contact us via email.
|
||||
### 3. Build the Project
|
||||
|
||||
```bash
|
||||
npm run buildreact
|
||||
npm run watch
|
||||
```
|
||||
|
||||
### 4. Start the Application
|
||||
|
||||
```bash
|
||||
./scripts/code.sh
|
||||
```
|
||||
|
||||
### 5. Build for macOS (ARM64)
|
||||
|
||||
```bash
|
||||
npm run gulp vscode-darwin-arm64
|
||||
```
|
||||
|
||||
## Support
|
||||
|
||||
If you need help building your own version of Void or have any questions, feel free to reach me:
|
||||
|
||||
- **Discord**: [Join the community](https://discord.gg/xBRHsjn6Dn)
|
||||
|
||||
## Notes
|
||||
|
||||
- This is a custom fork with personal modifications
|
||||
- Regular updates are applied to keep the project current
|
||||
- Contributions and feedback are welcome
|
||||
|
|
|
|||
41
SECURITY.md
41
SECURITY.md
|
|
@ -1,41 +0,0 @@
|
|||
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->
|
||||
|
||||
## Security
|
||||
|
||||
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).
|
||||
|
||||
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.
|
||||
|
||||
## Reporting Security Issues
|
||||
|
||||
**Please do not report security vulnerabilities through public GitHub issues.**
|
||||
|
||||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).
|
||||
|
||||
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).
|
||||
|
||||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
||||
|
||||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
||||
|
||||
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
||||
* Full paths of source file(s) related to the manifestation of the issue
|
||||
* The location of the affected source code (tag/branch/commit or direct URL)
|
||||
* Any special configuration required to reproduce the issue
|
||||
* Step-by-step instructions to reproduce the issue
|
||||
* Proof-of-concept or exploit code (if possible)
|
||||
* Impact of the issue, including how an attacker might exploit the issue
|
||||
|
||||
This information will help us triage your report more quickly.
|
||||
|
||||
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.
|
||||
|
||||
## Preferred Languages
|
||||
|
||||
We prefer all communications to be in English.
|
||||
|
||||
## Policy
|
||||
|
||||
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).
|
||||
|
||||
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
||||
|
|
@ -4,6 +4,34 @@ This repository incorporates material as listed below or described in the code.
|
|||
|
||||
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
@fig/autocomplete-shared 1.1.2
|
||||
https://github.com/withfig/autocomplete-tools
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Hercules Labs Inc. (Fig)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
---------------------------------------------------------
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
@iktakahiro/markdown-it-katex 4.0.2 - MIT
|
||||
|
|
@ -58,6 +86,34 @@ SOFTWARE.
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
amazon-q-developer-cli f66e0b0e917ab185eef528dc36eca56b78ca8b5d
|
||||
https://github.com/aws/amazon-q-developer-cli
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Amazon.com, Inc. or its affiliates.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
---------------------------------------------------------
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
atom/language-clojure 0.22.8 - MIT
|
||||
https://github.com/atom/language-clojure
|
||||
|
||||
|
|
@ -169,7 +225,7 @@ OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
atom/language-sass 0.62.1 - MIT
|
||||
atom/language-sass 0.61.4 - MIT
|
||||
https://github.com/atom/language-sass
|
||||
|
||||
The MIT License (MIT)
|
||||
|
|
@ -263,6 +319,34 @@ suitability for any purpose.
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
autocomplete 2.684.0 - MIT
|
||||
https://github.com/withfig/autocomplete
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Hercules Labs Inc. (Fig)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
---------------------------------------------------------
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
cacheable-request 7.0.4 - MIT
|
||||
|
||||
|
||||
|
|
@ -440,6 +524,580 @@ Title to copyright in this work will at all times remain with copyright holders.
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
dompurify 3.1.7 - Apache 2.0
|
||||
https://github.com/cure53/DOMPurify
|
||||
|
||||
DOMPurify
|
||||
Copyright 2025 Dr.-Ing. Mario Heiderich, Cure53
|
||||
|
||||
DOMPurify is free software; you can redistribute it and/or modify it under the
|
||||
terms of either:
|
||||
|
||||
a) the Apache License Version 2.0, or
|
||||
b) the Mozilla Public License Version 2.0
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Mozilla Public License, version 2.0
|
||||
|
||||
1. Definitions
|
||||
|
||||
1.1. "Contributor"
|
||||
|
||||
means each individual or legal entity that creates, contributes to the
|
||||
creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
|
||||
means the combination of the Contributions of others (if any) used by a
|
||||
Contributor and that particular Contributor’s Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
|
||||
means Source Code Form to which the initial Contributor has attached the
|
||||
notice in Exhibit A, the Executable Form of such Source Code Form, and
|
||||
Modifications of such Source Code Form, in each case including portions
|
||||
thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
a. that the initial Contributor has attached the notice described in
|
||||
Exhibit B to the Covered Software; or
|
||||
|
||||
b. that the Covered Software was made available under the terms of version
|
||||
1.1 or earlier of the License, but not also under the terms of a
|
||||
Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
|
||||
means a work that combines Covered Software with other material, in a separate
|
||||
file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
|
||||
means having the right to grant, to the maximum extent possible, whether at the
|
||||
time of the initial grant or subsequently, any and all of the rights conveyed by
|
||||
this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
|
||||
means any of the following:
|
||||
|
||||
a. any file in Source Code Form that results from an addition to, deletion
|
||||
from, or modification of the contents of Covered Software; or
|
||||
|
||||
b. any new file in Source Code Form that contains any Covered Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
|
||||
means any patent claim(s), including without limitation, method, process,
|
||||
and apparatus claims, in any patent Licensable by such Contributor that
|
||||
would be infringed, but for the grant of the License, by the making,
|
||||
using, selling, offering for sale, having made, import, or transfer of
|
||||
either its Contributions or its Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
|
||||
means either the GNU General Public License, Version 2.0, the GNU Lesser
|
||||
General Public License, Version 2.1, the GNU Affero General Public
|
||||
License, Version 3.0, or any later versions of those licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that controls, is
|
||||
controlled by, or is under common control with You. For purposes of this
|
||||
definition, "control" means (a) the power, direct or indirect, to cause
|
||||
the direction or management of such entity, whether by contract or
|
||||
otherwise, or (b) ownership of more than fifty percent (50%) of the
|
||||
outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
|
||||
2. License Grants and Conditions
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
a. under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or as
|
||||
part of a Larger Work; and
|
||||
|
||||
b. under Patent Claims of such Contributor to make, use, sell, offer for
|
||||
sale, have made, import, and otherwise transfer either its Contributions
|
||||
or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution become
|
||||
effective for each Contribution on the date the Contributor first distributes
|
||||
such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under this
|
||||
License. No additional rights or licenses will be implied from the distribution
|
||||
or licensing of Covered Software under this License. Notwithstanding Section
|
||||
2.1(b) above, no patent license is granted by a Contributor:
|
||||
|
||||
a. for any code that a Contributor has removed from Covered Software; or
|
||||
|
||||
b. for infringements caused by: (i) Your and any other third party’s
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
c. under Patent Claims infringed by Covered Software in the absence of its
|
||||
Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks, or
|
||||
logos of any Contributor (except as may be necessary to comply with the
|
||||
notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this License
|
||||
(see Section 10.2) or under the terms of a Secondary License (if permitted
|
||||
under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its Contributions
|
||||
are its original creation(s) or it has sufficient rights to grant the
|
||||
rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under applicable
|
||||
copyright doctrines of fair use, fair dealing, or other equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
|
||||
Section 2.1.
|
||||
|
||||
|
||||
3. Responsibilities
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under the
|
||||
terms of this License. You must inform recipients that the Source Code Form
|
||||
of the Covered Software is governed by the terms of this License, and how
|
||||
they can obtain a copy of this License. You may not attempt to alter or
|
||||
restrict the recipients’ rights in the Source Code Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
a. such Covered Software must also be made available in Source Code Form,
|
||||
as described in Section 3.1, and You must inform recipients of the
|
||||
Executable Form how they can obtain a copy of such Source Code Form by
|
||||
reasonable means in a timely manner, at a charge no more than the cost
|
||||
of distribution to the recipient; and
|
||||
|
||||
b. You may distribute such Executable Form under the terms of this License,
|
||||
or sublicense it under different terms, provided that the license for
|
||||
the Executable Form does not attempt to limit or alter the recipients’
|
||||
rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for the
|
||||
Covered Software. If the Larger Work is a combination of Covered Software
|
||||
with a work governed by one or more Secondary Licenses, and the Covered
|
||||
Software is not Incompatible With Secondary Licenses, this License permits
|
||||
You to additionally distribute such Covered Software under the terms of
|
||||
such Secondary License(s), so that the recipient of the Larger Work may, at
|
||||
their option, further distribute the Covered Software under the terms of
|
||||
either this License or such Secondary License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices (including
|
||||
copyright notices, patent notices, disclaimers of warranty, or limitations
|
||||
of liability) contained within the Source Code Form of the Covered
|
||||
Software, except that You may alter any license notices to the extent
|
||||
required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on behalf
|
||||
of any Contributor. You must make it absolutely clear that any such
|
||||
warranty, support, indemnity, or liability obligation is offered by You
|
||||
alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this License
|
||||
with respect to some or all of the Covered Software due to statute, judicial
|
||||
order, or regulation then You must: (a) comply with the terms of this License
|
||||
to the maximum extent possible; and (b) describe the limitations and the code
|
||||
they affect. Such description must be placed in a text file included with all
|
||||
distributions of the Covered Software under this License. Except to the
|
||||
extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||
understand it.
|
||||
|
||||
5. Termination
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically if You
|
||||
fail to comply with any of its terms. However, if You become compliant,
|
||||
then the rights granted under this License from a particular Contributor
|
||||
are reinstated (a) provisionally, unless and until such Contributor
|
||||
explicitly and finally terminates Your grants, and (b) on an ongoing basis,
|
||||
if such Contributor fails to notify You of the non-compliance by some
|
||||
reasonable means prior to 60 days after You have come back into compliance.
|
||||
Moreover, Your grants from a particular Contributor are reinstated on an
|
||||
ongoing basis if such Contributor notifies You of the non-compliance by
|
||||
some reasonable means, this is the first time You have received notice of
|
||||
non-compliance with this License from such Contributor, and You become
|
||||
compliant prior to 30 days after Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions, counter-claims,
|
||||
and cross-claims) alleging that a Contributor Version directly or
|
||||
indirectly infringes any patent, then the rights granted to You by any and
|
||||
all Contributors for the Covered Software under Section 2.1 of this License
|
||||
shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
|
||||
license agreements (excluding distributors and resellers) which have been
|
||||
validly granted by You or Your distributors under this License prior to
|
||||
termination shall survive termination.
|
||||
|
||||
6. Disclaimer of Warranty
|
||||
|
||||
Covered Software is provided under this License on an "as is" basis, without
|
||||
warranty of any kind, either expressed, implied, or statutory, including,
|
||||
without limitation, warranties that the Covered Software is free of defects,
|
||||
merchantable, fit for a particular purpose or non-infringing. The entire
|
||||
risk as to the quality and performance of the Covered Software is with You.
|
||||
Should any Covered Software prove defective in any respect, You (not any
|
||||
Contributor) assume the cost of any necessary servicing, repair, or
|
||||
correction. This disclaimer of warranty constitutes an essential part of this
|
||||
License. No use of any Covered Software is authorized under this License
|
||||
except under this disclaimer.
|
||||
|
||||
7. Limitation of Liability
|
||||
|
||||
Under no circumstances and under no legal theory, whether tort (including
|
||||
negligence), contract, or otherwise, shall any Contributor, or anyone who
|
||||
distributes Covered Software as permitted above, be liable to You for any
|
||||
direct, indirect, special, incidental, or consequential damages of any
|
||||
character including, without limitation, damages for lost profits, loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses, even if such party shall have been
|
||||
informed of the possibility of such damages. This limitation of liability
|
||||
shall not apply to liability for death or personal injury resulting from such
|
||||
party’s negligence to the extent applicable law prohibits such limitation.
|
||||
Some jurisdictions do not allow the exclusion or limitation of incidental or
|
||||
consequential damages, so this exclusion and limitation may not apply to You.
|
||||
|
||||
8. Litigation
|
||||
|
||||
Any litigation relating to this License may be brought only in the courts of
|
||||
a jurisdiction where the defendant maintains its principal place of business
|
||||
and such litigation shall be governed by laws of that jurisdiction, without
|
||||
reference to its conflict-of-law provisions. Nothing in this Section shall
|
||||
prevent a party’s ability to bring cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
|
||||
This License represents the complete agreement concerning the subject matter
|
||||
hereof. If any provision of this License is held to be unenforceable, such
|
||||
provision shall be reformed only to the extent necessary to make it
|
||||
enforceable. Any law or regulation which provides that the language of a
|
||||
contract shall be construed against the drafter shall not be used to construe
|
||||
this License against a Contributor.
|
||||
|
||||
|
||||
10. Versions of the License
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version of
|
||||
the License under which You originally received the Covered Software, or
|
||||
under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a modified
|
||||
version of this License if you rename the license and remove any
|
||||
references to the name of the license steward (except to note that such
|
||||
modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular file, then
|
||||
You may include the notice in a location (such as a LICENSE file in a relevant
|
||||
directory) where a recipient would be likely to look for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
|
||||
This Source Code Form is "Incompatible
|
||||
With Secondary Licenses", as defined by
|
||||
the Mozilla Public License, v. 2.0.
|
||||
---------------------------------------------------------
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
dotnet/csharp-tmLanguage 0.1.0 - MIT
|
||||
https://github.com/dotnet/csharp-tmLanguage
|
||||
|
||||
|
|
@ -545,7 +1203,34 @@ to the base-name name of the original file, and an extension of txt, html, or si
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
go-syntax 0.7.5 - MIT
|
||||
fish-shell 3.7.1
|
||||
https://github.com/fish-shell/fish-shell
|
||||
|
||||
Fish is a smart and user-friendly command line shell.
|
||||
|
||||
Copyright (C) 2005-2009 Axel Liljencrantz
|
||||
Copyright (C) 2009- fish-shell contributors
|
||||
|
||||
fish is free software.
|
||||
|
||||
Most of fish is licensed under the GNU General Public License version 2, and
|
||||
you can redistribute it and/or modify it under the terms of the GNU GPL as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
fish also includes software licensed under the Python Software Foundation License version 2, the MIT
|
||||
license, and the GNU Library General Public License version 2.
|
||||
|
||||
Full licensing information is contained in doc_src/license.rst.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
---------------------------------------------------------
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
go-syntax 0.7.9 - MIT
|
||||
https://github.com/worlpaker/go-syntax
|
||||
|
||||
MIT License
|
||||
|
|
@ -593,7 +1278,7 @@ without specific, written prior permission. Title to copyright in this document
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
Ionic documentation 1.2.4 - Apache2
|
||||
Ionic documentation 1.2.4 - Apache-2.0
|
||||
https://github.com/ionic-team/ionic-site
|
||||
|
||||
Copyright Drifty Co. http://drifty.com/.
|
||||
|
|
@ -977,7 +1662,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SO
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
language-docker 0.0.0 - Apache2
|
||||
language-docker 0.0.0 - Apache-2.0
|
||||
https://github.com/moby/moby
|
||||
|
||||
Apache License
|
||||
|
|
@ -1443,7 +2128,7 @@ SOFTWARE.
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
microsoft/vscode-mssql 1.23.0 - MIT
|
||||
microsoft/vscode-mssql 1.29.0 - MIT
|
||||
https://github.com/microsoft/vscode-mssql
|
||||
|
||||
------------------------------------------ START OF LICENSE -----------------------------------------
|
||||
|
|
@ -1534,7 +2219,7 @@ SOFTWARE.
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
RedCMD/YAML-Syntax-Highlighter 1.1.1 - MIT
|
||||
RedCMD/YAML-Syntax-Highlighter 1.3.2 - MIT
|
||||
https://github.com/RedCMD/YAML-Syntax-Highlighter
|
||||
|
||||
MIT License
|
||||
|
|
@ -1590,7 +2275,7 @@ suitability for any purpose.
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
REditorSupport/vscode-R 2.8.1 - MIT
|
||||
REditorSupport/vscode-R 2.8.4 - MIT
|
||||
https://github.com/REditorSupport/vscode-R
|
||||
|
||||
MIT License
|
||||
|
|
@ -1723,6 +2408,55 @@ SOFTWARE.
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
Shopify/ruby-lsp 0.0.0 - MIT License
|
||||
https://github.com/Shopify/ruby-lsp
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2022-present, Shopify Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
================================================================================
|
||||
The following files and related configuration in package.json are based on a
|
||||
sequence of adaptions: grammars/ruby.cson.json, grammars/erb.cson.json,
|
||||
languages/erb.json.
|
||||
|
||||
Copyright (c) 2016 Peng Lv
|
||||
Copyright (c) 2017-2019 Stafford Brunk
|
||||
https://github.com/rubyide/vscode-ruby
|
||||
|
||||
Released under the MIT license
|
||||
https://github.com/rubyide/vscode-ruby/blob/main/LICENSE.txt
|
||||
|
||||
Copyright (c) 2014 GitHub Inc.
|
||||
https://github.com/atom/language-ruby
|
||||
|
||||
Released under the MIT license
|
||||
https://github.com/atom/language-ruby/blob/master/LICENSE.md
|
||||
|
||||
https://github.com/textmate/ruby.tmbundle
|
||||
https://github.com/textmate/ruby.tmbundle#license
|
||||
---------------------------------------------------------
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
sumneko/lua.tmbundle 1.0.0 - TextMate Bundle License
|
||||
https://github.com/sumneko/lua.tmbundle
|
||||
|
||||
|
|
@ -1952,26 +2686,6 @@ to the base-name name of the original file, and an extension of txt, html, or si
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
textmate/ruby.tmbundle 0.0.0 - TextMate Bundle License
|
||||
https://github.com/textmate/ruby.tmbundle
|
||||
|
||||
Copyright (c) textmate-ruby.tmbundle project authors
|
||||
|
||||
If not otherwise specified (see below), files in this folder fall under the following license:
|
||||
|
||||
Permission to copy, use, modify, sell and distribute this
|
||||
software is granted. This software is provided "as is" without
|
||||
express or implied warranty, and with no claim as to its
|
||||
suitability for any purpose.
|
||||
|
||||
An exception is made for files in readable text which contain their own license information,
|
||||
or files where an accompanying file exists (in the same directory) with a "-license" suffix added
|
||||
to the base-name name of the original file, and an extension of txt, html, or similar. For example
|
||||
"tidy" is accompanied by "tidy-license.txt".
|
||||
---------------------------------------------------------
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
trond-snekvik/vscode-rst 1.5.3 - MIT
|
||||
https://github.com/trond-snekvik/vscode-rst
|
||||
|
||||
|
|
@ -2482,7 +3196,7 @@ Creative Commons may be contacted at creativecommons.org.
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
vscode-logfile-highlighter 2.17.0 - MIT
|
||||
vscode-logfile-highlighter 3.3.4 - MIT
|
||||
https://github.com/emilast/vscode-logfile-highlighter
|
||||
|
||||
The MIT License (MIT)
|
||||
|
|
@ -2594,7 +3308,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
---------------------------------------------------------
|
||||
|
||||
Web Background Synchronization - Apache2
|
||||
Web Background Synchronization - Apache-2.0
|
||||
https://github.com/WICG/background-sync
|
||||
|
||||
Apache License
|
||||
|
|
@ -2798,4 +3512,24 @@ Apache License
|
|||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
---------------------------------------------------------
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
zsh 5.9
|
||||
https://github.com/zsh-users/zsh
|
||||
|
||||
Unless otherwise noted in the header of specific files, files in this distribution have the licence shown below.
|
||||
|
||||
However, note that certain shell functions are licensed under versions of the GNU General Public Licence. Anyone distributing the shell as a binary including those files needs to take account of this. Search shell functions for "Copyright" for specific copyright information. None of the core functions are affected by this, so those files may simply be omitted.
|
||||
|
||||
--
|
||||
|
||||
The Z Shell is copyright (c) 1992-2017 Paul Falstad, Richard Coleman, Zoltán Hidvégi, Andrew Main, Peter Stephenson, Sven Wischnowsky, and others. All rights reserved. Individual authors, whether or not specifically named, retain copyright in all changes; in what follows, they are referred to as `the Zsh Development Group'. This is for convenience only and this body has no legal status. The Z shell is distributed under the following licence; any provisions made in individual files take precedence.
|
||||
|
||||
Permission is hereby granted, without written agreement and without licence or royalty fees, to use, copy, modify, and distribute this software and to distribute modified versions of this software for any purpose, provided that the above copyright notice and the following two paragraphs appear in all copies of this software.
|
||||
|
||||
In no event shall the Zsh Development Group be liable to any party for direct, indirect, special, incidental, or consequential damages arising out of the use of this software and its documentation, even if the Zsh Development Group have been advised of the possibility of such damage.
|
||||
|
||||
The Zsh Development Group specifically disclaim any warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The software provided hereunder is on an "as is" basis, and the Zsh Development Group have no obligation to provide maintenance, support, updates, enhancements, or modifications.
|
||||
---------------------------------------------------------
|
||||
167
VOID_CODEBASE_GUIDE.md
Normal file
167
VOID_CODEBASE_GUIDE.md
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
# Void Codebase Guide
|
||||
|
||||
The Void codebase is not as intimidating as it seems!
|
||||
|
||||
Most of Void's code lives in the folder `src/vs/workbench/contrib/void/`.
|
||||
|
||||
The purpose of this document is to explain how Void's codebase works. If you want build instructions instead, see [Contributing](https://github.com/voideditor/void/blob/main/HOW_TO_CONTRIBUTE.md).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Void Codebase Guide
|
||||
|
||||
### VSCode Rundown
|
||||
Here's a VSCode rundown if you're just getting started with Void. You can also see Microsoft's [wiki](https://github.com/microsoft/vscode/wiki/Source-Code-Organization) for some pictures. VSCode is an Electron app. Electron runs two processes: a **main** process (for internals) and a **browser** process (browser means HTML in general, not just "web browser").
|
||||
<p align="center" >
|
||||
<img src="https://github.com/user-attachments/assets/eef80306-2bfe-4cac-ba15-6156f65ab3bb" alt="Credit - https://github.com/microsoft/vscode/wiki/Source-Code-Organization" width="700px">
|
||||
</p>
|
||||
|
||||
- Code in a `browser/` folder always lives on the browser process, and it can use `window` and other browser items.
|
||||
- Code in an `electron-main/` folder always lives on the main process, and it can import `node_modules`.
|
||||
- Code in `common/` can be used by either process, but doesn't get any special imports.
|
||||
- The browser environment is not allowed to import `node_modules`. We came up with two workarounds:
|
||||
1. Bundle the raw node_module code to the browser - we're doing this for React.
|
||||
2. Implement the code on `electron-main/` and set up a channel between main/browser - we're doing this for sendLLMMessage.
|
||||
|
||||
|
||||
|
||||
|
||||
### Terminology
|
||||
|
||||
Here's some terminology you might want to know about when working inside VSCode:
|
||||
- An **Editor** is the thing that you type your code in. If you have 10 tabs open, that's just one editor! Editors contain tabs (or "models").
|
||||
- A **Model** is an internal representation of a file's contents. It's shared between editors (for example, if you press `Cmd+\` to make a new editor, then the model of a file like `A.ts` is shared between them. Two editors, one model. That's how changes sync.).
|
||||
- Each model has a **URI** it represents, like `/Users/.../my_file.txt`. (A URI or "resource" is generally just a path).
|
||||
- The **Workbench** is the wrapper that contains all the editors, the terminal, the file system tree, etc.
|
||||
- Usually you use the `ITextModel` type for models and the `ICodeEditor` type for editors. There aren't that many other types.
|
||||
<p align="center" >
|
||||
<img src="https://github.com/user-attachments/assets/6521c228-dc96-4cf5-a673-6b9ca78b9b06" alt="Credit - https://code.visualstudio.com/docs/getstarted/userinterface" width="400px">
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
- VSCode is organized into "**Services**". A service is just a class that mounts a single time (in computer science theory this is called a "singleton"). You can register services with `registerSingleton` so that you can easily use them in any constructor with `@<Service>`. See _dummyContrib for an example we put together on how to register them. The registration is the same every time.
|
||||
|
||||
- "**Actions**" are functions you register on VSCode so that either you or the user can call them later. They're also called "**Commands**".
|
||||
- You can run actions as a user by pressing Cmd+Shift+P (opens the command pallete), or you can run them internally by using the commandService to call them by ID. We use actions to register keybinding listeners like Cmd+L, Cmd+K, etc. The nice thing about actions is the user can change the keybindings.
|
||||
|
||||
|
||||
### Internal LLM Message Pipeline
|
||||
|
||||
Here's a picture of all the dependencies that are relevent between the time you first send a message through Void's sidebar, and the time a request is sent to your provider.
|
||||
Sending LLM messages from the main process avoids CSP issues with local providers and lets us use node_modules more easily.
|
||||
|
||||
|
||||
<div align="center">
|
||||
<img width="100%" src="https://github.com/user-attachments/assets/9cf54dbb-82c4-4488-97a2-bd8dea890b50">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
**Notes:** `modelCapabilities` is an important file that must be updated when new models come out!
|
||||
|
||||
|
||||
### Apply
|
||||
|
||||
Void has two types of Apply: **Fast Apply** (uses Search/Replace, see below), and **Slow Apply** (rewrites whole file).
|
||||
|
||||
When you click Apply and Fast Apply is enabled, we prompt the LLM to output Search/Replace block(s) like this:
|
||||
```
|
||||
<<<<<<< ORIGINAL
|
||||
// original code goes here
|
||||
=======
|
||||
// replaced code goes here
|
||||
>>>>>>> UPDATED
|
||||
```
|
||||
This is what allows Void to quickly apply code even on 1000-line files. It's the same as asking the LLM to press Ctrl+F and enter in a search/replace query.
|
||||
|
||||
### Apply Inner Workings
|
||||
|
||||
The `editCodeService` file runs Apply. The same exact code is also used when the LLM calls the Edit tool, and when you submit Cmd+K. Just different versions of Fast/Slow Apply mode.
|
||||
|
||||
Here is some important terminology:
|
||||
- A **DiffZone** is a {startLine, endLine} region of text where we compute and show red/green areas, or **Diffs**. When any changes are made to a file, we loop through all the DiffAreas on that file and refresh its Diffs.
|
||||
- A **DiffArea** is a generalization that just tracks line numbers like a DiffZone.
|
||||
- The only type of DiffArea that can "stream" is a DiffZone. Each DiffZone has an llmCancelToken if it's streaming.
|
||||
|
||||
How Apply works:
|
||||
- When you click Apply, we create a **DiffZone** over that the full file so that any changes that the LLM makes will show up in red/green. We then stream the change.
|
||||
- When an LLM calls Edit, it's really calling Apply.
|
||||
- When you submit Cmd+K, it's the same as Apply except we create a smaller DiffZone (not on the whole file).
|
||||
|
||||
|
||||
### Writing Files Inner Workings
|
||||
When Void wants to change your code, it just writes to a text model. This means all you need to know to write to a file is its URI - you don't have to load it, save it, etc. There are some annoying background URI/model things to think about to get this to work, but we handled them all in `voidModelService`.
|
||||
|
||||
### Void Settings Inner Workings
|
||||
We have a service `voidSettingsService` that stores all your Void settings (providers, models, global Void settings, etc). Imagine this as an implicit dependency for any of the core Void services:
|
||||
|
||||
<div align="center">
|
||||
<img width="800" src="https://github.com/user-attachments/assets/9f3cb68c-a61b-4810-8429-bb90b992b3fa">
|
||||
</div>
|
||||
|
||||
Here's a guide to some of the terminology we're using:
|
||||
- **FeatureName**: Autocomplete | Chat | CtrlK | Apply
|
||||
- **ModelSelection**: a {providerName, modelName} pair.
|
||||
- **ProviderName**: The name of a provider: `'ollama'`, `'openAI'`, etc.
|
||||
- **ModelName**: The name of a model (string type, eg `'gpt-4o'`).
|
||||
- **RefreshProvider**: a provider that we ping repeatedly to update the models list.
|
||||
- **ChatMode** = normal | gather | agent
|
||||
|
||||
|
||||
|
||||
### Approval State
|
||||
`editCodeService`'s data structures contain all the information about changes that the user needs to review. However, they don't store that information in a useful format. We wrote the following service to get a more useful derived state:
|
||||
|
||||
<div align="center">
|
||||
<img width="600" src="https://github.com/user-attachments/assets/f3645355-dff6-467c-bc38-ffe52077c08b">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
### Build process
|
||||
If you want to know how our build pipeline works, see our build repo [here](https://github.com/voideditor/void-builder).
|
||||
|
||||
|
||||
|
||||
## VSCode Codebase Guide
|
||||
|
||||
For additional references, the Void team put together this list of links to get up and running with VSCode.
|
||||
<details>
|
||||
|
||||
|
||||
#### Links for Beginners
|
||||
|
||||
- [VSCode UI guide](https://code.visualstudio.com/docs/getstarted/userinterface) - covers auxbar, panels, etc.
|
||||
- [UX guide](https://code.visualstudio.com/api/ux-guidelines/overview) - covers Containers, Views, Items, etc.
|
||||
|
||||
#### Links for Contributors
|
||||
|
||||
- [How VSCode's sourcecode is organized](https://github.com/microsoft/vscode/wiki/Source-Code-Organization) - this explains where the entry point files are, what `browser/` and `common/` mean, etc. This is the most important read on this whole list! We recommend reading the whole thing.
|
||||
- [Built-in VSCode styles](https://code.visualstudio.com/api/references/theme-color) - CSS variables that are built into VSCode. Use `var(--vscode-{theme but replacing . with -})`. You can also see their [Webview theming guide](https://code.visualstudio.com/api/extension-guides/webview#theming-webview-content).
|
||||
|
||||
|
||||
#### Misc
|
||||
|
||||
- [Every command](https://code.visualstudio.com/api/references/commands) built-in to VSCode - not used often, but here for reference.
|
||||
- Note: VSCode's repo is the source code for the Monaco editor! An "editor" is a Monaco editor, and it shares the code for ITextModel, etc.
|
||||
|
||||
|
||||
#### VSCode's Extension API
|
||||
|
||||
Void is no longer an extension, so these links are no longer required, but they might be useful if we ever build an extension again.
|
||||
|
||||
- [Files you need in an extension](https://code.visualstudio.com/api/get-started/extension-anatomy).
|
||||
- [An extension's `package.json` schema](https://code.visualstudio.com/api/references/extension-manifest).
|
||||
- ["Contributes" Guide](https://code.visualstudio.com/api/references/contribution-points) - the `"contributes"` part of `package.json` is how an extension mounts.
|
||||
- [The Full VSCode Extension API](https://code.visualstudio.com/api/references/vscode-api) - look on the right side for organization. The [bottom](https://code.visualstudio.com/api/references/vscode-api#api-patterns) of the page is easy to miss but is useful - cancellation tokens, events, disposables.
|
||||
- [Activation events](https://code.visualstudio.com/api/references/activation-events) you can define in `package.json` (not the most useful).
|
||||
|
||||
|
||||
</details>
|
||||
|
|
@ -1 +1 @@
|
|||
2024-08-14T18:12:43.548Z
|
||||
2024-12-11T00:28:56.838Z
|
||||
|
|
|
|||
1
build/.gitignore
vendored
1
build/.gitignore
vendored
|
|
@ -1,2 +1 @@
|
|||
.yarnrc
|
||||
*.js.map
|
||||
|
|
|
|||
|
|
@ -55,6 +55,12 @@ fsevents/test/**
|
|||
@vscode/windows-registry/build/**
|
||||
!@vscode/windows-registry/build/Release/*.node
|
||||
|
||||
@vscode/tree-sitter-wasm/wasm/tree-sitter-*.wasm
|
||||
!@vscode/tree-sitter-wasm/wasm/tree-sitter-typescript.wasm
|
||||
!@vscode/tree-sitter-wasm/wasm/tree-sitter-regex.wasm
|
||||
!@vscode/tree-sitter-wasm/wasm/tree-sitter-ini.wasm
|
||||
!@vscode/tree-sitter-wasm/wasm/tree-sitter-css.wasm
|
||||
|
||||
native-keymap/binding.gyp
|
||||
native-keymap/build/**
|
||||
native-keymap/src/**
|
||||
|
|
@ -110,15 +116,13 @@ node-pty/third_party/**
|
|||
@parcel/watcher/src/**
|
||||
!@parcel/watcher/build/Release/*.node
|
||||
|
||||
vsda/build/**
|
||||
vsda/ci/**
|
||||
vsda/src/**
|
||||
vsda/.gitignore
|
||||
vsda/binding.gyp
|
||||
vsda/README.md
|
||||
vsda/SECURITY.md
|
||||
vsda/targets
|
||||
vsda/**
|
||||
!vsda/index.js
|
||||
!vsda/index.d.ts
|
||||
!vsda/package.json
|
||||
!vsda/build/Release/vsda.node
|
||||
!vsda/rust/web/**
|
||||
!vsda/rust/bundler/**
|
||||
|
||||
@vscode/policy-watcher/build/**
|
||||
@vscode/policy-watcher/.husky/**
|
||||
|
|
@ -132,6 +136,7 @@ vsda/targets
|
|||
!@vscode/windows-ca-certs/package.json
|
||||
!@vscode/windows-ca-certs/**/*.node
|
||||
|
||||
@vscode/node-addon-api/**/*
|
||||
node-addon-api/**/*
|
||||
prebuild-install/**/*
|
||||
|
||||
|
|
|
|||
1
build/.npmrc
Normal file
1
build/.npmrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
legacy-peer-deps="true"
|
||||
|
|
@ -26,6 +26,9 @@ vscode-textmate/webpack.config.js
|
|||
@xterm/addon-image/src/**
|
||||
@xterm/addon-image/out/**
|
||||
|
||||
@xterm/addon-ligatures/src/**
|
||||
@xterm/addon-ligatures/out/**
|
||||
|
||||
@xterm/addon-search/src/**
|
||||
@xterm/addon-search/out/**
|
||||
@xterm/addon-search/fixtures/**
|
||||
|
|
|
|||
|
|
@ -19,21 +19,15 @@ steps:
|
|||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
# Install yarn as the ARM64 build agent is using vanilla Ubuntu
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true) }}:
|
||||
- task: Npm@1
|
||||
displayName: Install yarn
|
||||
inputs:
|
||||
command: custom
|
||||
customCommand: install --global yarn
|
||||
- template: ../cli/cli-apply-patches.yml@self
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn --frozen-lockfile --ignore-optional
|
||||
npm ci
|
||||
workingDirectory: build
|
||||
displayName: Install pipeline build
|
||||
|
||||
- template: ../cli/cli-apply-patches.yml@self
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Install build dependencies
|
||||
|
||||
- task: Npm@1
|
||||
displayName: Download openssl prebuilt
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ steps:
|
|||
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: "vscode-builds-subscription"
|
||||
azureSubscription: vscode
|
||||
KeyVaultName: vscode-build-secrets
|
||||
SecretsFilter: "github-distro-mixin-password"
|
||||
|
||||
|
|
@ -27,12 +27,12 @@ steps:
|
|||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Registry
|
||||
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js alpine $VSCODE_ARCH > .build/yarnlockhash
|
||||
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js alpine $VSCODE_ARCH > .build/packagelockhash
|
||||
displayName: Prepare node_modules cache key
|
||||
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"node_modules" | .build/yarnlockhash'
|
||||
key: '"node_modules" | .build/packagelockhash'
|
||||
path: .build/node_modules_cache
|
||||
cacheHitVar: NODE_MODULES_RESTORED
|
||||
displayName: Restore node_modules cache
|
||||
|
|
@ -43,24 +43,23 @@ steps:
|
|||
|
||||
- script: |
|
||||
set -e
|
||||
npm config set registry "$NPM_REGISTRY" --location=project
|
||||
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
|
||||
# following is a workaround for yarn to send authorization header
|
||||
# for GET requests to the registry.
|
||||
echo "always-auth=true" >> .npmrc
|
||||
yarn config set registry "$NPM_REGISTRY"
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$NPM_REGISTRY"
|
||||
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM & Yarn
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: .npmrc
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
- task: Docker@1
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: "vscode-builds-subscription"
|
||||
azureSubscriptionEndpoint: vscode
|
||||
azureContainerRegistry: vscodehub.azurecr.io
|
||||
command: "Run an image"
|
||||
imageName: "vscode-linux-build-agent:alpine-$(VSCODE_ARCH)"
|
||||
|
|
@ -74,13 +73,14 @@ steps:
|
|||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
echo "Yarn failed too many times" >&2
|
||||
npm ci && break
|
||||
if [ $i -eq 5 ]; then
|
||||
echo "Npm install failed too many times" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Yarn failed $i, trying again..."
|
||||
echo "Npm install failed $i, trying again..."
|
||||
done
|
||||
env:
|
||||
npm_config_arch: $(NPM_ARCH)
|
||||
|
|
@ -89,7 +89,7 @@ steps:
|
|||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME: vscodehub.azurecr.io/vscode-linux-build-agent:alpine-$(VSCODE_ARCH)
|
||||
VSCODE_HOST_MOUNT: "/mnt/vss/_work/1/s"
|
||||
displayName: Install build dependencies
|
||||
displayName: Install dependencies
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
|
||||
- script: node build/azure-pipelines/distro/mixin-npm
|
||||
|
|
@ -112,7 +112,7 @@ steps:
|
|||
- script: |
|
||||
set -e
|
||||
TARGET=$([ "$VSCODE_ARCH" == "x64" ] && echo "linux-alpine" || echo "alpine-arm64") # TODO@joaomoreno
|
||||
yarn gulp vscode-reh-$TARGET-min-ci
|
||||
npm run gulp vscode-reh-$TARGET-min-ci
|
||||
(cd .. && mv vscode-reh-$TARGET vscode-server-$TARGET) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/server/vscode-server-$TARGET.tar.gz"
|
||||
DIR_PATH="$(realpath ../vscode-server-$TARGET)"
|
||||
|
|
@ -127,7 +127,7 @@ steps:
|
|||
- script: |
|
||||
set -e
|
||||
TARGET=$([ "$VSCODE_ARCH" == "x64" ] && echo "linux-alpine" || echo "alpine-arm64")
|
||||
yarn gulp vscode-reh-web-$TARGET-min-ci
|
||||
npm run gulp vscode-reh-web-$TARGET-min-ci
|
||||
(cd .. && mv vscode-reh-web-$TARGET vscode-server-$TARGET-web) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/web/vscode-server-$TARGET-web.tar.gz"
|
||||
DIR_PATH="$(realpath ../vscode-server-$TARGET-web)"
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ steps:
|
|||
- script: |
|
||||
set -e
|
||||
if [ -n "$SYSROOT_ARCH" ]; then
|
||||
export VSCODE_SYSROOT_PREFIX='-glibc-2.17'
|
||||
export VSCODE_SYSROOT_DIR=$(Build.SourcesDirectory)/.build/sysroots
|
||||
node -e '(async () => { const { getVSCodeSysroot } = require("../build/linux/debian/install-sysroot.js"); await getVSCodeSysroot(process.env["SYSROOT_ARCH"]); })()'
|
||||
if [ "$SYSROOT_ARCH" == "arm64" ]; then
|
||||
|
|
@ -73,7 +72,7 @@ steps:
|
|||
|
||||
# verify glibc requirement
|
||||
if [ -n "$SYSROOT_ARCH" ]; then
|
||||
glibc_version="2.17"
|
||||
glibc_version="2.28"
|
||||
while IFS= read -r line; do
|
||||
if [[ $line == *"GLIBC_"* ]]; then
|
||||
version=$(echo "$line" | awk '{print $5}' | tr -d '()')
|
||||
|
|
@ -83,8 +82,8 @@ steps:
|
|||
fi
|
||||
fi
|
||||
done < <("$OBJDUMP" -T "$PWD/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code")
|
||||
if [[ "$glibc_version" != "2.17" ]]; then
|
||||
echo "Error: binary has dependency on GLIBC > 2.17, found $glibc_version"
|
||||
if [[ "$glibc_version" != "2.28" ]]; then
|
||||
echo "Error: binary has dependency on GLIBC > 2.28, found $glibc_version"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
|
@ -108,6 +107,18 @@ steps:
|
|||
${{ pair.key }}: ${{ pair.value }}
|
||||
|
||||
- ${{ if contains(parameters.VSCODE_CLI_TARGET, '-windows-') }}:
|
||||
- task: PublishSymbols@2
|
||||
inputs:
|
||||
IndexSources: false
|
||||
SymbolsFolder: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release
|
||||
SearchPattern: 'code.pdb'
|
||||
SymbolServerType: TeamServices
|
||||
SymbolsProduct: 'code'
|
||||
ArtifactServices.Symbol.AccountName: microsoft
|
||||
ArtifactServices.Symbol.PAT: $(System.AccessToken)
|
||||
ArtifactServices.Symbol.UseAAD: false
|
||||
displayName: Publish Symbols
|
||||
|
||||
- powershell: |
|
||||
. build/azure-pipelines/win32/exec.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue