Compare commits

...

732 Commits

Author SHA1 Message Date
Andrew Pareles b3166e7ef2 all repos 2026-06-02 15:03:37 -07:00
Andrew Pareles 17e7a5b152 Update README.md 2026-01-12 01:57:57 -08:00
Andrew Pareles f100db9175 Update README.md 2026-01-12 01:25:52 -08:00
Andrew Pareles 1ee8980fe1 typo 2025-08-06 17:07:32 -07:00
Andrew Pareles 74650cb867 clearer instructions on developer mode and building locally 2025-08-06 17:04:13 -07:00
Andrew Pareles 5aaa1604e1 Merge pull request #858 from chrisnumbers/main
Updated code selection to properly parse selected lines
2025-08-04 15:22:47 -07:00
Andrew Pareles ff717cad16 update lines 2025-08-04 15:21:42 -07:00
Chris 7a974f2dff Fixed selection output to include triple backticks and language tag 2025-08-04 14:23:35 -04:00
Chris cbb52dec28 Removed unnecessary ternary in lineNumAdd 2025-08-04 10:55:59 -04:00
Chris d948fc5950 Updated code selection to properly parse selected lines 2025-08-03 19:06:52 -04:00
Andrew Pareles ee39ee94b1 add dev note 2025-08-01 02:06:28 -07:00
Andrew Pareles a7eb54a09b Update releases and add download button 2025-07-22 01:53:37 -07:00
Andrew Pareles 34e3413dca wiki token 2025-07-05 01:01:07 -07:00
Andrew Pareles 607a61c068 Merge pull request #797 from voideditor/revert-784-fix-ime-composition-chat
Revert "Fix: IME composition preventing message sending in chat"
2025-06-29 16:34:44 -07:00
Andrew Pareles 9732f74ba7 remove random as any casts 2025-06-29 16:34:35 -07:00
Andrew Pareles 9031215001 Revert "Fix: IME composition preventing message sending in chat" 2025-06-29 16:33:29 -07:00
Andrew Pareles 3fa95be625 Merge pull request #784 from tsujihidetaka/fix-ime-composition-chat
Fix: IME composition preventing message sending in chat
2025-06-29 16:31:38 -07:00
Andrew Pareles 1183cd3ad4 Merge pull request #697 from vrtnis/cron-issue-wiki
Add GitHub Action to triage issues and publish to wiki
2025-06-29 16:30:32 -07:00
Andrew Pareles ac1aba825f Merge pull request #747 from jcommaret/mistral-magistral
Mistral magistral
2025-06-29 15:51:50 -07:00
Andrew Pareles 867df38364 Merge pull request #791 from servetgulnaroglu/tooltip-for-selected-files
added tooltip for selected files the prevent ambiguity
2025-06-28 22:12:17 -07:00
Andrew Pareles c90f707070 add delay 2025-06-28 22:12:08 -07:00
Andrew Pareles 0424e7d0d3 Merge pull request #783 from cabelo/patch-1
SUSE and openSUSE instructions
2025-06-28 22:07:55 -07:00
servetgulnaroglu 42c50413f5 added tooltip for selected files the prevent ambiguity 2025-06-28 15:08:40 +03:00
Hidetaka Tsuji b5ae6d7a96 Fix: IME composition preventing message sending in chat 2025-06-24 13:54:51 +02:00
Alessandro de Oliveira Faria (A.K.A.CABELO) 453f392f01 SUSE and openSUSE instructions 2025-06-24 02:22:01 -03:00
Andrew Pareles b5a41840a0 Merge pull request #775 from voideditor/mcp
clearer wording
2025-06-23 01:05:25 -07:00
Andrew Pareles f0ad8e2e2e 1.4.9 2025-06-23 04:04:55 -04:00
Andrew Pareles d732d6ba05 re-add msft telemetry option but with clearer distinction of void vs msft 2025-06-23 04:04:28 -04:00
Andrew Pareles 24add9286c Merge pull request #774 from voideditor/mcp
Mcp
2025-06-22 22:20:56 -07:00
Andrew Pareles 67e89fd979 bump 2025-06-23 01:20:34 -04:00
Andrew Pareles 5a702f98bc remove leftover vscode telemetry setting; replaced with Void Settings option 2025-06-23 01:20:05 -04:00
Andrew Pareles 8b3b118319 Merge pull request #773 from voideditor/mcp
lint fix
2025-06-22 21:37:18 -07:00
Andrew Pareles c3125804f3 lint fix 2025-06-23 00:36:58 -04:00
Andrew Pareles b739e99a1e Merge pull request #772 from voideditor/mcp
fix
2025-06-22 21:26:34 -07:00
Andrew Pareles ec3b7caa8e fix 2025-06-23 00:26:09 -04:00
Andrew Pareles ffdbb214f9 Merge pull request #771 from voideditor/mcp
disabled fix + bump
2025-06-22 21:19:08 -07:00
Andrew Pareles ec5b7636be disabled fix + bump 2025-06-23 00:18:44 -04:00
Andrew Pareles d1adb8b0fc Merge pull request #768 from voideditor/mcp
bump 1.4.5
2025-06-21 14:57:08 -07:00
Andrew Pareles a475c80f4f bump 1.4.5 2025-06-21 14:56:44 -07:00
Andrew Pareles 8233c59f2b Merge pull request #767 from voideditor/mcp
Metrics toggle
2025-06-21 14:56:23 -07:00
Andrew Pareles 7c2192a7dc message 2025-06-21 14:54:35 -07:00
Andrew Pareles 6aa2409302 update 2025-06-21 14:42:36 -07:00
Mathew Pareles b48c3aaf35 proper ordering 2025-06-21 04:12:52 -07:00
Mathew Pareles 722d0c5b3b settings styles 2025-06-21 04:08:16 -07:00
Mathew Pareles 7727b19b3c finish adding toggle 2025-06-21 04:07:23 -07:00
Mathew Pareles 0816694210 clearer wording 2025-06-21 03:55:01 -07:00
Mathew Pareles c6d210902b start adding toggle metrics 2025-06-21 03:50:08 -07:00
Andrew Pareles b00d77610d Merge pull request #761 from voideditor/mcp
add icons
2025-06-19 13:58:56 -07:00
Andrew Pareles ad8fedc307 add icons 2025-06-19 13:58:41 -07:00
Jérôme Commaret 940155ac80 Added reasoning parameters 2025-06-12 19:46:30 +02:00
Jérôme Commaret ffbfba8d4f [Feature] Add magistral-small-2506 #741 2025-06-12 19:43:01 +02:00
Andrew Pareles da425ab0fe Merge pull request #738 from voideditor/mcp
1.4.4
2025-06-09 17:31:25 -07:00
Andrew Pareles 1191abf745 1.4.4 2025-06-09 17:31:01 -07:00
Andrew Pareles 1a922133da Merge pull request #737 from voideditor/mcp
mcp tool interrupt fix
2025-06-09 17:30:21 -07:00
Andrew Pareles 40a27cd1ee mcp tool interrupt fix 2025-06-09 17:30:03 -07:00
Andrew Pareles bf062146c9 Merge pull request #720 from voideditor/mcp
fix?
2025-06-06 01:44:50 -07:00
Andrew Pareles 97cb63c7fc fix? 2025-06-06 01:42:44 -07:00
Andrew Pareles 2f283b503a Merge pull request #719 from voideditor/mcp
temp fixes
2025-06-06 01:37:06 -07:00
Andrew Pareles 7b78f962d3 rm scm generation until we can dismiss the errors 2025-06-06 01:35:54 -07:00
Andrew Pareles 93ee1731b5 remove type to try to fix git errors 2025-06-06 01:15:04 -07:00
Andrew Pareles f5680a5c62 Merge pull request #718 from voideditor/mcp
add to history on autoaccept
2025-06-06 01:10:27 -07:00
Andrew Pareles 88288dba46 add to history on autoaccept 2025-06-06 01:09:35 -07:00
Andrew Pareles 5b7580c3da Merge pull request #717 from voideditor/mcp
bump 1.4.3
2025-06-06 01:01:15 -07:00
Andrew Pareles 9bf0646abe bump 1.4.3 2025-06-06 01:00:30 -07:00
Andrew Pareles 1737c7bfc8 Merge pull request #716 from voideditor/mcp
undo validateURI change
2025-06-06 00:56:48 -07:00
Andrew Pareles 584dc18ede undo validateURI change 2025-06-06 00:56:22 -07:00
Andrew Pareles 3ec6973a0f Merge pull request #714 from voideditor/mcp
add auto accept toggle
2025-06-06 00:28:13 -07:00
Andrew Pareles 42ef028c1e add auto accept toggle 2025-06-06 00:27:47 -07:00
Andrew Pareles 7b14f0ca73 Merge pull request #558 from steaks/commit-prompt
Added Generate Commit Message button for git
2025-06-05 19:28:41 -07:00
Andrew Pareles 9a5580d32e sync SCM 2025-06-05 16:14:40 -07:00
Andrew Pareles c41838afc6 git commit 2025-06-05 16:06:13 -07:00
Andrew Pareles f32743d759 Merge pull request #711 from Sherlock-Holo/reasoning_content
openai compatible support reasoning_content field
2025-06-05 15:52:15 -07:00
Steven Wexler 9e53dfef33 Support staged vs. unstaged changs. Increase diff size to 8000. 2025-06-05 09:56:07 -04:00
Steven Wexler 844784445c Localize commit message generation error notification 2025-06-05 09:35:26 -04:00
Steven Wexler 9920bd3366 Merge remote-tracking branch 'upstream/main' into commit-prompt 2025-06-05 09:33:28 -04:00
Sherlock Holo 483cfb29a0 openai compatible support reasoning_content field 2025-06-05 19:12:21 +08:00
Andrew Pareles 282800e394 Merge pull request #710 from voideditor/mcp
ssh/wsl fix + ui
2025-06-05 02:47:28 -07:00
Andrew Pareles aacae4728f 1.4.2 version bump 2025-06-05 02:47:07 -07:00
Andrew Pareles 77c9284df5 fix ssh? 2025-06-05 02:41:58 -07:00
Andrew Pareles 7eac4aad6f remove ugly button 2025-06-05 02:41:54 -07:00
vrtnis 797c8e7096 Add GitHub Action to triage issues and publish to wiki 2025-06-02 00:18:58 +00:00
Andrew Pareles 406d0dc297 Merge pull request #692 from voideditor/mcp
1.4.1
2025-05-30 23:40:54 -07:00
Andrew Pareles e34e38cb3a 1.4.1 2025-05-30 23:40:34 -07:00
Andrew Pareles 95f2aa70a1 Merge pull request #691 from voideditor/mcp
fix terminal cmdCap issues
2025-05-30 23:40:17 -07:00
Andrew Pareles b74772e6e2 cmdCap 2025-05-30 23:40:02 -07:00
Andrew Pareles 374e6c7109 Merge pull request #690 from voideditor/mcp
1.4.0 - MCP!
2025-05-30 21:16:08 -07:00
Andrew Pareles 8e6bb7194d 1.4.0! 2025-05-30 21:15:24 -07:00
Andrew Pareles 2b4283a0f0 rm comments 2025-05-30 21:10:23 -07:00
Andrew Pareles b0617700aa Merge branch 'main' into pr/steaks/558 2025-05-30 21:04:50 -07:00
Andrew Pareles 53f7aa47f6 Merge pull request #689 from voideditor/mcp
Mcp error codes
2025-05-30 21:03:02 -07:00
Andrew Pareles e324257e1a Merge remote-tracking branch 'origin/main' into mcp 2025-05-30 21:02:52 -07:00
Andrew Pareles 7feb9154da err codes 2025-05-30 21:02:21 -07:00
Andrew Pareles 857eda72fd remove toolname prefix in sidebar and remove unused logic 2025-05-30 20:54:52 -07:00
Andrew Pareles 3bc0a34e83 Merge pull request #688 from voideditor/test1
update voidrules
2025-05-30 20:40:12 -07:00
Andrew Pareles 9c642763f0 update voidrules 2025-05-30 20:39:57 -07:00
Andrew Pareles 17e44e192d Merge pull request #686 from bjoaquinc/mcp-debugging
fix: mcp tool call and tool call error response
2025-05-30 20:38:11 -07:00
Joaquin Coromina a24d097264 add remove prefix function for tool call, updated the tool call error to return tool call error response string rather than content object 2025-05-30 17:43:06 -04:00
Andrew Pareles 2880549d3f merge properly 2025-05-30 03:40:14 -07:00
Andrew Pareles 22fa093928 sync 2025-05-30 01:26:34 -07:00
Andrew Pareles 31950ae01e sync scm 2025-05-30 01:24:14 -07:00
Andrew Pareles 12a1014534 Merge branch 'main' into pr/steaks/558 2025-05-30 01:17:52 -07:00
Andrew Pareles 5815c0180a Merge pull request #654 from vrtnis/void-settings-sidebar
feat(settings): add “All Settings” tab + smooth-scroll navigation
2025-05-30 01:13:25 -07:00
Andrew Pareles 822430535e MCP 2025-05-30 01:12:34 -07:00
Andrew Pareles 020fb60d74 mcp tool rename 2025-05-30 01:08:11 -07:00
Andrew Pareles 615f8c3315 finish merge settings 2025-05-30 01:06:38 -07:00
Andrew Pareles 980d7937c3 Merge branch 'main' into pr/vrtnis/654 2025-05-30 01:05:24 -07:00
Andrew Pareles 57d94d2d44 fix spacing issues and make scroll whole settings page 2025-05-30 00:54:59 -07:00
Andrew Pareles 382ecaae1b auto format 2025-05-30 00:34:42 -07:00
Andrew Pareles a9abdf6351 Merge pull request #623 from vrtnis/aws-bedrock
feat(void): add Bedrock provider in onboarding + type updates
2025-05-30 00:28:40 -07:00
Andrew Pareles 27c40d8428 key 2025-05-30 00:28:22 -07:00
Andrew Pareles c067d9fbf0 Merge pull request #684 from voideditor/andrew/fix-mcp-styling-consistency
sys message ui
2025-05-30 00:23:57 -07:00
Andrew Pareles 83c4a05642 toggle 2025-05-30 00:15:39 -07:00
Andrew Pareles 182af95035 Merge pull request #661 from animeshlego5/feat/disable-ai-system-message
feat: Add Toggle to Disable AI System Message Context
2025-05-29 23:58:34 -07:00
Andrew Pareles 0a6be740e1 simplify 2025-05-29 23:58:21 -07:00
Andrew Pareles 8d0cdb8d36 Merge remote-tracking branch 'origin/main' into pr/animeshlego5/661-1 2025-05-29 23:57:55 -07:00
Andrew Pareles 29f004a826 sys 2025-05-29 23:56:55 -07:00
Andrew Pareles ac6b5601ef remove optional variables that arent even used 2025-05-29 22:45:11 -07:00
Andrew Pareles cfb15e1117 remove unused variable 2025-05-29 22:41:21 -07:00
Andrew Pareles bd13208513 rm todo 2025-05-29 22:37:59 -07:00
Andrew Pareles 8350fbd2d1 Include both staged and unstaged changes in git diff statistics 2025-05-29 22:36:36 -07:00
Andrew Pareles 22e08e6a06 rename 2025-05-29 22:32:44 -07:00
Andrew Pareles b50079709d rename scm to match void convention 2025-05-29 22:32:11 -07:00
Andrew Pareles e2863d3002 simplify 2025-05-29 22:20:16 -07:00
Andrew Pareles c12e9ca9f8 Merge pull request #630 from voideditor/mcp
bjoaquinc/mcp - MCP Implementation
2025-05-29 19:16:24 -07:00
Andrew Pareles e138744816 updates 2025-05-29 19:12:34 -07:00
Andrew Pareles df21a99ed9 ignore scroll 2025-05-29 18:48:37 -07:00
Andrew Pareles 98e07e1c7f misc ui 2025-05-29 17:23:55 -07:00
Andrew Pareles 77e562e278 misc improvements 2025-05-29 16:31:40 -07:00
Andrew Pareles 232264d5fe + 2025-05-29 03:07:44 -07:00
Andrew Pareles 70d484049c rm any casts 2025-05-29 03:07:34 -07:00
Andrew Pareles f4557ef6a8 opus 4 edits:
----
1. parse id code  { "code": -32602, "name": "McpError" } out and display it to the user
2. deleting an mcp server from the mcp file doesnt work, the server remains
3. ui - non-wrapping tooltips should wrap
2025-05-29 03:03:12 -07:00
Andrew Pareles 3038b420c9 Merge remote-tracking branch 'origin/main' into pr/animeshlego5/661-1 2025-05-29 00:22:02 -07:00
Joaquin Coromina 0625ce4b40 Updated tool name to add a unique prefix on a per session basis. Created a function that removes that prefix when displaying tools to users 2025-05-27 16:09:50 -04:00
Steven Wexler 06d20d705e Remove log 2025-05-26 18:07:40 -04:00
Steven Wexler f034be08c3 Refactor: Update commit message generation to use new prompt structure and system messages 2025-05-26 13:04:41 -04:00
Steven Wexler f74b94e3ba Refactor: Move and rename prompt generation logic for commit messages 2025-05-26 13:04:23 -04:00
Steven Wexler d09601191d Merge remote-tracking branch 'upstream/main' into commit-prompt 2025-05-26 11:44:11 -04:00
Steven Wexler 189e207499 Improve system message prompt 2025-05-26 11:41:45 -04:00
Steven Wexler f88dba7610 Add git branch and log info to prompt 2025-05-26 11:41:12 -04:00
Andrew Pareles 44f56b3ab4 Merge pull request #653 from vdawger/chore-update-model-capabilities-grok-mini
chore: add grok mini and fast models to dropdown options
2025-05-26 01:31:39 -07:00
Steven Wexler 5e100fcf1d Limit commit message length 2025-05-25 22:01:41 -04:00
Steven Wexler 9e745e2b87 Merge remote-tracking branch 'upstream/main' into commit-prompt 2025-05-25 14:19:40 -04:00
Steven Wexler 3a39551205 Handle loading, aborting, debouncing, and errors 2025-05-25 09:18:08 -04:00
Steven Wexler 033a23aa28 Update service name 2025-05-25 09:17:01 -04:00
Steven Wexler 38f06202ed Sync scm model to chat model 2025-05-25 09:16:46 -04:00
Steven Wexler 327d2dfe06 Fix undefined files and propagate git errors 2025-05-25 09:16:19 -04:00
Andrew Pareles 826571b410 remove ToolName from extractGrammar 2025-05-24 17:09:35 -07:00
Animesh Gosain c185807e60 feat: Add toggle to disable AI system message
Refactor role mapping logic

role

Fix keymap for Void: Quick Edit to resolve conflict

The current keymap causes a conflict between 'Void: Quick Edit' and 'Clear Console'/'Clear Terminal'. Using this _when_ expression, we can resolve the conflict without affecting functionality.

* Add the when expression `editorFocus && !terminalFocus` to the keybinding for 'Void: Quick Edit' `void.ctrlKAction`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/voideditor/void?shareId=XXXX-XXXX-XXXX-XXXX).

feat: add Devstral model mapping + fix quick-edit keybinding type

claude 4

feat: Add <file_name_or_pattern> to .gitignore

remove whitespace

changed gitignore

changed gitignore again

changed gitignore again
2025-05-24 19:39:14 +05:30
Animesh Gosain 31cde552a0 Local Changes 2025-05-24 19:39:14 +05:30
vrtnis 23bb28f3c0 Merge branch 'main' into void-settings-sidebar 2025-05-23 11:27:39 -07:00
William Viana 5a34feb328 chore: add grok mini and fast models to dropdown options 2025-05-23 12:16:01 -05:00
Andrew Pareles f0f536bc2d mcp ui 2025-05-23 01:45:21 -07:00
Andrew Pareles 09f5f1fad1 better result display 2025-05-22 17:22:07 -07:00
Andrew Pareles 31aa31a18b call 2025-05-22 17:06:29 -07:00
Andrew Pareles b56cc0d662 mcp errors handling 2025-05-22 17:04:52 -07:00
Andrew Pareles 4f4af9b8b9 ui 2025-05-22 16:58:32 -07:00
Andrew Pareles 66de84f4e3 auto approve 2025-05-22 16:46:52 -07:00
Andrew Pareles 0a02342128 MCP UI 2025-05-22 16:42:04 -07:00
Joaquin Coromina f99589aaa6 Fixed isOn server name setting 2025-05-22 19:41:25 -04:00
Andrew Pareles da6ffecc1d mcp works! 2025-05-22 15:31:56 -07:00
Andrew Pareles 43b6dba7a3 tool progress 2025-05-22 14:47:56 -07:00
Joaquin Coromina 5747904b85 Created getMCPTools function which transforms the MCP tool to a similar shape to voidTools, also created a helper functions which turns InputSchema into params 2025-05-22 15:43:43 -04:00
Andrew Pareles 4358b9e384 Merge pull request #647 from voideditor/model-selection
Claude 4
2025-05-22 11:23:04 -07:00
Andrew Pareles 5a5732601e claude 4 2025-05-22 11:22:36 -07:00
Andrew Pareles 83ec200039 claude 4 2025-05-22 11:22:06 -07:00
Andrew Pareles 81ab21868a mcp ui + misc 2025-05-22 02:50:26 -07:00
Andrew Pareles 627ec18cc9 got event fires 2025-05-22 02:30:43 -07:00
Andrew Pareles 883a4663c9 clarify 2025-05-22 02:21:17 -07:00
Andrew Pareles d2d47175b5 cleanup + final mcp todos 2025-05-22 02:18:14 -07:00
Andrew Pareles 7aacbca580 updates/fixes to mcp 2025-05-22 02:04:28 -07:00
Andrew Pareles f5b0f24445 fix 2025-05-21 23:51:00 -07:00
Andrew Pareles 89ac548ae9 clearer types 2025-05-21 23:29:41 -07:00
Andrew Pareles 57bc32ac9b update loading? 2025-05-21 22:51:55 -07:00
Andrew Pareles 446248aa79 loading 2025-05-21 22:02:24 -07:00
Andrew Pareles 66575b5381 add bg colors 2025-05-21 21:38:30 -07:00
Andrew Pareles 8b99b6ec78 userspecified 2025-05-21 21:33:05 -07:00
Andrew Pareles 18d1f2e6b9 move MCP to settings 2025-05-21 21:24:46 -07:00
Andrew Pareles 72143608a1 misc fixes 2025-05-21 20:57:54 -07:00
Andrew Pareles ec2ea70395 Merge pull request #638 from vrtnis/add-devstral
feat: add devstral model mapping + fix quick-edit keybinding type
2025-05-21 19:48:41 -07:00
Andrew Pareles 55691624dd rename 2025-05-21 19:47:47 -07:00
Andrew Pareles 9072668be3 Merge remote-tracking branch 'upstream/mcp' into mcp 2025-05-21 19:46:49 -07:00
vrtnis 7a4cf6c955 Merge branch 'main' into add-devstral 2025-05-21 19:26:56 -07:00
vrtnis 588953be96 feat: add Devstral model mapping + fix quick-edit keybinding type 2025-05-22 02:01:51 +00:00
Andrew Pareles 5bdbbc84aa Merge pull request #636 from voideditor/revert-633-keymap-ctrlK
Revert "Fix keymap for Void: Quick Edit to resolve conflict"
2025-05-21 18:25:51 -07:00
Andrew Pareles ebae55cd4b Revert "Fix keymap for Void: Quick Edit to resolve conflict" 2025-05-21 18:25:23 -07:00
Andrew Pareles 2b9e2088b3 Merge pull request #633 from anschmieg/keymap-ctrlK
Fix keymap for Void: Quick Edit to resolve conflict
2025-05-21 14:01:03 -07:00
anschmieg cbc7cf0841 Fix keymap for Void: Quick Edit to resolve conflict
The current keymap causes a conflict between 'Void: Quick Edit' and 'Clear Console'/'Clear Terminal'. Using this _when_ expression, we can resolve the conflict without affecting functionality. 

* Add the when expression `editorFocus && !terminalFocus` to the keybinding for 'Void: Quick Edit' `void.ctrlKAction`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/voideditor/void?shareId=XXXX-XXXX-XXXX-XXXX).
2025-05-21 17:58:34 +02:00
Andrew Pareles d141bffae9 misc 2025-05-21 02:02:12 -07:00
Andrew Pareles 3619a3e671 add loading 2025-05-21 01:48:37 -07:00
Andrew Pareles 13654389c6 update state 2025-05-21 01:38:15 -07:00
Andrew Pareles 4d8363026e progress 2025-05-21 00:56:14 -07:00
Andrew Pareles d80fd766f8 autoformat 2025-05-20 23:18:52 -07:00
Andrew Pareles 6d9027f63b misc 2025-05-20 23:18:46 -07:00
Andrew Pareles 03ab6559fc misc 2025-05-20 23:09:23 -07:00
Joaquin Coromina 35f23261b0 Fixed the string definition for the mcp resultToString fns 2025-05-20 12:44:29 -04:00
Joaquin Coromina 9b4c0b8d5a Added functions that return properly formatted CallTool functions and ToolResultToStr functions from MCP tools, then hooked it up 2025-05-19 22:38:56 -04:00
Joaquin Coromina 07df20b4de Added mcpServerName to InternalToolInfo 2025-05-19 22:37:26 -04:00
vrtnis 5995591296 feat(void): add Bedrock provider in onboarding + type updates 2025-05-20 01:36:16 +00:00
Joaquin Coromina 6646bd0993 Added function in mcpService to handle calling an MCP server tool 2025-05-19 16:52:43 -04:00
Joaquin Coromina f1c9e29f61 Updated types and hooked up return value to callTool and safeCallTool functions 2025-05-19 16:16:48 -04:00
Joaquin Coromina 2b97326eff Added types to MCP tool call response 2025-05-19 16:00:30 -04:00
Joaquin Coromina b70ee20b88 Added an error to handle unsupported response types 2025-05-19 16:00:07 -04:00
Joaquin Coromina ae0068ecb3 Added callTool function to handle server tool calls 2025-05-19 15:01:56 -04:00
Andrew Pareles 091bbf4dd3 Merge pull request #608 from animeshlego5/fix-system-role
[Fix] system role for o-series models
2025-05-19 01:34:51 -07:00
Andrew Pareles 7642b3281a role 2025-05-19 01:34:29 -07:00
Animesh Gosain 05e27a0885 Refactor role mapping logic 2025-05-19 13:34:01 +05:30
vrtnis 1d15d29a19 Updated Settings.tsx with new sidebar tabs 2025-05-18 20:46:45 +00:00
Joaquin Coromina 807086f7b6 Added persistence between sessions for mcpServerState 2025-05-18 04:05:41 -04:00
Joaquin Coromina 2d910835b7 Updated the void settings to include mcpServerState 2025-05-18 04:04:49 -04:00
Joaquin Coromina b68d8fd8e8 Added toggle service to turn mcp servers on and off 2025-05-17 19:23:14 -04:00
Joaquin Coromina 59dd7d7eea Added proper error handling for config file parsing errors 2025-05-17 18:21:55 -04:00
Joaquin Coromina 079ce49d17 Fixed bug where isUpdated is never returned 2025-05-17 18:21:01 -04:00
Joaquin Coromina 7f4470674d Updated the client side to use new events and mcpService 2025-05-17 17:42:28 -04:00
Joaquin Coromina b1b7afe8a0 Updated service types to match new events and organized it better 2025-05-17 17:41:46 -04:00
Joaquin Coromina d3757e81b4 Changed mcpConfigService to mcpService and updated events to match channel 2025-05-17 17:41:10 -04:00
Joaquin Coromina 065470afc1 Updated the channel it include events for add, update, delete, and loading. Fixed a bug related to client.close() throwing and error 2025-05-17 17:36:37 -04:00
Animesh Gosain db771c4f33 Fix system role for o-series models 2025-05-17 16:24:13 +05:30
Joaquin Coromina 3c96193b71 Added an event for reinitializing all servers when config file is updated 2025-05-17 00:03:44 -04:00
Joaquin Coromina c669a987c5 Removed the custom toggle button and added MCPServersList to the main Settings 2025-05-16 23:28:06 -04:00
Joaquin Coromina 543c6f0550 Sent back command formatted for display 2025-05-16 23:25:31 -04:00
Joaquin Coromina 8afaec30da Updated the types to include commmand for display 2025-05-16 23:25:01 -04:00
Joaquin Coromina a0f9309e02 Updated the service to include a service that updates the browser whenever an event from the main-process comes in 2025-05-16 23:24:29 -04:00
Joaquin Coromina 243349a90f Created a server list UI and hooked it up to Config Service 2025-05-16 23:23:35 -04:00
Joaquin Coromina 04a821b382 Merge branch 'main' into mcp 2025-05-16 17:26:24 -04:00
Andrew Pareles 906502f660 Merge pull request #590 from voideditor/model-selection
Auto update message + terminal tool service improvements on Windows
2025-05-16 13:29:57 -07:00
Joaquin Coromina 2817cdd8a6 Created function for getting all tools from mcp servers formatted for void 2025-05-16 00:38:09 -04:00
Andrew Pareles a8bc42b524 Merge pull request #595 from zpg6/fix/azure-model-selection
fix: select AzureOpenAI deployment based on selected model
2025-05-15 21:01:32 -07:00
Joaquin Coromina 05e1e61f08 Added error channel event listener and a utility function to handle all server events 2025-05-15 22:47:24 -04:00
Joaquin Coromina 30655678fe Connected this service to the mcpChannel for interaction with the servers 2025-05-15 22:30:15 -04:00
Joaquin Coromina ca51bcaecc Added @modelcontextprotocol/sdk to the allowed list of imports to avoid typescript error 2025-05-15 22:29:22 -04:00
Joaquin Coromina a629736683 Registered mcpChannel 2025-05-15 22:28:48 -04:00
Joaquin Coromina 0074189191 Removed mcpService from common because it was supposed to handle setting up the servers but can't because of a lack of access to node dependencies 2025-05-15 22:28:14 -04:00
Joaquin Coromina 4a862641cd Added a types file to handle all MCP Server interfaces and response values 2025-05-15 22:27:05 -04:00
Joaquin Coromina b18ac4b6c0 Created mcpChannel to handle all mcp server setup and events in electron-main 2025-05-15 22:26:11 -04:00
Zach Grimaldi d7201a38dc fix: select AzureOpenAI deployment based on selected model 2025-05-15 11:34:56 -04:00
Andrew Pareles 9112c0c94d only 1 void update notif at a time 2025-05-14 15:11:05 -07:00
Joaquin Coromina 716cb8d591 Replaced @modelcontextprotocol/inspector-cli for @modelcontextprotocol/sdk 2025-05-14 11:41:22 -04:00
Joaquin Coromina aed9f31185 Added initial scaffolding 2025-05-14 11:23:35 -04:00
Joaquin Coromina 2377c18241 Added @modelcontextprotocol/inspector-cli for MCP client interactions and server interactions 2025-05-14 11:23:02 -04:00
Joaquin Coromina 7b9e5ce517 Created mcpService file to handle MCP commands 2025-05-14 11:08:24 -04:00
Joaquin Coromina c119286571 Merge branch 'voideditor:main' into mcp 2025-05-14 11:05:51 -04:00
Andrew Pareles 5cab7e61e5 1.3.10 2025-05-13 23:37:48 -07:00
Andrew Pareles c405a462a8 Merge pull request #584 from voideditor/model-selection
add reasoning low/med/hi for all openai-compat providers
2025-05-13 23:37:34 -07:00
Andrew Pareles e481327327 add reasoning low/med/hi for all openai-compat providers 2025-05-13 23:35:19 -07:00
Andrew Pareles b7bb7f2f94 Merge pull request #583 from voideditor/model-selection
1.3.9
2025-05-13 22:59:47 -07:00
Andrew Pareles 2ae288e2ed 1.3.9 2025-05-13 22:59:28 -07:00
Andrew Pareles 316709671f Merge pull request #582 from voideditor/model-selection
fix certain cases of advanced settings
2025-05-13 22:59:16 -07:00
Andrew Pareles 9fac1e27a9 fix certain cases of advanced settings 2025-05-13 22:58:37 -07:00
Andrew Pareles f632327a7e Merge pull request #580 from voideditor/model-selection
1.3.8
2025-05-13 21:33:26 -07:00
Andrew Pareles e95922802f rm azure identity 2025-05-13 21:32:57 -07:00
Andrew Pareles 3954056a41 1.3.8 2025-05-13 21:32:21 -07:00
Andrew Pareles 1c7acdac94 Merge remote-tracking branch 'origin/main' into model-selection 2025-05-13 21:31:39 -07:00
Andrew Pareles 33163b7e81 Merge branch 'main' into model-selection 2025-05-13 21:31:09 -07:00
Andrew Pareles d9d3147b2a Merge pull request #577 from voideditor/azure-fix
Fix Azure
2025-05-13 21:06:03 -07:00
Andrew Pareles 4b9e2c2319 azure link 2025-05-13 21:02:44 -07:00
Andrew Pareles 19bd649451 Merge pull request #579 from voideditor/model-selection
Fix Grok 3
2025-05-13 21:01:05 -07:00
Andrew Pareles 7fd06b946b fallback 2025-05-13 21:00:47 -07:00
Andrew Pareles 8c760980b6 fix grok 3 2025-05-13 21:00:20 -07:00
Andrew Pareles 96000273cf payload 2025-05-13 20:05:35 -07:00
Andrew Pareles e771edbe2e update azure 2025-05-13 20:04:40 -07:00
Andrew Pareles aafe556333 azure via AzureOpenAI 2025-05-13 20:00:39 -07:00
Andrew Pareles 9502f563f4 Merge pull request #576 from voideditor/model-selection
Refresh blank window
2025-05-13 19:56:11 -07:00
Andrew Pareles 78c6baed82 revert 2025-05-13 19:54:45 -07:00
Andrew Pareles bafbdd9df3 Merge pull request #575 from voideditor/model-selection
fix anthropic empty err message
2025-05-13 19:53:20 -07:00
Joaquin Coromina 4cca689c94 Moved all watcher and file creation logic to initialize and fixed bug with this._configFileExists 2025-05-13 22:24:32 -04:00
Joaquin Coromina 63083cec89 Added MCP section to void settings 2025-05-13 22:23:49 -04:00
Joaquin Coromina 661908237b Added functions to watch, update, and remove watcher for mcpConfigFile 2025-05-13 21:54:42 -04:00
Andrew Pareles b35dfdf475 trigger resize 2025-05-13 18:29:04 -07:00
Joaquin Coromina 2187641cc3 Updated all functions to be private initially 2025-05-13 21:07:06 -04:00
Andrew Pareles 609f4c9cbf UI 2025-05-13 17:27:46 -07:00
Andrew Pareles 6df3b588df fix anthropic empty err message 2025-05-13 17:25:29 -07:00
Joaquin Coromina 01329382b9 Made createMCPConfigFile private 2025-05-13 02:46:48 -04:00
Joaquin Coromina 7af9973a8d Fixed the structure of createMCPConfigFile 2025-05-13 02:37:54 -04:00
Joaquin Coromina 1ed79ef985 Added function to create mcp config file if it doesnt exist 2025-05-13 02:37:06 -04:00
Joaquin Coromina 8a12505ffd Moved mcp.json into a private variable in the class 2025-05-13 02:04:11 -04:00
Joaquin Coromina f82c15401a Updated services.tsx to include IMCPConfigService 2025-05-13 02:01:23 -04:00
Joaquin Coromina b4dff124e0 Updated file with class MCPConfigService and functions to check if mcp.json config file exists or not 2025-05-13 02:00:50 -04:00
Joaquin Coromina 1aeb62d075 Created mcpConfigService file 2025-05-13 01:13:05 -04:00
Andrew Pareles 4b86bfa184 Merge pull request #562 from voideditor/model-selection
bump version
2025-05-12 20:16:26 -07:00
Andrew Pareles f4c1321f25 rm thinking from 2 flash 2025-05-12 20:08:54 -07:00
Andrew Pareles b54dd7fedc 1.3.7 / 0031 2025-05-12 19:53:58 -07:00
Andrew Pareles 7c448f15db Merge pull request #560 from voideditor/model-selection
Azure?
2025-05-12 19:50:57 -07:00
Andrew Pareles 3241178238 Merge remote-tracking branch 'origin/main' into model-selection 2025-05-12 19:50:35 -07:00
Andrew Pareles 68bb3f6962 fix azure? 2025-05-12 19:48:50 -07:00
Andrew Pareles 2e64f5a24b overrides link update 2025-05-12 19:46:18 -07:00
Andrew Pareles 2e5ecb291d comment 2025-05-12 19:44:42 -07:00
Andrew Pareles f1e24c9b4c Merge pull request #545 from HunterEvangelista/510-openai-additional-json
added optional json config for VoidStaticModelInfo
2025-05-12 19:42:22 -07:00
Andrew Pareles f65e4f51a2 misc 2025-05-12 19:40:39 -07:00
Andrew Pareles f1a5d20150 Merge pull request #505 from homanp/feat/apply-to-terminal
feat: add support for applying `shellscript` and `bash` directly to terminal
2025-05-12 19:32:24 -07:00
Andrew Pareles 28dcdff189 isdisabled fix 2025-05-12 19:31:05 -07:00
Andrew Pareles 67ed52415e apply terminal? 2025-05-12 19:29:45 -07:00
Andrew Pareles 3772cf98ea delete 2025-05-12 18:47:40 -07:00
Andrew Pareles 1c6edf7023 generalize 2025-05-12 18:45:33 -07:00
Andrew Pareles 6b6528c3fb Merge pull request #507 from steaks/explorer-view-copy-prompt
Add Void: Copy Prompt as menu item to the ExplorerContext window
2025-05-12 18:30:21 -07:00
Andrew Pareles f98894ad77 format 2025-05-12 18:22:59 -07:00
Andrew Pareles f8745d8b40 Merge remote-tracking branch 'origin/main' into pr/steaks/507 2025-05-12 18:20:55 -07:00
Andrew Pareles 7066b4285b file and folder copy uniform 2025-05-12 18:20:44 -07:00
Andrew Pareles 1eee07e697 Merge pull request #548 from ujjwaljainnn/ujjwaljainnn-add-context-on-add-to-chat
fix: preserve selection when adding to chat via CTRL+L with closed panel
2025-05-12 16:50:04 -07:00
Andrew Pareles 45f7e4b157 minor updates 2025-05-12 16:48:27 -07:00
Andrew Pareles 1619a3c19b Merge pull request #559 from vrtnis/mistral-medium-capabilities
feat(models): update modelCapabilities with mistral-medium entry
2025-05-12 14:37:40 -07:00
vrtnis d668348244 feat(models): update modelCapabilities with mistral-medium entry 2025-05-12 20:58:55 +00:00
Andrew Pareles 3fa680e8ba identify more shells 2025-05-12 12:09:55 -07:00
Andrew Pareles e8b7c9c470 always create terminal when apply 2025-05-12 11:56:08 -07:00
Andrew Pareles a0eb7d6192 Merge remote-tracking branch 'origin/main' into pr/homanp/505 2025-05-12 11:52:22 -07:00
Andrew Pareles 5c4785d691 Merge remote-tracking branch 'origin/model-selection' into pr/homanp/505 2025-05-12 11:50:36 -07:00
Andrew Pareles 1de90cc39d use 1st terminal id 2025-05-12 11:50:25 -07:00
Andrew Pareles 20dba6f04e Merge pull request #556 from voideditor/model-selection
delete
2025-05-12 12:17:21 -06:00
Andrew Pareles 8e0d29ff75 Merge pull request #556 from voideditor/model-selection
delete
2025-05-12 12:14:54 -06:00
Andrew Pareles 117feaa063 Merge pull request #555 from voideditor/model-selection
extensions warning fix by deleting some extensions once
2025-05-12 12:14:54 -06:00
Andrew Pareles d09a41acd3 Merge pull request #556 from voideditor/model-selection
delete
2025-05-12 11:03:17 -07:00
Andrew Pareles 24102fc2b2 log2 2025-05-12 11:00:05 -07:00
Andrew Pareles c2b65eb16f log 2025-05-12 10:59:53 -07:00
Andrew Pareles a4046bc5a5 update so edit extensions.json 2025-05-12 10:58:18 -07:00
Andrew Pareles 6f73804e94 update 2025-05-12 10:50:28 -07:00
Steven Wexler 4300df420c Refine VoidSCM TODO comments 2025-05-12 11:48:47 -06:00
Andrew Pareles 76155beaad Merge pull request #555 from voideditor/model-selection
extensions warning fix by deleting some extensions once
2025-05-12 10:45:08 -07:00
Andrew Pareles 53c68b1267 bump 2025-05-12 10:44:43 -07:00
Andrew Pareles afbc1b40bf extensions warning fix by deleting some extensions once 2025-05-12 10:42:40 -07:00
Steven Wexler 74d5c86593 Add generate commit message button for git 2025-05-12 08:44:05 -06:00
Ismail Pelaseyed 9a905f6cb2 add support for stopping the terminal command 2025-05-12 09:06:22 +02:00
Ujjwal Jain dd42e40a8d fix: preserve selection when adding to chat via CTRL+L with closed panel 2025-05-11 22:01:04 -04:00
Hunter Evangelista 970fd7ecbb moved payload to sdk initialization 2025-05-11 17:10:07 -07:00
Hunter Evangelista 50710143eb Merge branch 'main' into 510-openai-additional-json 2025-05-11 16:06:11 -07:00
Hunter Evangelista d6295e5d65 added optional json config for VoidStaticModelInfo 2025-05-11 16:02:17 -07:00
Andrew Pareles 053a022ef8 Merge pull request #538 from voideditor/model-selection
1.3.5
2025-05-10 22:28:33 -07:00
Andrew Pareles 3b963d8717 1.3.5 2025-05-10 22:28:15 -07:00
Andrew Pareles e8540e4668 Merge pull request #537 from voideditor/model-selection
Cmd L better
2025-05-10 22:27:36 -07:00
Andrew Pareles 39f2f24b42 1.3.4 2025-05-10 22:07:26 -07:00
Andrew Pareles e852874be7 cmd L to add file 2025-05-10 22:05:50 -07:00
Andrew Pareles 6d07f9db14 Reasoning improvements + Gemini (Merge pull request #521 from voideditor/model-selection)
Gemini reasoning improvements + link URI improvements
2025-05-10 18:10:34 -07:00
Andrew Pareles 2934f9a3c5 += -> = 2025-05-10 18:10:00 -07:00
Andrew Pareles 7748dc4f2d misc fixes + (empty message) improvements 2025-05-10 18:06:58 -07:00
Andrew Pareles 8b45aea8a8 fix link + add gemini tool id if empty 2025-05-10 16:28:54 -07:00
Andrew Pareles cab8dd64b6 rm comments 2025-05-10 16:13:36 -07:00
Andrew Pareles 19782c80df voidRelease 2025-05-10 16:09:06 -07:00
Andrew Pareles 926db45f0a 33 2025-05-10 16:03:06 -07:00
Andrew Pareles 4068911d49 27 2025-05-10 16:02:56 -07:00
Andrew Pareles dcee2e2657 add prompt 2025-05-10 16:02:37 -07:00
Andrew Pareles 4c1c0b591a GoogleGenerativeAI (deprecated) -> genai, add gemini reasoning, improve reasoning logic 2025-05-10 15:59:26 -07:00
Andrew Pareles 61fc593903 shorten non URL links too 2025-05-10 15:53:05 -07:00
Andrew Pareles ecff59eed7 shorten long URI links 2025-05-10 15:29:55 -07:00
Ismail Pelaseyed e2a7b0e1a0 fix merge conflicts 2025-05-10 13:41:43 +02:00
Andrew Pareles 07c3f33f1e void increment 2025-05-10 03:36:54 -07:00
Andrew Pareles 0f93e1b055 Merge pull request #518 from voideditor/model-selection
Model selection
2025-05-10 03:33:45 -07:00
Andrew Pareles 2106573922 misc 2025-05-10 03:32:57 -07:00
Andrew Pareles 93a13a76af Merge remote-tracking branch 'origin/main' into model-selection 2025-05-10 03:31:45 -07:00
Andrew Pareles 7b18e25288 period 2025-05-10 03:29:33 -07:00
Andrew Pareles 57b0505a7e Merge pull request #517 from voideditor/revert-516-model-selection
apply UX message
2025-05-10 03:28:59 -07:00
Andrew Pareles e7436575a5 Revert "apply button failure better UX" 2025-05-10 03:28:39 -07:00
Andrew Pareles 58d95035ff update message 2025-05-10 03:28:29 -07:00
Andrew Pareles 96436ac461 Merge pull request #516 from voideditor/model-selection
apply button failure better UX
2025-05-10 03:26:48 -07:00
Andrew Pareles 85b1f0ec04 apply button failure better UX 2025-05-10 03:20:03 -07:00
Andrew Pareles 5232b4c30c update prompt to work better in agent 2025-05-10 02:28:40 -07:00
Andrew Pareles 81fd74d0b0 Merge pull request #515 from voideditor/model-selection
fix linux update message
2025-05-10 02:10:03 -07:00
Andrew Pareles 93b727198e fix linux update message 2025-05-10 02:09:49 -07:00
Andrew Pareles f33cf14b07 Update README.md 2025-05-09 17:13:35 -07:00
Andrew Pareles 15cf383524 Update README.md 2025-05-09 17:13:15 -07:00
Andrew Pareles f7489375b0 Update issue_template.md 2025-05-09 17:03:16 -07:00
Steven Wexler 08274637e1 Small touchups 2025-05-09 15:40:34 -06:00
Steven Wexler 168b92f6c4 Add Void: Copy Prompt as menu item to the ExplorerContext window 2025-05-09 15:38:32 -06:00
Ismail Pelaseyed a9aa9a26ea feat: add support for applying shellscripts and bash directly to terminal 2025-05-09 14:59:27 +02:00
Andrew Pareles eeb6167c12 Merge pull request #504 from voideditor/model-selection
do not show X / Check while streaming
2025-05-09 05:03:19 -07:00
Andrew Pareles c2092779e7 UI around tools 2025-05-09 05:02:08 -07:00
Andrew Pareles 19dc26d35b Merge pull request #502 from voideditor/model-selection
terminal 10s
2025-05-09 04:42:30 -07:00
Andrew Pareles b1c17256c2 terminal 10s 2025-05-09 04:41:52 -07:00
Andrew Pareles 1992a86211 Merge pull request #501 from voideditor/model-selection
Terminal improvements
2025-05-09 03:43:03 -07:00
Andrew Pareles 70fe79c4fe add terminal 2025-05-09 03:41:46 -07:00
Andrew Pareles a1bf83b5a6 faster 2025-05-09 03:35:18 -07:00
Andrew Pareles 215efed10c disposables 2025-05-09 02:03:23 -07:00
Andrew Pareles 6ada92e6f5 terminal tool improvements 2025-05-09 01:39:15 -07:00
Andrew Pareles ae55e97c18 add background terminal (not jittery) 2025-05-09 01:06:27 -07:00
Andrew Pareles 07c9a72c83 openrouter gemini fix 2025-05-08 23:53:19 -07:00
Andrew Pareles e577d4a01b Update README.md 2025-05-08 17:11:34 -07:00
Andrew Pareles 56c2f7a900 Merge pull request #491 from voideditor/model-selection
ui
2025-05-08 13:48:59 -07:00
Andrew Pareles 558bec1f61 not blue 2025-05-08 13:48:21 -07:00
Andrew Pareles 12e97f5689 ui 2025-05-08 13:34:23 -07:00
Andrew Pareles 7220323098 fix 2025-05-08 13:32:01 -07:00
Andrew Pareles 94229ff1d8 Merge pull request #490 from voideditor/model-selection
Onboarding UI
2025-05-08 13:22:21 -07:00
Andrew Pareles 3b778a3c36 spacing 2025-05-08 13:22:04 -07:00
Andrew Pareles f6529f2d76 better onboarding 2025-05-08 13:20:35 -07:00
Mathew Pareles 1b222e8335 Update README.md 2025-05-08 12:53:32 -07:00
Andrew Pareles 3b518e6f96 Merge pull request #486 from voideditor/model-selection
remove reapply
2025-05-08 12:12:49 -07:00
Andrew Pareles ac23cbb523 remove reapply 2025-05-08 12:11:54 -07:00
Andrew Pareles 301418bd12 Merge pull request #474 from voideditor/model-selection
Accept|Reject on Edit tool fix
2025-05-08 12:07:01 -07:00
Mathew Pareles d192bdcdc0 selecitons work with link 2025-05-08 04:22:50 -07:00
Mathew Pareles 42f2958959 desc1 link 2025-05-08 03:53:18 -07:00
Andrew Pareles 7a3cf4953d misc 2025-05-08 03:41:02 -07:00
Andrew Pareles 84ddf2b88c prompt 2025-05-08 02:40:13 -07:00
Andrew Pareles d00c478c5b add accept|reject on edit tool! 2025-05-08 02:21:57 -07:00
Mathew Pareles 42391a33c8 tooltip 2025-05-08 01:48:41 -07:00
Mathew Pareles 4618442c11 num messages better 2025-05-07 20:12:51 -07:00
Andrew Pareles 77d174edcf Merge pull request #471 from voideditor/model-selection
Misc fixes
2025-05-07 19:56:13 -07:00
Andrew Pareles 79d549b45b release fix 2025-05-07 19:52:54 -07:00
Mathew Pareles 8ba5ee5ea3 threads 2025-05-07 19:51:11 -07:00
Mathew Pareles 1d40c14d50 remove logging 2025-05-07 19:42:32 -07:00
Mathew Pareles cc51d2852e improve @ to mention 2025-05-07 19:41:41 -07:00
Andrew Pareles 8855cdeb04 Merge pull request #469 from GhostDog98/patch-3
Update HOW_TO_CONTRIBUTE.md with tip for nvm
2025-05-07 18:00:34 -07:00
ghostoverflow256 559994f1ee Update HOW_TO_CONTRIBUTE.md
Added a tip for those who may be unfamiliar with the node ecosystem, that you can use nvm to do that step (and probably should).
2025-05-08 10:46:19 +10:00
Andrew Pareles 05e3625014 Merge pull request #468 from voideditor/model-selection
Extensions
2025-05-07 14:37:15 -07:00
Andrew Pareles d9951e4108 dont delete, just transfer extensions 2025-05-07 14:35:26 -07:00
Andrew Pareles 620b5b7341 permalink 2025-05-06 14:13:33 -07:00
Andrew Pareles d33b5ff9a3 Merge pull request #465 from voideditor/model-selection
{} for openaicompat
2025-05-06 13:46:30 -07:00
Andrew Pareles 2208bce55f {} for openaicompat 2025-05-06 13:46:08 -07:00
Andrew Pareles bd62b68dfb Merge pull request #464 from voideditor/model-selection
Gemini Experimental
2025-05-06 13:35:04 -07:00
Andrew Pareles af3e0e863b exp free 2025-05-06 13:34:31 -07:00
Andrew Pareles 57f4d8cd38 Merge pull request #463 from voideditor/model-selection
Laggy Extensions Fix
2025-05-06 13:27:16 -07:00
Andrew Pareles 262f3aee12 update gemini models + fix del extension 2025-05-06 13:26:36 -07:00
Andrew Pareles b03cbadb9b auto delete laggy extensions 2025-05-06 13:16:57 -07:00
Andrew Pareles 390afaf227 ignore extensions actually works 2025-05-06 12:47:18 -07:00
Andrew Pareles 41f6ce8f9b Merge pull request #461 from voideditor/model-selection
update copy
2025-05-06 07:48:00 -07:00
Andrew Pareles cbc3d4b52f update copy 2025-05-06 07:41:58 -07:00
Andrew Pareles 38eeee8e30 Merge pull request #459 from voideditor/model-selection
Dump full files into context; better onboarding; better nav
2025-05-06 06:03:15 -07:00
Andrew Pareles 84f95170cb finish 2025-05-06 05:58:30 -07:00
Andrew Pareles 2de4cacf0f 1.3.2 2025-05-06 05:39:26 -07:00
Andrew Pareles 097d89366c file and folder dump! 2025-05-06 05:39:00 -07:00
Andrew Pareles fa83dfc529 onboarding improvements 2025-05-06 05:39:00 -07:00
Mathew Pareles c5862188cb goto next diff after accept/reject 2025-05-06 05:19:14 -07:00
Mathew Pareles 8816c7194d better tooltips 2025-05-06 05:09:44 -07:00
Mathew Pareles 4b40ac1b47 commandbar decent draft 2025-05-06 04:33:48 -07:00
Mathew Pareles 02115f5b6c bug in names 2025-05-06 03:52:28 -07:00
Mathew Pareles 786f5707e3 add keybinds 2025-05-06 03:47:21 -07:00
Andrew Pareles 71d703852b improve onboarding 2025-05-06 02:08:38 -07:00
Andrew Pareles ae179b8111 fix gemini OR 2025-05-05 22:05:01 -07:00
Andrew Pareles 170ccb9298 ui 2025-05-05 21:49:04 -07:00
Andrew Pareles a5b43ce146 Cmd+Shift+L transfers old text+selections, delete sidebarState 2025-05-05 21:44:42 -07:00
Mathew Pareles e0156803ff better commandbar ui 2025-05-05 21:37:41 -07:00
Andrew Pareles fcd445d875 Merge pull request #453 from voideditor/model-selection
Fix gemini OpenRouter
2025-05-05 17:17:57 -07:00
Andrew Pareles decd0c9bc4 openrouter gemini-style -> openai-style 2025-05-05 17:15:37 -07:00
Andrew Pareles e1da2a5231 update 2025-05-05 17:06:25 -07:00
Andrew Pareles 4570068fa9 update commnet 2025-05-05 17:06:06 -07:00
Andrew Pareles afacd32407 sourcecode overrides link 2025-05-05 17:02:35 -07:00
Andrew Pareles fa782243c9 comment 2025-05-05 17:01:06 -07:00
Andrew Pareles 19390808bc update 2025-05-05 17:00:29 -07:00
Andrew Pareles f77258799f update comment for VoidStaticModelInfo 2025-05-05 17:00:07 -07:00
Andrew Pareles f97cdd82d8 Merge pull request #451 from voideditor/model-selection
Azure, Reasoning, Model overrides, Fix Search/Replace without whitespace, File dump, New models
2025-05-05 16:42:05 -07:00
Andrew Pareles 9216a0e91f update voidVersion 2025-05-05 16:40:32 -07:00
Andrew Pareles aa03c34db6 update link 2025-05-05 16:39:52 -07:00
Andrew Pareles d125d8698b comment 2025-05-05 16:38:51 -07:00
Mathew Pareles f56ccad713 revert draft for today's push 2025-05-05 03:25:32 -07:00
Mathew Pareles 4c511f0c32 draft 2025-05-05 03:24:51 -07:00
Mathew Pareles ca3acb0d30 commandbar draft 2025-05-05 03:22:57 -07:00
Andrew Pareles 38e6ee94d8 phi 4 2025-05-05 03:09:38 -07:00
Andrew Pareles 1c9e684350 misc improvements 2025-05-05 02:52:21 -07:00
Mathew Pareles b6e3a57dc6 fix bug with widgetid 2025-05-05 02:30:07 -07:00
Mathew Pareles 7dc86502e3 remove text in @ to mention... 2025-05-05 02:30:07 -07:00
Andrew Pareles e70915afc3 fix model fallbacks - recognizedName 2025-05-05 02:23:27 -07:00
Andrew Pareles fab84d7371 style 2025-05-05 02:03:48 -07:00
Andrew Pareles d38b744dd2 small updates 2025-05-05 01:50:14 -07:00
Andrew Pareles b520523c4c current effort 2025-05-05 01:22:16 -07:00
Andrew Pareles b73c11429c finish adding effort budget 2025-05-05 01:15:53 -07:00
Andrew Pareles 7846b117bd model settings overrides part ii 2025-05-05 01:15:53 -07:00
Andrew Pareles 398a8a1934 misc + model overrides 2025-05-05 01:15:53 -07:00
Andrew Pareles 732269de87 misc 2025-05-05 01:15:52 -07:00
Andrew Pareles 4dae90e047 maxOutputTokens -> reservedOutputTokenSpace 2025-05-05 01:15:52 -07:00
Mathew Pareles 25c12b101f small 2025-05-05 01:10:10 -07:00
Mathew Pareles 09d7e7f3e6 accept/reject better keybind 2025-05-05 00:57:00 -07:00
Mathew Pareles c088ad3c07 keyboard shortcuts for accept/reject 2025-05-05 00:57:00 -07:00
Mathew Pareles 9bebbb5615 draft for accept/reject interactive 2025-05-05 00:57:00 -07:00
Andrew Pareles e726c3c5de add system message trimming because of very small models with 4096 window len 2025-05-04 19:33:29 -07:00
Andrew Pareles d826052444 add model overrides 2025-05-04 19:33:29 -07:00
Mathew Pareles d841468f3b diffidx updates properly 2025-05-03 18:47:01 -07:00
Mathew Pareles 4d04141139 fix backspace 2025-05-03 17:09:43 -07:00
Andrew Pareles 5090e31a89 add model overrides and headers JSON! 2025-05-03 16:41:41 -07:00
Andrew Pareles 4fb0d7d727 providerName 2025-05-02 15:56:36 -07:00
Andrew Pareles 5f12c7a1cf fix submit button click 2025-05-01 22:04:33 -07:00
Andrew Pareles 1af393983b rewrite file tool streaming fix 2025-05-01 21:52:38 -07:00
Andrew Pareles d3d62652db copy 2025-05-01 21:47:54 -07:00
Andrew Pareles 5cd1fa15cf copy 2025-05-01 18:04:35 -07:00
Andrew Pareles 14a276e4a0 flatten settings 2025-05-01 04:04:10 -07:00
Andrew Pareles cf0728f4c6 Merge pull request #443 from voideditor/model-selection
Chat interruption state
2025-05-01 00:45:57 -07:00
Andrew Pareles 6a119e1246 add logs for transfer 2025-05-01 00:45:22 -07:00
Andrew Pareles 8723107f1d voidrules 2025-05-01 00:36:14 -07:00
Andrew Pareles b1ca03611e interruptor and idle chat state fixes 2025-05-01 00:33:14 -07:00
Mathew Pareles 32f41f97d9 bg decent 2025-05-01 00:23:00 -07:00
Mathew Pareles 3580eb01d0 stagingselection bg 2025-04-30 23:05:39 -07:00
Andrew Pareles cb549ddd9a OpenAI-Compatible -> Custom 2025-04-30 22:43:57 -07:00
Andrew Pareles f0f7c57485 voidrules 2025-04-30 22:31:06 -07:00
Andrew Pareles ace3bfdfb6 Merge pull request #441 from voideditor/model-selection
Issue template
2025-04-30 22:28:53 -07:00
Andrew Pareles 90c1beecca do not enable blank issues 2025-04-30 22:28:11 -07:00
Mathew Pareles 4ad286a030 allow user to search from the start of @ file 2025-04-30 22:23:54 -07:00
Andrew Pareles c5bf5e453e Merge pull request #439 from voideditor/model-selection
Edit fixes
2025-04-30 22:14:17 -07:00
Andrew Pareles a89934d7ad gemini 2025-04-30 22:11:58 -07:00
Andrew Pareles e424a2cdbd fix double cancel 2025-04-30 22:00:52 -07:00
Andrew Pareles d9f2fcd700 error UI less overwhelming, gemini separated system message, improve Apply prompt 2025-04-30 21:42:29 -07:00
Mathew Pareles 1ed82ba174 dont show propective selections since we have @ to mention 2025-04-30 21:31:30 -07:00
Mathew Pareles 80a5dc0362 allow backspace stagingselections 2025-04-30 21:28:22 -07:00
Andrew Pareles f166fa3581 native gemini tools, editing UI, tool prompts 2025-04-30 20:27:08 -07:00
Andrew Pareles cec0df989c onerror for edits 2025-04-30 20:27:08 -07:00
Mathew Pareles ceba02ed47 fix jittery @ to mention 2025-04-30 19:26:54 -07:00
Mathew Pareles 1b9fe5b16d bad spacing 2025-04-30 16:47:34 -07:00
Andrew Pareles 8d8fcba833 generating... 2025-04-30 15:14:14 -07:00
Andrew Pareles e02d1e6847 Merge pull request #300 from Brandon-Bai/feature/add-chat-history-removal-button
Add history chat thread remove button in the chat side nav
2025-04-30 14:28:31 -07:00
Andrew Pareles b68f34e644 Merge remote-tracking branch 'origin/main' into pr/Brandon-Bai/300 2025-04-30 13:59:11 -07:00
Andrew Pareles f13279e84a temp 2025-04-30 13:58:51 -07:00
Andrew Pareles 9b861db77f rm debug 2025-04-30 13:49:09 -07:00
Andrew Pareles a8ba44e49e QwQ 2025-04-30 13:48:16 -07:00
Andrew Pareles 1632bb5169 qwen 3 2025-04-30 13:48:07 -07:00
Andrew Pareles 125968feb1 Merge remote-tracking branch 'origin/main' into model-selection 2025-04-30 13:41:59 -07:00
Andrew Pareles d2310973ec qwen 3 2025-04-30 13:39:43 -07:00
Andrew Pareles 722da01c7c Update README.md 2025-04-29 03:55:35 -07:00
Andrew Pareles 244cffe873 Update VOID_CODEBASE_GUIDE.md 2025-04-29 03:53:40 -07:00
Andrew Pareles d5e76813ce Update VOID_CODEBASE_GUIDE.md 2025-04-29 03:52:48 -07:00
Andrew Pareles a663a258f7 Update VOID_CODEBASE_GUIDE.md 2025-04-29 03:52:02 -07:00
Andrew Pareles 51b66338b5 Update README.md 2025-04-29 03:51:19 -07:00
Andrew Pareles b91b2b9276 Update README.md 2025-04-29 03:51:10 -07:00
Andrew Pareles 1081878c31 Update README.md 2025-04-29 03:50:27 -07:00
Andrew Pareles 477dedeb38 Update HOW_TO_CONTRIBUTE.md 2025-04-29 03:49:36 -07:00
Andrew Pareles df721c5370 Merge pull request #414 from Dylan-86/patch-3
Update HOW_TO_CONTRIBUTE.md
2025-04-29 00:59:00 -07:00
Andrew Pareles e493e65cff update 2025-04-29 00:58:22 -07:00
Andrew Pareles c16a45c647 Merge remote-tracking branch 'origin/main' into pr/Dylan-86/414 2025-04-29 00:54:55 -07:00
Andrew Pareles 9871d4f413 update 2025-04-29 00:50:04 -07:00
Andrew Pareles e94c0fb1c0 Merge pull request #436 from voideditor/model-selection
Updates + Rebase
2025-04-29 00:36:35 -07:00
Andrew Pareles 44398eb96b Merge pull request #436 from voideditor/model-selection
Updates + Rebase
2025-04-29 00:36:35 -07:00
Andrew Pareles 413be993d8 interruptions work 2025-04-29 00:25:16 -07:00
Andrew Pareles 106b30dfbd interruptions work 2025-04-29 00:25:16 -07:00
Andrew Pareles 58804620f7 capture toolName 2025-04-29 00:20:13 -07:00
Andrew Pareles 02b03003c0 capture toolName 2025-04-29 00:20:13 -07:00
Andrew Pareles 46d318b0ce voideditor-test -> voideditor 2025-04-29 00:12:46 -07:00
Andrew Pareles f9d8e92621 voideditor-test -> voideditor 2025-04-29 00:12:46 -07:00
Andrew Pareles 806b3b90b5 gitignore 2025-04-29 00:11:57 -07:00
Andrew Pareles 25f1fb4d19 gitignore 2025-04-29 00:11:57 -07:00
Andrew Pareles dfe00e7a18 HOW_TO_CONTRIBUTE 2025-04-29 00:09:40 -07:00
Andrew Pareles 2bd5708915 HOW_TO_CONTRIBUTE 2025-04-29 00:09:40 -07:00
Andrew Pareles c666a5f721 COPY FROM voideditor-test/void (void-test)!!!! 2025-04-29 00:07:20 -07:00
Andrew Pareles d31c0730ed rebase from 17baf84 2025-04-29 00:07:20 -07:00
Andrew Pareles a5a8559a20 Merge remote-tracking branch 'origin/main' into model-selection 2025-04-28 16:55:57 -07:00
Andrew Pareles 6b4142e9b1 better terminal context and search/replace fix 2025-04-28 15:56:05 -07:00
Mathew Pareles 7605931abe wording 2025-04-28 02:54:19 -07:00
Mathew Pareles a12d4fa9a7 missed a spot 2025-04-28 02:50:33 -07:00
Mathew Pareles ace109b0df grammar 2025-04-28 02:49:48 -07:00
Mathew Pareles e2464e16c6 descs 2025-04-28 02:49:07 -07:00
Mathew Pareles 6a7590ed03 prepare merge 2025-04-28 02:37:27 -07:00
Andrew Pareles 5134ebc761 EOL pref 2025-04-27 23:45:05 -07:00
Andrew Pareles 039d5cb812 rewrite file tool 2025-04-27 21:36:51 -07:00
Andrew Pareles 0bb948ee2d improve edit tool 2025-04-27 21:36:51 -07:00
Andrew Pareles 8a17e9b4e5 Merge pull request #430 from Dylan-86/Improved-how-to-contribute
Improved how to contribute
2025-04-27 20:21:19 -07:00
Andrew Pareles 5173ef70c8 update how to contribute 2025-04-27 20:20:59 -07:00
Andrew Pareles 879c18f6f3 Merge pull request #428 from Dylan-86/patch-4
Disable VoidIcon in onboarding to prevent UI freeze
2025-04-27 20:09:36 -07:00
Andrew Pareles e1516de6ac fix 2025-04-27 20:09:22 -07:00
Mathew Pareles 991e6a9d5f prepare large change 2025-04-27 20:03:30 -07:00
Mathew Pareles fec283a0f1 count 2025-04-27 20:03:30 -07:00
Andrew Pareles 1e5f9808b4 edit_file -> replace_in_file (SEARCH/REPLACE blocks) 2025-04-27 19:57:21 -07:00
Andrew Pareles 735b403820 improve prompting 2025-04-23 21:25:10 -07:00
Andrew Pareles 71fc2895a8 fix persistent terminal ID 2025-04-23 20:46:30 -07:00
Andrew Pareles 1a45baa23e fix persistent terminal id? 2025-04-23 19:32:37 -07:00
Dylan-86 d1db394693 Updated instructions based on my quite extensive experience with Void on Linux/Ubuntu 2025-04-22 13:24:25 +02:00
Dylan-86 94c3d38dc9 Update HOW_TO_CONTRIBUTE.md 2025-04-22 13:05:13 +02:00
Dylan-86 f1a79f8508 Update VoidOnboarding.tsx 2025-04-22 12:30:02 +02:00
Andrew Pareles 8f09a94c78 Merge pull request #427 from voideditor/fix-katex
fix katex?
2025-04-21 16:38:18 -07:00
Andrew Pareles 3de9faed5c fix katex? 2025-04-21 16:37:31 -07:00
Andrew Pareles c179912368 ajv 2025-04-21 14:45:20 -07:00
Mathew Pareles 19313c7e5d ux 2025-04-21 05:31:50 -07:00
Mathew Pareles c689dcad12 accurate space 2025-04-21 05:19:23 -07:00
Mathew Pareles c52a754076 lots of ux 2025-04-21 05:18:24 -07:00
Mathew Pareles d67cfb5b33 small 2025-04-21 02:27:21 -07:00
Mathew Pareles 7df49a769a add @ to mention! 2025-04-21 02:26:34 -07:00
Andrew Pareles e3a59057a5 format 2025-04-20 21:37:09 -07:00
Andrew Pareles 89c2adee70 Merge pull request #424 from voideditor/model-selection
update package-lock??
2025-04-20 20:32:27 -07:00
Andrew Pareles c4b9637546 update package-lock?? 2025-04-20 20:32:04 -07:00
Andrew Pareles 868736330a Merge pull request #423 from voideditor/model-selection
Fix build?
2025-04-20 20:20:54 -07:00
Andrew Pareles 2c856c9932 rm google vertex and fast-json-stable-stringify, and revert package-lock to try to fix build 2025-04-20 20:09:48 -07:00
Andrew Pareles a3b49d8aa2 add extensions transfer omits 2025-04-20 19:04:56 -07:00
Andrew Pareles da9817bd99 misc 2025-04-20 18:44:07 -07:00
Andrew Pareles 58b4d90b49 changeDiff prompt, chat thread state, improve import/export 2025-04-20 18:32:13 -07:00
Andrew Pareles 39ea63b207 add download/upload/reset 2025-04-20 06:43:49 -07:00
Andrew Pareles b02b2f0c89 duplicate thread, retry, search_in_file 2025-04-20 04:22:05 -07:00
Mathew Pareles 902d419026 at to mention draft 2025-04-20 02:06:35 -07:00
Andrew Pareles b244f2f08b tooltips 2025-04-20 01:54:44 -07:00
Andrew Pareles 4d9b52ede6 loader and misc 2025-04-20 01:13:47 -07:00
Andrew Pareles e94d2de641 bgTerminalId !== null 2025-04-19 23:59:12 -07:00
Andrew Pareles 5fdc5d6df2 Merge pull request #421 from voideditor/model-selection
fix ajv missing dep
2025-04-19 17:10:12 -07:00
Andrew Pareles cf5ff98081 fix ajv missing dep 2025-04-19 17:07:59 -07:00
Andrew Pareles 45eeb14b54 Merge pull request #420 from voideditor/model-selection
package-lock fix
2025-04-19 16:28:11 -07:00
Andrew Pareles dcfb5d443c fix package-lock? 2025-04-19 16:27:39 -07:00
Andrew Pareles f839e73ebc @types/katex as dev dep 2025-04-19 00:26:47 -07:00
Andrew Pareles c775d34d75 Merge pull request #417 from voideditor/model-selection
Misc updates
2025-04-18 20:58:55 -07:00
Andrew Pareles 3023ed87d2 1.2.6 2025-04-18 20:58:43 -07:00
Andrew Pareles 3a5a04ceae Update README.md 2025-04-18 20:54:57 -07:00
Andrew Pareles 22475f7206 Update README.md 2025-04-18 20:54:40 -07:00
Andrew Pareles 68333ce349 Update README.md 2025-04-18 20:54:01 -07:00
Andrew Pareles 9f3dbc3eb4 Update VOID_CODEBASE_GUIDE.md 2025-04-18 20:52:13 -07:00
Andrew Pareles 10949b44d1 add retries, fix key, X on autodetected 2025-04-18 20:48:57 -07:00
Andrew Pareles 45778d5735 Update VOID_CODEBASE_GUIDE.md 2025-04-18 18:49:17 -07:00
Andrew Pareles 816d6090cc Update VOID_CODEBASE_GUIDE.md 2025-04-18 18:46:04 -07:00
Andrew Pareles 355d8d9a5a Update VOID_CODEBASE_GUIDE.md 2025-04-18 18:41:06 -07:00
Andrew Pareles b47e8f2237 Update VOID_CODEBASE_GUIDE.md 2025-04-18 18:14:36 -07:00
Andrew Pareles 0543b2c893 Update VOID_CODEBASE_GUIDE.md 2025-04-18 18:11:38 -07:00
Andrew Pareles 69cf58af5a Update VOID_CODEBASE_GUIDE.md 2025-04-18 18:06:25 -07:00
Andrew Pareles f9b3dbe316 Update VOID_CODEBASE_GUIDE.md 2025-04-18 18:05:48 -07:00
Andrew Pareles 176b988539 Update VOID_CODEBASE_GUIDE.md 2025-04-18 18:04:21 -07:00
Andrew Pareles 11cc9f8b4e Update VOID_CODEBASE_GUIDE.md 2025-04-18 18:03:33 -07:00
Andrew Pareles ab396d4c1d Update VOID_CODEBASE_GUIDE.md 2025-04-18 18:02:22 -07:00
Andrew Pareles a01ca97b18 Update VOID_CODEBASE_GUIDE.md 2025-04-18 18:01:09 -07:00
Andrew Pareles 1b4105ed2b Update issue_template.md 2025-04-18 14:57:16 -07:00
Andrew Pareles 4024ed40c2 Update issue_template.md 2025-04-18 14:56:56 -07:00
Andrew Pareles 8c53878681 Update issue_template.md 2025-04-18 14:56:33 -07:00
Andrew Pareles 7bd52438f5 try/catch voidrules 2025-04-18 06:24:33 -07:00
Andrew Pareles 6f2d513d3f Delete .github/issue_template.md 2025-04-18 06:19:54 -07:00
Andrew Pareles 800aeea247 misc fixes 2025-04-18 06:08:54 -07:00
Mathew Pareles 021acf541a latex works with some hacks 2025-04-18 05:42:35 -07:00
Andrew Pareles 7a739e567c prepare retry loop 2025-04-18 04:44:14 -07:00
Andrew Pareles ef52ebfdc2 2.5 pro 2025-04-18 04:03:32 -07:00
Andrew Pareles e83a172816 reorder 2025-04-18 04:00:01 -07:00
Andrew Pareles c3ef7e616f lm studio reasoning! 2025-04-18 03:59:23 -07:00
Andrew Pareles f77907fe0d LM studio refreshing 2025-04-18 03:48:44 -07:00
Andrew Pareles 6d28b0627f add GCP vertex (w/ auth), MSFT azure, litellm, lm studio - NEEDS TESTING 2025-04-18 03:48:44 -07:00
Andrew Pareles 7d3ce48f5f extract \n from FIM 2025-04-18 03:48:44 -07:00
Andrew Pareles 97c611f4f2 improve Fast Apply prompt 2025-04-18 03:48:44 -07:00
Mathew Pareles 90d94ecd3c ux 2025-04-18 01:03:08 -07:00
Mathew Pareles 9f7154ddab table 2025-04-18 00:11:36 -07:00
Mathew Pareles 5cdb4b0c47 ux 2025-04-17 23:35:23 -07:00
Mathew Pareles a61fdd0419 ux 2025-04-17 23:32:01 -07:00
Mathew Pareles b7db527866 history ux 2025-04-17 22:41:40 -07:00
Mathew Pareles c921059690 thread history ux 2025-04-17 21:27:21 -07:00
Mathew Pareles cee6dcc524 rename .voidinstructions to .voidrules ... 2025-04-17 21:27:21 -07:00
Andrew Pareles b9e097bfc0 Update issue_template.md 2025-04-17 18:46:58 -07:00
Andrew Pareles 87c6669020 Update issue_template.md 2025-04-17 18:46:42 -07:00
Andrew Pareles 80448c4471 Update issue_template.md 2025-04-17 18:44:57 -07:00
Andrew Pareles b4f9c1fa97 Delete .github/issue_template.md 2025-04-17 18:43:57 -07:00
Andrew Pareles 10052819ce Update issue_template.md 2025-04-17 18:43:44 -07:00
Andrew Pareles 0f2ebecbd3 Create issue_template.md 2025-04-17 18:39:58 -07:00
Andrew Pareles eb68e1d294 Update issue_template.md 2025-04-17 18:38:55 -07:00
Andrew Pareles 17aa9eea97 prompt 2025-04-17 18:29:37 -07:00
Andrew Pareles 5e85d804f8 update 2025-04-17 17:30:07 -07:00
Andrew Pareles 8f2a2d642f Merge pull request #415 from voideditor/model-selection
Template
2025-04-17 17:22:41 -07:00
Andrew Pareles 6141351e15 issue template 2025-04-17 17:21:53 -07:00
Andrew Pareles 00e196a55f Update HOW_TO_CONTRIBUTE.md 2025-04-17 15:54:16 -07:00
Dylan-86 a146b8ba0d Update HOW_TO_CONTRIBUTE.md
I added some notes about Ubuntu installing as I ran through a simple npm blocking error when a folder in the Void path contains a space " " like "New Folder". I simply moved to "NewFolder" and the error disappeared.
2025-04-17 12:58:07 +02:00
Andrew Pareles 16913e96e5 prompt 2025-04-16 23:44:24 -07:00
Andrew Pareles 6f55e6900b Merge pull request #413 from voideditor/model-selection
1.2.5 misc
2025-04-16 22:57:50 -07:00
Andrew Pareles 36e10dcc08 1.2.5 2025-04-16 22:56:52 -07:00
Andrew Pareles ce8c790e5c undo version 2025-04-16 22:47:52 -07:00
Mathew Pareles 738067951a ux 2025-04-16 22:31:28 -07:00
Andrew Pareles 8b1a42499b add more boundaries 2025-04-16 21:56:23 -07:00
Mathew Pareles 7fd52b4805 fix commandbarinchat state 2025-04-16 20:44:47 -07:00
Mathew Pareles 5f30506f46 terminal tool style 2025-04-16 20:44:47 -07:00
Andrew Pareles 48efc32dd3 lint finite size 2025-04-16 20:25:12 -07:00
Andrew Pareles 5fffd2fe0f rename command tool 2025-04-16 20:23:52 -07:00
Andrew Pareles 664428c8f0 add download chat buttons 2025-04-16 18:09:03 -07:00
Andrew Pareles aa8b999da0 Merge pull request #409 from voideditor/model-selection
prompt update for o3
2025-04-16 14:31:10 -07:00
Andrew Pareles d99d2cca4a prompt update for o3 2025-04-16 14:30:49 -07:00
Andrew Pareles e7da1d27bd Merge pull request #408 from voideditor/model-selection
o3 fallback
2025-04-16 10:47:31 -07:00
Andrew Pareles 56c50dc218 fallback 2025-04-16 10:46:37 -07:00
Andrew Pareles e0e7b360fe Merge pull request #407 from voideditor/model-selection
Model selection
2025-04-16 10:41:03 -07:00
Andrew Pareles 434a8289d9 1.2.4 bump 2025-04-16 10:40:37 -07:00
Andrew Pareles 7e0e65d3b7 o3, o4-mini 2025-04-16 10:39:37 -07:00
Andrew Pareles 4cb96cb60e Merge pull request #403 from Dylan-86/patch-2
Fix AppImage creation bug
2025-04-16 04:30:39 -07:00
Andrew Pareles 4a7ea3ec43 appimage 2025-04-16 04:30:01 -07:00
Andrew Pareles bd53772523 Merge remote-tracking branch 'origin/main' into pr/Dylan-86/403 2025-04-16 04:29:58 -07:00
Andrew Pareles f09f538b05 Merge pull request #406 from voideditor/model-selection
Onboarding, SSH
2025-04-16 04:27:13 -07:00
Andrew Pareles ff2ed836c7 onboarding style 2025-04-16 04:26:35 -07:00
Mathew Pareles 6db29526ec add letterpress image 2025-04-16 04:04:50 -07:00
Andrew Pareles 27d9cc2916 comment 2025-04-16 03:50:56 -07:00
Andrew Pareles dbbaa61961 try again 2025-04-16 03:49:41 -07:00
Andrew Pareles 05bd1790a7 mistral 2025-04-16 03:46:14 -07:00
Mathew Pareles 4b30990e92 fix long api key 2025-04-16 03:35:25 -07:00
Mathew Pareles 3a0eedc9fa py 2025-04-16 03:29:15 -07:00
Mathew Pareles 64d4e264bf onboarding 2025-04-16 03:27:44 -07:00
Mathew Pareles afc5cf512b remove tooltip for now 2025-04-16 03:21:14 -07:00
Mathew Pareles 35e8cf59ff better ending screen onboarding 2025-04-16 03:14:52 -07:00
Mathew Pareles fd4ecaff8a fz 2025-04-16 02:51:42 -07:00
Mathew Pareles 55c4f9e1cf onboarding decent final draft 2025-04-16 02:47:19 -07:00
Andrew Pareles 78f9463da1 .voidinstructions 2025-04-16 02:27:29 -07:00
Andrew Pareles 23f1e8c641 .voidinstructions file 2025-04-16 02:21:36 -07:00
Andrew Pareles 79eacad18b error boundaries everywhere + misc (BROKEN) 2025-04-16 02:21:17 -07:00
Andrew Pareles 3e0e0bd4aa SSH buttons 2025-04-16 01:23:25 -07:00
Andrew Pareles fece3b2548 update settings page 2025-04-16 01:18:59 -07:00
Andrew Pareles 091855a89a linux version for deb, rem, snap 2025-04-16 01:02:57 -07:00
Andrew Pareles b3bd454bad add SSH button 2025-04-16 01:02:57 -07:00
Mathew Pareles bd580946ce add image 2025-04-16 00:58:24 -07:00
Mathew Pareles 3bd6d08841 button 2025-04-16 00:58:24 -07:00
Andrew Pareles 152cfd93aa Merge pull request #404 from voideditor/model-selection
1.2.1 updates
2025-04-15 23:09:44 -07:00
Andrew Pareles 7ea4e16f5f 1.2.3 2025-04-15 23:08:26 -07:00
Andrew Pareles 884548615b checkpoint UX and dropdown UI 2025-04-15 23:06:13 -07:00
Mathew Pareles b62943fffd tooltip for ollama 2025-04-15 18:35:23 -07:00
Andrew Pareles 9bd97d0cd5 Claude reasoning small fix 2025-04-15 17:30:35 -07:00
Andrew Pareles bf9852858e remove auto-selection of current file 2025-04-15 17:30:21 -07:00
Andrew Pareles 6058b7ff78 misc fixes and gemini prompt improvement 2025-04-15 17:04:06 -07:00
Mathew Pareles 9b8f3ec2e2 desc 2025-04-15 16:52:21 -07:00
Mathew Pareles d3fd5be294 small 2025-04-15 16:38:54 -07:00
Mathew Pareles aa4398c734 small changes 2025-04-15 16:36:46 -07:00
Mathew Pareles 29d1a919be small styles 2025-04-15 16:16:04 -07:00
Andrew Pareles feea5e13f3 update service fix 2025-04-15 15:56:15 -07:00
Mathew Pareles 119db73f69 colors 2025-04-15 15:12:40 -07:00
Andrew Pareles f59b24496e 1.2.2 fix gemini 2025-04-15 15:01:24 -07:00
Andrew Pareles a2ae9794ed eslint 2025-04-15 15:00:44 -07:00
Andrew Pareles f335ce7204 fix gemini 2025-04-15 14:59:32 -07:00
Mathew Pareles 0ddab03f8b styles 2025-04-15 03:23:31 -07:00
Mathew Pareles 5f8fddb01e fix flash 2025-04-15 03:23:31 -07:00
Mathew Pareles c81f628b7b colors 2025-04-15 03:23:31 -07:00
Mathew Pareles 9d1ab8728a styles 2025-04-15 03:23:31 -07:00
Dylan-86 7a0f9ac77c Fix AppImage creation bug
See https://github.com/voideditor/void/issues/402
2025-04-15 12:22:15 +02:00
Andrew Pareles a0fa104d23 Merge pull request #401 from voideditor/model-selection
Model selection
2025-04-15 02:34:33 -07:00
Andrew Pareles 7fd0b133e5 misc prompt improvements 2025-04-15 02:30:37 -07:00
Andrew Pareles 321876932a loading 2025-04-15 01:51:59 -07:00
Andrew Pareles eda8517c78 Merge pull request #400 from voideditor/model-selection
GPT 4.1 and Claude 3.7 Thinking with Tools
2025-04-14 23:52:58 -07:00
Andrew Pareles 6ce37f7627 misc 2025-04-14 23:47:14 -07:00
Andrew Pareles 18b76885f5 1.2.1 2025-04-14 23:17:33 -07:00
Andrew Pareles ba8644fbb6 read_file improvements 2025-04-14 23:12:10 -07:00
Andrew Pareles ee959ded08 4.1 and 3.7 work! 2025-04-14 22:57:29 -07:00
Mathew Pareles 499a47904e style 2025-04-14 22:53:39 -07:00
Mathew Pareles 5ac03bb917 fix 2025-04-14 22:47:10 -07:00
Mathew Pareles 922f3ba2d7 fix current file 2025-04-14 22:46:54 -07:00
Mathew Pareles a189629341 fix current file 2025-04-14 22:46:15 -07:00
Andrew Pareles d2098f71eb support 4.1 native tools and 3.7 native thinking... 2025-04-14 22:01:46 -07:00
Mathew Pareles 77c59f2e80 lint error severity must be warning or error 2025-04-14 14:41:48 -07:00
Mathew Pareles e6ecad3f65 desc 2025-04-14 14:34:04 -07:00
Mathew Pareles ee43ec99ea duplicate tooltips 2025-04-14 13:59:32 -07:00
Andrew Pareles e77039e9ad Merge pull request #399 from voideditor/model-selection
1.2.0
2025-04-14 13:38:12 -07:00
Andrew Pareles 6aa1375067 1.2.0 2025-04-14 13:36:43 -07:00
Andrew Pareles fe017948c6 Merge pull request #398 from voideditor/model-selection
GPT 4.1 + fixes
2025-04-14 13:34:33 -07:00
Andrew Pareles 9b3d4cbdba lint errors 2025-04-14 13:33:49 -07:00
Andrew Pareles a8cf0b361f prompt 2025-04-14 13:29:13 -07:00
Andrew Pareles 680125baec hot-swap out default models on mount 2025-04-14 12:48:44 -07:00
Andrew Pareles 0db4f7118d Merge remote-tracking branch 'origin/main' into model-selection 2025-04-14 12:31:49 -07:00
Andrew Pareles 2ea20243a8 lint error UI + misc 2025-04-14 12:31:31 -07:00
Andrew Pareles 4d02381dab Merge pull request #321 from jcommaret/feat_mistral-199
[Provider]Mistral -😻- Mistral working : [OpenAICompatibleModel Chat + tools +  sendMistralFIM]
2025-04-14 12:03:53 -07:00
Andrew Pareles a80883c10f 4.1 fallback for OSS providers 2025-04-14 11:10:52 -07:00
Andrew Pareles 20b0fd6af9 add 4.1 2025-04-14 10:57:26 -07:00
Andrew Pareles 5171f7244f Merge pull request #397 from voideditor/model-selection
Misc
2025-04-14 01:28:56 -07:00
Andrew Pareles 43708d25e7 1.1.0 2025-04-14 01:28:37 -07:00
Andrew Pareles 2b54733242 disable onboarding 2025-04-13 22:07:30 -07:00
Andrew Pareles cd77d1a1c4 Update README.md 2025-04-13 20:38:46 -07:00
Andrew Pareles 37af09add8 message 2025-04-13 12:04:17 -07:00
Andrew Pareles ade1e70536 Merge pull request #395 from voideditor/model-selection
minor fixes
2025-04-12 20:16:39 -07:00
Andrew Pareles 159e0b677f minor fixes 2025-04-12 20:16:20 -07:00
Shi Bai cbae8d5ec2 Remove one empty line between methods 2025-03-04 21:07:54 -08:00
Andrew Pareles 9f25d652d5 merge 2025-03-01 18:46:10 -08:00
Andrew Pareles be291fd0f9 Merge remote-tracking branch 'origin/main' into pr/Brandon-Bai/300 2025-03-01 18:46:07 -08:00
Andrew Pareles 1ef22641b7 minor changes 2025-03-01 18:19:33 -08:00
Andrew Pareles 334401eb50 Merge remote-tracking branch 'origin/main' into pr/Brandon-Bai/300 2025-03-01 17:52:28 -08:00
Shi Bai f287a5388f Add history chat thread remove button in the chat side nav
- Added a trash icon to the right of the chat thread name to remove a thread history.
- Added 2 icon size constants in SidebarThreadSelector.tsx to avoid the usage of magic numbers.
2025-02-28 16:08:43 -08:00
1388 changed files with 113180 additions and 33867 deletions
+46
View 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"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
# Code - OSS Development Container
[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode)
[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue)](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).
+2 -1
View File
@@ -11,10 +11,10 @@
**/extensions/markdown-language-features/notebook-out/**
**/extensions/markdown-math/notebook-out/**
**/extensions/notebook-renderers/renderer-out/index.js
**/extensions/open-remote-ssh/out/extension.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
@@ -37,4 +37,5 @@
**/test/unit/assert.js
**/test/automation/out/**
**/typings/**
**/.build/**
!.vscode
+1 -1
View File
@@ -51,7 +51,7 @@ export = new class ApiProviderNaming implements eslint.Rule.RuleModule {
node,
messageId: 'amdX'
});
}
};
return {
['ImportExpression Literal']: checkImport,
@@ -19,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;');
}
});
}
@@ -27,7 +27,7 @@ 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,
+1 -1
View File
@@ -44,7 +44,7 @@ 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',
},
@@ -14,13 +14,13 @@ export = new class implements eslint.Rule.RuleModule {
layerbreaker: 'You are only allowed to define limited top level functions.'
},
schema: {
type: "array",
type: 'array',
items: {
type: "object",
type: 'object',
additionalProperties: {
type: "array",
type: 'array',
items: {
type: "string"
type: 'string'
}
}
}
@@ -65,6 +65,6 @@ export = new class implements eslint.Rule.RuleModule {
}
}
}
}
};
}
};
+4 -4
View File
@@ -14,22 +14,22 @@ 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;
@@ -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 {
});
}
},
}
};
}
};
@@ -24,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'
}
}
}
@@ -38,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,
@@ -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.sourceCode.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({
@@ -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
+4
View File
@@ -1,3 +1,7 @@
/*---------------------------------------------------------------------------------------------
* 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');
@@ -19,7 +19,7 @@ export = new class ApiTypeDiscrimination implements eslint.Rule.RuleModule {
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
return {
['TSPropertySignature[optional=false] TSTypeAnnotation TSLiteralType Literal']: (node: any) => {
const raw = String((<TSESTree.Literal>node).raw)
const raw = String((<TSESTree.Literal>node).raw);
if (/^('|").*\1$/.test(raw)) {
@@ -29,6 +29,6 @@ export = new class ApiTypeDiscrimination implements eslint.Rule.RuleModule {
});
}
}
}
};
}
};
+1
View File
@@ -0,0 +1 @@
blank_issues_enabled: false
+9
View File
@@ -0,0 +1,9 @@
---
name: Issue
about: Submit an Issue to Void
title: For VSCode-related issues (eg builds), please start the title with `[App]`. Otherwise, start it with `[Bug]` or `[Feature]`.
---
1. Press `Cmd+Shift+P` in Void, and type `Help: About`. Please paste the information here. Also let us know any other relevant details, like the model and provider you're using if applicable.
2. Describe the issue/feature here!
+164
View File
@@ -0,0 +1,164 @@
#!/usr/bin/env python
from __future__ import annotations
import os, sys, json, datetime, pathlib, textwrap, requests
from openai import OpenAI
REPO = "voideditor/void"
CACHE_FILE = pathlib.Path(".github/triage_cache.json")
STAMP_FILE = pathlib.Path(".github/last_triage.txt")
THEMES_MD = textwrap.dedent("""\
1. 🔗 LLM Integration & Provider Support
2. 🖥 App Build & Platform Compatibility
3. 🎯 Prompt, Token, and Cost Management
4. 🧩 Editor UX & Interaction Design
5. 🤖 Agent & Automation Features
6. ⚙️ System Config & Environment Setup
7. 🗃 Meta: Feature Comparison, Structure, and Naming
""").strip()
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
headers = {"Authorization": f"Bearer {os.environ['GITHUB_TOKEN']}"}
# ───────── helpers ────────────────────────────────────────────────────────
def utc_iso_now() -> str:
return datetime.datetime.utcnow().replace(microsecond=0, tzinfo=datetime.timezone.utc).isoformat()
def read_stamp() -> str:
return STAMP_FILE.read_text().strip() if STAMP_FILE.exists() else "1970-01-01T00:00:00Z"
def save_stamp():
STAMP_FILE.parent.mkdir(parents=True, exist_ok=True)
STAMP_FILE.write_text(utc_iso_now())
def load_cache() -> dict[int, str]:
return json.loads(CACHE_FILE.read_text()) if CACHE_FILE.exists() else {}
def save_cache(d: dict[int, str]):
CACHE_FILE.parent.mkdir(parents=True, exist_ok=True)
CACHE_FILE.write_text(json.dumps(d, indent=2))
def fetch_open_issues(since_iso: str | None = None) -> list[dict]:
issues, page = [], 1
while True:
url = (
f"https://api.github.com/repos/{REPO}/issues"
f"?state=open&per_page=100&page={page}"
+ (f"&since={since_iso}" if since_iso else "")
)
chunk = requests.get(url, headers=headers).json()
if not chunk or (isinstance(chunk, dict) and chunk.get("message")):
break
issues.extend(i for i in chunk if "pull_request" not in i)
page += 1
return issues
# ───────── main ───────────────────────────────────────────────────────────
last_stamp = read_stamp()
changed = fetch_open_issues(since_iso=last_stamp)
# Fallback if **nothing** changed AND we have *no* existing output
if not changed:
cache_exists = CACHE_FILE.exists()
wiki_exists = pathlib.Path("wiki/Issue-Categories.md").exists()
if not cache_exists or not wiki_exists:
# first run or someone wiped the wiki → build from scratch
print("⏩ First run or empty wiki — fetching ALL open issues.", file=sys.stderr)
changed = fetch_open_issues() # full list
else:
print(f"✅ No issues updated since {last_stamp}. Nothing to classify.", file=sys.stderr)
save_stamp()
sys.exit(0)
# ---------------------------------------------------------------- prompt
issue_lines = "\n".join(f"- {i['title']} ({i['html_url']})" for i in changed)
prompt = textwrap.dedent(f"""\
You are an AI assistant helping triage GitHub issues into exactly 7 predefined themes.
Each issue must go into exactly one of the themes below:
{THEMES_MD}
Format your output in Markdown like:
## 🎯 Prompt, Token, and Cost Management
- [#123](https://github.com/org/repo/issues/123) Title here
Classify these issues:
{issue_lines}
""")
resp = client.chat.completions.create(
model="gpt-4.1",
messages=[{"role": "user", "content": prompt}],
temperature=0.2,
)
md = resp.choices[0].message.content
# ---------------------------------------------------------------- parse GPT
new_map: dict[int, str] = {}
current = None
for ln in md.splitlines():
if ln.startswith("##"):
current = ln.lstrip("# ").strip()
elif ln.lstrip().startswith("- [#"):
try:
num = int(ln.split("[#")[1].split("]")[0])
new_map[num] = current
except Exception:
pass # ignore malformed lines
cache = load_cache()
cache.update(new_map)
save_cache(cache)
save_stamp()
# ---------------------------------------------------------------- rebuild wiki
order = [
"🔗 LLM Integration & Provider Support",
"🖥 App Build & Platform Compatibility",
"🎯 Prompt, Token, and Cost Management",
"🧩 Editor UX & Interaction Design",
"🤖 Agent & Automation Features",
"⚙️ System Config & Environment Setup",
"🗃 Meta: Feature Comparison, Structure, and Naming",
]
sections: dict[str, list[int]] = {t: [] for t in order}
# ── fetch ALL current open issues once (PRs filtered out) ────────────────
title_map: dict[int, tuple[str, str]] = {}
open_now: set[int] = set()
page = 1
while True:
batch = fetch_open_issues(since_iso=None) if page == 1 else []
if not batch:
break
for it in batch:
num = it["number"]
title_map[num] = (it["title"], it["html_url"])
open_now.add(num)
page += 1
# 🧹 drop any cached IDs that are no longer open issues (e.g., became a PR or were closed)
for stale in set(cache) - open_now:
del cache[stale]
save_cache(cache) # persist cleaned cache
# build sections from cleaned cache
for num, theme in cache.items():
if theme in sections: # extra safety
sections[theme].append(num)
# ---------------------------------------------------------------- print roadmap
for theme in order:
issues = sections[theme]
if issues:
print(f"## {theme}")
for n in sorted(issues):
title, url = title_map.get(n, ("(missing)", f"https://github.com/{REPO}/issues/{n}"))
print(f"- [#{n}]({url}) {title}")
print()
+60
View File
@@ -0,0 +1,60 @@
name: Issue Triage to Wiki
on:
workflow_dispatch:
schedule:
- cron: '0 */6 * * *' # every 6 hrs (UTC)
jobs:
roadmap:
runs-on: ubuntu-latest
steps:
# 1️⃣ Check out code (so the script and cache files are present)
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1 # shallow clone
# 2️⃣ Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
# 3️⃣ Install dependencies
- name: Install Python dependencies
run: |
pip install openai requests
# 4️⃣ Clone your forks Wiki
- name: Clone your fork's Wiki
run: |
git clone https://x-access-token:${{ secrets.WIKI_TOKEN }}@github.com/${{ github.repository }}.wiki.git wiki
# 5️⃣ (Optional) Show repo tree for debugging
- name: Show repo tree (debug)
run: |
echo "PWD: $(pwd)"
ls -al
ls -al .github/scripts || true
ls -al void/.github/scripts || true
# 6️⃣ Generate roadmap and push only if it changed
- name: Generate roadmap directly into wiki
run: |
python .github/scripts/issue_triage.py > wiki/_new.md
if ! cmp -s wiki/_new.md wiki/Issue-Categories.md ; then
mv wiki/_new.md wiki/Issue-Categories.md
cd wiki
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add Issue-Categories.md
git commit -m "Auto-update Issue-Categories.md from GPT triage"
git push
else
echo "No content change skipping wiki update"
fi
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GITHUB_TOKEN: ${{ secrets.WIKI_TOKEN }}
+2
View File
@@ -21,6 +21,8 @@ vscode.db
product.overrides.json
*.snap.actual
.vscode-test
# Void added these:
.tmp/
.tmp2/
.tool-versions
+1 -1
View File
@@ -1,6 +1,6 @@
disturl="https://electronjs.org/headers"
target="34.3.2"
ms_build_id="11044223"
ms_build_id="11161073"
runtime="electron"
build_from_source="true"
legacy-peer-deps="true"
+16
View 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.
+21 -4
View File
@@ -19,7 +19,7 @@ const { defineConfig } = require('@vscode/test-cli');
* 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 = [
{
@@ -65,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',
}
];
@@ -75,9 +89,12 @@ const defaultLaunchArgs = process.env.API_TESTS_EXTRA_ARGS?.split(' ') || [
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) {
+60 -1
View File
@@ -251,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": [
@@ -568,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": [
+1 -1
View File
@@ -7,7 +7,7 @@
{
"kind": 2,
"language": "github-issues",
"value": "$REPO=repo:microsoft/vscode\n$MILESTONE=milestone:\"February 2025\""
"value": "$REPO=repo:microsoft/vscode\n$MILESTONE=milestone:\"March 2025\""
},
{
"kind": 1,
+1 -1
View File
@@ -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\r\n\r\n$MILESTONE=milestone:\"February 2025\""
"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,
+1 -1
View File
@@ -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:\"February 2025\"\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,
+1 -1
View File
@@ -7,7 +7,7 @@
{
"kind": 2,
"language": "github-issues",
"value": "// list of repos we work in\n$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// current milestone name\n$MILESTONE=milestone:\"February 2025\"\n"
"value": "// list of repos we work in\n$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// current milestone name\n$MILESTONE=milestone:\"March 2025\"\n"
},
{
"kind": 1,
+2
View File
@@ -49,6 +49,7 @@
"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
@@ -156,6 +157,7 @@
"application.experimental.rendererProfiling": true,
"editor.experimental.asyncTokenization": true,
"editor.experimental.asyncTokenizationVerification": true,
"terminal.integrated.suggest.enabled": true,
"typescript.preferences.autoImportFileExcludePatterns": [
"@xterm/xterm",
"@xterm/headless",
+3 -3
View File
@@ -29,7 +29,7 @@
}
}
},
{
{ // Void added this
"type": "npm",
"script": "watchreactd",
"label": "React - Build",
@@ -89,8 +89,8 @@
"label": "VS Code - Build",
"dependsOn": [
"Core - Build",
"Ext - Build",
"React - Build"
"React - Build",
"Ext - Build"
],
"group": {
"kind": "build",
+59 -66
View File
@@ -12,7 +12,7 @@ There are a few ways to contribute:
### 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 contribute!
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!
@@ -20,14 +20,15 @@ Most of Void's code lives in the folder `src/vs/workbench/contrib/void/`.
## Editing Void's Code
## Building Void
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. Build Prerequisites - Mac
### a. Mac - Prerequisites
If you're using a Mac, you need Python and XCode. You probably have these by default.
### b. Build Prerequisites - Windows
### 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.
@@ -42,35 +43,55 @@ Go to the "Individual Components" tab and select:
Finally, click Install.
### c. Build Prerequisites - Linux
### 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).
### d. Building Void
### 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.
To build Void, open `void/` inside VSCode. Then open your terminal and run:
1. `npm install` to install all dependencies.
2. `npm run watchreact` to build Void's browser dependencies like React. (If this doesn't work, try `npm run buildreact`).
3. Build Void.
- Press <kbd>Cmd+Shift+B</kbd> (Mac).
- Press <kbd>Ctrl+Shift+B</kbd> (Windows/Linux).
- This step can take ~5 min. The build is done when you see two check marks (one of the items will continue spinning indefinitely - it compiles our React code).
4. Run Void.
- Run `./scripts/code.sh` (Mac/Linux).
- Run `./scripts/code.bat` (Windows).
6. Nice-to-knows.
- You can always press <kbd>Ctrl+R</kbd> (<kbd>Cmd+R</kbd>) inside the new window to reload and see your new changes. It's faster than <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 above run command, which lets you delete the `.tmp` folder to reset any IDE changes you made when testing.
- You can kill any of the build scripts by pressing `Ctrl+D` in VSCode terminal. If you press `Ctrl+C` the script will close but will keep running in the background (to open all background scripts, just re-build).
#### Building Void from Terminal
Alternatively, if you want to build Void from the terminal, instead of pressing <kbd>Cmd+Shift+B</kbd> you can run `npm run watch`. The build is done when you see something like this:
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
@@ -81,45 +102,46 @@ Alternatively, if you want to build Void from the terminal, instead of pressing
#### Common Fixes
### 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).
- Make sure you followed the prerequisite steps.
- Make sure you have Node version `20.18.2` (the version in `.nvmrc`)!
- If you get `"TypeError: Failed to fetch dynamically imported module"`, make sure all imports end with `.js`.
- If you see missing styles, wait a few seconds and then reload.
- If you have any 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.
- If you get errors like `npm error libtool: error: unrecognised option: '-static'`, make sure you have GNU libtool instead of BSD libtool (BSD is the default in macos)
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.
## Packaging
#### 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.
We don't usually recommend packaging. Instead, you should probably just build. If you're sure you want to package Void into an executable app, make sure you've built 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). Be patient - packaging can take ~25 minutes.
<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
##### Mac
- `npm run gulp vscode-darwin-arm64` - most common (Apple Silicon)
- `npm run gulp vscode-darwin-x64` (Intel)
### Windows
##### Windows
- `npm run gulp vscode-win32-x64` - most common
- `npm run gulp vscode-win32-arm64`
### Linux
##### Linux
- `npm run gulp vscode-linux-x64` - most common
- `npm run gulp vscode-linux-arm64`
### Output
##### Local Executible Output
This will generate a folder outside of `void/`:
The local executible will be located in a folder outside of `void/`:
```bash
workspace/
├── void/ # Your Void fork
└── VSCode-darwin-arm64/ # Generated output
```
### Distributing
Void's maintainers distribute Void on our website and in releases. If you'd like to see the scripts to convert `Mac .app -> .dmg`, `Windows folder -> .exe`, and `Linux folder -> appimage` for distribution, feel free to reach out.
</details>
## Pull Request Guidelines
@@ -131,32 +153,3 @@ Void's maintainers distribute Void on our website and in releases. If you'd like
<!--
# Relevant files
We keep track of all the files we've changed with Void so it's easy to rebase:
Edit: far too many changes to track... this is old
- README.md
- CONTRIBUTING.md
- VOID_USEFUL_LINKS.md
- product.json
- package.json
- src/vs/workbench/api/common/{extHost.api.impl.ts | extHostApiCommands.ts}
- src/vs/workbench/workbench.common.main.ts
- src/vs/workbench/contrib/void/\*
- extensions/void/\*
- .github/\*
- .vscode/settings/\*
- .eslintrc.json
- build/hygiene.js
- build/lib/i18n.resources.json
- build/npm/dirs.js
- vscode.proposed.editorInsets.d.ts - not modified, but code copied
-->
+37 -16
View File
@@ -1,3 +1,30 @@
## Void is now deprecated.
Void is deprecated and no longer accepting contributions.
Thank you to everyone who contributed, both with lines of code and support from the community. Void remains open source and is still one of the best references to use when forking VS Code.
## Download
To view a list of newer Void forks, see [Void Forks](http://github.com/voideditor/void-forks/).
To download an old version of Void, see [Releases](https://github.com/voideditor/void/releases).
## Forking VS Code
If you're forking VS Code, you might still want to reference Void's logic, and see our [Codebase Guide](https://github.com/voideditor/void/blob/main/VOID_CODEBASE_GUIDE.md) and [How to Contribute](https://github.com/voideditor/void/blob/main/HOW_TO_CONTRIBUTE.md).
- We mount React + Tailwind. This is not possible in plain VS Code, and required extending the build pipeline to compile React and [scope](https://github.com/andrewpareles/scope-tailwind) Tailwind ourselves.
- You can copy our GitHub Actions to package, sign, and auto-update Void. VS Code's build pipeline is private, so this is normally very hard.
- Our AI provider code is built from scratch, allowing us to support autocomplete (FIM) and other custom responses. We expose grammars for common `<thinking>` tags, tool tags, etc. Feel free to reference our architecture for using IPC and satisfying CSP.
- Use our custom services to edit files. EditCodeService lets you show diffs as code streams in, even token by token. VoidModelService lets you edit files in the background and syncs OS files with your text buffers.
- Everything we've done is 100% open source. See [repos](https://github.com/orgs/voideditor/repositories) for a complete picture of all the repos that make up Void.
# Welcome to Void.
<div align="center">
@@ -9,32 +36,26 @@
/>
</div>
Void is the open-source Cursor alternative.
Use AI agents on your codebase, checkpoint and visualize changes, and bring any model or host locally. Void sends messages directly to providers without retaining your data.
This repo contains the full sourcecode for Void. We are currently in [open beta](https://voideditor.com/email) for Discord members (see the `announcements` channel), with a waitlist for our official release. If you're new, welcome!
This repo contains the full sourcecode for Void's Desktop app. If you're new, welcome!
- 👋 [Discord](https://discord.gg/RSNjgaugJs)
- 🔨 [Contribute](https://github.com/voideditor/void/blob/main/HOW_TO_CONTRIBUTE.md)
- 🧭 [Website](https://voideditor.com)
- 🚙 [Roadmap](https://github.com/orgs/voideditor/projects/2)
- 📝 [Changelog](https://voideditor.com/changelog)
- 🔨 [Contribute](https://github.com/voideditor/void/blob/main/HOW_TO_CONTRIBUTE.md)
- 🧭 [Codebase Guide](https://github.com/voideditor/void/blob/main/VOID_CODEBASE_GUIDE.md)
## Contributing
1. Feel free to attend a weekly meeting in our Discord channel if you'd like to contribute!
2. To get started working on Void, see [Contributing](https://github.com/voideditor/void/blob/main/HOW_TO_CONTRIBUTE.md).
3. We're open to collaborations and suggestions of all types - just reach out.
## Reference
Void is a fork of the [vscode](https://github.com/microsoft/vscode) repository. For a guide to the VSCode/Void codebase, see [our Codebase Guide](https://github.com/voideditor/void/blob/main/VOID_CODEBASE_GUIDE.md).
Void is a fork of the [vscode](https://github.com/microsoft/vscode) repository. For a guide to our codebase, see [VOID_CODEBASE_GUIDE](https://github.com/voideditor/void/blob/main/VOID_CODEBASE_GUIDE.md).
For a guide on how to develop your own version of Void, see [HOW_TO_CONTRIBUTE](https://github.com/voideditor/void/blob/main/HOW_TO_CONTRIBUTE.md) and [void-builder](https://github.com/voideditor/void-builder).
## Support
Feel free to reach out in our Discord or contact us via email: hello@voideditor.com.
You can always reach us in our [Discord server](https://discord.gg/RSNjgaugJs) or contact us via email at hello@voideditor.com.
+50 -3
View File
@@ -225,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)
@@ -1203,6 +1203,33 @@ to the base-name name of the original file, and an extension of txt, html, or si
---------------------------------------------------------
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
@@ -1519,7 +1546,7 @@ SOFTWARE.
---------------------------------------------------------
jlelong/vscode-latex-basics 1.10.0 - MIT
jlelong/vscode-latex-basics 1.9.0 - MIT
https://github.com/jlelong/vscode-latex-basics
Copyright (c) vscode-latex-basics authors
@@ -2101,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 -----------------------------------------
@@ -3485,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.
---------------------------------------------------------
+47 -39
View File
@@ -4,49 +4,58 @@ 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, see [Contributing](https://github.com/voideditor/void/blob/main/HOW_TO_CONTRIBUTE.md).
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
### Terminology
### 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>
Here is some important terminology you should know if you're 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.
### Minimal VSCode Rundown
Here's a minimal VSCode rundown if you're just getting started with Void:
- VSCode is (and therefore Void 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").
- 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`, but there are two workarounds:
- 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.
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.
Services are always lazily created, even if you register them as Eager. If you want something that always runs on Void's mount, you should use a "workbench contribution". See _dummyContrib for this. Very similar to a Service, just registered slightly differently.
### Terminology
Actions or "commands" are functions you register on VSCode so that either you or the user can call them later. 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.
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>
See [here](https://github.com/microsoft/vscode/wiki/Source-Code-Organization) for a decent VSCode guide with even more info.
- 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.
Each section below contains an overview of a core part of Void's sourcecode. You might want to scroll to find the item that's relevant to you.
### Internal LLM Message Pipeline
### Void's 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.
@@ -58,7 +67,7 @@ Sending LLM messages from the main process avoids CSP issues with local provider
**Notes:** `modelCapabilities` is an important file that must be updated when new models come out!
**Notes:** `modelCapabilities` is an important file that must be updated when new models come out!
### Apply
@@ -68,25 +77,28 @@ Void has two types of Apply: **Fast Apply** (uses Search/Replace, see below), an
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
// 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.
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.
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 in which we show Diffs (red/green areas). We update it when the user types, so it's always accurate.
- A **DiffArea** is a generalization that tracks line numbers like a DiffZone.
- The only type of zone that can "stream" is a DiffZone. Each DiffZone has an llmCancelToken if it's streaming.
- 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`.
@@ -101,7 +113,7 @@ 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'`).
- **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
@@ -121,27 +133,26 @@ If you want to know how our build pipeline works, see our build repo [here](http
## VSCode Codebase Guide (Not Void)
## VSCode Codebase Guide
For additional references, the Void team put together this list of links to get up and running with VSCode.
<details>
The Void team put together this list of links to get up and running with VSCode's sourcecode, the foundation of Void. We hope it's helpful!
#### 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.
@@ -150,13 +161,10 @@ The Void team put together this list of links to get up and running with VSCode'
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
View File
@@ -59,6 +59,7 @@ fsevents/test/**
!@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/**
+1
View File
@@ -2,4 +2,5 @@ disturl="https://nodejs.org/dist"
runtime="node"
build_from_source="true"
legacy-peer-deps="true"
force_process_config="true"
timeout=180000
+3 -20
View File
@@ -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
@@ -120,22 +119,6 @@ steps:
ArtifactServices.Symbol.UseAAD: false
displayName: Publish Symbols
- task: CopyFiles@2
inputs:
SourceFolder: $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release
Contents: 'code.*'
TargetFolder: $(Agent.TempDirectory)/binskim-cli
displayName: Copy files for BinSkim
- task: BinSkim@4
inputs:
InputType: Basic
Function: analyze
TargetPattern: guardianGlob
AnalyzeTargetGlob: $(Agent.TempDirectory)/binskim-cli/*.*
AnalyzeSymPath: $(Agent.TempDirectory)/binskim-cli
displayName: Run BinSkim
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
@@ -1,7 +1,7 @@
parameters:
- name: channel
type: string
default: 1.81
default: 1.85
- name: targets
default: []
type: object
@@ -1,7 +1,7 @@
parameters:
- name: channel
type: string
default: 1.81
default: 1.85
- name: targets
default: []
type: object
+4 -8
View File
@@ -382,7 +382,7 @@ async function unzip(packagePath, outputPath) {
});
}
// Contains all of the logic for mapping details to our actual product names in CosmosDB
function getPlatform(product, os, arch, type, isLegacy) {
function getPlatform(product, os, arch, type) {
switch (os) {
case 'win32':
switch (product) {
@@ -427,12 +427,12 @@ function getPlatform(product, os, arch, type, isLegacy) {
case 'client':
return `linux-${arch}`;
case 'server':
return isLegacy ? `server-linux-legacy-${arch}` : `server-linux-${arch}`;
return `server-linux-${arch}`;
case 'web':
if (arch === 'standalone') {
return 'web-standalone';
}
return isLegacy ? `server-linux-legacy-${arch}-web` : `server-linux-${arch}-web`;
return `server-linux-${arch}-web`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@@ -556,8 +556,7 @@ async function processArtifact(artifact, filePath) {
await releaseService.createRelease(version, filePath, friendlyFileName);
}
const { product, os, arch, unprocessedType } = match.groups;
const isLegacy = artifact.name.includes('_legacy');
const platform = getPlatform(product, os, arch, unprocessedType, isLegacy);
const platform = getPlatform(product, os, arch, unprocessedType);
const type = getRealType(unprocessedType);
const size = fs_1.default.statSync(filePath).size;
const stream = fs_1.default.createReadStream(filePath);
@@ -610,9 +609,6 @@ async function main() {
if (e('VSCODE_BUILD_STAGE_LINUX') === 'True') {
stages.add('Linux');
}
if (e('VSCODE_BUILD_STAGE_LINUX_LEGACY_SERVER') === 'True') {
stages.add('LinuxLegacyServer');
}
if (e('VSCODE_BUILD_STAGE_ALPINE') === 'True') {
stages.add('Alpine');
}
+4 -6
View File
@@ -694,7 +694,7 @@ interface Asset {
}
// Contains all of the logic for mapping details to our actual product names in CosmosDB
function getPlatform(product: string, os: string, arch: string, type: string, isLegacy: boolean): string {
function getPlatform(product: string, os: string, arch: string, type: string): string {
switch (os) {
case 'win32':
switch (product) {
@@ -739,12 +739,12 @@ function getPlatform(product: string, os: string, arch: string, type: string, is
case 'client':
return `linux-${arch}`;
case 'server':
return isLegacy ? `server-linux-legacy-${arch}` : `server-linux-${arch}`;
return `server-linux-${arch}`;
case 'web':
if (arch === 'standalone') {
return 'web-standalone';
}
return isLegacy ? `server-linux-legacy-${arch}-web` : `server-linux-${arch}-web`;
return `server-linux-${arch}-web`;
default:
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
}
@@ -896,8 +896,7 @@ async function processArtifact(
}
const { product, os, arch, unprocessedType } = match.groups!;
const isLegacy = artifact.name.includes('_legacy');
const platform = getPlatform(product, os, arch, unprocessedType, isLegacy);
const platform = getPlatform(product, os, arch, unprocessedType);
const type = getRealType(unprocessedType);
const size = fs.statSync(filePath).size;
const stream = fs.createReadStream(filePath);
@@ -956,7 +955,6 @@ async function main() {
if (e('VSCODE_BUILD_STAGE_WINDOWS') === 'True') { stages.add('Windows'); }
if (e('VSCODE_BUILD_STAGE_LINUX') === 'True') { stages.add('Linux'); }
if (e('VSCODE_BUILD_STAGE_LINUX_LEGACY_SERVER') === 'True') { stages.add('LinuxLegacyServer'); }
if (e('VSCODE_BUILD_STAGE_ALPINE') === 'True') { stages.add('Alpine'); }
if (e('VSCODE_BUILD_STAGE_MACOS') === 'True') { stages.add('macOS'); }
if (e('VSCODE_BUILD_STAGE_WEB') === 'True') { stages.add('Web'); }
@@ -23,10 +23,10 @@ steps:
- script: npm run test-node
displayName: Run unit tests (node.js)
timeoutInMinutes: 15
- script: npm run test-browser-no-install -- --sequential --browser chromium --browser webkit --tfs "Browser Unit Tests"
- script: npm run test-browser-no-install -- --browser webkit --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"
displayName: Run unit tests (Browser, Chromium & Webkit)
displayName: Run unit tests (Browser, Webkit)
timeoutInMinutes: 30
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
@@ -36,10 +36,10 @@ steps:
- script: npm run test-node -- --build
displayName: Run unit tests (node.js)
timeoutInMinutes: 15
- script: npm run test-browser-no-install -- --sequential --build --browser chromium --browser webkit --tfs "Browser Unit Tests"
- script: npm run test-browser-no-install -- --build --browser webkit --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"
displayName: Run unit tests (Browser, Chromium & Webkit)
displayName: Run unit tests (Browser, Webkit)
timeoutInMinutes: 30
- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
@@ -121,6 +121,11 @@ steps:
- template: ../common/install-builtin-extensions.yml@self
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'oss')) }}:
- script: node build/lib/policies darwin
displayName: Generate policy definitions
retryCountOnTaskFailure: 3
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
@@ -1,233 +0,0 @@
parameters:
- name: VSCODE_QUALITY
type: string
- name: VSCODE_RUN_INTEGRATION_TESTS
type: boolean
- name: VSCODE_ARCH
type: string
steps:
- task: NodeTool@0
inputs:
versionSource: fromFile
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- template: ../distro/download-distro.yml
- task: AzureKeyVault@2
displayName: "Azure Key Vault: Get Secrets"
inputs:
azureSubscription: vscode
KeyVaultName: vscode-build-secrets
SecretsFilter: "github-distro-mixin-password"
- task: DownloadPipelineArtifact@2
inputs:
artifact: Compilation
path: $(Build.ArtifactStagingDirectory)
displayName: Download compilation output
- script: tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
displayName: Extract compilation output
- script: |
set -e
# Start X server
./build/azure-pipelines/linux/apt-retry.sh sudo apt-get update
./build/azure-pipelines/linux/apt-retry.sh sudo apt-get install -y pkg-config \
dbus \
xvfb \
libgtk-3-0 \
libxkbfile-dev \
libkrb5-dev \
libgbm1 \
rpm \
gcc-10 \
g++-10
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
sudo service xvfb start
# Start dbus session
sudo mkdir -p /var/run/dbus
DBUS_LAUNCH_RESULT=$(sudo dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address)
echo "##vso[task.setvariable variable=DBUS_SESSION_BUS_ADDRESS]$DBUS_LAUNCH_RESULT"
displayName: Setup system services
- script: node build/setup-npm-registry.js $NPM_REGISTRY
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: |
set -e
# 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['NPM_REGISTRY'], 'none'))
displayName: Setup NPM
- task: npmAuthenticate@0
inputs:
workingFile: $(NPMRC_PATH)
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication
- ${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
- task: Docker@1
displayName: "Pull Docker image"
inputs:
azureSubscriptionEndpoint: vscode
azureContainerRegistry: vscodehub.azurecr.io
command: "Run an image"
imageName: vscode-linux-build-agent:centos7-devtoolset8-$(VSCODE_ARCH)
containerCommand: uname
- script: |
set -e
for i in {1..5}; do # try 5 times
npm ci && break
if [ $i -eq 5 ]; then
echo "Npm install failed too many times" >&2
exit 1
fi
echo "Npm install failed $i, trying again..."
done
workingDirectory: build
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Install build dependencies
- script: |
set -e
export VSCODE_SYSROOT_PREFIX='-glibc-2.17'
export CC=$(which gcc-10)
export CXX=$(which g++-10)
source ./build/azure-pipelines/linux/setup-env.sh --skip-sysroot
for i in {1..5}; do # try 5 times
npm ci && break
if [ $i -eq 5 ]; then
echo "Npm install failed too many times" >&2
exit 1
fi
echo "Npm install failed $i, trying again..."
done
env:
npm_config_arch: $(NPM_ARCH)
VSCODE_ARCH: $(VSCODE_ARCH)
NPM_REGISTRY: "$(NPM_REGISTRY)"
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
VSCODE_HOST_MOUNT: "/mnt/vss/_work/1/s"
${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME: vscodehub.azurecr.io/vscode-linux-build-agent:centos7-devtoolset8-$(VSCODE_ARCH)
displayName: Install dependencies
- script: node build/azure-pipelines/distro/mixin-npm
displayName: Mixin distro node modules
- script: node build/azure-pipelines/distro/mixin-quality
displayName: Mixin distro quality
- template: ../common/install-builtin-extensions.yml
- script: |
set -e
npm run gulp vscode-linux-$(VSCODE_ARCH)-min-ci
ARCHIVE_PATH=".build/linux/client/code-${{ parameters.VSCODE_QUALITY }}-$(VSCODE_ARCH)-$(date +%s).tar.gz"
mkdir -p $(dirname $ARCHIVE_PATH)
echo "##vso[task.setvariable variable=CLIENT_PATH]$ARCHIVE_PATH"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build client
- script: |
set -e
tar -czf $CLIENT_PATH -C .. VSCode-linux-$(VSCODE_ARCH)
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Archive client
- script: |
set -e
export VSCODE_NODE_GLIBC="-glibc-2.17"
npm run gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
ARCHIVE_PATH=".build/linux/server/vscode-server-linux-legacy-$(VSCODE_ARCH).tar.gz"
UNARCHIVE_PATH="`pwd`/../vscode-server-linux-$(VSCODE_ARCH)"
mkdir -p $(dirname $ARCHIVE_PATH)
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
echo "##vso[task.setvariable variable=SERVER_UNARCHIVE_PATH]$UNARCHIVE_PATH"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server
- script: |
set -e
export VSCODE_NODE_GLIBC="-glibc-2.17"
npm run gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
mv ../vscode-reh-web-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH)-web # TODO@joaomoreno
ARCHIVE_PATH=".build/linux/web/vscode-server-linux-legacy-$(VSCODE_ARCH)-web.tar.gz"
mkdir -p $(dirname $ARCHIVE_PATH)
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)-web
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server (web)
- ${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
- script: |
set -e
EXPECTED_GLIBC_VERSION="2.17" \
EXPECTED_GLIBCXX_VERSION="3.4.19" \
./build/azure-pipelines/linux/verify-glibc-requirements.sh
env:
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
displayName: Check GLIBC and GLIBCXX dependencies in server archive
- ${{ else }}:
- script: |
set -e
EXPECTED_GLIBC_VERSION="2.17" \
EXPECTED_GLIBCXX_VERSION="3.4.22" \
./build/azure-pipelines/linux/verify-glibc-requirements.sh
env:
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
displayName: Check GLIBC and GLIBCXX dependencies in server archive
- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- template: product-build-linux-test.yml
parameters:
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
VSCODE_RUN_UNIT_TESTS: false
VSCODE_RUN_INTEGRATION_TESTS: ${{ parameters.VSCODE_RUN_INTEGRATION_TESTS }}
VSCODE_RUN_SMOKE_TESTS: false
${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
PUBLISH_TASK_NAME: 1ES.PublishPipelineArtifact@1
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(SERVER_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_server_linux_legacy_$(VSCODE_ARCH)_archive-unsigned
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) Legacy Server"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''))
displayName: Publish server archive
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(WEB_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_web_linux_legacy_$(VSCODE_ARCH)_archive-unsigned
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) Legacy Web"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''))
displayName: Publish web server archive
+38 -44
View File
@@ -16,56 +16,50 @@ else
fi
if [ "$npm_config_arch" == "x64" ]; then
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/132.0.6834.196/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/132.0.6834.210/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
# Download libcxx headers and objects from upstream electron releases
DEBUG=libcxx-fetcher \
VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \
VSCODE_LIBCXX_HEADERS_DIR=$PWD/.build/libcxx_headers \
VSCODE_LIBCXXABI_HEADERS_DIR=$PWD/.build/libcxxabi_headers \
VSCODE_ARCH="$npm_config_arch" \
node build/linux/libcxx-fetcher.js
# Download libcxx headers and objects from upstream electron releases
DEBUG=libcxx-fetcher \
VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \
VSCODE_LIBCXX_HEADERS_DIR=$PWD/.build/libcxx_headers \
VSCODE_LIBCXXABI_HEADERS_DIR=$PWD/.build/libcxxabi_headers \
VSCODE_ARCH="$npm_config_arch" \
node build/linux/libcxx-fetcher.js
# Set compiler toolchain
# Flags for the client build are based on
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/132.0.6834.196:build/config/arm.gni
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/132.0.6834.196:build/config/compiler/BUILD.gn
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/132.0.6834.196:build/config/c++/BUILD.gn
export CC="$PWD/.build/CR_Clang/bin/clang --gcc-toolchain=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu"
export CXX="$PWD/.build/CR_Clang/bin/clang++ --gcc-toolchain=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu"
export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -DSPDLOG_USE_STD_FORMAT -I$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit -D_LIBCPP_ABI_NAMESPACE=Cr -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE --sysroot=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot"
export LDFLAGS="-stdlib=libc++ --sysroot=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot -fuse-ld=lld -flto=thin -L$PWD/.build/libcxx-objects -lc++abi -L$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot/usr/lib/x86_64-linux-gnu -L$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot/lib/x86_64-linux-gnu -Wl,--lto-O0"
# Set compiler toolchain
# Flags for the client build are based on
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/132.0.6834.210:build/config/arm.gni
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/132.0.6834.210:build/config/compiler/BUILD.gn
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/132.0.6834.210:build/config/c++/BUILD.gn
export CC="$PWD/.build/CR_Clang/bin/clang --gcc-toolchain=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu"
export CXX="$PWD/.build/CR_Clang/bin/clang++ --gcc-toolchain=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu"
export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -DSPDLOG_USE_STD_FORMAT -I$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit -D_LIBCPP_ABI_NAMESPACE=Cr -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE --sysroot=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot"
export LDFLAGS="-stdlib=libc++ --sysroot=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot -fuse-ld=lld -flto=thin -L$PWD/.build/libcxx-objects -lc++abi -L$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot/usr/lib/x86_64-linux-gnu -L$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot/lib/x86_64-linux-gnu -Wl,--lto-O0"
if [ "$(echo "$@" | grep -c -- "--skip-sysroot")" -eq 0 ]; then
# Set compiler toolchain for remote server
export VSCODE_REMOTE_CC=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/bin/x86_64-linux-gnu-gcc
export VSCODE_REMOTE_CXX=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/bin/x86_64-linux-gnu-g++
export VSCODE_REMOTE_CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot"
export VSCODE_REMOTE_LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot -L$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot/usr/lib/x86_64-linux-gnu -L$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot/lib/x86_64-linux-gnu"
fi
# Set compiler toolchain for remote server
export VSCODE_REMOTE_CC=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/bin/x86_64-linux-gnu-gcc
export VSCODE_REMOTE_CXX=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/bin/x86_64-linux-gnu-g++
export VSCODE_REMOTE_CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot"
export VSCODE_REMOTE_LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot -L$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot/usr/lib/x86_64-linux-gnu -L$VSCODE_SYSROOT_DIR/x86_64-linux-gnu/x86_64-linux-gnu/sysroot/lib/x86_64-linux-gnu"
elif [ "$npm_config_arch" == "arm64" ]; then
if [ "$(echo "$@" | grep -c -- "--skip-sysroot")" -eq 0 ]; then
# Set compiler toolchain for client native modules
export CC=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
export CXX=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/bin/aarch64-linux-gnu-g++
export CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot"
export LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot -L$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot/usr/lib/aarch64-linux-gnu -L$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot/lib/aarch64-linux-gnu"
# Set compiler toolchain for client native modules
export CC=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
export CXX=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/bin/aarch64-linux-gnu-g++
export CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot"
export LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot -L$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot/usr/lib/aarch64-linux-gnu -L$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot/lib/aarch64-linux-gnu"
# Set compiler toolchain for remote server
export VSCODE_REMOTE_CC=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
export VSCODE_REMOTE_CXX=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/bin/aarch64-linux-gnu-g++
export VSCODE_REMOTE_CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot"
export VSCODE_REMOTE_LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot -L$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot/usr/lib/aarch64-linux-gnu -L$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot/lib/aarch64-linux-gnu"
fi
# Set compiler toolchain for remote server
export VSCODE_REMOTE_CC=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
export VSCODE_REMOTE_CXX=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/bin/aarch64-linux-gnu-g++
export VSCODE_REMOTE_CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot"
export VSCODE_REMOTE_LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot -L$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot/usr/lib/aarch64-linux-gnu -L$VSCODE_SYSROOT_DIR/aarch64-linux-gnu/aarch64-linux-gnu/sysroot/lib/aarch64-linux-gnu"
elif [ "$npm_config_arch" == "arm" ]; then
if [ "$(echo "$@" | grep -c -- "--skip-sysroot")" -eq 0 ]; then
# Set compiler toolchain for client native modules
export CC=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/bin/arm-rpi-linux-gnueabihf-gcc
export CXX=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/bin/arm-rpi-linux-gnueabihf-g++
export CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot"
export LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot -L$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot/usr/lib/arm-linux-gnueabihf -L$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot/lib/arm-linux-gnueabihf"
fi
# Set compiler toolchain for client native modules
export CC=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/bin/arm-rpi-linux-gnueabihf-gcc
export CXX=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/bin/arm-rpi-linux-gnueabihf-g++
export CXXFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot"
export LDFLAGS="--sysroot=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot -L$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot/usr/lib/arm-linux-gnueabihf -L$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot/lib/arm-linux-gnueabihf"
# Set compiler toolchain for remote server
export VSCODE_REMOTE_CC=$VSCODE_SYSROOT_DIR/arm-rpi-linux-gnueabihf/bin/arm-rpi-linux-gnueabihf-gcc
+20 -61
View File
@@ -41,26 +41,14 @@ parameters:
displayName: "🎯 Linux x64"
type: boolean
default: true
- name: VSCODE_BUILD_LINUX_X64_LEGACY_SERVER
displayName: "🎯 Linux x64 Legacy Server"
type: boolean
default: true
- name: VSCODE_BUILD_LINUX_ARM64
displayName: "🎯 Linux arm64"
type: boolean
default: true
- name: VSCODE_BUILD_LINUX_ARM64_LEGACY_SERVER
displayName: "🎯 Linux arm64 Legacy Server"
type: boolean
default: true
- name: VSCODE_BUILD_LINUX_ARMHF
displayName: "🎯 Linux armhf"
type: boolean
default: true
- name: VSCODE_BUILD_LINUX_ARMHF_LEGACY_SERVER
displayName: "🎯 Linux armhf Legacy Server"
type: boolean
default: true
- name: VSCODE_BUILD_ALPINE
displayName: "🎯 Alpine x64"
type: boolean
@@ -118,8 +106,6 @@ variables:
value: ${{ or(eq(parameters.VSCODE_BUILD_WIN32, true), eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}
- name: VSCODE_BUILD_STAGE_LINUX
value: ${{ or(eq(parameters.VSCODE_BUILD_LINUX, true), eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true), eq(parameters.VSCODE_BUILD_LINUX_ARM64, true)) }}
- name: VSCODE_BUILD_STAGE_LINUX_LEGACY_SERVER
value: ${{ or(eq(parameters.VSCODE_BUILD_LINUX_X64_LEGACY_SERVER, true), eq(parameters.VSCODE_BUILD_LINUX_ARMHF_LEGACY_SERVER, true), eq(parameters.VSCODE_BUILD_LINUX_ARM64_LEGACY_SERVER, true)) }}
- name: VSCODE_BUILD_STAGE_ALPINE
value: ${{ or(eq(parameters.VSCODE_BUILD_ALPINE, true), eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true)) }}
- name: VSCODE_BUILD_STAGE_MACOS
@@ -183,6 +169,8 @@ extends:
tsa:
enabled: true
configFile: $(Build.SourcesDirectory)/build/azure-pipelines/config/tsaoptions.json
binskim:
analyzeTargetGlob: '+:file|$(Agent.BuildDirectory)/VSCode-*/**/*.exe;+:file|$(Agent.BuildDirectory)/VSCode-*/**/*.node;+:file|$(Agent.BuildDirectory)/VSCode-*/**/*.dll;-:file|$(Build.SourcesDirectory)/.build/**/system-setup/VSCodeSetup*.exe;-:file|$(Build.SourcesDirectory)/.build/**/user-setup/VSCodeUserSetup*.exe'
codeql:
runSourceLanguagesInSourceAnalysis: true
compiled:
@@ -279,6 +267,10 @@ extends:
name: Azure Pipelines
image: macOS-13
os: macOS
variables:
# todo@connor4312 to diagnose build flakes
- name: MSRUSTUP_LOG
value: debug
steps:
- template: build/azure-pipelines/darwin/cli-build-darwin.yml@self
parameters:
@@ -292,6 +284,10 @@ extends:
name: Azure Pipelines
image: macOS-13
os: macOS
variables:
# todo@connor4312 to diagnose build flakes
- name: MSRUSTUP_LOG
value: debug
steps:
- template: build/azure-pipelines/darwin/cli-build-darwin.yml@self
parameters:
@@ -322,13 +318,13 @@ extends:
VSCODE_BUILD_WIN32_ARM64: ${{ parameters.VSCODE_BUILD_WIN32_ARM64 }}
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_COMPILE_ONLY, false)) }}:
- stage: CustomSDL
- stage: APIScan
dependsOn: []
pool:
name: 1es-windows-2019-x64
os: windows
jobs:
- job: WindowsSDL
- job: WindowsAPIScan
steps:
- template: build/azure-pipelines/win32/sdl-scan-win32.yml@self
parameters:
@@ -394,6 +390,10 @@ extends:
timeoutInMinutes: 120
variables:
VSCODE_ARCH: x64
templateContext:
sdl:
suppression:
suppressionFile: $(Build.SourcesDirectory)\.config\guardian\.gdnsuppress
steps:
- template: build/azure-pipelines/win32/product-build-win32.yml@self
parameters:
@@ -418,6 +418,10 @@ extends:
timeoutInMinutes: 90
variables:
VSCODE_ARCH: arm64
templateContext:
sdl:
suppression:
suppressionFile: $(Build.SourcesDirectory)\.config\guardian\.gdnsuppress
steps:
- template: build/azure-pipelines/win32/product-build-win32.yml@self
parameters:
@@ -547,51 +551,6 @@ extends:
VSCODE_RUN_INTEGRATION_TESTS: false
VSCODE_RUN_SMOKE_TESTS: false
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_LINUX_LEGACY_SERVER'], true)) }}:
- stage: LinuxLegacyServer
dependsOn:
- Compile
pool:
name: 1es-ubuntu-20.04-x64
os: linux
jobs:
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_X64_LEGACY_SERVER, true) }}:
- job: Linuxx64LegacyServer
variables:
VSCODE_ARCH: x64
NPM_ARCH: x64
DISPLAY: ":10"
steps:
- template: build/azure-pipelines/linux/product-build-linux-legacy-server.yml@self
parameters:
VSCODE_ARCH: x64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_RUN_INTEGRATION_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF_LEGACY_SERVER, true) }}:
- job: LinuxArmhfLegacyServer
variables:
VSCODE_ARCH: armhf
NPM_ARCH: arm
steps:
- template: build/azure-pipelines/linux/product-build-linux-legacy-server.yml@self
parameters:
VSCODE_ARCH: armhf
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_RUN_INTEGRATION_TESTS: false
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64_LEGACY_SERVER, true) }}:
- job: LinuxArm64LegacyServer
variables:
VSCODE_ARCH: arm64
NPM_ARCH: arm64
steps:
- template: build/azure-pipelines/linux/product-build-linux-legacy-server.yml@self
parameters:
VSCODE_ARCH: arm64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_RUN_INTEGRATION_TESTS: false
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_ALPINE'], true)) }}:
- stage: Alpine
dependsOn:
+2 -2
View File
@@ -104,12 +104,12 @@ steps:
- template: common/install-builtin-extensions.yml@self
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: npm exec -- npm-run-all -lp core-ci-pr extensions-ci-pr hygiene eslint valid-layers-check vscode-dts-compile-check tsec-compile-check
- script: npm exec -- npm-run-all -lp core-ci-pr extensions-ci-pr hygiene eslint valid-layers-check property-init-order-check vscode-dts-compile-check tsec-compile-check
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Compile & Hygiene (OSS)
- ${{ else }}:
- script: npm exec -- npm-run-all -lp core-ci extensions-ci hygiene eslint valid-layers-check vscode-dts-compile-check tsec-compile-check
- script: npm exec -- npm-run-all -lp core-ci extensions-ci hygiene eslint valid-layers-check property-init-order-check vscode-dts-compile-check tsec-compile-check
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Compile & Hygiene (non-OSS)
@@ -102,7 +102,6 @@ steps:
$stages = @(
if ($env:VSCODE_BUILD_STAGE_WINDOWS -eq 'True') { 'Windows' }
if ($env:VSCODE_BUILD_STAGE_LINUX -eq 'True') { 'Linux' }
if ($env:VSCODE_BUILD_STAGE_LINUX_LEGACY_SERVER -eq 'True') { 'LinuxLegacyServer' }
if ($env:VSCODE_BUILD_STAGE_ALPINE -eq 'True') { 'Alpine' }
if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' }
if ($env:VSCODE_BUILD_STAGE_WEB -eq 'True') { 'Web' }
@@ -28,7 +28,7 @@ steps:
- powershell: npm run test-node
displayName: Run unit tests (node.js)
timeoutInMinutes: 15
- powershell: node test/unit/browser/index.js --sequential --browser chromium --tfs "Browser Unit Tests"
- powershell: node test/unit/browser/index.js --browser chromium --tfs "Browser Unit Tests"
displayName: Run unit tests (Browser, Chromium)
timeoutInMinutes: 20
@@ -39,7 +39,7 @@ steps:
- powershell: npm run test-node -- --build
displayName: Run unit tests (node.js)
timeoutInMinutes: 15
- powershell: npm run test-browser-no-install -- --sequential --build --browser chromium --tfs "Browser Unit Tests"
- powershell: npm run test-browser-no-install -- --build --browser chromium --tfs "Browser Unit Tests"
displayName: Run unit tests (Browser, Chromium)
timeoutInMinutes: 20
@@ -124,7 +124,7 @@ steps:
- template: ../common/install-builtin-extensions.yml@self
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'oss')) }}:
- powershell: node build\lib\policies
- powershell: node build\lib\policies win32
displayName: Generate Group Policy definitions
retryCountOnTaskFailure: 3
@@ -145,7 +145,7 @@ steps:
exec { npm run gulp "vscode-win32-$(VSCODE_ARCH)-min-ci" }
exec { npm run gulp "vscode-win32-$(VSCODE_ARCH)-inno-updater" }
echo "##vso[task.setvariable variable=BUILT_CLIENT]true"
echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)"
echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build client
@@ -156,7 +156,7 @@ steps:
exec { npm run gulp "vscode-reh-win32-$(VSCODE_ARCH)-min-ci" }
mv ..\vscode-reh-win32-$(VSCODE_ARCH) ..\vscode-server-win32-$(VSCODE_ARCH) # TODO@joaomoreno
echo "##vso[task.setvariable variable=BUILT_SERVER]true"
echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(CodeSigningFolderPath),$(agent.builddirectory)/vscode-server-win32-$(VSCODE_ARCH)"
echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(CodeSigningFolderPath),$(Agent.BuildDirectory)/vscode-server-win32-$(VSCODE_ARCH)"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server
@@ -196,10 +196,10 @@ steps:
$ErrorActionPreference = "Stop"
$ArtifactName = (gci -Path "$(Build.ArtifactStagingDirectory)/cli" | Select-Object -last 1).FullName
Expand-Archive -Path $ArtifactName -DestinationPath "$(Build.ArtifactStagingDirectory)/cli"
$AppProductJson = Get-Content -Raw -Path "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)\resources\app\product.json" | ConvertFrom-Json
$AppProductJson = Get-Content -Raw -Path "$(Agent.BuildDirectory)\VSCode-win32-$(VSCODE_ARCH)\resources\app\product.json" | ConvertFrom-Json
$CliAppName = $AppProductJson.tunnelApplicationName
$AppName = $AppProductJson.applicationName
Move-Item -Path "$(Build.ArtifactStagingDirectory)/cli/$AppName.exe" -Destination "$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)/bin/$CliAppName.exe"
Move-Item -Path "$(Build.ArtifactStagingDirectory)/cli/$AppName.exe" -Destination "$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)/bin/$CliAppName.exe"
displayName: Move VS Code CLI
- task: UseDotNet@2
@@ -231,6 +231,11 @@ steps:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
displayName: Codesign executables and shared libraries
- powershell: node build\azure-pipelines\common\sign $env:EsrpCliDllPath sign-windows-appx $(CodeSigningFolderPath) '*.ps1'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
displayName: Codesign Powershell scripts
- ${{ if eq(parameters.VSCODE_QUALITY, 'insider') }}:
- powershell: node build\azure-pipelines\common\sign $env:EsrpCliDllPath sign-windows-appx $(CodeSigningFolderPath) '*.appx'
env:
@@ -247,13 +252,16 @@ steps:
condition: succeededOrFailed()
displayName: Get product version
- powershell: |
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$ArchivePath = ".build\win32-$(VSCODE_ARCH)\VSCode-win32-$(VSCODE_ARCH)-$(VSCODE_VERSION).zip"
New-Item -ItemType Directory -Path .build\win32-$(VSCODE_ARCH) -Force
exec { 7z.exe a -tzip $ArchivePath -x!CodeSignSummary*.md ..\VSCode-win32-$(VSCODE_ARCH)\* -r }
exec { 7z.exe a -tzip $ArchivePath ..\VSCode-win32-$(VSCODE_ARCH)\* "-xr!CodeSignSummary*.md" }
echo "##vso[task.setvariable variable=CLIENT_PATH]$ArchivePath"
echo "Listing archive contents"
7z.exe l $ArchivePath
condition: and(succeededOrFailed(), eq(variables['BUILT_CLIENT'], 'true'))
displayName: Package client
@@ -262,8 +270,11 @@ steps:
$ErrorActionPreference = "Stop"
$ArchivePath = ".build\win32-$(VSCODE_ARCH)\vscode-server-win32-$(VSCODE_ARCH).zip"
New-Item -ItemType Directory -Path .build\win32-$(VSCODE_ARCH) -Force
exec { 7z.exe a -tzip $ArchivePath ..\vscode-server-win32-$(VSCODE_ARCH) -r }
exec { 7z.exe a -tzip $ArchivePath ..\vscode-server-win32-$(VSCODE_ARCH) }
echo "##vso[task.setvariable variable=SERVER_PATH]$ArchivePath"
echo "Listing archive contents"
7z.exe l $ArchivePath
condition: and(succeededOrFailed(), eq(variables['BUILT_SERVER'], 'true'))
displayName: Package server
@@ -272,32 +283,30 @@ steps:
$ErrorActionPreference = "Stop"
$ArchivePath = ".build\win32-$(VSCODE_ARCH)\vscode-server-win32-$(VSCODE_ARCH)-web.zip"
New-Item -ItemType Directory -Path .build\win32-$(VSCODE_ARCH) -Force
exec { 7z.exe a -tzip $ArchivePath ..\vscode-server-win32-$(VSCODE_ARCH)-web -r }
exec { 7z.exe a -tzip $ArchivePath ..\vscode-server-win32-$(VSCODE_ARCH)-web }
echo "##vso[task.setvariable variable=WEB_PATH]$ArchivePath"
echo "Listing archive contents"
7z.exe l $ArchivePath
condition: and(succeededOrFailed(), eq(variables['BUILT_WEB'], 'true'))
displayName: Package server (web)
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm run -- gulp "vscode-win32-$(VSCODE_ARCH)-system-setup" --sign }
$SetupPath = ".build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup-$(VSCODE_ARCH)-$(VSCODE_VERSION).exe"
mv .build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup.exe $SetupPath
echo "##vso[task.setvariable variable=SYSTEM_SETUP_PATH]$SetupPath"
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
displayName: Build system setup
exec { npm exec -- npm-run-all -lp "gulp vscode-win32-$(VSCODE_ARCH)-system-setup -- --sign" "gulp vscode-win32-$(VSCODE_ARCH)-user-setup -- --sign" }
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm run -- gulp "vscode-win32-$(VSCODE_ARCH)-user-setup" --sign }
$SetupPath = ".build\win32-$(VSCODE_ARCH)\user-setup\VSCodeUserSetup-$(VSCODE_ARCH)-$(VSCODE_VERSION).exe"
mv .build\win32-$(VSCODE_ARCH)\user-setup\VSCodeSetup.exe $SetupPath
echo "##vso[task.setvariable variable=USER_SETUP_PATH]$SetupPath"
$SystemSetupPath = ".build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup-$(VSCODE_ARCH)-$(VSCODE_VERSION).exe"
$UserSetupPath = ".build\win32-$(VSCODE_ARCH)\user-setup\VSCodeUserSetup-$(VSCODE_ARCH)-$(VSCODE_VERSION).exe"
mv .build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup.exe $SystemSetupPath
mv .build\win32-$(VSCODE_ARCH)\user-setup\VSCodeSetup.exe $UserSetupPath
echo "##vso[task.setvariable variable=SYSTEM_SETUP_PATH]$SystemSetupPath"
echo "##vso[task.setvariable variable=USER_SETUP_PATH]$UserSetupPath"
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
displayName: Build user setup
displayName: Build setup packages (system, user)
- powershell: echo "##vso[task.setvariable variable=ARTIFACT_PREFIX]attempt$(System.JobAttempt)_"
condition: and(succeededOrFailed(), notIn(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'))
+1 -30
View File
@@ -102,13 +102,6 @@ steps:
- powershell: npm run compile
displayName: Compile
- powershell: |
Get-ChildItem '$(Build.SourcesDirectory)' -Recurse -Filter "*.exe"
Get-ChildItem '$(Build.SourcesDirectory)' -Recurse -Filter "*.dll"
Get-ChildItem '$(Build.SourcesDirectory)' -Recurse -Filter "*.node"
Get-ChildItem '$(Build.SourcesDirectory)' -Recurse -Filter "*.pdb"
displayName: List files
- powershell: npm run gulp "vscode-symbols-win32-${{ parameters.VSCODE_ARCH }}"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
@@ -119,16 +112,7 @@ steps:
Get-ChildItem '$(Agent.BuildDirectory)\scanbin' -Recurse -Filter "*.dll"
Get-ChildItem '$(Agent.BuildDirectory)\scanbin' -Recurse -Filter "*.node"
Get-ChildItem '$(Agent.BuildDirectory)\scanbin' -Recurse -Filter "*.pdb"
displayName: List files again
- task: BinSkim@4
inputs:
InputType: "Basic"
Function: "analyze"
TargetPattern: "guardianGlob"
AnalyzeIgnorePdbLoadError: true
AnalyzeTargetGlob: '$(Agent.BuildDirectory)\scanbin\**.dll;$(Agent.BuildDirectory)\scanbin\**.exe;$(Agent.BuildDirectory)\scanbin\**.node'
AnalyzeLocalSymbolDirectories: '$(Agent.BuildDirectory)\scanbin\VSCode-win32-${{ parameters.VSCODE_ARCH }}\pdb'
displayName: List files
- task: CopyFiles@2
displayName: 'Collect Symbols for API Scan'
@@ -139,19 +123,6 @@ steps:
flattenFolders: true
condition: succeeded()
- task: PublishSymbols@2
inputs:
IndexSources: false
SymbolsFolder: '$(Agent.BuildDirectory)\symbols'
SearchPattern: '**\*.pdb'
SymbolServerType: TeamServices
SymbolsProduct: 'code'
ArtifactServices.Symbol.AccountName: microsoft
ArtifactServices.Symbol.PAT: $(System.AccessToken)
ArtifactServices.Symbol.UseAAD: false
displayName: Publish Symbols
condition: succeeded()
- task: APIScan@2
inputs:
softwareFolder: $(Agent.BuildDirectory)\scanbin
+10 -19
View File
@@ -5,31 +5,22 @@
/**
* @param {string} name
* @param {string[]=} exclude
* @returns {import('./lib/bundle').IEntryPoint}
*/
function createModuleDescription(name, exclude) {
function createModuleDescription(name) {
return {
name,
exclude
name
};
}
/**
* @param {string} name
*/
function createEditorWorkerModuleDescription(name) {
return createModuleDescription(name, ['vs/base/common/worker/simpleWorker', 'vs/editor/common/services/editorSimpleWorker']);
}
exports.workerEditor = createEditorWorkerModuleDescription('vs/editor/common/services/editorSimpleWorkerMain');
exports.workerExtensionHost = createEditorWorkerModuleDescription('vs/workbench/api/worker/extensionHostWorkerMain');
exports.workerNotebook = createEditorWorkerModuleDescription('vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain');
exports.workerLanguageDetection = createEditorWorkerModuleDescription('vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorkerMain');
exports.workerLocalFileSearch = createEditorWorkerModuleDescription('vs/workbench/services/search/worker/localFileSearchMain');
exports.workerProfileAnalysis = createEditorWorkerModuleDescription('vs/platform/profiling/electron-sandbox/profileAnalysisWorkerMain');
exports.workerOutputLinks = createEditorWorkerModuleDescription('vs/workbench/contrib/output/common/outputLinkComputerMain');
exports.workerBackgroundTokenization = createEditorWorkerModuleDescription('vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.workerMain');
exports.workerEditor = createModuleDescription('vs/editor/common/services/editorWebWorkerMain');
exports.workerExtensionHost = createModuleDescription('vs/workbench/api/worker/extensionHostWorkerMain');
exports.workerNotebook = createModuleDescription('vs/workbench/contrib/notebook/common/services/notebookWebWorkerMain');
exports.workerLanguageDetection = createModuleDescription('vs/workbench/services/languageDetection/browser/languageDetectionWebWorkerMain');
exports.workerLocalFileSearch = createModuleDescription('vs/workbench/services/search/worker/localFileSearchMain');
exports.workerProfileAnalysis = createModuleDescription('vs/platform/profiling/electron-sandbox/profileAnalysisWorkerMain');
exports.workerOutputLinks = createModuleDescription('vs/workbench/contrib/output/common/outputLinkComputerMain');
exports.workerBackgroundTokenization = createModuleDescription('vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.workerMain');
exports.workbenchDesktop = [
createModuleDescription('vs/workbench/contrib/debug/node/telemetryApp'),
+1 -1
View File
@@ -72,4 +72,4 @@ f7db8ebe91a1cc8d24ef6aad12949a18d8e4975ac296e3e5e9ecd88c9bccb143 *mksnapshot-v34
4da23a950bfcc377ef21c37d496017ab4c36da03f3b41049ac114042c42608ce *mksnapshot-v34.3.2-mas-x64.zip
fab59573d3c2f9bdf31146a1896d24ac0c51f736aad86d2f3c7ecef13c05a7fd *mksnapshot-v34.3.2-win32-arm64-x64.zip
66f25e07c6f8d5d2009577a129440255a3baf63c929a5b60b2e77cd52e46105b *mksnapshot-v34.3.2-win32-ia32.zip
8168bfbf61882cfac80aed1e71e364e1c7f2fccd11eac298e6abade8b46894ea *mksnapshot-v34.3.2-win32-x64.zip
8168bfbf61882cfac80aed1e71e364e1c7f2fccd11eac298e6abade8b46894ea *mksnapshot-v34.3.2-win32-x64.zip
+7 -7
View File
@@ -1,7 +1,7 @@
fa76d5b5340f14070ebaa88ef8faa28c1e9271502725e830cb52f0cf5b6493de node-v20.18.2-darwin-arm64.tar.gz
00a16bb0a82a2ad5d00d66b466ae1afa678482283747c27e9bce96668f334744 node-v20.18.2-darwin-x64.tar.gz
319789e8a055ff80793a05e633c8c5c9226050144a09da3747225b4ec56a2a99 node-v20.18.2-linux-arm64.tar.gz
65397a4a63960bda94718099698d2961623e9ef400f60f4c3a71add2268bccfb node-v20.18.2-linux-armv7l.tar.gz
eb5b031bdd728871c3b9a82655dbfa533bc262c0b6da1d09a86842430cef07d4 node-v20.18.2-linux-x64.tar.gz
83e7ad1b8c4d4d9c5e06849c3e8f3a5948a5eb6aa34c5bd973ba700e0386f42c win-arm64/node.exe
8487a277e92282904dfe0f860dbd5d229543e97a858a223fbe9c9b8670bbe170 win-x64/node.exe
1f15b7ed18a580af31cf32bc126572292d820f547bf55bf9cdce08041a24e1d9 node-v20.18.3-darwin-arm64.tar.gz
ba668f64df9239843fefcef095ee539f5ac5aa1b0fc15a71f1ecca16abedec7a node-v20.18.3-darwin-x64.tar.gz
93a9df19238adfaa289f4784041d03edaf2fdd89fbb247faffca2fe4a1000703 node-v20.18.3-linux-arm64.tar.gz
8a84eb34287db6a273066934d7195e429f57b91686b62fc19497210204a2b3de node-v20.18.3-linux-armv7l.tar.gz
9fc3952da39b20d1fcfdb777b198cc035485afbbb1004b4df93f35245d61151e node-v20.18.3-linux-x64.tar.gz
4258e333f4b95060681d61bffa762542a8068547d3dffebe57c575b38d380dda win-arm64/node.exe
528a9aa64888a2a3ba71c6aea89434dd5ab5cb3caa9f0f31345cf5facf685ab0 win-x64/node.exe
-3
View File
@@ -1,6 +1,3 @@
68a17006021975ff271a1dd615f9db9eda7c25f2cc65e750c87980dc57a06c94 aarch64-linux-gnu-glibc-2.17.tar.gz
0de422a81683cf9e8cf875dbd1e0c27545ac3c775b2d53015daf3ca2b31d3f15 aarch64-linux-gnu-glibc-2.28.tar.gz
3ced48cb479f2cdba95aa649710fcb7778685551c745bbd76ac706c3c0ead9fb arm-rpi-linux-gnueabihf-glibc-2.17.tar.gz
7aea163f7fad8cc50000c86b5108be880121d35e2f55d016ef8c96bbe54129eb arm-rpi-linux-gnueabihf-glibc-2.28.tar.gz
5aae21115f1d284c3cdf32c83db15771b59bc80793f1423032abf5a823c0d658 x86_64-linux-gnu-glibc-2.17.tar.gz
dbb927408393041664a020661f2641c9785741be3d29b050b9dac58980967784 x86_64-linux-gnu-glibc-2.28.tar.gz
+1
View File
@@ -27,6 +27,7 @@ async function main(buildDir) {
const filesToSkip = [
'**/CodeResources',
'**/Credits.rtf',
'**/policies/{*.mobileconfig,**/*.plist}',
// TODO: Should we consider expanding this to other files in this area?
'**/node_modules/@parcel/node-addon-api/nothing.target.mk'
];
+1
View File
@@ -28,6 +28,7 @@ async function main(buildDir?: string) {
const filesToSkip = [
'**/CodeResources',
'**/Credits.rtf',
'**/policies/{*.mobileconfig,**/*.plist}',
// TODO: Should we consider expanding this to other files in this area?
'**/node_modules/@parcel/node-addon-api/nothing.target.mk'
];
+2 -4
View File
@@ -54,11 +54,9 @@ async function main(buildDir) {
...defaultOpts,
// TODO(deepak1556): Incorrectly declared type in electron-osx-sign
ignore: (filePath) => {
const ext = path_1.default.extname(filePath);
return filePath.includes(gpuHelperAppName) ||
filePath.includes(rendererHelperAppName) ||
filePath.includes(pluginHelperAppName) ||
ext === '.asar' || ext === '.dat' || ext === '.gif' || ext === '.icns' || ext === '.ico' || ext === '.json' || ext === '.mp3' || ext === '.nib' || ext === '.pak' || ext === '.png' || ext === '.scpt' || ext === '.ttf' || ext === '.wasm' || ext === '.woff' || ext === '.woff2';
filePath.includes(pluginHelperAppName);
}
};
const gpuHelperOpts = {
@@ -83,7 +81,7 @@ async function main(buildDir) {
// universal will get its copy from the x64 build.
if (arch !== 'universal') {
await (0, cross_spawn_promise_1.spawn)('plutil', [
'-replace', // Void changed this to replace
'-insert',
'NSAppleEventsUsageDescription',
'-string',
'An application in Visual Studio Code wants to use AppleScript.',
+2 -4
View File
@@ -58,11 +58,9 @@ async function main(buildDir?: string): Promise<void> {
...defaultOpts,
// TODO(deepak1556): Incorrectly declared type in electron-osx-sign
ignore: (filePath: string) => {
const ext = path.extname(filePath);
return filePath.includes(gpuHelperAppName) ||
filePath.includes(rendererHelperAppName) ||
filePath.includes(pluginHelperAppName) ||
ext === '.asar' || ext === '.dat' || ext === '.gif' || ext === '.icns' || ext === '.ico' || ext === '.json' || ext === '.mp3' || ext === '.nib' || ext === '.pak' || ext === '.png' || ext === '.scpt' || ext === '.ttf' || ext === '.wasm' || ext === '.woff' || ext === '.woff2';
filePath.includes(pluginHelperAppName);
}
};
@@ -91,7 +89,7 @@ async function main(buildDir?: string): Promise<void> {
// universal will get its copy from the x64 build.
if (arch !== 'universal') {
await spawn('plutil', [
'-replace', // Void changed this to replace
'-insert',
'NSAppleEventsUsageDescription',
'-string',
'An application in Visual Studio Code wants to use AppleScript.',
+5 -3
View File
@@ -57,6 +57,7 @@ module.exports.unicodeFilter = [
'!extensions/**/out/**',
'!extensions/**/snippets/**',
'!extensions/**/colorize-fixtures/**',
'!extensions/terminal-suggest/src/shell/fishBuiltinsCache.ts',
'!src/vs/base/browser/dompurify/**',
'!src/vs/workbench/services/keybinding/browser/keyboardLayouts/**',
@@ -79,6 +80,7 @@ module.exports.indentationFilter = [
'!src/vs/base/node/terminateProcess.sh',
'!src/vs/base/node/cpuUsage.sh',
'!src/vs/editor/common/languages/highlights/*.scm',
'!src/vs/editor/common/languages/injections/*.scm',
'!test/unit/assert.js',
'!resources/linux/snap/electron-launch',
'!build/ext.js',
@@ -90,6 +92,7 @@ module.exports.indentationFilter = [
'!test/monaco/out/**',
'!test/smoke/out/**',
'!extensions/terminal-suggest/src/shell/zshBuiltinsCache.ts',
'!extensions/terminal-suggest/src/shell/fishBuiltinsCache.ts',
'!extensions/terminal-suggest/src/completions/upstream/**',
'!extensions/typescript-language-features/test-workspace/**',
'!extensions/typescript-language-features/resources/walkthroughs/**',
@@ -137,9 +140,6 @@ module.exports.indentationFilter = [
'!extensions/ipynb/notebook-out/**',
'!extensions/notebook-renderers/renderer-out/*.js',
'!extensions/simple-browser/media/*.js',
'!extensions/open-remote-ssh/out/*.js', // Void added this
'!extensions/open-remote-wsl/out/*.js', // Void added this
];
module.exports.copyrightFilter = [
@@ -198,6 +198,7 @@ module.exports.tsFormattingFilter = [
'!extensions/**/*.test.ts',
'!extensions/html-language-features/server/lib/jquery.d.ts',
'!extensions/terminal-suggest/src/shell/zshBuiltinsCache.ts',
'!extensions/terminal-suggest/src/shell/fishBuiltinsCache.ts',
];
module.exports.eslintFilter = [
@@ -205,6 +206,7 @@ module.exports.eslintFilter = [
'**/*.cjs',
'**/*.mjs',
'**/*.ts',
'.eslint-plugin-local/**/*.ts',
...readFileSync(join(__dirname, '..', '.eslint-ignore'))
.toString()
.split(/\r\n|\n/)
+8 -8
View File
@@ -24,12 +24,12 @@ function makeCompileBuildTask(disableMangle) {
);
}
// Full compile, including nls and inline sources in sourcemaps, mangling, minification, for build
const compileBuildTask = task.define('compile-build', makeCompileBuildTask(false));
gulp.task(compileBuildTask);
exports.compileBuildTask = compileBuildTask;
// Local/PR compile, including nls and inline sources in sourcemaps, minification, no mangling
const compileBuildWithoutManglingTask = task.define('compile-build-without-mangling', makeCompileBuildTask(true));
gulp.task(compileBuildWithoutManglingTask);
exports.compileBuildWithoutManglingTask = compileBuildWithoutManglingTask;
// Full compile for PR ci, e.g no mangling
const compileBuildTaskPullRequest = task.define('compile-build-pr', makeCompileBuildTask(true));
gulp.task(compileBuildTaskPullRequest);
exports.compileBuildTaskPullRequest = compileBuildTaskPullRequest;
// CI compile, including nls and inline sources in sourcemaps, mangling, minification, for build
const compileBuildWithManglingTask = task.define('compile-build-with-mangling', makeCompileBuildTask(false));
gulp.task(compileBuildWithManglingTask);
exports.compileBuildWithManglingTask = compileBuildWithManglingTask;
+27 -210
View File
@@ -3,12 +3,13 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const gulp = require('gulp');
const path = require('path');
const util = require('./lib/util');
const { getVersion } = require('./lib/getVersion');
const task = require('./lib/task');
const optimize = require('./lib/optimize');
const es = require('event-stream');
const File = require('vinyl');
const i18n = require('./lib/i18n');
@@ -17,39 +18,13 @@ const cp = require('child_process');
const compilation = require('./lib/compilation');
const monacoapi = require('./lib/monaco-api');
const fs = require('fs');
const filter = require('gulp-filter');
const root = path.dirname(__dirname);
const sha1 = getVersion(root);
const semver = require('./monaco/package.json').version;
const headerVersion = semver + '(' + sha1 + ')';
// Build
const editorEntryPoints = [
{
name: 'vs/editor/editor.main',
include: [],
exclude: ['vs/css'],
prepend: [
{ path: 'out-editor-build/vs/css.js', amdModuleId: 'vs/css' }
],
},
{
name: 'vs/base/common/worker/simpleWorker',
include: ['vs/editor/common/services/editorSimpleWorker'],
exclude: [],
prepend: [
{ path: 'vs/loader.js' },
{ path: 'vs/base/worker/workerMain.js' }
],
dest: 'vs/base/worker/workerMain.js'
}
];
const editorResources = [
'out-editor-build/vs/base/browser/ui/codicons/**/*.ttf'
];
const BUNDLED_FILE_HEADER = [
'/*!-----------------------------------------------------------',
' * Copyright (c) Microsoft Corporation. All rights reserved.',
@@ -60,8 +35,6 @@ const BUNDLED_FILE_HEADER = [
''
].join('\n');
const languages = i18n.defaultLanguages.concat([]); // i18n.defaultLanguages.concat(process.env.VSCODE_QUALITY !== 'stable' ? i18n.extraLanguages : []);
const extractEditorSrcTask = task.define('extract-editor-src', () => {
const apiusages = monacoapi.execute().usageContent;
const extrausages = fs.readFileSync(path.join(root, 'build', 'monaco', 'monaco.usage.recipe')).toString();
@@ -69,128 +42,43 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
sourcesRoot: path.join(root, 'src'),
entryPoints: [
'vs/editor/editor.main',
'vs/editor/editor.worker',
'vs/base/worker/workerMain',
'vs/editor/editor.worker.start',
'vs/editor/common/services/editorWebWorkerMain',
],
inlineEntryPoints: [
apiusages,
extrausages
],
typings: [],
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
importIgnorePattern: /\.css$/,
destRoot: path.join(root, 'out-editor-src'),
tsOutDir: '../out-monaco-editor-core/esm/vs',
redirects: {
'@vscode/tree-sitter-wasm': '../node_modules/@vscode/tree-sitter-wasm/wasm/web-tree-sitter',
}
});
});
// Disable mangling for the editor, as it complicates debugging & quite a few users rely on private/protected fields.
// Disable NLS task to remove english strings to preserve backwards compatibility when we removed the `vs/nls!` AMD plugin.
const compileEditorAMDTask = task.define('compile-editor-amd', compilation.compileTask('out-editor-src', 'out-editor-build', true, { disableMangle: true, preserveEnglish: true }));
const bundleEditorAMDTask = task.define('bundle-editor-amd', optimize.bundleTask(
{
out: 'out-editor',
esm: {
src: 'out-editor-build',
entryPoints: editorEntryPoints,
resources: editorResources
}
}
));
const minifyEditorAMDTask = task.define('minify-editor-amd', optimize.minifyTask('out-editor'));
const createESMSourcesAndResourcesTask = task.define('extract-editor-esm', () => {
standalone.createESMSourcesAndResources2({
srcFolder: './out-editor-src',
outFolder: './out-editor-esm',
outResourcesFolder: './out-monaco-editor-core/esm',
ignores: [
'inlineEntryPoint:0.ts',
'inlineEntryPoint:1.ts',
'vs/loader.js',
'vs/base/worker/workerMain.ts',
],
renames: {
}
});
});
const compileEditorESMTask = task.define('compile-editor-esm', () => {
const KEEP_PREV_ANALYSIS = false;
const FAIL_ON_PURPOSE = false;
console.log(`Launching the TS compiler at ${path.join(__dirname, '../out-editor-esm')}...`);
let result;
if (process.platform === 'win32') {
result = cp.spawnSync(`..\\node_modules\\.bin\\tsc.cmd`, {
cwd: path.join(__dirname, '../out-editor-esm'),
shell: true
});
} else {
result = cp.spawnSync(`node`, [`../node_modules/.bin/tsc`], {
cwd: path.join(__dirname, '../out-editor-esm')
});
}
console.log(result.stdout.toString());
console.log(result.stderr.toString());
const src = 'out-editor-src';
const out = 'out-monaco-editor-core/esm';
if (FAIL_ON_PURPOSE || result.status !== 0) {
console.log(`The TS Compilation failed, preparing analysis folder...`);
const destPath = path.join(__dirname, '../../vscode-monaco-editor-esm-analysis');
const keepPrevAnalysis = (KEEP_PREV_ANALYSIS && fs.existsSync(destPath));
const cleanDestPath = (keepPrevAnalysis ? Promise.resolve() : util.rimraf(destPath)());
return cleanDestPath.then(() => {
// build a list of files to copy
const files = util.rreddir(path.join(__dirname, '../out-editor-esm'));
const compile = compilation.createCompile(src, { build: true, emitError: true, transpileOnly: false, preserveEnglish: true });
const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
if (!keepPrevAnalysis) {
fs.mkdirSync(destPath);
// initialize a new repository
cp.spawnSync(`git`, [`init`], {
cwd: destPath
});
// copy files from src
for (const file of files) {
const srcFilePath = path.join(__dirname, '../src', file);
const dstFilePath = path.join(destPath, file);
if (fs.existsSync(srcFilePath)) {
util.ensureDir(path.dirname(dstFilePath));
const contents = fs.readFileSync(srcFilePath).toString().replace(/\r\n|\r|\n/g, '\n');
fs.writeFileSync(dstFilePath, contents);
}
}
// create an initial commit to diff against
cp.spawnSync(`git`, [`add`, `.`], {
cwd: destPath
});
// create the commit
cp.spawnSync(`git`, [`commit`, `-m`, `"original sources"`, `--no-gpg-sign`], {
cwd: destPath
});
}
// copy files from tree shaken src
for (const file of files) {
const srcFilePath = path.join(__dirname, '../out-editor-src', file);
const dstFilePath = path.join(destPath, file);
if (fs.existsSync(srcFilePath)) {
util.ensureDir(path.dirname(dstFilePath));
const contents = fs.readFileSync(srcFilePath).toString().replace(/\r\n|\r|\n/g, '\n');
fs.writeFileSync(dstFilePath, contents);
}
}
console.log(`Open in VS Code the folder at '${destPath}' and you can analyze the compilation error`);
throw new Error('Standalone Editor compilation failed. If this is the build machine, simply launch `npm run gulp editor-distro` on your machine to further analyze the compilation problem.');
});
}
return (
srcPipe
.pipe(compile())
.pipe(i18n.processNlsFiles({
out,
fileHeader: BUNDLED_FILE_HEADER,
languages: i18n.defaultLanguages,
}))
.pipe(filter(['**', '!**/inlineEntryPoint*', '!**/tsconfig.json', '!**/loader.js']))
.pipe(gulp.dest(out))
);
});
/**
@@ -239,18 +127,6 @@ function toExternalDTS(contents) {
return lines.join('\n').replace(/\n\n\n+/g, '\n\n');
}
/**
* @param {{ (path: string): boolean }} testFunc
*/
function filterStream(testFunc) {
return es.through(function (data) {
if (!testFunc(data.relative)) {
return;
}
this.emit('data', data);
});
}
const finalEditorResourcesTask = task.define('final-editor-resources', () => {
return es.merge(
// other assets
@@ -299,42 +175,6 @@ const finalEditorResourcesTask = task.define('final-editor-resources', () => {
}));
}))
.pipe(gulp.dest('out-monaco-editor-core')),
// dev folder
es.merge(
gulp.src('out-editor/**/*')
).pipe(gulp.dest('out-monaco-editor-core/dev')),
// min folder
es.merge(
gulp.src('out-editor-min/**/*')
).pipe(filterStream(function (path) {
// no map files
return !/(\.js\.map$)|(nls\.metadata\.json$)|(bundleInfo\.json$)/.test(path);
})).pipe(es.through(function (data) {
// tweak the sourceMappingURL
if (!/\.js$/.test(data.path)) {
this.emit('data', data);
return;
}
const relativePathToMap = path.relative(path.join(data.relative), path.join('min-maps', data.relative + '.map'));
let strContents = data.contents.toString();
const newStr = '//# sourceMappingURL=' + relativePathToMap.replace(/\\/g, '/');
strContents = strContents.replace(/\/\/# sourceMappingURL=[^ ]+$/, newStr);
data.contents = Buffer.from(strContents);
this.emit('data', data);
})).pipe(gulp.dest('out-monaco-editor-core/min')),
// min-maps folder
es.merge(
gulp.src('out-editor-min/**/*')
).pipe(filterStream(function (path) {
// no map files
return /\.js\.map$/.test(path);
})).pipe(gulp.dest('out-monaco-editor-core/min-maps'))
);
});
@@ -349,38 +189,11 @@ gulp.task('editor-distro',
task.series(
task.parallel(
util.rimraf('out-editor-src'),
util.rimraf('out-editor-build'),
util.rimraf('out-editor-esm'),
util.rimraf('out-monaco-editor-core'),
util.rimraf('out-editor'),
util.rimraf('out-editor-min')
),
extractEditorSrcTask,
task.parallel(
task.series(
compileEditorAMDTask,
bundleEditorAMDTask,
minifyEditorAMDTask
),
task.series(
createESMSourcesAndResourcesTask,
compileEditorESMTask,
)
),
finalEditorResourcesTask
)
);
gulp.task('editor-esm',
task.series(
task.parallel(
util.rimraf('out-editor-src'),
util.rimraf('out-editor-esm'),
util.rimraf('out-monaco-editor-core'),
),
extractEditorSrcTask,
createESMSourcesAndResourcesTask,
compileEditorESMTask,
finalEditorResourcesTask
)
);
@@ -393,6 +206,9 @@ gulp.task('monacodts', task.define('monacodts', () => {
//#region monaco type checking
/**
* @param {boolean} watch
*/
function createTscCompileTask(watch) {
return () => {
const createReporter = require('./lib/reporter').createReporter;
@@ -421,6 +237,7 @@ function createTscCompileTask(watch) {
report = reporter.end(false);
} else if (str.indexOf('Compilation complete') >= 0) {
// @ts-ignore
report.end();
} else if (str) {
-4
View File
@@ -71,10 +71,6 @@ const compilations = [
'.vscode/extensions/vscode-selfhost-test-provider/tsconfig.json',
'.vscode/extensions/vscode-selfhost-import-aid/tsconfig.json',
'extensions/open-remote-ssh/tsconfig.json', // Void added this
'extensions/open-remote-wsl/tsconfig.json', // Void added this
];
const getBaseUrl = out => `https://main.vscode-cdn.net/sourcemaps/${commit}/${out}`;
+7 -25
View File
@@ -26,7 +26,7 @@ const gunzip = require('gulp-gunzip');
const File = require('vinyl');
const fs = require('fs');
const glob = require('glob');
const { compileBuildTask } = require('./gulpfile.compile');
const { compileBuildWithManglingTask } = require('./gulpfile.compile');
const { cleanExtensionsBuildTask, compileNonNativeExtensionsBuildTask, compileNativeExtensionsBuildTask, compileExtensionMediaBuildTask } = require('./gulpfile.extensions');
const { vscodeWebResourceIncludes, createVSCodeWebFileContentMapper } = require('./gulpfile.vscode.web');
const cp = require('child_process');
@@ -154,20 +154,9 @@ function getNodeChecksum(expectedName) {
}
function extractAlpinefromDocker(nodeVersion, platform, arch) {
let imageName = 'node';
let dockerPlatform = '';
if (arch === 'arm64') {
imageName = 'arm64v8/node';
const architecture = cp.execSync(`docker info --format '{{json .Architecture}}'`, { encoding: 'utf8' }).trim();
if (architecture !== '"aarch64"') {
dockerPlatform = '--platform=linux/arm64';
}
}
const imageName = arch === 'arm64' ? 'arm64v8/node' : 'node';
log(`Downloading node.js ${nodeVersion} ${platform} ${arch} from docker image ${imageName}`);
const contents = cp.execSync(`docker run --rm ${dockerPlatform} ${imageName}:${nodeVersion}-alpine /bin/sh -c 'cat \`which node\`'`, { maxBuffer: 100 * 1024 * 1024, encoding: 'buffer' });
const contents = cp.execSync(`docker run --rm ${imageName}:${nodeVersion}-alpine /bin/sh -c 'cat \`which node\`'`, { maxBuffer: 100 * 1024 * 1024, encoding: 'buffer' });
return es.readArray([new File({ path: 'node', contents, stat: { mode: parseInt('755', 8) } })]);
}
@@ -319,11 +308,10 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
}
const name = product.nameShort;
const release = packageJson.release;
let packageJsonContents;
const packageJsonStream = gulp.src(['remote/package.json'], { base: 'remote' })
.pipe(json({ name, version, release, dependencies: undefined, optionalDependencies: undefined, type: 'module' }))
.pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined, type: 'module' }))
.pipe(es.through(function (file) {
packageJsonContents = file.contents.toString();
this.emit('data', file);
@@ -331,7 +319,7 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
let productJsonContents;
const productJsonStream = gulp.src(['product.json'], { base: '.' })
.pipe(json({ commit, date: readISODate('out-build'), version, release }))
.pipe(json({ commit, date: readISODate('out-build'), version }))
.pipe(es.through(function (file) {
productJsonContents = file.contents.toString();
this.emit('data', file);
@@ -414,13 +402,7 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
);
}
if (platform === 'linux' && process.env['VSCODE_NODE_GLIBC'] === '-glibc-2.17') {
result = es.merge(result,
gulp.src(`resources/server/bin/helpers/check-requirements-linux-legacy.sh`, { base: '.' })
.pipe(rename(`bin/helpers/check-requirements.sh`))
.pipe(util.setExecutableBit())
);
} else if (platform === 'linux' || platform === 'alpine') {
if (platform === 'linux' || platform === 'alpine') {
result = es.merge(result,
gulp.src(`resources/server/bin/helpers/check-requirements-linux.sh`, { base: '.' })
.pipe(rename(`bin/helpers/check-requirements.sh`))
@@ -491,7 +473,7 @@ function tweakProductForServerWeb(product) {
gulp.task(serverTaskCI);
const serverTask = task.define(`vscode-${type}${dashed(platform)}${dashed(arch)}${dashed(minified)}`, task.series(
compileBuildTask,
compileBuildWithManglingTask,
cleanExtensionsBuildTask,
compileNonNativeExtensionsBuildTask,
compileExtensionMediaBuildTask,
+18 -16
View File
@@ -30,7 +30,7 @@ const { getProductionDependencies } = require('./lib/dependencies');
const { config } = require('./lib/electron');
const createAsar = require('./lib/asar').createAsar;
const minimist = require('minimist');
const { compileBuildTask } = require('./gulpfile.compile');
const { compileBuildWithoutManglingTask, compileBuildWithManglingTask } = require('./gulpfile.compile');
const { compileNonNativeExtensionsBuildTask, compileNativeExtensionsBuildTask, compileAllExtensionsBuildTask, compileExtensionMediaBuildTask, cleanExtensionsBuildTask } = require('./gulpfile.extensions');
const { promisify } = require('util');
const glob = promisify(require('glob'));
@@ -101,6 +101,9 @@ const vscodeResourceIncludes = [
// Tree Sitter highlights
'out-build/vs/editor/common/languages/highlights/*.scm',
// Tree Sitter injection queries
'out-build/vs/editor/common/languages/injections/*.scm',
];
const vscodeResources = [
@@ -166,25 +169,25 @@ const minifyVSCodeTask = task.define('minify-vscode', task.series(
));
gulp.task(minifyVSCodeTask);
const core = task.define('core-ci', task.series(
gulp.task('compile-build'),
const coreCI = task.define('core-ci', task.series(
gulp.task('compile-build-with-mangling'),
task.parallel(
gulp.task('minify-vscode'),
gulp.task('minify-vscode-reh'),
gulp.task('minify-vscode-reh-web'),
)
));
gulp.task(core);
gulp.task(coreCI);
const corePr = task.define('core-ci-pr', task.series(
gulp.task('compile-build-pr'),
const coreCIPR = task.define('core-ci-pr', task.series(
gulp.task('compile-build-without-mangling'),
task.parallel(
gulp.task('minify-vscode'),
gulp.task('minify-vscode-reh'),
gulp.task('minify-vscode-reh-web'),
)
));
gulp.task(corePr);
gulp.task(coreCIPR);
/**
* Compute checksums for some files.
@@ -267,8 +270,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
}
const name = product.nameShort;
const release = packageJson.release;
const packageJsonUpdates = { name, version, release };
const packageJsonUpdates = { name, version };
if (platform === 'linux') {
packageJsonUpdates.desktopName = `${product.applicationName}.desktop`;
@@ -282,10 +284,9 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
this.emit('data', file);
}));
// Void - this is important, creates the product.json in .app
let productJsonContents;
const productJsonStream = gulp.src(['product.json'], { base: '.' })
.pipe(json({ commit, date: readISODate('out-build'), checksums, version, release }))
.pipe(json({ commit, date: readISODate('out-build'), checksums, version }))
.pipe(es.through(function (file) {
productJsonContents = file.contents.toString();
this.emit('data', file);
@@ -373,9 +374,10 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
} else if (platform === 'darwin') {
const shortcut = gulp.src('resources/darwin/bin/code.sh')
.pipe(replace('@@APPNAME@@', product.applicationName))
.pipe(rename('bin/' + product.applicationName));
all = es.merge(all, shortcut);
.pipe(rename('bin/code'));
const policyDest = gulp.src('.build/policies/darwin/**', { base: '.build/policies/darwin' })
.pipe(rename(f => f.dirname = `policies/${f.dirname}`));
all = es.merge(all, shortcut, policyDest);
}
let result = all
@@ -502,7 +504,7 @@ BUILD_TARGETS.forEach(buildTarget => {
gulp.task(vscodeTaskCI);
const vscodeTask = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}`, task.series(
compileBuildTask,
minified ? compileBuildWithManglingTask : compileBuildWithoutManglingTask,
cleanExtensionsBuildTask,
compileNonNativeExtensionsBuildTask,
compileExtensionMediaBuildTask,
@@ -540,7 +542,7 @@ const innoSetupConfig = {
gulp.task(task.define(
'vscode-translations-export',
task.series(
core,
coreCI,
compileAllExtensionsBuildTask,
function () {
const pathToMetadata = './out-build/nls.metadata.json';
+23 -24
View File
@@ -25,6 +25,7 @@ const exec = util.promisify(cp.exec);
const root = path.dirname(__dirname);
const commit = getVersion(root);
const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
/**
* @param {string} arch
@@ -38,7 +39,9 @@ function prepareDebPackage(arch) {
const debArch = getDebPackageArch(arch);
const destination = '.build/linux/deb/' + debArch + '/' + product.applicationName + '-' + debArch;
return function () {
return async function () {
const dependencies = await dependenciesGenerator.getDependencies('deb', binaryDir, product.applicationName, debArch);
const desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
.pipe(rename('usr/share/applications/' + product.applicationName + '.desktop'));
@@ -81,12 +84,11 @@ function prepareDebPackage(arch) {
let size = 0;
const control = code.pipe(es.through(
function (f) { size += f.isDirectory() ? 4096 : f.contents.length; },
async function () {
function () {
const that = this;
const dependencies = await dependenciesGenerator.getDependencies('deb', binaryDir, product.applicationName, debArch);
gulp.src('resources/linux/debian/control.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
.pipe(replace('@@VERSION@@', packageJson.version + '-' + linuxPackageRevision))
.pipe(replace('@@ARCHITECTURE@@', debArch))
.pipe(replace('@@DEPENDS@@', dependencies.join(', ')))
.pipe(replace('@@RECOMMENDS@@', debianRecommendedDependencies.join(', ')))
@@ -153,7 +155,9 @@ function prepareRpmPackage(arch) {
const rpmArch = getRpmPackageArch(arch);
const stripBinary = process.env['STRIP'] ?? '/usr/bin/strip';
return function () {
return async function () {
const dependencies = await dependenciesGenerator.getDependencies('rpm', binaryDir, product.applicationName, rpmArch);
const desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
.pipe(rename('BUILD/usr/share/applications/' + product.applicationName + '.desktop'));
@@ -193,24 +197,19 @@ function prepareRpmPackage(arch) {
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
.pipe(rename(function (p) { p.dirname = 'BUILD/usr/share/' + product.applicationName + '/' + p.dirname; }));
const spec = code.pipe(es.through(
async function () {
const that = this;
const dependencies = await dependenciesGenerator.getDependencies('rpm', binaryDir, product.applicationName, rpmArch);
gulp.src('resources/linux/rpm/code.spec.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@NAME_LONG@@', product.nameLong))
.pipe(replace('@@ICON@@', product.linuxIconName))
.pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
.pipe(replace('@@ARCHITECTURE@@', rpmArch))
.pipe(replace('@@LICENSE@@', product.licenseName))
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))
.pipe(replace('@@DEPENDENCIES@@', dependencies.join(', ')))
.pipe(replace('@@STRIP@@', stripBinary))
.pipe(rename('SPECS/' + product.applicationName + '.spec'))
.pipe(es.through(function (f) { that.emit('data', f); }, function () { that.emit('end'); }));
}));
const spec = gulp.src('resources/linux/rpm/code.spec.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@NAME_LONG@@', product.nameLong))
.pipe(replace('@@ICON@@', product.linuxIconName))
.pipe(replace('@@VERSION@@', packageJson.version))
.pipe(replace('@@RELEASE@@', linuxPackageRevision))
.pipe(replace('@@ARCHITECTURE@@', rpmArch))
.pipe(replace('@@LICENSE@@', product.licenseName))
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))
.pipe(replace('@@DEPENDENCIES@@', dependencies.join(', ')))
.pipe(replace('@@STRIP@@', stripBinary))
.pipe(rename('SPECS/' + product.applicationName + '.spec'));
const specIcon = gulp.src('resources/linux/rpm/code.xpm', { base: '.' })
.pipe(rename('SOURCES/' + product.applicationName + '.xpm'));
@@ -277,7 +276,7 @@ function prepareSnapPackage(arch) {
const snapcraft = gulp.src('resources/linux/snap/snapcraft.yaml', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
.pipe(replace('@@VERSION@@', commit.substr(0, 8)))
// Possible run-on values https://snapcraft.io/docs/architectures
.pipe(replace('@@ARCHITECTURE@@', arch === 'x64' ? 'amd64' : arch))
.pipe(rename('snap/snapcraft.yaml'));
+5 -2
View File
@@ -19,7 +19,7 @@ const filter = require('gulp-filter');
const { getProductionDependencies } = require('./lib/dependencies');
const vfs = require('vinyl-fs');
const packageJson = require('../package.json');
const { compileBuildTask } = require('./gulpfile.compile');
const { compileBuildWithManglingTask } = require('./gulpfile.compile');
const extensions = require('./lib/extensions');
const VinylFile = require('vinyl');
@@ -52,6 +52,9 @@ const vscodeWebResourceIncludes = [
// Tree Sitter highlights
'out-build/vs/editor/common/languages/highlights/*.scm',
// Tree Sitter injections
'out-build/vs/editor/common/languages/injections/*.scm',
// Extension Host Worker
'out-build/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html',
];
@@ -223,7 +226,7 @@ const dashed = (/** @type {string} */ str) => (str ? `-${str}` : ``);
gulp.task(vscodeWebTaskCI);
const vscodeWebTask = task.define(`vscode-web${dashed(minified)}`, task.series(
compileBuildTask,
compileBuildWithManglingTask,
vscodeWebTaskCI
));
gulp.task(vscodeWebTask);
+2 -2
View File
@@ -87,8 +87,8 @@ function buildWin32Setup(arch, target) {
NameLong: product.nameLong,
NameShort: product.nameShort,
DirName: product.win32DirName,
Version: `${pkg.version}.${pkg.release}`,
RawVersion: `${pkg.version.replace(/-\w+$/, '')}.${pkg.release}`,
Version: pkg.version,
RawVersion: pkg.version.replace(/-\w+$/, ''),
NameVersion: product.win32NameVersion + (target === 'user' ? ' (User)' : ''),
ExeBasename: product.nameShort,
RegValueName: product.win32RegValueName,
+4 -1
View File
@@ -85,7 +85,10 @@ function getExtensionDownloadStream(extension) {
if (extension.vsix) {
input = ext.fromVsix(path_1.default.join(root, extension.vsix), extension);
}
else { // Void - ext-from-gh.patch
else if (productjson.extensionsGallery?.serviceUrl) {
input = ext.fromMarketplace(productjson.extensionsGallery.serviceUrl, extension);
}
else {
input = ext.fromGithub(extension);
}
return input.pipe((0, gulp_rename_1.default)(p => p.dirname = `${extension.name}/${p.dirname}`));
+3 -1
View File
@@ -73,7 +73,9 @@ function getExtensionDownloadStream(extension: IExtensionDefinition) {
if (extension.vsix) {
input = ext.fromVsix(path.join(root, extension.vsix), extension);
} else { // Void - ext-from-gh.patch
} else if (productjson.extensionsGallery?.serviceUrl) {
input = ext.fromMarketplace(productjson.extensionsGallery.serviceUrl, extension);
} else {
input = ext.fromGithub(extension);
}
-430
View File
@@ -3,229 +3,8 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.bundle = bundle;
exports.removeAllTSBoilerplate = removeAllTSBoilerplate;
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const vm_1 = __importDefault(require("vm"));
/**
* Bundle `entryPoints` given config `config`.
*/
function bundle(entryPoints, config, callback) {
const entryPointsMap = {};
entryPoints.forEach((module) => {
if (entryPointsMap[module.name]) {
throw new Error(`Cannot have two entry points with the same name '${module.name}'`);
}
entryPointsMap[module.name] = module;
});
const allMentionedModulesMap = {};
entryPoints.forEach((module) => {
allMentionedModulesMap[module.name] = true;
module.include?.forEach(function (includedModule) {
allMentionedModulesMap[includedModule] = true;
});
module.exclude?.forEach(function (excludedModule) {
allMentionedModulesMap[excludedModule] = true;
});
});
const code = require('fs').readFileSync(path_1.default.join(__dirname, '../../src/vs/loader.js'));
const r = vm_1.default.runInThisContext('(function(require, module, exports) { ' + code + '\n});');
const loaderModule = { exports: {} };
r.call({}, require, loaderModule, loaderModule.exports);
const loader = loaderModule.exports;
config.isBuild = true;
config.paths = config.paths || {};
if (!config.paths['vs/css']) {
config.paths['vs/css'] = 'out-build/vs/css.build';
}
config.buildForceInvokeFactory = config.buildForceInvokeFactory || {};
config.buildForceInvokeFactory['vs/css'] = true;
loader.config(config);
loader(['require'], (localRequire) => {
const resolvePath = (entry) => {
let r = localRequire.toUrl(entry.path);
if (!r.endsWith('.js')) {
r += '.js';
}
// avoid packaging the build version of plugins:
r = r.replace('vs/css.build.js', 'vs/css.js');
return { path: r, amdModuleId: entry.amdModuleId };
};
for (const moduleId in entryPointsMap) {
const entryPoint = entryPointsMap[moduleId];
if (entryPoint.prepend) {
entryPoint.prepend = entryPoint.prepend.map(resolvePath);
}
}
});
loader(Object.keys(allMentionedModulesMap), () => {
const modules = loader.getBuildInfo();
const partialResult = emitEntryPoints(modules, entryPointsMap);
const cssInlinedResources = loader('vs/css').getInlinedResources();
callback(null, {
files: partialResult.files,
cssInlinedResources: cssInlinedResources,
bundleData: partialResult.bundleData
});
}, (err) => callback(err, null));
}
function emitEntryPoints(modules, entryPoints) {
const modulesMap = {};
modules.forEach((m) => {
modulesMap[m.id] = m;
});
const modulesGraph = {};
modules.forEach((m) => {
modulesGraph[m.id] = m.dependencies;
});
const sortedModules = topologicalSort(modulesGraph);
let result = [];
const usedPlugins = {};
const bundleData = {
graph: modulesGraph,
bundles: {}
};
Object.keys(entryPoints).forEach((moduleToBundle) => {
const info = entryPoints[moduleToBundle];
const rootNodes = [moduleToBundle].concat(info.include || []);
const allDependencies = visit(rootNodes, modulesGraph);
const excludes = ['require', 'exports', 'module'].concat(info.exclude || []);
excludes.forEach((excludeRoot) => {
const allExcludes = visit([excludeRoot], modulesGraph);
Object.keys(allExcludes).forEach((exclude) => {
delete allDependencies[exclude];
});
});
const includedModules = sortedModules.filter((module) => {
return allDependencies[module];
});
bundleData.bundles[moduleToBundle] = includedModules;
const res = emitEntryPoint(modulesMap, modulesGraph, moduleToBundle, includedModules, info.prepend || [], info.dest);
result = result.concat(res.files);
for (const pluginName in res.usedPlugins) {
usedPlugins[pluginName] = usedPlugins[pluginName] || res.usedPlugins[pluginName];
}
});
Object.keys(usedPlugins).forEach((pluginName) => {
const plugin = usedPlugins[pluginName];
if (typeof plugin.finishBuild === 'function') {
const write = (filename, contents) => {
result.push({
dest: filename,
sources: [{
path: null,
contents: contents
}]
});
};
plugin.finishBuild(write);
}
});
return {
// TODO@TS 2.1.2
files: extractStrings(removeAllDuplicateTSBoilerplate(result)),
bundleData: bundleData
};
}
function extractStrings(destFiles) {
const parseDefineCall = (moduleMatch, depsMatch) => {
const module = moduleMatch.replace(/^"|"$/g, '');
let deps = depsMatch.split(',');
deps = deps.map((dep) => {
dep = dep.trim();
dep = dep.replace(/^"|"$/g, '');
dep = dep.replace(/^'|'$/g, '');
let prefix = null;
let _path = null;
const pieces = dep.split('!');
if (pieces.length > 1) {
prefix = pieces[0] + '!';
_path = pieces[1];
}
else {
prefix = '';
_path = pieces[0];
}
if (/^\.\//.test(_path) || /^\.\.\//.test(_path)) {
const res = path_1.default.join(path_1.default.dirname(module), _path).replace(/\\/g, '/');
return prefix + res;
}
return prefix + _path;
});
return {
module: module,
deps: deps
};
};
destFiles.forEach((destFile) => {
if (!/\.js$/.test(destFile.dest)) {
return;
}
if (/\.nls\.js$/.test(destFile.dest)) {
return;
}
// Do one pass to record the usage counts for each module id
const useCounts = {};
destFile.sources.forEach((source) => {
const matches = source.contents.match(/define\(("[^"]+"),\s*\[(((, )?("|')[^"']+("|'))+)\]/);
if (!matches) {
return;
}
const defineCall = parseDefineCall(matches[1], matches[2]);
useCounts[defineCall.module] = (useCounts[defineCall.module] || 0) + 1;
defineCall.deps.forEach((dep) => {
useCounts[dep] = (useCounts[dep] || 0) + 1;
});
});
const sortedByUseModules = Object.keys(useCounts);
sortedByUseModules.sort((a, b) => {
return useCounts[b] - useCounts[a];
});
const replacementMap = {};
sortedByUseModules.forEach((module, index) => {
replacementMap[module] = index;
});
destFile.sources.forEach((source) => {
source.contents = source.contents.replace(/define\(("[^"]+"),\s*\[(((, )?("|')[^"']+("|'))+)\]/, (_, moduleMatch, depsMatch) => {
const defineCall = parseDefineCall(moduleMatch, depsMatch);
return `define(__m[${replacementMap[defineCall.module]}/*${defineCall.module}*/], __M([${defineCall.deps.map(dep => replacementMap[dep] + '/*' + dep + '*/').join(',')}])`;
});
});
destFile.sources.unshift({
path: null,
contents: [
'(function() {',
`var __m = ${JSON.stringify(sortedByUseModules)};`,
`var __M = function(deps) {`,
` var result = [];`,
` for (var i = 0, len = deps.length; i < len; i++) {`,
` result[i] = __m[deps[i]];`,
` }`,
` return result;`,
`};`
].join('\n')
});
destFile.sources.push({
path: null,
contents: '}).call(this);'
});
});
return destFiles;
}
function removeAllDuplicateTSBoilerplate(destFiles) {
destFiles.forEach((destFile) => {
const SEEN_BOILERPLATE = [];
destFile.sources.forEach((source) => {
source.contents = removeDuplicateTSBoilerplate(source.contents, SEEN_BOILERPLATE);
});
});
return destFiles;
}
function removeAllTSBoilerplate(source) {
const seen = new Array(BOILERPLATE.length).fill(true, 0, BOILERPLATE.length);
return removeDuplicateTSBoilerplate(source, seen);
@@ -280,213 +59,4 @@ function removeDuplicateTSBoilerplate(source, SEEN_BOILERPLATE = []) {
}
return newLines.join('\n');
}
function emitEntryPoint(modulesMap, deps, entryPoint, includedModules, prepend, dest) {
if (!dest) {
dest = entryPoint + '.js';
}
const mainResult = {
sources: [],
dest: dest
}, results = [mainResult];
const usedPlugins = {};
const getLoaderPlugin = (pluginName) => {
if (!usedPlugins[pluginName]) {
usedPlugins[pluginName] = modulesMap[pluginName].exports;
}
return usedPlugins[pluginName];
};
includedModules.forEach((c) => {
const bangIndex = c.indexOf('!');
if (bangIndex >= 0) {
const pluginName = c.substr(0, bangIndex);
const plugin = getLoaderPlugin(pluginName);
mainResult.sources.push(emitPlugin(entryPoint, plugin, pluginName, c.substr(bangIndex + 1)));
return;
}
const module = modulesMap[c];
if (module.path === 'empty:') {
return;
}
const contents = readFileAndRemoveBOM(module.path);
if (module.shim) {
mainResult.sources.push(emitShimmedModule(c, deps[c], module.shim, module.path, contents));
}
else if (module.defineLocation) {
mainResult.sources.push(emitNamedModule(c, module.defineLocation, module.path, contents));
}
else {
const moduleCopy = {
id: module.id,
path: module.path,
defineLocation: module.defineLocation,
dependencies: module.dependencies
};
throw new Error(`Cannot bundle module '${module.id}' for entry point '${entryPoint}' because it has no shim and it lacks a defineLocation: ${JSON.stringify(moduleCopy)}`);
}
});
Object.keys(usedPlugins).forEach((pluginName) => {
const plugin = usedPlugins[pluginName];
if (typeof plugin.writeFile === 'function') {
const req = (() => {
throw new Error('no-no!');
});
req.toUrl = something => something;
const write = (filename, contents) => {
results.push({
dest: filename,
sources: [{
path: null,
contents: contents
}]
});
};
plugin.writeFile(pluginName, entryPoint, req, write, {});
}
});
const toIFile = (entry) => {
let contents = readFileAndRemoveBOM(entry.path);
if (entry.amdModuleId) {
contents = contents.replace(/^define\(/m, `define("${entry.amdModuleId}",`);
}
return {
path: entry.path,
contents: contents
};
};
const toPrepend = (prepend || []).map(toIFile);
mainResult.sources = toPrepend.concat(mainResult.sources);
return {
files: results,
usedPlugins: usedPlugins
};
}
function readFileAndRemoveBOM(path) {
const BOM_CHAR_CODE = 65279;
let contents = fs_1.default.readFileSync(path, 'utf8');
// Remove BOM
if (contents.charCodeAt(0) === BOM_CHAR_CODE) {
contents = contents.substring(1);
}
return contents;
}
function emitPlugin(entryPoint, plugin, pluginName, moduleName) {
let result = '';
if (typeof plugin.write === 'function') {
const write = ((what) => {
result += what;
});
write.getEntryPoint = () => {
return entryPoint;
};
write.asModule = (moduleId, code) => {
code = code.replace(/^define\(/, 'define("' + moduleId + '",');
result += code;
};
plugin.write(pluginName, moduleName, write);
}
return {
path: null,
contents: result
};
}
function emitNamedModule(moduleId, defineCallPosition, path, contents) {
// `defineCallPosition` is the position in code: |define()
const defineCallOffset = positionToOffset(contents, defineCallPosition.line, defineCallPosition.col);
// `parensOffset` is the position in code: define|()
const parensOffset = contents.indexOf('(', defineCallOffset);
const insertStr = '"' + moduleId + '", ';
return {
path: path,
contents: contents.substr(0, parensOffset + 1) + insertStr + contents.substr(parensOffset + 1)
};
}
function emitShimmedModule(moduleId, myDeps, factory, path, contents) {
const strDeps = (myDeps.length > 0 ? '"' + myDeps.join('", "') + '"' : '');
const strDefine = 'define("' + moduleId + '", [' + strDeps + '], ' + factory + ');';
return {
path: path,
contents: contents + '\n;\n' + strDefine
};
}
/**
* Convert a position (line:col) to (offset) in string `str`
*/
function positionToOffset(str, desiredLine, desiredCol) {
if (desiredLine === 1) {
return desiredCol - 1;
}
let line = 1;
let lastNewLineOffset = -1;
do {
if (desiredLine === line) {
return lastNewLineOffset + 1 + desiredCol - 1;
}
lastNewLineOffset = str.indexOf('\n', lastNewLineOffset + 1);
line++;
} while (lastNewLineOffset >= 0);
return -1;
}
/**
* Return a set of reachable nodes in `graph` starting from `rootNodes`
*/
function visit(rootNodes, graph) {
const result = {};
const queue = rootNodes;
rootNodes.forEach((node) => {
result[node] = true;
});
while (queue.length > 0) {
const el = queue.shift();
const myEdges = graph[el] || [];
myEdges.forEach((toNode) => {
if (!result[toNode]) {
result[toNode] = true;
queue.push(toNode);
}
});
}
return result;
}
/**
* Perform a topological sort on `graph`
*/
function topologicalSort(graph) {
const allNodes = {}, outgoingEdgeCount = {}, inverseEdges = {};
Object.keys(graph).forEach((fromNode) => {
allNodes[fromNode] = true;
outgoingEdgeCount[fromNode] = graph[fromNode].length;
graph[fromNode].forEach((toNode) => {
allNodes[toNode] = true;
outgoingEdgeCount[toNode] = outgoingEdgeCount[toNode] || 0;
inverseEdges[toNode] = inverseEdges[toNode] || [];
inverseEdges[toNode].push(fromNode);
});
});
// https://en.wikipedia.org/wiki/Topological_sorting
const S = [], L = [];
Object.keys(allNodes).forEach((node) => {
if (outgoingEdgeCount[node] === 0) {
delete outgoingEdgeCount[node];
S.push(node);
}
});
while (S.length > 0) {
// Ensure the exact same order all the time with the same inputs
S.sort();
const n = S.shift();
L.push(n);
const myInverseEdges = inverseEdges[n] || [];
myInverseEdges.forEach((m) => {
outgoingEdgeCount[m]--;
if (outgoingEdgeCount[m] === 0) {
delete outgoingEdgeCount[m];
S.push(m);
}
});
}
if (Object.keys(outgoingEdgeCount).length > 0) {
throw new Error('Cannot do topological sort on cyclic graph, remaining nodes: ' + Object.keys(outgoingEdgeCount));
}
return L;
}
//# sourceMappingURL=bundle.js.map
-618
View File
@@ -3,360 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import fs from 'fs';
import path from 'path';
import vm from 'vm';
interface IPosition {
line: number;
col: number;
}
interface IBuildModuleInfo {
id: string;
path: string;
defineLocation: IPosition | null;
dependencies: string[];
shim: string;
exports: any;
}
interface IBuildModuleInfoMap {
[moduleId: string]: IBuildModuleInfo;
}
interface ILoaderPlugin {
write(pluginName: string, moduleName: string, write: ILoaderPluginWriteFunc): void;
writeFile(pluginName: string, entryPoint: string, req: ILoaderPluginReqFunc, write: (filename: string, contents: string) => void, config: any): void;
finishBuild(write: (filename: string, contents: string) => void): void;
}
interface ILoaderPluginWriteFunc {
(something: string): void;
getEntryPoint(): string;
asModule(moduleId: string, code: string): void;
}
interface ILoaderPluginReqFunc {
(something: string): void;
toUrl(something: string): string;
}
export interface IExtraFile {
path: string;
amdModuleId?: string;
}
export interface IEntryPoint {
name: string;
include?: string[];
exclude?: string[];
/** @deprecated unsupported by ESM */
prepend?: IExtraFile[];
dest?: string;
}
interface IEntryPointMap {
[moduleId: string]: IEntryPoint;
}
export interface IGraph {
[node: string]: string[];
}
interface INodeSet {
[node: string]: boolean;
}
export interface IFile {
path: string | null;
contents: string;
}
export interface IConcatFile {
dest: string;
sources: IFile[];
}
export interface IBundleData {
graph: IGraph;
bundles: { [moduleId: string]: string[] };
}
export interface IBundleResult {
files: IConcatFile[];
cssInlinedResources: string[];
bundleData: IBundleData;
}
interface IPartialBundleResult {
files: IConcatFile[];
bundleData: IBundleData;
}
export interface ILoaderConfig {
isBuild?: boolean;
paths?: { [path: string]: any };
/*
* Normally, during a build, no module factories are invoked. This can be used
* to forcefully execute a module's factory.
*/
buildForceInvokeFactory: {
[moduleId: string]: boolean;
};
}
/**
* Bundle `entryPoints` given config `config`.
*/
export function bundle(entryPoints: IEntryPoint[], config: ILoaderConfig, callback: (err: any, result: IBundleResult | null) => void): void {
const entryPointsMap: IEntryPointMap = {};
entryPoints.forEach((module: IEntryPoint) => {
if (entryPointsMap[module.name]) {
throw new Error(`Cannot have two entry points with the same name '${module.name}'`);
}
entryPointsMap[module.name] = module;
});
const allMentionedModulesMap: { [modules: string]: boolean } = {};
entryPoints.forEach((module: IEntryPoint) => {
allMentionedModulesMap[module.name] = true;
module.include?.forEach(function (includedModule) {
allMentionedModulesMap[includedModule] = true;
});
module.exclude?.forEach(function (excludedModule) {
allMentionedModulesMap[excludedModule] = true;
});
});
const code = require('fs').readFileSync(path.join(__dirname, '../../src/vs/loader.js'));
const r: Function = <any>vm.runInThisContext('(function(require, module, exports) { ' + code + '\n});');
const loaderModule = { exports: {} };
r.call({}, require, loaderModule, loaderModule.exports);
const loader: any = loaderModule.exports;
config.isBuild = true;
config.paths = config.paths || {};
if (!config.paths['vs/css']) {
config.paths['vs/css'] = 'out-build/vs/css.build';
}
config.buildForceInvokeFactory = config.buildForceInvokeFactory || {};
config.buildForceInvokeFactory['vs/css'] = true;
loader.config(config);
loader(['require'], (localRequire: any) => {
const resolvePath = (entry: IExtraFile) => {
let r = localRequire.toUrl(entry.path);
if (!r.endsWith('.js')) {
r += '.js';
}
// avoid packaging the build version of plugins:
r = r.replace('vs/css.build.js', 'vs/css.js');
return { path: r, amdModuleId: entry.amdModuleId };
};
for (const moduleId in entryPointsMap) {
const entryPoint = entryPointsMap[moduleId];
if (entryPoint.prepend) {
entryPoint.prepend = entryPoint.prepend.map(resolvePath);
}
}
});
loader(Object.keys(allMentionedModulesMap), () => {
const modules = <IBuildModuleInfo[]>loader.getBuildInfo();
const partialResult = emitEntryPoints(modules, entryPointsMap);
const cssInlinedResources = loader('vs/css').getInlinedResources();
callback(null, {
files: partialResult.files,
cssInlinedResources: cssInlinedResources,
bundleData: partialResult.bundleData
});
}, (err: any) => callback(err, null));
}
function emitEntryPoints(modules: IBuildModuleInfo[], entryPoints: IEntryPointMap): IPartialBundleResult {
const modulesMap: IBuildModuleInfoMap = {};
modules.forEach((m: IBuildModuleInfo) => {
modulesMap[m.id] = m;
});
const modulesGraph: IGraph = {};
modules.forEach((m: IBuildModuleInfo) => {
modulesGraph[m.id] = m.dependencies;
});
const sortedModules = topologicalSort(modulesGraph);
let result: IConcatFile[] = [];
const usedPlugins: IPluginMap = {};
const bundleData: IBundleData = {
graph: modulesGraph,
bundles: {}
};
Object.keys(entryPoints).forEach((moduleToBundle: string) => {
const info = entryPoints[moduleToBundle];
const rootNodes = [moduleToBundle].concat(info.include || []);
const allDependencies = visit(rootNodes, modulesGraph);
const excludes: string[] = ['require', 'exports', 'module'].concat(info.exclude || []);
excludes.forEach((excludeRoot: string) => {
const allExcludes = visit([excludeRoot], modulesGraph);
Object.keys(allExcludes).forEach((exclude: string) => {
delete allDependencies[exclude];
});
});
const includedModules = sortedModules.filter((module: string) => {
return allDependencies[module];
});
bundleData.bundles[moduleToBundle] = includedModules;
const res = emitEntryPoint(
modulesMap,
modulesGraph,
moduleToBundle,
includedModules,
info.prepend || [],
info.dest
);
result = result.concat(res.files);
for (const pluginName in res.usedPlugins) {
usedPlugins[pluginName] = usedPlugins[pluginName] || res.usedPlugins[pluginName];
}
});
Object.keys(usedPlugins).forEach((pluginName: string) => {
const plugin = usedPlugins[pluginName];
if (typeof plugin.finishBuild === 'function') {
const write = (filename: string, contents: string) => {
result.push({
dest: filename,
sources: [{
path: null,
contents: contents
}]
});
};
plugin.finishBuild(write);
}
});
return {
// TODO@TS 2.1.2
files: extractStrings(removeAllDuplicateTSBoilerplate(result)),
bundleData: bundleData
};
}
function extractStrings(destFiles: IConcatFile[]): IConcatFile[] {
const parseDefineCall = (moduleMatch: string, depsMatch: string) => {
const module = moduleMatch.replace(/^"|"$/g, '');
let deps = depsMatch.split(',');
deps = deps.map((dep) => {
dep = dep.trim();
dep = dep.replace(/^"|"$/g, '');
dep = dep.replace(/^'|'$/g, '');
let prefix: string | null = null;
let _path: string | null = null;
const pieces = dep.split('!');
if (pieces.length > 1) {
prefix = pieces[0] + '!';
_path = pieces[1];
} else {
prefix = '';
_path = pieces[0];
}
if (/^\.\//.test(_path) || /^\.\.\//.test(_path)) {
const res = path.join(path.dirname(module), _path).replace(/\\/g, '/');
return prefix + res;
}
return prefix + _path;
});
return {
module: module,
deps: deps
};
};
destFiles.forEach((destFile) => {
if (!/\.js$/.test(destFile.dest)) {
return;
}
if (/\.nls\.js$/.test(destFile.dest)) {
return;
}
// Do one pass to record the usage counts for each module id
const useCounts: { [moduleId: string]: number } = {};
destFile.sources.forEach((source) => {
const matches = source.contents.match(/define\(("[^"]+"),\s*\[(((, )?("|')[^"']+("|'))+)\]/);
if (!matches) {
return;
}
const defineCall = parseDefineCall(matches[1], matches[2]);
useCounts[defineCall.module] = (useCounts[defineCall.module] || 0) + 1;
defineCall.deps.forEach((dep) => {
useCounts[dep] = (useCounts[dep] || 0) + 1;
});
});
const sortedByUseModules = Object.keys(useCounts);
sortedByUseModules.sort((a, b) => {
return useCounts[b] - useCounts[a];
});
const replacementMap: { [moduleId: string]: number } = {};
sortedByUseModules.forEach((module, index) => {
replacementMap[module] = index;
});
destFile.sources.forEach((source) => {
source.contents = source.contents.replace(/define\(("[^"]+"),\s*\[(((, )?("|')[^"']+("|'))+)\]/, (_, moduleMatch, depsMatch) => {
const defineCall = parseDefineCall(moduleMatch, depsMatch);
return `define(__m[${replacementMap[defineCall.module]}/*${defineCall.module}*/], __M([${defineCall.deps.map(dep => replacementMap[dep] + '/*' + dep + '*/').join(',')}])`;
});
});
destFile.sources.unshift({
path: null,
contents: [
'(function() {',
`var __m = ${JSON.stringify(sortedByUseModules)};`,
`var __M = function(deps) {`,
` var result = [];`,
` for (var i = 0, len = deps.length; i < len; i++) {`,
` result[i] = __m[deps[i]];`,
` }`,
` return result;`,
`};`
].join('\n')
});
destFile.sources.push({
path: null,
contents: '}).call(this);'
});
});
return destFiles;
}
function removeAllDuplicateTSBoilerplate(destFiles: IConcatFile[]): IConcatFile[] {
destFiles.forEach((destFile) => {
const SEEN_BOILERPLATE: boolean[] = [];
destFile.sources.forEach((source) => {
source.contents = removeDuplicateTSBoilerplate(source.contents, SEEN_BOILERPLATE);
});
});
return destFiles;
}
export function removeAllTSBoilerplate(source: string) {
const seen = new Array<boolean>(BOILERPLATE.length).fill(true, 0, BOILERPLATE.length);
return removeDuplicateTSBoilerplate(source, seen);
@@ -411,273 +63,3 @@ function removeDuplicateTSBoilerplate(source: string, SEEN_BOILERPLATE: boolean[
}
return newLines.join('\n');
}
interface IPluginMap {
[moduleId: string]: ILoaderPlugin;
}
interface IEmitEntryPointResult {
files: IConcatFile[];
usedPlugins: IPluginMap;
}
function emitEntryPoint(
modulesMap: IBuildModuleInfoMap,
deps: IGraph,
entryPoint: string,
includedModules: string[],
prepend: IExtraFile[],
dest: string | undefined
): IEmitEntryPointResult {
if (!dest) {
dest = entryPoint + '.js';
}
const mainResult: IConcatFile = {
sources: [],
dest: dest
},
results: IConcatFile[] = [mainResult];
const usedPlugins: IPluginMap = {};
const getLoaderPlugin = (pluginName: string): ILoaderPlugin => {
if (!usedPlugins[pluginName]) {
usedPlugins[pluginName] = modulesMap[pluginName].exports;
}
return usedPlugins[pluginName];
};
includedModules.forEach((c: string) => {
const bangIndex = c.indexOf('!');
if (bangIndex >= 0) {
const pluginName = c.substr(0, bangIndex);
const plugin = getLoaderPlugin(pluginName);
mainResult.sources.push(emitPlugin(entryPoint, plugin, pluginName, c.substr(bangIndex + 1)));
return;
}
const module = modulesMap[c];
if (module.path === 'empty:') {
return;
}
const contents = readFileAndRemoveBOM(module.path);
if (module.shim) {
mainResult.sources.push(emitShimmedModule(c, deps[c], module.shim, module.path, contents));
} else if (module.defineLocation) {
mainResult.sources.push(emitNamedModule(c, module.defineLocation, module.path, contents));
} else {
const moduleCopy = {
id: module.id,
path: module.path,
defineLocation: module.defineLocation,
dependencies: module.dependencies
};
throw new Error(`Cannot bundle module '${module.id}' for entry point '${entryPoint}' because it has no shim and it lacks a defineLocation: ${JSON.stringify(moduleCopy)}`);
}
});
Object.keys(usedPlugins).forEach((pluginName: string) => {
const plugin = usedPlugins[pluginName];
if (typeof plugin.writeFile === 'function') {
const req: ILoaderPluginReqFunc = <any>(() => {
throw new Error('no-no!');
});
req.toUrl = something => something;
const write = (filename: string, contents: string) => {
results.push({
dest: filename,
sources: [{
path: null,
contents: contents
}]
});
};
plugin.writeFile(pluginName, entryPoint, req, write, {});
}
});
const toIFile = (entry: IExtraFile): IFile => {
let contents = readFileAndRemoveBOM(entry.path);
if (entry.amdModuleId) {
contents = contents.replace(/^define\(/m, `define("${entry.amdModuleId}",`);
}
return {
path: entry.path,
contents: contents
};
};
const toPrepend = (prepend || []).map(toIFile);
mainResult.sources = toPrepend.concat(mainResult.sources);
return {
files: results,
usedPlugins: usedPlugins
};
}
function readFileAndRemoveBOM(path: string): string {
const BOM_CHAR_CODE = 65279;
let contents = fs.readFileSync(path, 'utf8');
// Remove BOM
if (contents.charCodeAt(0) === BOM_CHAR_CODE) {
contents = contents.substring(1);
}
return contents;
}
function emitPlugin(entryPoint: string, plugin: ILoaderPlugin, pluginName: string, moduleName: string): IFile {
let result = '';
if (typeof plugin.write === 'function') {
const write: ILoaderPluginWriteFunc = <any>((what: string) => {
result += what;
});
write.getEntryPoint = () => {
return entryPoint;
};
write.asModule = (moduleId: string, code: string) => {
code = code.replace(/^define\(/, 'define("' + moduleId + '",');
result += code;
};
plugin.write(pluginName, moduleName, write);
}
return {
path: null,
contents: result
};
}
function emitNamedModule(moduleId: string, defineCallPosition: IPosition, path: string, contents: string): IFile {
// `defineCallPosition` is the position in code: |define()
const defineCallOffset = positionToOffset(contents, defineCallPosition.line, defineCallPosition.col);
// `parensOffset` is the position in code: define|()
const parensOffset = contents.indexOf('(', defineCallOffset);
const insertStr = '"' + moduleId + '", ';
return {
path: path,
contents: contents.substr(0, parensOffset + 1) + insertStr + contents.substr(parensOffset + 1)
};
}
function emitShimmedModule(moduleId: string, myDeps: string[], factory: string, path: string, contents: string): IFile {
const strDeps = (myDeps.length > 0 ? '"' + myDeps.join('", "') + '"' : '');
const strDefine = 'define("' + moduleId + '", [' + strDeps + '], ' + factory + ');';
return {
path: path,
contents: contents + '\n;\n' + strDefine
};
}
/**
* Convert a position (line:col) to (offset) in string `str`
*/
function positionToOffset(str: string, desiredLine: number, desiredCol: number): number {
if (desiredLine === 1) {
return desiredCol - 1;
}
let line = 1;
let lastNewLineOffset = -1;
do {
if (desiredLine === line) {
return lastNewLineOffset + 1 + desiredCol - 1;
}
lastNewLineOffset = str.indexOf('\n', lastNewLineOffset + 1);
line++;
} while (lastNewLineOffset >= 0);
return -1;
}
/**
* Return a set of reachable nodes in `graph` starting from `rootNodes`
*/
function visit(rootNodes: string[], graph: IGraph): INodeSet {
const result: INodeSet = {};
const queue = rootNodes;
rootNodes.forEach((node) => {
result[node] = true;
});
while (queue.length > 0) {
const el = queue.shift();
const myEdges = graph[el!] || [];
myEdges.forEach((toNode) => {
if (!result[toNode]) {
result[toNode] = true;
queue.push(toNode);
}
});
}
return result;
}
/**
* Perform a topological sort on `graph`
*/
function topologicalSort(graph: IGraph): string[] {
const allNodes: INodeSet = {},
outgoingEdgeCount: { [node: string]: number } = {},
inverseEdges: IGraph = {};
Object.keys(graph).forEach((fromNode: string) => {
allNodes[fromNode] = true;
outgoingEdgeCount[fromNode] = graph[fromNode].length;
graph[fromNode].forEach((toNode) => {
allNodes[toNode] = true;
outgoingEdgeCount[toNode] = outgoingEdgeCount[toNode] || 0;
inverseEdges[toNode] = inverseEdges[toNode] || [];
inverseEdges[toNode].push(fromNode);
});
});
// https://en.wikipedia.org/wiki/Topological_sorting
const S: string[] = [],
L: string[] = [];
Object.keys(allNodes).forEach((node: string) => {
if (outgoingEdgeCount[node] === 0) {
delete outgoingEdgeCount[node];
S.push(node);
}
});
while (S.length > 0) {
// Ensure the exact same order all the time with the same inputs
S.sort();
const n: string = S.shift()!;
L.push(n);
const myInverseEdges = inverseEdges[n] || [];
myInverseEdges.forEach((m: string) => {
outgoingEdgeCount[m]--;
if (outgoingEdgeCount[m] === 0) {
delete outgoingEdgeCount[m];
S.push(m);
}
});
}
if (Object.keys(outgoingEdgeCount).length > 0) {
throw new Error('Cannot do topological sort on cyclic graph, remaining nodes: ' + Object.keys(outgoingEdgeCount));
}
return L;
}
+1
View File
@@ -41,6 +41,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.watchApiProposalNamesTask = exports.compileApiProposalNamesTask = void 0;
exports.createCompile = createCompile;
exports.transpileTask = transpileTask;
exports.compileTask = compileTask;
exports.watchTask = watchTask;
+1 -1
View File
@@ -49,7 +49,7 @@ interface ICompileTaskOptions {
readonly preserveEnglish: boolean;
}
function createCompile(src: string, { build, emitError, transpileOnly, preserveEnglish }: ICompileTaskOptions) {
export function createCompile(src: string, { build, emitError, transpileOnly, preserveEnglish }: ICompileTaskOptions) {
const tsb = require('./tsb') as typeof import('./tsb');
const sourcemaps = require('gulp-sourcemaps') as typeof import('gulp-sourcemaps');
+2 -2
View File
@@ -90,7 +90,7 @@ function darwinBundleDocumentType(extensions, icon, nameOrSuffix, utis) {
role: 'Editor',
ostypes: ['TEXT', 'utxt', 'TUTX', '****'],
extensions,
iconFile: 'resources/darwin/' + icon.toLowerCase() + '.icns', // <-- Void icon code.icns
iconFile: 'resources/darwin/' + icon.toLowerCase() + '.icns',
utis
};
}
@@ -215,7 +215,7 @@ exports.config = {
darwinForceDarkModeSupport: true,
darwinCredits: darwinCreditsTemplate ? Buffer.from(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : undefined,
linuxExecutableName: product.applicationName,
winIcon: 'resources/win32/code.ico', // <-- Void icon
winIcon: 'resources/win32/code.ico',
token: process.env['GITHUB_TOKEN'],
repo: product.electronRepository || undefined,
validateChecksum: true,
+2 -2
View File
@@ -68,7 +68,7 @@ function darwinBundleDocumentType(extensions: string[], icon: string, nameOrSuff
role: 'Editor',
ostypes: ['TEXT', 'utxt', 'TUTX', '****'],
extensions,
iconFile: 'resources/darwin/' + icon.toLowerCase() + '.icns', // <-- Void icon code.icns
iconFile: 'resources/darwin/' + icon.toLowerCase() + '.icns',
utis
};
}
@@ -196,7 +196,7 @@ export const config = {
darwinForceDarkModeSupport: true,
darwinCredits: darwinCreditsTemplate ? Buffer.from(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : undefined,
linuxExecutableName: product.applicationName,
winIcon: 'resources/win32/code.ico', // <-- Void icon
winIcon: 'resources/win32/code.ico',
token: process.env['GITHUB_TOKEN'],
repo: product.electronRepository || undefined,
validateChecksum: true,
+3 -2
View File
@@ -319,9 +319,10 @@ globalThis._VSCODE_NLS_LANGUAGE=${JSON.stringify(language.id)};`),
function processNlsFiles(opts) {
return (0, event_stream_1.through)(function (file) {
const fileName = path_1.default.basename(file.path);
if (fileName === 'bundleInfo.json') { // pick a root level file to put the core bundles (TODO@esm this file is not created anymore, pick another)
if (fileName === 'nls.keys.json') {
try {
const json = JSON.parse(fs_1.default.readFileSync(path_1.default.join(REPO_ROOT_PATH, opts.out, 'nls.keys.json')).toString());
const contents = file.contents.toString('utf8');
const json = JSON.parse(contents);
if (NLSKeysFormat.is(json)) {
processCoreBundleFormat(file.base, opts.fileHeader, opts.languages, json, this);
}
+3 -2
View File
@@ -387,9 +387,10 @@ globalThis._VSCODE_NLS_LANGUAGE=${JSON.stringify(language.id)};`),
export function processNlsFiles(opts: { out: string; fileHeader: string; languages: Language[] }): ThroughStream {
return through(function (this: ThroughStream, file: File) {
const fileName = path.basename(file.path);
if (fileName === 'bundleInfo.json') { // pick a root level file to put the core bundles (TODO@esm this file is not created anymore, pick another)
if (fileName === 'nls.keys.json') {
try {
const json = JSON.parse(fs.readFileSync(path.join(REPO_ROOT_PATH, opts.out, 'nls.keys.json')).toString());
const contents = file.contents.toString('utf8');
const json = JSON.parse(contents);
if (NLSKeysFormat.is(json)) {
processCoreBundleFormat(file.base, opts.fileHeader, opts.languages, json, this);
}
+4 -1
View File
@@ -79,9 +79,12 @@ const CORE_TYPES = [
'PerformanceMark',
'PerformanceObserver',
'ImportMeta',
'structuredClone',
// webcrypto has been available since Node.js 19, but still live in dom.d.ts
'Crypto',
'SubtleCrypto'
'SubtleCrypto',
'JsonWebKey',
'MessageEvent',
];
// Types that are defined in a common layer but are known to be only
// available in native environments should not be allowed in browser
+4 -1
View File
@@ -77,10 +77,13 @@ const CORE_TYPES = [
'PerformanceMark',
'PerformanceObserver',
'ImportMeta',
'structuredClone',
// webcrypto has been available since Node.js 19, but still live in dom.d.ts
'Crypto',
'SubtleCrypto'
'SubtleCrypto',
'JsonWebKey',
'MessageEvent',
];
// Types that are defined in a common layer but are known to be only
-7
View File
@@ -70,12 +70,6 @@ function bundleESMTask(opts) {
}
return entryPoint;
});
const allMentionedModules = new Set();
for (const entryPoint of entryPoints) {
allMentionedModules.add(entryPoint.name);
entryPoint.include?.forEach(allMentionedModules.add, allMentionedModules);
entryPoint.exclude?.forEach(allMentionedModules.add, allMentionedModules);
}
const bundleAsync = async () => {
const files = [];
const tasks = [];
@@ -127,7 +121,6 @@ function bundleESMTask(opts) {
};
const task = esbuild_1.default.build({
bundle: true,
external: entryPoint.exclude,
packages: 'external', // "external all the things", see https://esbuild.github.io/api/#packages
platform: 'neutral', // makes esm
format: 'esm',
-8
View File
@@ -62,13 +62,6 @@ function bundleESMTask(opts: IBundleESMTaskOpts): NodeJS.ReadWriteStream {
return entryPoint;
});
const allMentionedModules = new Set<string>();
for (const entryPoint of entryPoints) {
allMentionedModules.add(entryPoint.name);
entryPoint.include?.forEach(allMentionedModules.add, allMentionedModules);
entryPoint.exclude?.forEach(allMentionedModules.add, allMentionedModules);
}
const bundleAsync = async () => {
const files: VinylFile[] = [];
const tasks: Promise<any>[] = [];
@@ -129,7 +122,6 @@ function bundleESMTask(opts: IBundleESMTaskOpts): NodeJS.ReadWriteStream {
const task = esbuild.build({
bundle: true,
external: entryPoint.exclude,
packages: 'external', // "external all the things", see https://esbuild.github.io/api/#packages
platform: 'neutral', // makes esm
format: 'esm',
+393 -54
View File
@@ -27,7 +27,11 @@ function isNlsStringArray(value) {
}
var PolicyType;
(function (PolicyType) {
PolicyType[PolicyType["StringEnum"] = 0] = "StringEnum";
PolicyType["Boolean"] = "boolean";
PolicyType["Number"] = "number";
PolicyType["Object"] = "object";
PolicyType["String"] = "string";
PolicyType["StringEnum"] = "stringEnum";
})(PolicyType || (PolicyType = {}));
function renderADMLString(prefix, moduleName, nlsString, translations) {
let value;
@@ -42,15 +46,28 @@ function renderADMLString(prefix, moduleName, nlsString, translations) {
}
return `<string id="${prefix}_${nlsString.nlsKey.replace(/\./g, '_')}">${value}</string>`;
}
function renderProfileString(_prefix, moduleName, nlsString, translations) {
let value;
if (translations) {
const moduleTranslations = translations[moduleName];
if (moduleTranslations) {
value = moduleTranslations[nlsString.nlsKey];
}
}
if (!value) {
value = nlsString.value;
}
return value;
}
class BasePolicy {
policyType;
type;
name;
category;
minimumVersion;
description;
moduleName;
constructor(policyType, name, category, minimumVersion, description, moduleName) {
this.policyType = policyType;
constructor(type, name, category, minimumVersion, description, moduleName) {
this.type = type;
this.name = name;
this.category = category;
this.minimumVersion = minimumVersion;
@@ -80,17 +97,25 @@ class BasePolicy {
renderADMLPresentation() {
return `<presentation id="${this.name}">${this.renderADMLPresentationContents()}</presentation>`;
}
renderProfile() {
return [`<key>${this.name}</key>`, this.renderProfileValue()];
}
renderProfileManifest(translations) {
return `<dict>
${this.renderProfileManifestValue(translations)}
</dict>`;
}
}
class BooleanPolicy extends BasePolicy {
static from(name, category, minimumVersion, description, moduleName, settingNode) {
const type = getStringProperty(settingNode, 'type');
const type = getStringProperty(moduleName, settingNode, 'type');
if (type !== 'boolean') {
return undefined;
}
return new BooleanPolicy(name, category, minimumVersion, description, moduleName);
}
constructor(name, category, minimumVersion, description, moduleName) {
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
super(PolicyType.Boolean, name, category, minimumVersion, description, moduleName);
}
renderADMXElements() {
return [
@@ -102,19 +127,39 @@ class BooleanPolicy extends BasePolicy {
renderADMLPresentationContents() {
return `<checkBox refId="${this.name}">${this.name}</checkBox>`;
}
renderProfileValue() {
return `<false/>`;
}
renderProfileManifestValue(translations) {
return `<key>pfm_default</key>
<false/>
<key>pfm_description</key>
<string>${renderProfileString(this.name, this.moduleName, this.description, translations)}</string>
<key>pfm_name</key>
<string>${this.name}</string>
<key>pfm_title</key>
<string>${this.name}</string>
<key>pfm_type</key>
<string>boolean</string>`;
}
}
class IntPolicy extends BasePolicy {
class ParseError extends Error {
constructor(message, moduleName, node) {
super(`${message}. ${moduleName}.ts:${node.startPosition.row + 1}`);
}
}
class NumberPolicy extends BasePolicy {
defaultValue;
static from(name, category, minimumVersion, description, moduleName, settingNode) {
const type = getStringProperty(settingNode, 'type');
const type = getStringProperty(moduleName, settingNode, 'type');
if (type !== 'number') {
return undefined;
}
const defaultValue = getIntProperty(settingNode, 'default');
const defaultValue = getNumberProperty(moduleName, settingNode, 'default');
if (typeof defaultValue === 'undefined') {
throw new Error(`Missing required 'default' property.`);
throw new ParseError(`Missing required 'default' property.`, moduleName, settingNode);
}
return new IntPolicy(name, category, minimumVersion, description, moduleName, defaultValue);
return new NumberPolicy(name, category, minimumVersion, description, moduleName, defaultValue);
}
constructor(name, category, minimumVersion, description, moduleName, defaultValue) {
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
@@ -129,17 +174,32 @@ class IntPolicy extends BasePolicy {
renderADMLPresentationContents() {
return `<decimalTextBox refId="${this.name}" defaultValue="${this.defaultValue}">${this.name}</decimalTextBox>`;
}
renderProfileValue() {
return `<integer>${this.defaultValue}</integer>`;
}
renderProfileManifestValue(translations) {
return `<key>pfm_default</key>
<integer>${this.defaultValue}</integer>
<key>pfm_description</key>
<string>${renderProfileString(this.name, this.moduleName, this.description, translations)}</string>
<key>pfm_name</key>
<string>${this.name}</string>
<key>pfm_title</key>
<string>${this.name}</string>
<key>pfm_type</key>
<string>integer</string>`;
}
}
class StringPolicy extends BasePolicy {
static from(name, category, minimumVersion, description, moduleName, settingNode) {
const type = getStringProperty(settingNode, 'type');
const type = getStringProperty(moduleName, settingNode, 'type');
if (type !== 'string') {
return undefined;
}
return new StringPolicy(name, category, minimumVersion, description, moduleName);
}
constructor(name, category, minimumVersion, description, moduleName) {
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
super(PolicyType.String, name, category, minimumVersion, description, moduleName);
}
renderADMXElements() {
return [`<text id="${this.name}" valueName="${this.name}" required="true" />`];
@@ -147,17 +207,32 @@ class StringPolicy extends BasePolicy {
renderADMLPresentationContents() {
return `<textBox refId="${this.name}"><label>${this.name}:</label></textBox>`;
}
renderProfileValue() {
return `<string></string>`;
}
renderProfileManifestValue(translations) {
return `<key>pfm_default</key>
<string></string>
<key>pfm_description</key>
<string>${renderProfileString(this.name, this.moduleName, this.description, translations)}</string>
<key>pfm_name</key>
<string>${this.name}</string>
<key>pfm_title</key>
<string>${this.name}</string>
<key>pfm_type</key>
<string>string</string>`;
}
}
class ObjectPolicy extends BasePolicy {
static from(name, category, minimumVersion, description, moduleName, settingNode) {
const type = getStringProperty(settingNode, 'type');
const type = getStringProperty(moduleName, settingNode, 'type');
if (type !== 'object' && type !== 'array') {
return undefined;
}
return new ObjectPolicy(name, category, minimumVersion, description, moduleName);
}
constructor(name, category, minimumVersion, description, moduleName) {
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
super(PolicyType.Object, name, category, minimumVersion, description, moduleName);
}
renderADMXElements() {
return [`<multiText id="${this.name}" valueName="${this.name}" required="true" />`];
@@ -165,28 +240,44 @@ class ObjectPolicy extends BasePolicy {
renderADMLPresentationContents() {
return `<multiTextBox refId="${this.name}" />`;
}
renderProfileValue() {
return `<string></string>`;
}
renderProfileManifestValue(translations) {
return `<key>pfm_default</key>
<string></string>
<key>pfm_description</key>
<string>${renderProfileString(this.name, this.moduleName, this.description, translations)}</string>
<key>pfm_name</key>
<string>${this.name}</string>
<key>pfm_title</key>
<string>${this.name}</string>
<key>pfm_type</key>
<string>string</string>
`;
}
}
class StringEnumPolicy extends BasePolicy {
enum_;
enumDescriptions;
static from(name, category, minimumVersion, description, moduleName, settingNode) {
const type = getStringProperty(settingNode, 'type');
const type = getStringProperty(moduleName, settingNode, 'type');
if (type !== 'string') {
return undefined;
}
const enum_ = getStringArrayProperty(settingNode, 'enum');
const enum_ = getStringArrayProperty(moduleName, settingNode, 'enum');
if (!enum_) {
return undefined;
}
if (!isStringArray(enum_)) {
throw new Error(`Property 'enum' should not be localized.`);
throw new ParseError(`Property 'enum' should not be localized.`, moduleName, settingNode);
}
const enumDescriptions = getStringArrayProperty(settingNode, 'enumDescriptions');
const enumDescriptions = getStringArrayProperty(moduleName, settingNode, 'enumDescriptions');
if (!enumDescriptions) {
throw new Error(`Missing required 'enumDescriptions' property.`);
throw new ParseError(`Missing required 'enumDescriptions' property.`, moduleName, settingNode);
}
else if (!isNlsStringArray(enumDescriptions)) {
throw new Error(`Property 'enumDescriptions' should be localized.`);
throw new ParseError(`Property 'enumDescriptions' should be localized.`, moduleName, settingNode);
}
return new StringEnumPolicy(name, category, minimumVersion, description, moduleName, enum_, enumDescriptions);
}
@@ -211,8 +302,27 @@ class StringEnumPolicy extends BasePolicy {
renderADMLPresentationContents() {
return `<dropdownList refId="${this.name}" />`;
}
renderProfileValue() {
return `<string>${this.enum_[0]}</string>`;
}
renderProfileManifestValue(translations) {
return `<key>pfm_default</key>
<string>${this.enum_[0]}</string>
<key>pfm_description</key>
<string>${renderProfileString(this.name, this.moduleName, this.description, translations)}</string>
<key>pfm_name</key>
<string>${this.name}</string>
<key>pfm_title</key>
<string>${this.name}</string>
<key>pfm_type</key>
<string>string</string>
<key>pfm_range_list</key>
<array>
${this.enum_.map(e => `<string>${e}</string>`).join('\n ')}
</array>`;
}
}
const IntQ = {
const NumberQ = {
Q: `(number) @value`,
value(matches) {
const match = matches[0];
@@ -229,7 +339,16 @@ const IntQ = {
const StringQ = {
Q: `[
(string (string_fragment) @value)
(call_expression function: (identifier) @localizeFn arguments: (arguments (string (string_fragment) @nlsKey) (string (string_fragment) @value)) (#eq? @localizeFn localize))
(call_expression
function: [
(identifier) @localizeFn (#eq? @localizeFn localize)
(member_expression
object: (identifier) @nlsObj (#eq? @nlsObj nls)
property: (property_identifier) @localizeFn (#eq? @localizeFn localize)
)
]
arguments: (arguments (string (string_fragment) @nlsKey) (string (string_fragment) @value))
)
]`,
value(matches) {
const match = matches[0];
@@ -260,47 +379,53 @@ const StringArrayQ = {
});
}
};
function getProperty(qtype, node, key) {
function getProperty(qtype, moduleName, node, key) {
const query = new tree_sitter_1.default.Query(typescript, `(
(pair
key: [(property_identifier)(string)] @key
value: ${qtype.Q}
)
(#eq? @key ${key})
(#any-of? @key "${key}" "'${key}'")
)`);
return qtype.value(query.matches(node));
try {
const matches = query.matches(node).filter(m => m.captures[0].node.parent?.parent === node);
return qtype.value(matches);
}
catch (e) {
throw new ParseError(e.message, moduleName, node);
}
}
function getIntProperty(node, key) {
return getProperty(IntQ, node, key);
function getNumberProperty(moduleName, node, key) {
return getProperty(NumberQ, moduleName, node, key);
}
function getStringProperty(node, key) {
return getProperty(StringQ, node, key);
function getStringProperty(moduleName, node, key) {
return getProperty(StringQ, moduleName, node, key);
}
function getStringArrayProperty(node, key) {
return getProperty(StringArrayQ, node, key);
function getStringArrayProperty(moduleName, node, key) {
return getProperty(StringArrayQ, moduleName, node, key);
}
// TODO: add more policy types
const PolicyTypes = [
BooleanPolicy,
IntPolicy,
NumberPolicy,
StringEnumPolicy,
StringPolicy,
ObjectPolicy
];
function getPolicy(moduleName, configurationNode, settingNode, policyNode, categories) {
const name = getStringProperty(policyNode, 'name');
const name = getStringProperty(moduleName, policyNode, 'name');
if (!name) {
throw new Error(`Missing required 'name' property.`);
throw new ParseError(`Missing required 'name' property`, moduleName, policyNode);
}
else if (isNlsString(name)) {
throw new Error(`Property 'name' should be a literal string.`);
throw new ParseError(`Property 'name' should be a literal string`, moduleName, policyNode);
}
const categoryName = getStringProperty(configurationNode, 'title');
const categoryName = getStringProperty(moduleName, configurationNode, 'title');
if (!categoryName) {
throw new Error(`Missing required 'title' property.`);
throw new ParseError(`Missing required 'title' property`, moduleName, configurationNode);
}
else if (!isNlsString(categoryName)) {
throw new Error(`Property 'title' should be localized.`);
throw new ParseError(`Property 'title' should be localized`, moduleName, configurationNode);
}
const categoryKey = `${categoryName.nlsKey}:${categoryName.value}`;
let category = categories.get(categoryKey);
@@ -308,19 +433,19 @@ function getPolicy(moduleName, configurationNode, settingNode, policyNode, categ
category = { moduleName, name: categoryName };
categories.set(categoryKey, category);
}
const minimumVersion = getStringProperty(policyNode, 'minimumVersion');
const minimumVersion = getStringProperty(moduleName, policyNode, 'minimumVersion');
if (!minimumVersion) {
throw new Error(`Missing required 'minimumVersion' property.`);
throw new ParseError(`Missing required 'minimumVersion' property.`, moduleName, policyNode);
}
else if (isNlsString(minimumVersion)) {
throw new Error(`Property 'minimumVersion' should be a literal string.`);
throw new ParseError(`Property 'minimumVersion' should be a literal string.`, moduleName, policyNode);
}
const description = getStringProperty(settingNode, 'description');
const description = getStringProperty(moduleName, policyNode, 'description') ?? getStringProperty(moduleName, settingNode, 'description');
if (!description) {
throw new Error(`Missing required 'description' property.`);
throw new ParseError(`Missing required 'description' property.`, moduleName, settingNode);
}
if (!isNlsString(description)) {
throw new Error(`Property 'description' should be localized.`);
throw new ParseError(`Property 'description' should be localized.`, moduleName, settingNode);
}
let result;
for (const policyType of PolicyTypes) {
@@ -329,7 +454,7 @@ function getPolicy(moduleName, configurationNode, settingNode, policyNode, categ
}
}
if (!result) {
throw new Error(`Failed to parse policy '${name}'.`);
throw new ParseError(`Failed to parse policy '${name}'.`, moduleName, settingNode);
}
return result;
}
@@ -339,11 +464,11 @@ function getPolicies(moduleName, node) {
(call_expression
function: (member_expression property: (property_identifier) @registerConfigurationFn) (#eq? @registerConfigurationFn registerConfiguration)
arguments: (arguments (object (pair
key: [(property_identifier)(string)] @propertiesKey (#eq? @propertiesKey properties)
key: [(property_identifier)(string)] @propertiesKey (#any-of? @propertiesKey "properties" "'properties'")
value: (object (pair
key: [(property_identifier)(string)(computed_property_name)]
value: (object (pair
key: [(property_identifier)(string)] @policyKey (#eq? @policyKey policy)
key: [(property_identifier)(string)] @policyKey (#any-of? @policyKey "policy" "'policy'")
value: (object) @policy
)) @setting
))
@@ -400,8 +525,8 @@ function renderADML(appName, versions, categories, policies, translations) {
<resources>
<stringTable>
<string id="Application">${appName}</string>
${versions.map(v => `<string id="Supported_${v.replace(/\./g, '_')}">${appName} &gt;= ${v}</string>`)}
${categories.map(c => renderADMLString('Category', c.moduleName, c.name, translations))}
${versions.map(v => `<string id="Supported_${v.replace(/\./g, '_')}">${appName} &gt;= ${v}</string>`).join(`\n `)}
${categories.map(c => renderADMLString('Category', c.moduleName, c.name, translations)).join(`\n `)}
${policies.map(p => p.renderADMLStrings(translations)).flat().join(`\n `)}
</stringTable>
<presentationTable>
@@ -411,6 +536,186 @@ function renderADML(appName, versions, categories, policies, translations) {
</policyDefinitionResources>
`;
}
function renderProfileManifest(appName, bundleIdentifier, _versions, _categories, policies, translations) {
const requiredPayloadFields = `
<dict>
<key>pfm_default</key>
<string>Configure ${appName}</string>
<key>pfm_name</key>
<string>PayloadDescription</string>
<key>pfm_title</key>
<string>Payload Description</string>
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_default</key>
<string>${appName}</string>
<key>pfm_name</key>
<string>PayloadDisplayName</string>
<key>pfm_require</key>
<string>always</string>
<key>pfm_title</key>
<string>Payload Display Name</string>
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_default</key>
<string>${bundleIdentifier}</string>
<key>pfm_name</key>
<string>PayloadIdentifier</string>
<key>pfm_require</key>
<string>always</string>
<key>pfm_title</key>
<string>Payload Identifier</string>
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_default</key>
<string>${bundleIdentifier}</string>
<key>pfm_name</key>
<string>PayloadType</string>
<key>pfm_require</key>
<string>always</string>
<key>pfm_title</key>
<string>Payload Type</string>
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_default</key>
<string></string>
<key>pfm_name</key>
<string>PayloadUUID</string>
<key>pfm_require</key>
<string>always</string>
<key>pfm_title</key>
<string>Payload UUID</string>
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_default</key>
<integer>1</integer>
<key>pfm_name</key>
<string>PayloadVersion</string>
<key>pfm_range_list</key>
<array>
<integer>1</integer>
</array>
<key>pfm_require</key>
<string>always</string>
<key>pfm_title</key>
<string>Payload Version</string>
<key>pfm_type</key>
<string>integer</string>
</dict>
<dict>
<key>pfm_default</key>
<string>Microsoft</string>
<key>pfm_name</key>
<string>PayloadOrganization</string>
<key>pfm_title</key>
<string>Payload Organization</string>
<key>pfm_type</key>
<string>string</string>
</dict>`;
const profileManifestSubkeys = policies.map(policy => {
return policy.renderProfileManifest(translations);
}).join('');
return `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>pfm_app_url</key>
<string>https://code.visualstudio.com/</string>
<key>pfm_description</key>
<string>${appName} Managed Settings</string>
<key>pfm_documentation_url</key>
<string>https://code.visualstudio.com/docs/setup/enterprise</string>
<key>pfm_domain</key>
<string>${bundleIdentifier}</string>
<key>pfm_format_version</key>
<integer>1</integer>
<key>pfm_interaction</key>
<string>combined</string>
<key>pfm_last_modified</key>
<date>${new Date().toISOString().replace(/\.\d+Z$/, 'Z')}</date>
<key>pfm_platforms</key>
<array>
<string>macOS</string>
</array>
<key>pfm_subkeys</key>
<array>
${requiredPayloadFields}
${profileManifestSubkeys}
</array>
<key>pfm_title</key>
<string>${appName}</string>
<key>pfm_unique</key>
<true/>
<key>pfm_version</key>
<integer>1</integer>
</dict>
</plist>`;
}
function renderMacOSPolicy(policies, translations) {
const appName = product.nameLong;
const bundleIdentifier = product.darwinBundleIdentifier;
const payloadUUID = product.darwinProfilePayloadUUID;
const UUID = product.darwinProfileUUID;
const versions = [...new Set(policies.map(p => p.minimumVersion)).values()].sort();
const categories = [...new Set(policies.map(p => p.category))];
const policyEntries = policies.map(policy => policy.renderProfile())
.flat()
.map(entry => `\t\t\t\t${entry}`)
.join('\n');
return {
profile: `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDisplayName</key>
<string>${appName}</string>
<key>PayloadIdentifier</key>
<string>${bundleIdentifier}.${UUID}</string>
<key>PayloadType</key>
<string>${bundleIdentifier}</string>
<key>PayloadUUID</key>
<string>${UUID}</string>
<key>PayloadVersion</key>
<integer>1</integer>
${policyEntries}
</dict>
</array>
<key>PayloadDescription</key>
<string>This profile manages ${appName}. For more information see https://code.visualstudio.com/docs/setup/enterprise</string>
<key>PayloadDisplayName</key>
<string>${appName}</string>
<key>PayloadIdentifier</key>
<string>${bundleIdentifier}</string>
<key>PayloadOrganization</key>
<string>Microsoft</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>${payloadUUID}</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>TargetDeviceType</key>
<integer>5</integer>
</dict>
</plist>`,
manifests: [{ languageId: 'en-us', contents: renderProfileManifest(appName, bundleIdentifier, versions, categories, policies) },
...translations.map(({ languageId, languageTranslations }) => ({ languageId, contents: renderProfileManifest(appName, bundleIdentifier, versions, categories, policies, languageTranslations) }))
]
};
}
function renderGP(policies, translations) {
const appName = product.nameLong;
const regKey = product.win32RegValueName;
@@ -526,10 +831,9 @@ async function getTranslations() {
return await Promise.all(languageIds.map(languageId => getNLS(extensionGalleryServiceUrl, resourceUrlTemplate, languageId, version)
.then(languageTranslations => ({ languageId, languageTranslations }))));
}
async function main() {
const [policies, translations] = await Promise.all([parsePolicies(), getTranslations()]);
const { admx, adml } = await renderGP(policies, translations);
async function windowsMain(policies, translations) {
const root = '.build/policies/win32';
const { admx, adml } = await renderGP(policies, translations);
await fs_1.promises.rm(root, { recursive: true, force: true });
await fs_1.promises.mkdir(root, { recursive: true });
await fs_1.promises.writeFile(path_1.default.join(root, `${product.win32RegValueName}.admx`), admx.replace(/\r?\n/g, '\n'));
@@ -539,9 +843,44 @@ async function main() {
await fs_1.promises.writeFile(path_1.default.join(languagePath, `${product.win32RegValueName}.adml`), contents.replace(/\r?\n/g, '\n'));
}
}
async function darwinMain(policies, translations) {
const bundleIdentifier = product.darwinBundleIdentifier;
if (!bundleIdentifier || !product.darwinProfilePayloadUUID || !product.darwinProfileUUID) {
throw new Error(`Missing required product information.`);
}
const root = '.build/policies/darwin';
const { profile, manifests } = await renderMacOSPolicy(policies, translations);
await fs_1.promises.rm(root, { recursive: true, force: true });
await fs_1.promises.mkdir(root, { recursive: true });
await fs_1.promises.writeFile(path_1.default.join(root, `${bundleIdentifier}.mobileconfig`), profile.replace(/\r?\n/g, '\n'));
for (const { languageId, contents } of manifests) {
const languagePath = path_1.default.join(root, languageId === 'en-us' ? 'en-us' : Languages[languageId]);
await fs_1.promises.mkdir(languagePath, { recursive: true });
await fs_1.promises.writeFile(path_1.default.join(languagePath, `${bundleIdentifier}.plist`), contents.replace(/\r?\n/g, '\n'));
}
}
async function main() {
const [policies, translations] = await Promise.all([parsePolicies(), getTranslations()]);
const platform = process.argv[2];
if (platform === 'darwin') {
await darwinMain(policies, translations);
}
else if (platform === 'win32') {
await windowsMain(policies, translations);
}
else {
console.error(`Usage: node build/lib/policies <darwin|win32>`);
process.exit(1);
}
}
if (require.main === module) {
main().catch(err => {
console.error(err);
if (err instanceof ParseError) {
console.error(`Parse Error:`, err.message);
}
else {
console.error(err);
}
process.exit(1);
});
}
+431 -54
View File
@@ -33,15 +33,24 @@ interface Category {
}
enum PolicyType {
StringEnum
Boolean = 'boolean',
Number = 'number',
Object = 'object',
String = 'string',
StringEnum = 'stringEnum',
}
interface Policy {
readonly name: string;
readonly type: PolicyType;
readonly category: Category;
readonly minimumVersion: string;
renderADMX(regKey: string): string[];
renderADMLStrings(translations?: LanguageTranslations): string[];
renderADMLPresentation(): string;
renderProfile(): string[];
// https://github.com/ProfileManifests/ProfileManifests/wiki/Manifest-Format
renderProfileManifest(translations?: LanguageTranslations): string;
}
function renderADMLString(prefix: string, moduleName: string, nlsString: NlsString, translations?: LanguageTranslations): string {
@@ -62,10 +71,28 @@ function renderADMLString(prefix: string, moduleName: string, nlsString: NlsStri
return `<string id="${prefix}_${nlsString.nlsKey.replace(/\./g, '_')}">${value}</string>`;
}
function renderProfileString(_prefix: string, moduleName: string, nlsString: NlsString, translations?: LanguageTranslations): string {
let value: string | undefined;
if (translations) {
const moduleTranslations = translations[moduleName];
if (moduleTranslations) {
value = moduleTranslations[nlsString.nlsKey];
}
}
if (!value) {
value = nlsString.value;
}
return value;
}
abstract class BasePolicy implements Policy {
constructor(
protected policyType: PolicyType,
protected name: string,
readonly type: PolicyType,
readonly name: string,
readonly category: Category,
readonly minimumVersion: string,
protected description: NlsString,
@@ -102,6 +129,19 @@ abstract class BasePolicy implements Policy {
}
protected abstract renderADMLPresentationContents(): string;
renderProfile() {
return [`<key>${this.name}</key>`, this.renderProfileValue()];
}
renderProfileManifest(translations?: LanguageTranslations): string {
return `<dict>
${this.renderProfileManifestValue(translations)}
</dict>`;
}
abstract renderProfileValue(): string;
abstract renderProfileManifestValue(translations?: LanguageTranslations): string;
}
class BooleanPolicy extends BasePolicy {
@@ -114,7 +154,7 @@ class BooleanPolicy extends BasePolicy {
moduleName: string,
settingNode: Parser.SyntaxNode
): BooleanPolicy | undefined {
const type = getStringProperty(settingNode, 'type');
const type = getStringProperty(moduleName, settingNode, 'type');
if (type !== 'boolean') {
return undefined;
@@ -130,7 +170,7 @@ class BooleanPolicy extends BasePolicy {
description: NlsString,
moduleName: string,
) {
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
super(PolicyType.Boolean, name, category, minimumVersion, description, moduleName);
}
protected renderADMXElements(): string[] {
@@ -144,9 +184,32 @@ class BooleanPolicy extends BasePolicy {
renderADMLPresentationContents() {
return `<checkBox refId="${this.name}">${this.name}</checkBox>`;
}
renderProfileValue(): string {
return `<false/>`;
}
renderProfileManifestValue(translations?: LanguageTranslations): string {
return `<key>pfm_default</key>
<false/>
<key>pfm_description</key>
<string>${renderProfileString(this.name, this.moduleName, this.description, translations)}</string>
<key>pfm_name</key>
<string>${this.name}</string>
<key>pfm_title</key>
<string>${this.name}</string>
<key>pfm_type</key>
<string>boolean</string>`;
}
}
class IntPolicy extends BasePolicy {
class ParseError extends Error {
constructor(message: string, moduleName: string, node: Parser.SyntaxNode) {
super(`${message}. ${moduleName}.ts:${node.startPosition.row + 1}`);
}
}
class NumberPolicy extends BasePolicy {
static from(
name: string,
@@ -155,20 +218,20 @@ class IntPolicy extends BasePolicy {
description: NlsString,
moduleName: string,
settingNode: Parser.SyntaxNode
): IntPolicy | undefined {
const type = getStringProperty(settingNode, 'type');
): NumberPolicy | undefined {
const type = getStringProperty(moduleName, settingNode, 'type');
if (type !== 'number') {
return undefined;
}
const defaultValue = getIntProperty(settingNode, 'default');
const defaultValue = getNumberProperty(moduleName, settingNode, 'default');
if (typeof defaultValue === 'undefined') {
throw new Error(`Missing required 'default' property.`);
throw new ParseError(`Missing required 'default' property.`, moduleName, settingNode);
}
return new IntPolicy(name, category, minimumVersion, description, moduleName, defaultValue);
return new NumberPolicy(name, category, minimumVersion, description, moduleName, defaultValue);
}
private constructor(
@@ -192,6 +255,23 @@ class IntPolicy extends BasePolicy {
renderADMLPresentationContents() {
return `<decimalTextBox refId="${this.name}" defaultValue="${this.defaultValue}">${this.name}</decimalTextBox>`;
}
renderProfileValue() {
return `<integer>${this.defaultValue}</integer>`;
}
renderProfileManifestValue(translations?: LanguageTranslations) {
return `<key>pfm_default</key>
<integer>${this.defaultValue}</integer>
<key>pfm_description</key>
<string>${renderProfileString(this.name, this.moduleName, this.description, translations)}</string>
<key>pfm_name</key>
<string>${this.name}</string>
<key>pfm_title</key>
<string>${this.name}</string>
<key>pfm_type</key>
<string>integer</string>`;
}
}
class StringPolicy extends BasePolicy {
@@ -204,7 +284,7 @@ class StringPolicy extends BasePolicy {
moduleName: string,
settingNode: Parser.SyntaxNode
): StringPolicy | undefined {
const type = getStringProperty(settingNode, 'type');
const type = getStringProperty(moduleName, settingNode, 'type');
if (type !== 'string') {
return undefined;
@@ -220,7 +300,7 @@ class StringPolicy extends BasePolicy {
description: NlsString,
moduleName: string,
) {
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
super(PolicyType.String, name, category, minimumVersion, description, moduleName);
}
protected renderADMXElements(): string[] {
@@ -230,6 +310,23 @@ class StringPolicy extends BasePolicy {
renderADMLPresentationContents() {
return `<textBox refId="${this.name}"><label>${this.name}:</label></textBox>`;
}
renderProfileValue(): string {
return `<string></string>`;
}
renderProfileManifestValue(translations?: LanguageTranslations): string {
return `<key>pfm_default</key>
<string></string>
<key>pfm_description</key>
<string>${renderProfileString(this.name, this.moduleName, this.description, translations)}</string>
<key>pfm_name</key>
<string>${this.name}</string>
<key>pfm_title</key>
<string>${this.name}</string>
<key>pfm_type</key>
<string>string</string>`;
}
}
class ObjectPolicy extends BasePolicy {
@@ -242,7 +339,7 @@ class ObjectPolicy extends BasePolicy {
moduleName: string,
settingNode: Parser.SyntaxNode
): ObjectPolicy | undefined {
const type = getStringProperty(settingNode, 'type');
const type = getStringProperty(moduleName, settingNode, 'type');
if (type !== 'object' && type !== 'array') {
return undefined;
@@ -258,7 +355,7 @@ class ObjectPolicy extends BasePolicy {
description: NlsString,
moduleName: string,
) {
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
super(PolicyType.Object, name, category, minimumVersion, description, moduleName);
}
protected renderADMXElements(): string[] {
@@ -268,6 +365,24 @@ class ObjectPolicy extends BasePolicy {
renderADMLPresentationContents() {
return `<multiTextBox refId="${this.name}" />`;
}
renderProfileValue(): string {
return `<string></string>`;
}
renderProfileManifestValue(translations?: LanguageTranslations): string {
return `<key>pfm_default</key>
<string></string>
<key>pfm_description</key>
<string>${renderProfileString(this.name, this.moduleName, this.description, translations)}</string>
<key>pfm_name</key>
<string>${this.name}</string>
<key>pfm_title</key>
<string>${this.name}</string>
<key>pfm_type</key>
<string>string</string>
`;
}
}
class StringEnumPolicy extends BasePolicy {
@@ -280,28 +395,28 @@ class StringEnumPolicy extends BasePolicy {
moduleName: string,
settingNode: Parser.SyntaxNode
): StringEnumPolicy | undefined {
const type = getStringProperty(settingNode, 'type');
const type = getStringProperty(moduleName, settingNode, 'type');
if (type !== 'string') {
return undefined;
}
const enum_ = getStringArrayProperty(settingNode, 'enum');
const enum_ = getStringArrayProperty(moduleName, settingNode, 'enum');
if (!enum_) {
return undefined;
}
if (!isStringArray(enum_)) {
throw new Error(`Property 'enum' should not be localized.`);
throw new ParseError(`Property 'enum' should not be localized.`, moduleName, settingNode);
}
const enumDescriptions = getStringArrayProperty(settingNode, 'enumDescriptions');
const enumDescriptions = getStringArrayProperty(moduleName, settingNode, 'enumDescriptions');
if (!enumDescriptions) {
throw new Error(`Missing required 'enumDescriptions' property.`);
throw new ParseError(`Missing required 'enumDescriptions' property.`, moduleName, settingNode);
} else if (!isNlsStringArray(enumDescriptions)) {
throw new Error(`Property 'enumDescriptions' should be localized.`);
throw new ParseError(`Property 'enumDescriptions' should be localized.`, moduleName, settingNode);
}
return new StringEnumPolicy(name, category, minimumVersion, description, moduleName, enum_, enumDescriptions);
@@ -337,6 +452,27 @@ class StringEnumPolicy extends BasePolicy {
renderADMLPresentationContents() {
return `<dropdownList refId="${this.name}" />`;
}
renderProfileValue() {
return `<string>${this.enum_[0]}</string>`;
}
renderProfileManifestValue(translations?: LanguageTranslations): string {
return `<key>pfm_default</key>
<string>${this.enum_[0]}</string>
<key>pfm_description</key>
<string>${renderProfileString(this.name, this.moduleName, this.description, translations)}</string>
<key>pfm_name</key>
<string>${this.name}</string>
<key>pfm_title</key>
<string>${this.name}</string>
<key>pfm_type</key>
<string>string</string>
<key>pfm_range_list</key>
<array>
${this.enum_.map(e => `<string>${e}</string>`).join('\n ')}
</array>`;
}
}
interface QType<T> {
@@ -344,7 +480,7 @@ interface QType<T> {
value(matches: Parser.QueryMatch[]): T | undefined;
}
const IntQ: QType<number> = {
const NumberQ: QType<number> = {
Q: `(number) @value`,
value(matches: Parser.QueryMatch[]): number | undefined {
@@ -367,7 +503,16 @@ const IntQ: QType<number> = {
const StringQ: QType<string | NlsString> = {
Q: `[
(string (string_fragment) @value)
(call_expression function: (identifier) @localizeFn arguments: (arguments (string (string_fragment) @nlsKey) (string (string_fragment) @value)) (#eq? @localizeFn localize))
(call_expression
function: [
(identifier) @localizeFn (#eq? @localizeFn localize)
(member_expression
object: (identifier) @nlsObj (#eq? @nlsObj nls)
property: (property_identifier) @localizeFn (#eq? @localizeFn localize)
)
]
arguments: (arguments (string (string_fragment) @nlsKey) (string (string_fragment) @value))
)
]`,
value(matches: Parser.QueryMatch[]): string | NlsString | undefined {
@@ -407,7 +552,7 @@ const StringArrayQ: QType<(string | NlsString)[]> = {
}
};
function getProperty<T>(qtype: QType<T>, node: Parser.SyntaxNode, key: string): T | undefined {
function getProperty<T>(qtype: QType<T>, moduleName: string, node: Parser.SyntaxNode, key: string): T | undefined {
const query = new Parser.Query(
typescript,
`(
@@ -415,29 +560,34 @@ function getProperty<T>(qtype: QType<T>, node: Parser.SyntaxNode, key: string):
key: [(property_identifier)(string)] @key
value: ${qtype.Q}
)
(#eq? @key ${key})
(#any-of? @key "${key}" "'${key}'")
)`
);
return qtype.value(query.matches(node));
try {
const matches = query.matches(node).filter(m => m.captures[0].node.parent?.parent === node);
return qtype.value(matches);
} catch (e) {
throw new ParseError(e.message, moduleName, node);
}
}
function getIntProperty(node: Parser.SyntaxNode, key: string): number | undefined {
return getProperty(IntQ, node, key);
function getNumberProperty(moduleName: string, node: Parser.SyntaxNode, key: string): number | undefined {
return getProperty(NumberQ, moduleName, node, key);
}
function getStringProperty(node: Parser.SyntaxNode, key: string): string | NlsString | undefined {
return getProperty(StringQ, node, key);
function getStringProperty(moduleName: string, node: Parser.SyntaxNode, key: string): string | NlsString | undefined {
return getProperty(StringQ, moduleName, node, key);
}
function getStringArrayProperty(node: Parser.SyntaxNode, key: string): (string | NlsString)[] | undefined {
return getProperty(StringArrayQ, node, key);
function getStringArrayProperty(moduleName: string, node: Parser.SyntaxNode, key: string): (string | NlsString)[] | undefined {
return getProperty(StringArrayQ, moduleName, node, key);
}
// TODO: add more policy types
const PolicyTypes = [
BooleanPolicy,
IntPolicy,
NumberPolicy,
StringEnumPolicy,
StringPolicy,
ObjectPolicy
@@ -450,20 +600,20 @@ function getPolicy(
policyNode: Parser.SyntaxNode,
categories: Map<string, Category>
): Policy {
const name = getStringProperty(policyNode, 'name');
const name = getStringProperty(moduleName, policyNode, 'name');
if (!name) {
throw new Error(`Missing required 'name' property.`);
throw new ParseError(`Missing required 'name' property`, moduleName, policyNode);
} else if (isNlsString(name)) {
throw new Error(`Property 'name' should be a literal string.`);
throw new ParseError(`Property 'name' should be a literal string`, moduleName, policyNode);
}
const categoryName = getStringProperty(configurationNode, 'title');
const categoryName = getStringProperty(moduleName, configurationNode, 'title');
if (!categoryName) {
throw new Error(`Missing required 'title' property.`);
throw new ParseError(`Missing required 'title' property`, moduleName, configurationNode);
} else if (!isNlsString(categoryName)) {
throw new Error(`Property 'title' should be localized.`);
throw new ParseError(`Property 'title' should be localized`, moduleName, configurationNode);
}
const categoryKey = `${categoryName.nlsKey}:${categoryName.value}`;
@@ -474,20 +624,20 @@ function getPolicy(
categories.set(categoryKey, category);
}
const minimumVersion = getStringProperty(policyNode, 'minimumVersion');
const minimumVersion = getStringProperty(moduleName, policyNode, 'minimumVersion');
if (!minimumVersion) {
throw new Error(`Missing required 'minimumVersion' property.`);
throw new ParseError(`Missing required 'minimumVersion' property.`, moduleName, policyNode);
} else if (isNlsString(minimumVersion)) {
throw new Error(`Property 'minimumVersion' should be a literal string.`);
throw new ParseError(`Property 'minimumVersion' should be a literal string.`, moduleName, policyNode);
}
const description = getStringProperty(settingNode, 'description');
const description = getStringProperty(moduleName, policyNode, 'description') ?? getStringProperty(moduleName, settingNode, 'description');
if (!description) {
throw new Error(`Missing required 'description' property.`);
throw new ParseError(`Missing required 'description' property.`, moduleName, settingNode);
} if (!isNlsString(description)) {
throw new Error(`Property 'description' should be localized.`);
throw new ParseError(`Property 'description' should be localized.`, moduleName, settingNode);
}
let result: Policy | undefined;
@@ -499,7 +649,7 @@ function getPolicy(
}
if (!result) {
throw new Error(`Failed to parse policy '${name}'.`);
throw new ParseError(`Failed to parse policy '${name}'.`, moduleName, settingNode);
}
return result;
@@ -511,11 +661,11 @@ function getPolicies(moduleName: string, node: Parser.SyntaxNode): Policy[] {
(call_expression
function: (member_expression property: (property_identifier) @registerConfigurationFn) (#eq? @registerConfigurationFn registerConfiguration)
arguments: (arguments (object (pair
key: [(property_identifier)(string)] @propertiesKey (#eq? @propertiesKey properties)
key: [(property_identifier)(string)] @propertiesKey (#any-of? @propertiesKey "properties" "'properties'")
value: (object (pair
key: [(property_identifier)(string)(computed_property_name)]
value: (object (pair
key: [(property_identifier)(string)] @policyKey (#eq? @policyKey policy)
key: [(property_identifier)(string)] @policyKey (#any-of? @policyKey "policy" "'policy'")
value: (object) @policy
)) @setting
))
@@ -578,8 +728,8 @@ function renderADML(appName: string, versions: string[], categories: Category[],
<resources>
<stringTable>
<string id="Application">${appName}</string>
${versions.map(v => `<string id="Supported_${v.replace(/\./g, '_')}">${appName} &gt;= ${v}</string>`)}
${categories.map(c => renderADMLString('Category', c.moduleName, c.name, translations))}
${versions.map(v => `<string id="Supported_${v.replace(/\./g, '_')}">${appName} &gt;= ${v}</string>`).join(`\n `)}
${categories.map(c => renderADMLString('Category', c.moduleName, c.name, translations)).join(`\n `)}
${policies.map(p => p.renderADMLStrings(translations)).flat().join(`\n `)}
</stringTable>
<presentationTable>
@@ -590,6 +740,197 @@ function renderADML(appName: string, versions: string[], categories: Category[],
`;
}
function renderProfileManifest(appName: string, bundleIdentifier: string, _versions: string[], _categories: Category[], policies: Policy[], translations?: LanguageTranslations) {
const requiredPayloadFields = `
<dict>
<key>pfm_default</key>
<string>Configure ${appName}</string>
<key>pfm_name</key>
<string>PayloadDescription</string>
<key>pfm_title</key>
<string>Payload Description</string>
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_default</key>
<string>${appName}</string>
<key>pfm_name</key>
<string>PayloadDisplayName</string>
<key>pfm_require</key>
<string>always</string>
<key>pfm_title</key>
<string>Payload Display Name</string>
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_default</key>
<string>${bundleIdentifier}</string>
<key>pfm_name</key>
<string>PayloadIdentifier</string>
<key>pfm_require</key>
<string>always</string>
<key>pfm_title</key>
<string>Payload Identifier</string>
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_default</key>
<string>${bundleIdentifier}</string>
<key>pfm_name</key>
<string>PayloadType</string>
<key>pfm_require</key>
<string>always</string>
<key>pfm_title</key>
<string>Payload Type</string>
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_default</key>
<string></string>
<key>pfm_name</key>
<string>PayloadUUID</string>
<key>pfm_require</key>
<string>always</string>
<key>pfm_title</key>
<string>Payload UUID</string>
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_default</key>
<integer>1</integer>
<key>pfm_name</key>
<string>PayloadVersion</string>
<key>pfm_range_list</key>
<array>
<integer>1</integer>
</array>
<key>pfm_require</key>
<string>always</string>
<key>pfm_title</key>
<string>Payload Version</string>
<key>pfm_type</key>
<string>integer</string>
</dict>
<dict>
<key>pfm_default</key>
<string>Microsoft</string>
<key>pfm_name</key>
<string>PayloadOrganization</string>
<key>pfm_title</key>
<string>Payload Organization</string>
<key>pfm_type</key>
<string>string</string>
</dict>`;
const profileManifestSubkeys = policies.map(policy => {
return policy.renderProfileManifest(translations);
}).join('');
return `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>pfm_app_url</key>
<string>https://code.visualstudio.com/</string>
<key>pfm_description</key>
<string>${appName} Managed Settings</string>
<key>pfm_documentation_url</key>
<string>https://code.visualstudio.com/docs/setup/enterprise</string>
<key>pfm_domain</key>
<string>${bundleIdentifier}</string>
<key>pfm_format_version</key>
<integer>1</integer>
<key>pfm_interaction</key>
<string>combined</string>
<key>pfm_last_modified</key>
<date>${new Date().toISOString().replace(/\.\d+Z$/, 'Z')}</date>
<key>pfm_platforms</key>
<array>
<string>macOS</string>
</array>
<key>pfm_subkeys</key>
<array>
${requiredPayloadFields}
${profileManifestSubkeys}
</array>
<key>pfm_title</key>
<string>${appName}</string>
<key>pfm_unique</key>
<true/>
<key>pfm_version</key>
<integer>1</integer>
</dict>
</plist>`;
}
function renderMacOSPolicy(policies: Policy[], translations: Translations) {
const appName = product.nameLong;
const bundleIdentifier = product.darwinBundleIdentifier;
const payloadUUID = product.darwinProfilePayloadUUID;
const UUID = product.darwinProfileUUID;
const versions = [...new Set(policies.map(p => p.minimumVersion)).values()].sort();
const categories = [...new Set(policies.map(p => p.category))];
const policyEntries =
policies.map(policy => policy.renderProfile())
.flat()
.map(entry => `\t\t\t\t${entry}`)
.join('\n');
return {
profile: `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDisplayName</key>
<string>${appName}</string>
<key>PayloadIdentifier</key>
<string>${bundleIdentifier}.${UUID}</string>
<key>PayloadType</key>
<string>${bundleIdentifier}</string>
<key>PayloadUUID</key>
<string>${UUID}</string>
<key>PayloadVersion</key>
<integer>1</integer>
${policyEntries}
</dict>
</array>
<key>PayloadDescription</key>
<string>This profile manages ${appName}. For more information see https://code.visualstudio.com/docs/setup/enterprise</string>
<key>PayloadDisplayName</key>
<string>${appName}</string>
<key>PayloadIdentifier</key>
<string>${bundleIdentifier}</string>
<key>PayloadOrganization</key>
<string>Microsoft</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>${payloadUUID}</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>TargetDeviceType</key>
<integer>5</integer>
</dict>
</plist>`,
manifests: [{ languageId: 'en-us', contents: renderProfileManifest(appName, bundleIdentifier, versions, categories, policies) },
...translations.map(({ languageId, languageTranslations }) =>
({ languageId, contents: renderProfileManifest(appName, bundleIdentifier, versions, categories, policies, languageTranslations) }))
]
};
}
function renderGP(policies: Policy[], translations: Translations) {
const appName = product.nameLong;
const regKey = product.win32RegValueName;
@@ -735,11 +1076,10 @@ async function getTranslations(): Promise<Translations> {
));
}
async function main() {
const [policies, translations] = await Promise.all([parsePolicies(), getTranslations()]);
async function windowsMain(policies: Policy[], translations: Translations) {
const root = '.build/policies/win32';
const { admx, adml } = await renderGP(policies, translations);
const root = '.build/policies/win32';
await fs.rm(root, { recursive: true, force: true });
await fs.mkdir(root, { recursive: true });
@@ -752,9 +1092,46 @@ async function main() {
}
}
async function darwinMain(policies: Policy[], translations: Translations) {
const bundleIdentifier = product.darwinBundleIdentifier;
if (!bundleIdentifier || !product.darwinProfilePayloadUUID || !product.darwinProfileUUID) {
throw new Error(`Missing required product information.`);
}
const root = '.build/policies/darwin';
const { profile, manifests } = await renderMacOSPolicy(policies, translations);
await fs.rm(root, { recursive: true, force: true });
await fs.mkdir(root, { recursive: true });
await fs.writeFile(path.join(root, `${bundleIdentifier}.mobileconfig`), profile.replace(/\r?\n/g, '\n'));
for (const { languageId, contents } of manifests) {
const languagePath = path.join(root, languageId === 'en-us' ? 'en-us' : Languages[languageId as keyof typeof Languages]);
await fs.mkdir(languagePath, { recursive: true });
await fs.writeFile(path.join(languagePath, `${bundleIdentifier}.plist`), contents.replace(/\r?\n/g, '\n'));
}
}
async function main() {
const [policies, translations] = await Promise.all([parsePolicies(), getTranslations()]);
const platform = process.argv[2];
if (platform === 'darwin') {
await darwinMain(policies, translations);
} else if (platform === 'win32') {
await windowsMain(policies, translations);
} else {
console.error(`Usage: node build/lib/policies <darwin|win32>`);
process.exit(1);
}
}
if (require.main === module) {
main().catch(err => {
console.error(err);
if (err instanceof ParseError) {
console.error(`Parse Error:`, err.message);
} else {
console.error(err);
}
process.exit(1);
});
}
+367
View File
@@ -0,0 +1,367 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.EntryKind = void 0;
const ts = __importStar(require("typescript"));
const path = __importStar(require("path"));
const fs = __importStar(require("fs"));
const TS_CONFIG_PATH = path.join(__dirname, '../../', 'src', 'tsconfig.json');
//
// #############################################################################################
//
// A custom typescript checker that ensure constructor properties are NOT used to initialize
// defined properties. This is needed for the times when `useDefineForClassFields` is gone.
//
// see https://github.com/microsoft/vscode/issues/243049, https://github.com/microsoft/vscode/issues/186726,
// https://github.com/microsoft/vscode/pull/241544
//
// #############################################################################################
//
const ignored = new Set([
'vs/base/common/arrays.ts',
'vs/platform/extensionManagement/common/extensionsScannerService.ts',
'vs/platform/configuration/common/configurations.ts',
'vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer.ts',
'vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree.ts',
'vs/editor/common/model/textModelTokens.ts',
'vs/editor/common/model/tokenizationTextModelPart.ts',
'vs/editor/common/core/textEdit.ts',
'vs/workbench/contrib/debug/common/debugStorage.ts',
'vs/workbench/contrib/debug/common/debugModel.ts',
'vs/workbench/api/common/extHostCommands.ts',
'vs/editor/browser/view/viewLayer.ts',
'vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.ts',
'vs/platform/accessibilitySignal/browser/accessibilitySignalService.ts',
'vs/editor/browser/widget/diffEditor/utils.ts',
'vs/editor/browser/observableCodeEditor.ts',
'vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.ts',
'vs/editor/browser/widget/diffEditor/diffEditorOptions.ts',
'vs/editor/browser/widget/diffEditor/components/diffEditorEditors.ts',
'vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.ts',
'vs/editor/browser/widget/diffEditor/components/diffEditorSash.ts',
'vs/editor/browser/widget/diffEditor/utils/editorGutter.ts',
'vs/editor/browser/widget/diffEditor/features/gutterFeature.ts',
'vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.ts',
'vs/editor/browser/widget/diffEditor/diffEditorWidget.ts',
'vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.ts',
'vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.ts',
'vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.ts',
'vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.ts',
'vs/editor/contrib/inlayHints/browser/inlayHintsController.ts',
'vs/editor/contrib/inlineCompletions/browser/model/changeRecorder.ts',
'vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.ts',
'vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts',
'vs/editor/contrib/inlineCompletions/browser/inlineCompletionsAccessibleView.ts',
'vs/editor/contrib/placeholderText/browser/placeholderTextContribution.ts',
'vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.ts',
'vs/workbench/contrib/chat/common/promptSyntax/parsers/basePromptParser.ts',
'vs/workbench/contrib/files/browser/views/openEditorsView.ts',
'vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.ts',
'vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.ts',
'vs/workbench/contrib/chat/browser/chatInputPart.ts',
'vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.ts',
'vs/workbench/contrib/mergeEditor/browser/model/diffComputer.ts',
'vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.ts',
'vs/workbench/contrib/mergeEditor/browser/view/editorGutter.ts',
'vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.ts',
'vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.ts',
'vs/workbench/contrib/mergeEditor/browser/view/viewModel.ts',
'vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.ts',
'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.ts',
'vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.ts',
'vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.ts',
'vs/platform/terminal/common/capabilities/commandDetectionCapability.ts',
'vs/workbench/contrib/testing/common/testExclusions.ts',
'vs/workbench/contrib/testing/common/testResultStorage.ts',
'vs/workbench/services/userDataProfile/browser/snippetsResource.ts',
'vs/platform/quickinput/browser/quickInputController.ts',
'vs/platform/userDataSync/common/abstractSynchronizer.ts',
'vs/workbench/services/authentication/browser/authenticationExtensionsService.ts',
'vs/workbench/services/textMate/browser/backgroundTokenization/textMateWorkerTokenizerController.ts',
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts',
'vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.ts',
'vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts',
'vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.ts',
'vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.ts',
'vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.ts',
'vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.ts',
'vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.ts',
'vs/workbench/contrib/search/common/cacheState.ts',
'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts',
'vs/workbench/contrib/search/browser/anythingQuickAccess.ts',
'vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts',
'vs/workbench/contrib/testing/browser/testResultsView/testResultsOutput.ts',
'vs/workbench/contrib/testing/common/testExplorerFilterState.ts',
'vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.ts',
'vs/workbench/contrib/testing/browser/testingOutputPeek.ts',
'vs/workbench/contrib/testing/browser/explorerProjections/index.ts',
'vs/workbench/contrib/testing/browser/testingExplorerFilter.ts',
'vs/workbench/contrib/testing/browser/testingExplorerView.ts',
'vs/workbench/contrib/testing/common/testServiceImpl.ts',
'vs/platform/quickinput/browser/commandsQuickAccess.ts',
'vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.ts',
'vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.ts',
'vs/workbench/contrib/debug/browser/debugMemory.ts',
'vs/workbench/contrib/markers/browser/markersViewActions.ts',
'vs/workbench/contrib/mergeEditor/browser/view/viewZones.ts',
'vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts',
'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts',
'vs/workbench/contrib/output/browser/outputServices.ts',
'vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts',
'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts',
'vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts',
'vs/workbench/contrib/accessibilitySignals/browser/editorTextPropertySignalsContribution.ts',
'vs/workbench/contrib/inlineCompletions/browser/inlineCompletionLanguageStatusBarContribution.ts',
'vs/workbench/services/extensionManagement/common/webExtensionManagementService.ts',
'vs/workbench/contrib/welcomeDialog/browser/welcomeWidget.ts',
'vs/editor/standalone/browser/quickInput/standaloneQuickInputService.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordInsertView.ts',
'vs/platform/terminal/node/ptyService.ts',
'vs/workbench/api/common/extHostLanguageFeatures.ts',
'vs/workbench/api/common/extHostSearch.ts',
'vs/workbench/contrib/testing/test/common/testStubs.ts'
]);
const cancellationToken = {
isCancellationRequested: () => false,
throwIfCancellationRequested: () => { },
};
const seenFiles = new Set();
let errorCount = 0;
function createProgram(tsconfigPath) {
const tsConfig = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
const configHostParser = { fileExists: fs.existsSync, readDirectory: ts.sys.readDirectory, readFile: file => fs.readFileSync(file, 'utf8'), useCaseSensitiveFileNames: process.platform === 'linux' };
const tsConfigParsed = ts.parseJsonConfigFileContent(tsConfig.config, configHostParser, path.resolve(path.dirname(tsconfigPath)), { noEmit: true });
const compilerHost = ts.createCompilerHost(tsConfigParsed.options, true);
return ts.createProgram(tsConfigParsed.fileNames, tsConfigParsed.options, compilerHost);
}
const program = createProgram(TS_CONFIG_PATH);
program.getTypeChecker();
for (const file of program.getSourceFiles()) {
if (!file || file.isDeclarationFile) {
continue;
}
const relativePath = path.relative(path.dirname(TS_CONFIG_PATH), file.fileName).replace(/\\/g, '/');
if (ignored.has(relativePath)) {
continue;
}
visit(file);
}
if (seenFiles.size) {
console.log();
console.log(`Found ${errorCount} error${errorCount === 1 ? '' : 's'} in ${seenFiles.size} file${seenFiles.size === 1 ? '' : 's'}.`);
process.exit(errorCount);
}
function visit(node) {
if (ts.isParameter(node) && ts.isParameterPropertyDeclaration(node, node.parent)) {
checkParameterPropertyDeclaration(node);
}
ts.forEachChild(node, visit);
}
function checkParameterPropertyDeclaration(param) {
const uses = [...collectReferences(param.name, [])];
if (!uses.length) {
return;
}
const sourceFile = param.getSourceFile();
if (!seenFiles.has(sourceFile)) {
if (seenFiles.size) {
console.log(``);
}
console.log(`${formatFileName(param)}:`);
seenFiles.add(sourceFile);
}
else {
console.log(``);
}
console.log(` Parameter property '${param.name.getText()}' is used before its declaration.`);
for (const { stack, container } of uses) {
const use = stack[stack.length - 1];
console.log(` at ${formatLocation(use)}: ${formatMember(container)} -> ${formatStack(stack)}`);
errorCount++;
}
}
function* collectReferences(node, stack, requiresInvocationDepth = 0, seen = new Set()) {
for (const use of findAllReferencesInClass(node)) {
const container = findContainer(use);
if (!container || seen.has(container) || ts.isConstructorDeclaration(container)) {
continue;
}
seen.add(container);
const nextStack = [...stack, use];
let nextRequiresInvocationDepth = requiresInvocationDepth;
if (isInvocation(use) && nextRequiresInvocationDepth > 0) {
nextRequiresInvocationDepth--;
}
if (ts.isPropertyDeclaration(container) && nextRequiresInvocationDepth === 0) {
yield { stack: nextStack, container };
}
else if (requiresInvocation(container)) {
nextRequiresInvocationDepth++;
}
yield* collectReferences(container.name ?? container, nextStack, nextRequiresInvocationDepth, seen);
}
}
function requiresInvocation(definition) {
return ts.isMethodDeclaration(definition) || ts.isFunctionDeclaration(definition) || ts.isFunctionExpression(definition) || ts.isArrowFunction(definition);
}
function isInvocation(use) {
let location = use;
if (ts.isPropertyAccessExpression(location.parent) && location.parent.name === location) {
location = location.parent;
}
else if (ts.isElementAccessExpression(location.parent) && location.parent.argumentExpression === location) {
location = location.parent;
}
return ts.isCallExpression(location.parent) && location.parent.expression === location
|| ts.isTaggedTemplateExpression(location.parent) && location.parent.tag === location;
}
function formatFileName(node) {
const sourceFile = node.getSourceFile();
return path.resolve(sourceFile.fileName);
}
function formatLocation(node) {
const sourceFile = node.getSourceFile();
const { line, character } = ts.getLineAndCharacterOfPosition(sourceFile, node.pos);
return `${formatFileName(sourceFile)}(${line + 1},${character + 1})`;
}
function formatStack(stack) {
return stack.slice().reverse().map((use) => formatUse(use)).join(' -> ');
}
function formatMember(container) {
const name = container.name?.getText();
if (name) {
const className = findClass(container)?.name?.getText();
if (className) {
return `${className}.${name}`;
}
return name;
}
return '<unknown>';
}
function formatUse(use) {
let text = use.getText();
if (use.parent && ts.isPropertyAccessExpression(use.parent) && use.parent.name === use) {
if (use.parent.expression.kind === ts.SyntaxKind.ThisKeyword) {
text = `this.${text}`;
}
use = use.parent;
}
else if (use.parent && ts.isElementAccessExpression(use.parent) && use.parent.argumentExpression === use) {
if (use.parent.expression.kind === ts.SyntaxKind.ThisKeyword) {
text = `this['${text}']`;
}
use = use.parent;
}
if (ts.isCallExpression(use.parent)) {
text = `${text}(...)`;
}
return text;
}
function findContainer(node) {
return ts.findAncestor(node, ancestor => {
switch (ancestor.kind) {
case ts.SyntaxKind.PropertyDeclaration:
case ts.SyntaxKind.MethodDeclaration:
case ts.SyntaxKind.GetAccessor:
case ts.SyntaxKind.SetAccessor:
case ts.SyntaxKind.Constructor:
case ts.SyntaxKind.ClassStaticBlockDeclaration:
case ts.SyntaxKind.ArrowFunction:
case ts.SyntaxKind.FunctionExpression:
case ts.SyntaxKind.FunctionDeclaration:
case ts.SyntaxKind.Parameter:
return true;
}
return false;
});
}
function findClass(node) {
return ts.findAncestor(node, ts.isClassLike);
}
function* findAllReferencesInClass(node) {
const classDecl = findClass(node);
if (!classDecl) {
return [];
}
for (const ref of findAllReferences(node)) {
for (const entry of ref.references) {
if (entry.kind !== 1 /* EntryKind.Node */ || entry.node === node) {
continue;
}
if (findClass(entry.node) === classDecl) {
yield entry.node;
}
}
}
}
// NOTE: The following uses TypeScript internals and are subject to change from version to version.
function findAllReferences(node) {
const sourceFile = node.getSourceFile();
const position = node.getStart();
const name = ts.getTouchingPropertyName(sourceFile, position);
const options = { use: ts.FindAllReferences.FindReferencesUse.References };
return ts.FindAllReferences.Core.getReferencedSymbolsForNode(position, name, program, [sourceFile], cancellationToken, options) ?? [];
}
var DefinitionKind;
(function (DefinitionKind) {
DefinitionKind[DefinitionKind["Symbol"] = 0] = "Symbol";
DefinitionKind[DefinitionKind["Label"] = 1] = "Label";
DefinitionKind[DefinitionKind["Keyword"] = 2] = "Keyword";
DefinitionKind[DefinitionKind["This"] = 3] = "This";
DefinitionKind[DefinitionKind["String"] = 4] = "String";
DefinitionKind[DefinitionKind["TripleSlashReference"] = 5] = "TripleSlashReference";
})(DefinitionKind || (DefinitionKind = {}));
/** @internal */
var EntryKind;
(function (EntryKind) {
EntryKind[EntryKind["Span"] = 0] = "Span";
EntryKind[EntryKind["Node"] = 1] = "Node";
EntryKind[EntryKind["StringLiteral"] = 2] = "StringLiteral";
EntryKind[EntryKind["SearchedLocalFoundProperty"] = 3] = "SearchedLocalFoundProperty";
EntryKind[EntryKind["SearchedPropertyFoundLocal"] = 4] = "SearchedPropertyFoundLocal";
})(EntryKind || (exports.EntryKind = EntryKind = {}));
//# sourceMappingURL=propertyInitOrderChecker.js.map
+417
View File
@@ -0,0 +1,417 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as ts from 'typescript';
import * as path from 'path';
import * as fs from 'fs';
const TS_CONFIG_PATH = path.join(__dirname, '../../', 'src', 'tsconfig.json');
//
// #############################################################################################
//
// A custom typescript checker that ensure constructor properties are NOT used to initialize
// defined properties. This is needed for the times when `useDefineForClassFields` is gone.
//
// see https://github.com/microsoft/vscode/issues/243049, https://github.com/microsoft/vscode/issues/186726,
// https://github.com/microsoft/vscode/pull/241544
//
// #############################################################################################
//
const ignored = new Set([
'vs/base/common/arrays.ts',
'vs/platform/extensionManagement/common/extensionsScannerService.ts',
'vs/platform/configuration/common/configurations.ts',
'vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer.ts',
'vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree.ts',
'vs/editor/common/model/textModelTokens.ts',
'vs/editor/common/model/tokenizationTextModelPart.ts',
'vs/editor/common/core/textEdit.ts',
'vs/workbench/contrib/debug/common/debugStorage.ts',
'vs/workbench/contrib/debug/common/debugModel.ts',
'vs/workbench/api/common/extHostCommands.ts',
'vs/editor/browser/view/viewLayer.ts',
'vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.ts',
'vs/platform/accessibilitySignal/browser/accessibilitySignalService.ts',
'vs/editor/browser/widget/diffEditor/utils.ts',
'vs/editor/browser/observableCodeEditor.ts',
'vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.ts',
'vs/editor/browser/widget/diffEditor/diffEditorOptions.ts',
'vs/editor/browser/widget/diffEditor/components/diffEditorEditors.ts',
'vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.ts',
'vs/editor/browser/widget/diffEditor/components/diffEditorSash.ts',
'vs/editor/browser/widget/diffEditor/utils/editorGutter.ts',
'vs/editor/browser/widget/diffEditor/features/gutterFeature.ts',
'vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.ts',
'vs/editor/browser/widget/diffEditor/diffEditorWidget.ts',
'vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.ts',
'vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.ts',
'vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.ts',
'vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.ts',
'vs/editor/contrib/inlayHints/browser/inlayHintsController.ts',
'vs/editor/contrib/inlineCompletions/browser/model/changeRecorder.ts',
'vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.ts',
'vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts',
'vs/editor/contrib/inlineCompletions/browser/inlineCompletionsAccessibleView.ts',
'vs/editor/contrib/placeholderText/browser/placeholderTextContribution.ts',
'vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.ts',
'vs/workbench/contrib/chat/common/promptSyntax/parsers/basePromptParser.ts',
'vs/workbench/contrib/files/browser/views/openEditorsView.ts',
'vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.ts',
'vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.ts',
'vs/workbench/contrib/chat/browser/chatInputPart.ts',
'vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.ts',
'vs/workbench/contrib/mergeEditor/browser/model/diffComputer.ts',
'vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.ts',
'vs/workbench/contrib/mergeEditor/browser/view/editorGutter.ts',
'vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.ts',
'vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.ts',
'vs/workbench/contrib/mergeEditor/browser/view/viewModel.ts',
'vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.ts',
'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.ts',
'vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.ts',
'vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.ts',
'vs/platform/terminal/common/capabilities/commandDetectionCapability.ts',
'vs/workbench/contrib/testing/common/testExclusions.ts',
'vs/workbench/contrib/testing/common/testResultStorage.ts',
'vs/workbench/services/userDataProfile/browser/snippetsResource.ts',
'vs/platform/quickinput/browser/quickInputController.ts',
'vs/platform/userDataSync/common/abstractSynchronizer.ts',
'vs/workbench/services/authentication/browser/authenticationExtensionsService.ts',
'vs/workbench/services/textMate/browser/backgroundTokenization/textMateWorkerTokenizerController.ts',
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts',
'vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.ts',
'vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts',
'vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.ts',
'vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.ts',
'vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.ts',
'vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.ts',
'vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.ts',
'vs/workbench/contrib/search/common/cacheState.ts',
'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts',
'vs/workbench/contrib/search/browser/anythingQuickAccess.ts',
'vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts',
'vs/workbench/contrib/testing/browser/testResultsView/testResultsOutput.ts',
'vs/workbench/contrib/testing/common/testExplorerFilterState.ts',
'vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.ts',
'vs/workbench/contrib/testing/browser/testingOutputPeek.ts',
'vs/workbench/contrib/testing/browser/explorerProjections/index.ts',
'vs/workbench/contrib/testing/browser/testingExplorerFilter.ts',
'vs/workbench/contrib/testing/browser/testingExplorerView.ts',
'vs/workbench/contrib/testing/common/testServiceImpl.ts',
'vs/platform/quickinput/browser/commandsQuickAccess.ts',
'vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.ts',
'vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.ts',
'vs/workbench/contrib/debug/browser/debugMemory.ts',
'vs/workbench/contrib/markers/browser/markersViewActions.ts',
'vs/workbench/contrib/mergeEditor/browser/view/viewZones.ts',
'vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts',
'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts',
'vs/workbench/contrib/output/browser/outputServices.ts',
'vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts',
'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts',
'vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts',
'vs/workbench/contrib/accessibilitySignals/browser/editorTextPropertySignalsContribution.ts',
'vs/workbench/contrib/inlineCompletions/browser/inlineCompletionLanguageStatusBarContribution.ts',
'vs/workbench/services/extensionManagement/common/webExtensionManagementService.ts',
'vs/workbench/contrib/welcomeDialog/browser/welcomeWidget.ts',
'vs/editor/standalone/browser/quickInput/standaloneQuickInputService.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordInsertView.ts',
'vs/platform/terminal/node/ptyService.ts',
'vs/workbench/api/common/extHostLanguageFeatures.ts',
'vs/workbench/api/common/extHostSearch.ts',
'vs/workbench/contrib/testing/test/common/testStubs.ts'
]);
const cancellationToken: ts.CancellationToken = {
isCancellationRequested: () => false,
throwIfCancellationRequested: () => { },
};
const seenFiles = new Set<ts.SourceFile>();
let errorCount = 0;
function createProgram(tsconfigPath: string): ts.Program {
const tsConfig = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
const configHostParser: ts.ParseConfigHost = { fileExists: fs.existsSync, readDirectory: ts.sys.readDirectory, readFile: file => fs.readFileSync(file, 'utf8'), useCaseSensitiveFileNames: process.platform === 'linux' };
const tsConfigParsed = ts.parseJsonConfigFileContent(tsConfig.config, configHostParser, path.resolve(path.dirname(tsconfigPath)), { noEmit: true });
const compilerHost = ts.createCompilerHost(tsConfigParsed.options, true);
return ts.createProgram(tsConfigParsed.fileNames, tsConfigParsed.options, compilerHost);
}
const program = createProgram(TS_CONFIG_PATH);
program.getTypeChecker();
for (const file of program.getSourceFiles()) {
if (!file || file.isDeclarationFile) {
continue;
}
const relativePath = path.relative(path.dirname(TS_CONFIG_PATH), file.fileName).replace(/\\/g, '/');
if (ignored.has(relativePath)) {
continue;
}
visit(file);
}
if (seenFiles.size) {
console.log();
console.log(`Found ${errorCount} error${errorCount === 1 ? '' : 's'} in ${seenFiles.size} file${seenFiles.size === 1 ? '' : 's'}.`);
process.exit(errorCount);
}
function visit(node: ts.Node) {
if (ts.isParameter(node) && ts.isParameterPropertyDeclaration(node, node.parent)) {
checkParameterPropertyDeclaration(node);
}
ts.forEachChild(node, visit);
}
function checkParameterPropertyDeclaration(param: ts.ParameterPropertyDeclaration) {
const uses = [...collectReferences(param.name, [])];
if (!uses.length) {
return;
}
const sourceFile = param.getSourceFile();
if (!seenFiles.has(sourceFile)) {
if (seenFiles.size) {
console.log(``);
}
console.log(`${formatFileName(param)}:`);
seenFiles.add(sourceFile);
} else {
console.log(``);
}
console.log(` Parameter property '${param.name.getText()}' is used before its declaration.`);
for (const { stack, container } of uses) {
const use = stack[stack.length - 1];
console.log(` at ${formatLocation(use)}: ${formatMember(container)} -> ${formatStack(stack)}`);
errorCount++;
}
}
interface InvalidUse {
stack: ts.Node[];
container: ReferenceContainer;
}
function* collectReferences(node: ts.Node, stack: ts.Node[], requiresInvocationDepth: number = 0, seen = new Set<ReferenceContainer>()): Generator<InvalidUse> {
for (const use of findAllReferencesInClass(node)) {
const container = findContainer(use);
if (!container || seen.has(container) || ts.isConstructorDeclaration(container)) {
continue;
}
seen.add(container);
const nextStack = [...stack, use];
let nextRequiresInvocationDepth = requiresInvocationDepth;
if (isInvocation(use) && nextRequiresInvocationDepth > 0) {
nextRequiresInvocationDepth--;
}
if (ts.isPropertyDeclaration(container) && nextRequiresInvocationDepth === 0) {
yield { stack: nextStack, container };
}
else if (requiresInvocation(container)) {
nextRequiresInvocationDepth++;
}
yield* collectReferences(container.name ?? container, nextStack, nextRequiresInvocationDepth, seen);
}
}
function requiresInvocation(definition: ReferenceContainer): boolean {
return ts.isMethodDeclaration(definition) || ts.isFunctionDeclaration(definition) || ts.isFunctionExpression(definition) || ts.isArrowFunction(definition);
}
function isInvocation(use: ts.Node): boolean {
let location = use;
if (ts.isPropertyAccessExpression(location.parent) && location.parent.name === location) {
location = location.parent;
}
else if (ts.isElementAccessExpression(location.parent) && location.parent.argumentExpression === location) {
location = location.parent;
}
return ts.isCallExpression(location.parent) && location.parent.expression === location
|| ts.isTaggedTemplateExpression(location.parent) && location.parent.tag === location;
}
function formatFileName(node: ts.Node): string {
const sourceFile = node.getSourceFile();
return path.resolve(sourceFile.fileName);
}
function formatLocation(node: ts.Node): string {
const sourceFile = node.getSourceFile();
const { line, character } = ts.getLineAndCharacterOfPosition(sourceFile, node.pos);
return `${formatFileName(sourceFile)}(${line + 1},${character + 1})`;
}
function formatStack(stack: ts.Node[]): string {
return stack.slice().reverse().map((use) => formatUse(use)).join(' -> ');
}
function formatMember(container: ReferenceContainer): string {
const name = container.name?.getText();
if (name) {
const className = findClass(container)?.name?.getText();
if (className) {
return `${className}.${name}`;
}
return name;
}
return '<unknown>';
}
function formatUse(use: ts.Node): string {
let text = use.getText();
if (use.parent && ts.isPropertyAccessExpression(use.parent) && use.parent.name === use) {
if (use.parent.expression.kind === ts.SyntaxKind.ThisKeyword) {
text = `this.${text}`;
}
use = use.parent;
}
else if (use.parent && ts.isElementAccessExpression(use.parent) && use.parent.argumentExpression === use) {
if (use.parent.expression.kind === ts.SyntaxKind.ThisKeyword) {
text = `this['${text}']`;
}
use = use.parent;
}
if (ts.isCallExpression(use.parent)) {
text = `${text}(...)`;
}
return text;
}
type ReferenceContainer =
| ts.PropertyDeclaration
| ts.MethodDeclaration
| ts.GetAccessorDeclaration
| ts.SetAccessorDeclaration
| ts.ConstructorDeclaration
| ts.ClassStaticBlockDeclaration
| ts.ArrowFunction
| ts.FunctionExpression
| ts.FunctionDeclaration
| ts.ParameterDeclaration;
function findContainer(node: ts.Node): ReferenceContainer | undefined {
return ts.findAncestor(node, ancestor => {
switch (ancestor.kind) {
case ts.SyntaxKind.PropertyDeclaration:
case ts.SyntaxKind.MethodDeclaration:
case ts.SyntaxKind.GetAccessor:
case ts.SyntaxKind.SetAccessor:
case ts.SyntaxKind.Constructor:
case ts.SyntaxKind.ClassStaticBlockDeclaration:
case ts.SyntaxKind.ArrowFunction:
case ts.SyntaxKind.FunctionExpression:
case ts.SyntaxKind.FunctionDeclaration:
case ts.SyntaxKind.Parameter:
return true;
}
return false;
}) as ReferenceContainer | undefined;
}
function findClass(node: ts.Node): ts.ClassLikeDeclaration | undefined {
return ts.findAncestor(node, ts.isClassLike);
}
function* findAllReferencesInClass(node: ts.Node): Generator<ts.Node> {
const classDecl = findClass(node);
if (!classDecl) {
return [];
}
for (const ref of findAllReferences(node)) {
for (const entry of ref.references) {
if (entry.kind !== EntryKind.Node || entry.node === node) {
continue;
}
if (findClass(entry.node) === classDecl) {
yield entry.node;
}
}
}
}
// NOTE: The following uses TypeScript internals and are subject to change from version to version.
function findAllReferences(node: ts.Node): readonly SymbolAndEntries[] {
const sourceFile = node.getSourceFile();
const position = node.getStart();
const name: ts.Node = (ts as any).getTouchingPropertyName(sourceFile, position);
const options = { use: (ts as any).FindAllReferences.FindReferencesUse.References };
return (ts as any).FindAllReferences.Core.getReferencedSymbolsForNode(position, name, program, [sourceFile], cancellationToken, options) ?? [];
}
interface SymbolAndEntries {
readonly definition: Definition | undefined;
readonly references: readonly Entry[];
}
const enum DefinitionKind {
Symbol,
Label,
Keyword,
This,
String,
TripleSlashReference,
}
type Definition =
| { readonly type: DefinitionKind.Symbol; readonly symbol: ts.Symbol }
| { readonly type: DefinitionKind.Label; readonly node: ts.Identifier }
| { readonly type: DefinitionKind.Keyword; readonly node: ts.Node }
| { readonly type: DefinitionKind.This; readonly node: ts.Node }
| { readonly type: DefinitionKind.String; readonly node: ts.StringLiteralLike }
| { readonly type: DefinitionKind.TripleSlashReference; readonly reference: ts.FileReference; readonly file: ts.SourceFile };
/** @internal */
export const enum EntryKind {
Span,
Node,
StringLiteral,
SearchedLocalFoundProperty,
SearchedPropertyFoundLocal,
}
type NodeEntryKind = EntryKind.Node | EntryKind.StringLiteral | EntryKind.SearchedLocalFoundProperty | EntryKind.SearchedPropertyFoundLocal;
type Entry = NodeEntry | SpanEntry;
interface ContextWithStartAndEndNode {
start: ts.Node;
end: ts.Node;
}
type ContextNode = ts.Node | ContextWithStartAndEndNode;
interface NodeEntry {
readonly kind: NodeEntryKind;
readonly node: ts.Node;
readonly context?: ContextNode;
}
interface SpanEntry {
readonly kind: EntryKind.Span;
readonly fileName: string;
readonly textSpan: ts.TextSpan;
}
+3 -97
View File
@@ -41,7 +41,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractEditor = extractEditor;
exports.createESMSourcesAndResources2 = createESMSourcesAndResources2;
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const tss = __importStar(require("./treeshaking"));
@@ -75,6 +74,9 @@ function extractEditor(options) {
compilerOptions = tsConfig.compilerOptions;
}
tsConfig.compilerOptions = compilerOptions;
tsConfig.compilerOptions.sourceMap = true;
tsConfig.compilerOptions.module = 'es2022';
tsConfig.compilerOptions.outDir = options.tsOutDir;
compilerOptions.noEmit = false;
compilerOptions.noUnusedLocals = false;
compilerOptions.preserveConstEnums = false;
@@ -142,102 +144,6 @@ function extractEditor(options) {
'vs/loader.js'
].forEach(copyFile);
}
function createESMSourcesAndResources2(options) {
const SRC_FOLDER = path_1.default.join(REPO_ROOT, options.srcFolder);
const OUT_FOLDER = path_1.default.join(REPO_ROOT, options.outFolder);
const OUT_RESOURCES_FOLDER = path_1.default.join(REPO_ROOT, options.outResourcesFolder);
const getDestAbsoluteFilePath = (file) => {
const dest = options.renames[file.replace(/\\/g, '/')] || file;
if (dest === 'tsconfig.json') {
return path_1.default.join(OUT_FOLDER, `tsconfig.json`);
}
if (/\.ts$/.test(dest)) {
return path_1.default.join(OUT_FOLDER, dest);
}
return path_1.default.join(OUT_RESOURCES_FOLDER, dest);
};
const allFiles = walkDirRecursive(SRC_FOLDER);
for (const file of allFiles) {
if (options.ignores.indexOf(file.replace(/\\/g, '/')) >= 0) {
continue;
}
if (file === 'tsconfig.json') {
const tsConfig = JSON.parse(fs_1.default.readFileSync(path_1.default.join(SRC_FOLDER, file)).toString());
tsConfig.compilerOptions.module = 'es2022';
tsConfig.compilerOptions.outDir = path_1.default.join(path_1.default.relative(OUT_FOLDER, OUT_RESOURCES_FOLDER), 'vs').replace(/\\/g, '/');
write(getDestAbsoluteFilePath(file), JSON.stringify(tsConfig, null, '\t'));
continue;
}
if (/\.ts$/.test(file) || /\.d\.ts$/.test(file) || /\.css$/.test(file) || /\.js$/.test(file) || /\.ttf$/.test(file)) {
// Transport the files directly
write(getDestAbsoluteFilePath(file), fs_1.default.readFileSync(path_1.default.join(SRC_FOLDER, file)));
continue;
}
console.log(`UNKNOWN FILE: ${file}`);
}
function walkDirRecursive(dir) {
if (dir.charAt(dir.length - 1) !== '/' || dir.charAt(dir.length - 1) !== '\\') {
dir += '/';
}
const result = [];
_walkDirRecursive(dir, result, dir.length);
return result;
}
function _walkDirRecursive(dir, result, trimPos) {
const files = fs_1.default.readdirSync(dir);
for (let i = 0; i < files.length; i++) {
const file = path_1.default.join(dir, files[i]);
if (fs_1.default.statSync(file).isDirectory()) {
_walkDirRecursive(file, result, trimPos);
}
else {
result.push(file.substr(trimPos));
}
}
}
function write(absoluteFilePath, contents) {
if (/(\.ts$)|(\.js$)/.test(absoluteFilePath)) {
contents = toggleComments(contents.toString());
}
writeFile(absoluteFilePath, contents);
function toggleComments(fileContents) {
const lines = fileContents.split(/\r\n|\r|\n/);
let mode = 0;
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
if (mode === 0) {
if (/\/\/ ESM-comment-begin/.test(line)) {
mode = 1;
continue;
}
if (/\/\/ ESM-uncomment-begin/.test(line)) {
mode = 2;
continue;
}
continue;
}
if (mode === 1) {
if (/\/\/ ESM-comment-end/.test(line)) {
mode = 0;
continue;
}
lines[i] = '// ' + line;
continue;
}
if (mode === 2) {
if (/\/\/ ESM-uncomment-end/.test(line)) {
mode = 0;
continue;
}
lines[i] = line.replace(/^(\s*)\/\/ ?/, function (_, indent) {
return indent;
});
}
}
return lines.join('\n');
}
}
}
function transportCSS(module, enqueue, write) {
if (!/\.css/.test(module)) {
return false;
+4 -120
View File
@@ -29,7 +29,7 @@ function writeFile(filePath: string, contents: Buffer | string): void {
fs.writeFileSync(filePath, contents);
}
export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: string }): void {
export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: string; tsOutDir: string }): void {
const ts = require('typescript') as typeof import('typescript');
const tsConfig = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.monaco.json')).toString());
@@ -41,6 +41,9 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
compilerOptions = tsConfig.compilerOptions;
}
tsConfig.compilerOptions = compilerOptions;
tsConfig.compilerOptions.sourceMap = true;
tsConfig.compilerOptions.module = 'es2022';
tsConfig.compilerOptions.outDir = options.tsOutDir;
compilerOptions.noEmit = false;
compilerOptions.noUnusedLocals = false;
@@ -119,125 +122,6 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
].forEach(copyFile);
}
export interface IOptions2 {
srcFolder: string;
outFolder: string;
outResourcesFolder: string;
ignores: string[];
renames: { [filename: string]: string };
}
export function createESMSourcesAndResources2(options: IOptions2): void {
const SRC_FOLDER = path.join(REPO_ROOT, options.srcFolder);
const OUT_FOLDER = path.join(REPO_ROOT, options.outFolder);
const OUT_RESOURCES_FOLDER = path.join(REPO_ROOT, options.outResourcesFolder);
const getDestAbsoluteFilePath = (file: string): string => {
const dest = options.renames[file.replace(/\\/g, '/')] || file;
if (dest === 'tsconfig.json') {
return path.join(OUT_FOLDER, `tsconfig.json`);
}
if (/\.ts$/.test(dest)) {
return path.join(OUT_FOLDER, dest);
}
return path.join(OUT_RESOURCES_FOLDER, dest);
};
const allFiles = walkDirRecursive(SRC_FOLDER);
for (const file of allFiles) {
if (options.ignores.indexOf(file.replace(/\\/g, '/')) >= 0) {
continue;
}
if (file === 'tsconfig.json') {
const tsConfig = JSON.parse(fs.readFileSync(path.join(SRC_FOLDER, file)).toString());
tsConfig.compilerOptions.module = 'es2022';
tsConfig.compilerOptions.outDir = path.join(path.relative(OUT_FOLDER, OUT_RESOURCES_FOLDER), 'vs').replace(/\\/g, '/');
write(getDestAbsoluteFilePath(file), JSON.stringify(tsConfig, null, '\t'));
continue;
}
if (/\.ts$/.test(file) || /\.d\.ts$/.test(file) || /\.css$/.test(file) || /\.js$/.test(file) || /\.ttf$/.test(file)) {
// Transport the files directly
write(getDestAbsoluteFilePath(file), fs.readFileSync(path.join(SRC_FOLDER, file)));
continue;
}
console.log(`UNKNOWN FILE: ${file}`);
}
function walkDirRecursive(dir: string): string[] {
if (dir.charAt(dir.length - 1) !== '/' || dir.charAt(dir.length - 1) !== '\\') {
dir += '/';
}
const result: string[] = [];
_walkDirRecursive(dir, result, dir.length);
return result;
}
function _walkDirRecursive(dir: string, result: string[], trimPos: number): void {
const files = fs.readdirSync(dir);
for (let i = 0; i < files.length; i++) {
const file = path.join(dir, files[i]);
if (fs.statSync(file).isDirectory()) {
_walkDirRecursive(file, result, trimPos);
} else {
result.push(file.substr(trimPos));
}
}
}
function write(absoluteFilePath: string, contents: string | Buffer): void {
if (/(\.ts$)|(\.js$)/.test(absoluteFilePath)) {
contents = toggleComments(contents.toString());
}
writeFile(absoluteFilePath, contents);
function toggleComments(fileContents: string): string {
const lines = fileContents.split(/\r\n|\r|\n/);
let mode = 0;
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
if (mode === 0) {
if (/\/\/ ESM-comment-begin/.test(line)) {
mode = 1;
continue;
}
if (/\/\/ ESM-uncomment-begin/.test(line)) {
mode = 2;
continue;
}
continue;
}
if (mode === 1) {
if (/\/\/ ESM-comment-end/.test(line)) {
mode = 0;
continue;
}
lines[i] = '// ' + line;
continue;
}
if (mode === 2) {
if (/\/\/ ESM-uncomment-end/.test(line)) {
mode = 0;
continue;
}
lines[i] = line.replace(/^(\s*)\/\/ ?/, function (_, indent) {
return indent;
});
}
}
return lines.join('\n');
}
}
}
function transportCSS(module: string, enqueue: (module: string) => void, write: (path: string, contents: string | Buffer) => void): boolean {
if (!/\.css/.test(module)) {
@@ -234,6 +234,8 @@
"--vscode-editorGutter-commentUnresolvedGlyphForeground",
"--vscode-editorGutter-deletedBackground",
"--vscode-editorGutter-foldingControlForeground",
"--vscode-editorGutter-itemBackground",
"--vscode-editorGutter-itemGlyphForeground",
"--vscode-editorGutter-modifiedBackground",
"--vscode-editorHint-border",
"--vscode-editorHint-foreground",
@@ -345,6 +347,7 @@
"--vscode-extensionButton-prominentHoverBackground",
"--vscode-extensionButton-separator",
"--vscode-extensionIcon-preReleaseForeground",
"--vscode-extensionIcon-privateForeground",
"--vscode-extensionIcon-sponsorForeground",
"--vscode-extensionIcon-starForeground",
"--vscode-extensionIcon-verifiedForeground",
@@ -370,14 +373,14 @@
"--vscode-inlineChatInput-placeholderForeground",
"--vscode-inlineEdit-gutterIndicator-background",
"--vscode-inlineEdit-gutterIndicator-primaryBackground",
"--vscode-inlineEdit-gutterIndicator-primaryBorder",
"--vscode-inlineEdit-gutterIndicator-primaryForeground",
"--vscode-inlineEdit-gutterIndicator-secondaryBackground",
"--vscode-inlineEdit-gutterIndicator-secondaryBorder",
"--vscode-inlineEdit-gutterIndicator-secondaryForeground",
"--vscode-inlineEdit-gutterIndicator-successfulBackground",
"--vscode-inlineEdit-gutterIndicator-successfulBorder",
"--vscode-inlineEdit-gutterIndicator-successfulForeground",
"--vscode-inlineEdit-indicator-background",
"--vscode-inlineEdit-indicator-border",
"--vscode-inlineEdit-indicator-foreground",
"--vscode-inlineEdit-modifiedBackground",
"--vscode-inlineEdit-modifiedBorder",
"--vscode-inlineEdit-modifiedChangedLineBackground",
@@ -386,8 +389,8 @@
"--vscode-inlineEdit-originalBorder",
"--vscode-inlineEdit-originalChangedLineBackground",
"--vscode-inlineEdit-originalChangedTextBackground",
"--vscode-inlineEdit-tabWillAcceptBorder",
"--vscode-inlineEdit-wordReplacementView-background",
"--vscode-inlineEdit-tabWillAcceptModifiedBorder",
"--vscode-inlineEdit-tabWillAcceptOriginalBorder",
"--vscode-input-background",
"--vscode-input-border",
"--vscode-input-foreground",
@@ -783,7 +786,14 @@
"--vscode-terminalStickyScroll-border",
"--vscode-terminalStickyScrollHover-background",
"--vscode-terminalSymbolIcon-aliasForeground",
"--vscode-terminalSymbolIcon-argumentForeground",
"--vscode-terminalSymbolIcon-fileForeground",
"--vscode-terminalSymbolIcon-flagForeground",
"--vscode-terminalSymbolIcon-folderForeground",
"--vscode-terminalSymbolIcon-inlineSuggestionForeground",
"--vscode-terminalSymbolIcon-methodForeground",
"--vscode-terminalSymbolIcon-optionForeground",
"--vscode-terminalSymbolIcon-optionValueForeground",
"--vscode-testing-coverCountBadgeBackground",
"--vscode-testing-coverCountBadgeForeground",
"--vscode-testing-coveredBackground",
+1 -1
View File
@@ -26,7 +26,7 @@ const product = require("../../product.json");
// The reference dependencies, which one has to update when the new dependencies
// are valid, are in dep-lists.ts
const FAIL_BUILD_FOR_NEW_DEPENDENCIES = true;
// Based on https://source.chromium.org/chromium/chromium/src/+/refs/tags/132.0.6834.196:chrome/installer/linux/BUILD.gn;l=64-80
// Based on https://source.chromium.org/chromium/chromium/src/+/refs/tags/132.0.6834.210:chrome/installer/linux/BUILD.gn;l=64-80
// and the Linux Archive build
// Shared library dependencies that we already bundle.
const bundledDeps = [
+1 -1
View File
@@ -25,7 +25,7 @@ import product = require('../../product.json');
// are valid, are in dep-lists.ts
const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = true;
// Based on https://source.chromium.org/chromium/chromium/src/+/refs/tags/132.0.6834.196:chrome/installer/linux/BUILD.gn;l=64-80
// Based on https://source.chromium.org/chromium/chromium/src/+/refs/tags/132.0.6834.210:chrome/installer/linux/BUILD.gn;l=64-80
// and the Linux Archive build
// Shared library dependencies that we already bundle.
const bundledDeps = [
+3
View File
@@ -46,6 +46,7 @@ exports.referenceGeneratedDepsByArch = {
'libc.so.6(GLIBC_2.18)(64bit)',
'libc.so.6(GLIBC_2.2.5)(64bit)',
'libc.so.6(GLIBC_2.25)(64bit)',
'libc.so.6(GLIBC_2.27)(64bit)',
'libc.so.6(GLIBC_2.28)(64bit)',
'libc.so.6(GLIBC_2.3)(64bit)',
'libc.so.6(GLIBC_2.3.2)(64bit)',
@@ -140,6 +141,7 @@ exports.referenceGeneratedDepsByArch = {
'libc.so.6(GLIBC_2.17)',
'libc.so.6(GLIBC_2.18)',
'libc.so.6(GLIBC_2.25)',
'libc.so.6(GLIBC_2.27)',
'libc.so.6(GLIBC_2.28)',
'libc.so.6(GLIBC_2.4)',
'libc.so.6(GLIBC_2.6)',
@@ -240,6 +242,7 @@ exports.referenceGeneratedDepsByArch = {
'libc.so.6(GLIBC_2.17)(64bit)',
'libc.so.6(GLIBC_2.18)(64bit)',
'libc.so.6(GLIBC_2.25)(64bit)',
'libc.so.6(GLIBC_2.27)(64bit)',
'libc.so.6(GLIBC_2.28)(64bit)',
'libcairo.so.2()(64bit)',
'libcurl.so.4()(64bit)',
+3
View File
@@ -45,6 +45,7 @@ export const referenceGeneratedDepsByArch = {
'libc.so.6(GLIBC_2.18)(64bit)',
'libc.so.6(GLIBC_2.2.5)(64bit)',
'libc.so.6(GLIBC_2.25)(64bit)',
'libc.so.6(GLIBC_2.27)(64bit)',
'libc.so.6(GLIBC_2.28)(64bit)',
'libc.so.6(GLIBC_2.3)(64bit)',
'libc.so.6(GLIBC_2.3.2)(64bit)',
@@ -139,6 +140,7 @@ export const referenceGeneratedDepsByArch = {
'libc.so.6(GLIBC_2.17)',
'libc.so.6(GLIBC_2.18)',
'libc.so.6(GLIBC_2.25)',
'libc.so.6(GLIBC_2.27)',
'libc.so.6(GLIBC_2.28)',
'libc.so.6(GLIBC_2.4)',
'libc.so.6(GLIBC_2.6)',
@@ -239,6 +241,7 @@ export const referenceGeneratedDepsByArch = {
'libc.so.6(GLIBC_2.17)(64bit)',
'libc.so.6(GLIBC_2.18)(64bit)',
'libc.so.6(GLIBC_2.25)(64bit)',
'libc.so.6(GLIBC_2.27)(64bit)',
'libc.so.6(GLIBC_2.28)(64bit)',
'libcairo.so.2()(64bit)',
'libcurl.so.4()(64bit)',
+2 -2
View File
@@ -92,7 +92,7 @@ declare namespace monaco.editor {
#includeAll(vs/editor/standalone/browser/standaloneEditor;languages.Token=>Token):
#include(vs/editor/standalone/common/standaloneTheme): BuiltinTheme, IStandaloneThemeData, IColors
#include(vs/editor/common/languages/supports/tokenization): ITokenThemeRule
#include(vs/editor/standalone/browser/standaloneWebWorker): MonacoWebWorker, IWebWorkerOptions
#include(vs/editor/standalone/browser/standaloneWebWorker): MonacoWebWorker, IInternalWebWorkerOptions
#include(vs/editor/standalone/browser/standaloneCodeEditor): IActionDescriptor, IGlobalEditorOptions, IStandaloneEditorConstructionOptions, IStandaloneDiffEditorConstructionOptions, IStandaloneCodeEditor, IStandaloneDiffEditor
export interface ICommandHandler {
(...args: any[]): void;
@@ -145,7 +145,7 @@ declare namespace monaco.languages {
declare namespace monaco.worker {
#include(vs/editor/common/model/mirrorTextModel): IMirrorTextModel
#includeAll(vs/editor/common/services/editorSimpleWorker;):
#includeAll(vs/editor/common/services/editorWebWorker;):
}
+2 -4
View File
@@ -4,8 +4,7 @@
import { IObservable } from './vs/base/common/observable';
import { ServiceIdentifier } from './vs/platform/instantiation/common/instantiation';
import { create as create1 } from './vs/base/common/worker/simpleWorker';
import { create as create2 } from './vs/editor/common/services/editorSimpleWorker';
import { start } from './vs/editor/editor.worker.start';
import { SyncDescriptor0 } from './vs/platform/instantiation/common/descriptors';
import * as editorAPI from './vs/editor/editor.api';
@@ -13,8 +12,7 @@ import * as editorAPI from './vs/editor/editor.api';
var a: any;
var b: any;
a = (<ServiceIdentifier<any>>b).type;
a = create1;
a = create2;
a = start;
// injection madness
a = (<SyncDescriptor0<any>>b).ctor;
+1 -1
View File
@@ -85,7 +85,7 @@ function setNpmrcConfig(dir, env) {
// the correct clang variable. So keep the version check
// in preinstall sync with this logic.
// Change was first introduced in https://github.com/nodejs/node/commit/6e0a2bb54c5bbeff0e9e33e1a0c683ed980a8a0f
if (dir === 'remote' && process.platform === 'darwin') {
if ((dir === 'remote' || dir === 'build') && process.platform === 'darwin') {
env['npm_config_force_process_config'] = 'true';
} else {
delete env['npm_config_force_process_config'];

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