Commit Graph

105 Commits

Author SHA1 Message Date
Matt Bierner
e779f86b17 Build script cleanup
For #277526

Quick cleanup pass after converting these scripts
2025-11-24 14:07:28 -08:00
Matt Bierner
2648263d3e Run our build scripts directly as typescript (#277567)
* Run our build scripts directly as typescript #277567

Follow up on #276864
For #277526

* Remove a few more ts-node references

* Fix linux and script reference

* Remove `_build-script` ref

* Fix script missing closing quote

* use type only import

* Fix export

* Make sure to run copy-policy-dto

* Make sure we run the copy-policy-dto script

* Enable `verbatimModuleSyntax`

* Pipelines fixes

* Try adding explicit ext to path

* Fix bad edit

* Revert extra `--`

---------

Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>
2025-11-21 14:56:00 +01:00
Matt Bierner
42410acd73 Add proper typings for a few more build script dependencies
For #276864
2025-11-12 16:22:40 -08:00
Matt Bierner
77ed219366 Convert some any -> unknown in build scripts 2025-10-08 10:22:21 -07:00
João Moreno
f4c2700d45 cleanup any casts (#270371)
related to #269213
cc @mjbvz @jrieken
2025-10-08 14:05:31 +00:00
Matt Bierner
360c9fd134 Add lint rule for as any and bulk ignore all existing breaks
For #269213

This adds a new eslint rule for `as any` and `<any>({... })`. We'd like to remove almost all of these, however right now the first goal is to prevent them in new code. That's why with this first PR I simply add `eslint-disable` comments for all breaks

Trying to get this change in soon after branching off for release to hopefully minimize disruption during debt week work
2025-10-02 23:38:33 -07:00
Matt Bierner
d865a99c49 Clean up some typings in build
- Adding ts-check in a few more js files
- Switching to use `@types` for a few more packages
- Remove some unused code
2025-08-07 09:38:52 -07:00
Aman Karmani
e539ff9ae1 [engineering] remove dead references to Swc transpile (#252375) 2025-06-25 10:40:10 +02:00
Benjamin Pasero
1330a32f25 debt - use esbuild for CSS minification (#250820) 2025-06-06 03:04:01 -07:00
Alex Dima
91f0cb7b90 Add nls info to monaco-editor-core and remove left-over AMD tasks 2025-03-20 14:53:50 +01:00
Aman Karmani
e76c50f20e build: switch build/tsconfig.json to module: nodenext (#238426)
* build/tsconfig: switch to module: nodenext for bun compat

* build: rewrite imports for nodenext compat

* build: re-generate
2025-01-22 20:12:39 +01:00
Johannes
6e4221f0ec remove swc 2024-10-04 11:23:51 +02:00
Benjamin Pasero
f5920b80a3 esm - add yarn watch-esm and watch-client-esm 2024-08-15 15:08:49 +02:00
Benjamin Pasero
f6f90e0163 Implement NLS without AMD loader (#214588) 2024-06-28 11:55:48 +02:00
Sandeep Somavarapu
a764c2ac80 Support version for proposed APIs (#216608)
Support version for proposed APIs
2024-06-19 18:01:46 +02:00
Connor Peet
87780c04c8 eng: fix CSS tooling crashes watch task (#209278)
Get rid of the gulp-postcss plugin and just implement our own, I couldn't get it to work.

Fixes #207827
2024-04-01 20:15:25 +02:00
Connor Peet
0f323440e5 eng: allow css nesting via postcss plugin (#203726)
* eng: allow css nesting via postcss plugin

CSS nesting has landed in most browsers at this point, but we don't want
to break users who are still stuck on old browser (mainly older iOS
devices.) This PR adds a postcss plugin to the build process that
de-nests nested CSS.

The plugin required a newer version of postcss as well, so I have
updated that and a couple other modules to their latest versions.

* update build's package.json versions too
2024-01-29 11:19:37 -08:00
João Moreno
87e7f8b5e1 replace node-fetch with native fetch (#198408)
* replace node-fetch with native fetch

* fix dep version

* handle terminated error from fetch

* more error handling
2023-11-16 17:29:35 +01:00
Rob Lourens
901ac65ea9 Implement chatAgent2 proposal (#194635)
* Add notes on chat agent API

* Add request ID to context

* variables

* Add partial implementation for another option for a chat agent API

* update

* Notes from api sync

* More notes

* Can invoke an agent and get the response

* Provide a real request

* Notes

* add `slashCommandProvider` - not yet hooked up

* add metadata properties inline, some comments

* some more notes

* Put the new API side-by-side with the old one

* Fix agent title in response

* Fix agent display

* Send slashCommand to request

* Hook up variables

* Get rid of package.json registration option

* Start to implement followups provider

* Add comment

* make it `slashCommandProvider` all the way, use updateAgent for updates icon, fullName, description

* update docs

* only ask for slash command completions when completing a slash-word

* use complex completion item label for command/agent completions

* add `promptText` to `IParsedChatRequestPart` so that some parts don't make it into the prompt (like agent and slash commands)

* only allow agent and slash command at the beginning of the prompt

* remove unused method

* some jsdoc, many renames so that stuff starts with `ChatAgent...`

* reduce `createChatAgent` to the minimum, let the rest be set via setters

* in the renderer know if an agent has slash command and follow ups, safes IPC calls

* use `iconPath` to align with other APIs

* more jsdoc and more obvious TODOs

* fix chat parser with "late" command

* handle error so that the request stops. where is the rendering tho?

* Show error message in response properly

* Don't blow up global / list

* Change proposal name

* Inline followup types

* fix type

* Remove brace in error msg

---------

Co-authored-by: Johannes <johannes.rieken@gmail.com>
2023-10-12 05:23:51 +02:00
yiliang114
818ae5029a fix: Close #189556, gulp task do not display task name 2023-08-08 14:02:41 +08:00
yiliang114
76e25bad23 fix: Close #189556, gulp task do not display task name 2023-08-03 22:58:20 +08:00
Matt Bierner
debcf16fcd Mangle exported symbols (#182935)
* Mangle exported functions

For #180461

This prototype tries to mangle exported functions, saving a further 440kb from the bundle size

* Fix missing call

* Also try mangling top level exported consts too

* Fixing errors

* Don't run on build files

* Skip a few more manglings and revert change to namespace

* Skip a few more monaco files

* Also mangle consts that shadow types

This increases savings up to 3325

* Also mangle exported classes

* Skip mangling more localization functions for now

* Opt out pfs

* Update build script

* Run find locations task in parallel

This should speed up compile

* Cleanup before close

* Limit workers to avoid hitting memory limit

* Limit pool size

* Skip one more mangling

* Exclude entrypoints from mangling

* Try to fix web build and clean up code

* Exempt a few more projects

* Exempt another file

* Also exempt html

* Skip mangling ext entrypoints

* Use prefix that can't be confused with rpc calls

* Fix max call stack error

* Switch prefixes

* Don't mangle ambient declarations

* Use correct way of checking modifier flags

* Workaround getCombinedModifierFlags not doing what I'd expect

Maybe needs the checker to be enabled too? Just check parent chain instead for now

* Clean up code and add logic showing how enum mangling could work

* Remove a few more skipMangles

Use entrypoints instead

* Fix entrypoint name
2023-06-13 08:18:05 +02:00
Henning Dieterichs
ebe458556d Don't mangle fields for the monaco editor, FYI @jrieken (#177223) 2023-03-15 14:46:23 +01:00
Johannes Rieken
155cd6db22 More implicit public of protected fields fixing (#175869)
* debt - don't make `_insertSuggestion` force-public

https://github.com/microsoft/vscode/issues/166603

* fix most implict public making

https://github.com/microsoft/vscode/issues/166603

* implict public making causes a build failure

* fix one more violation
2023-03-02 12:56:22 +01:00
Johannes Rieken
3db45fbd42 use normalized path when checking for mangled new contents, (#171964)
* use normalized path when checking for mangled new contents,

https://github.com/microsoft/vscode/issues/170767

* add missing js file
2023-01-23 14:11:36 +01:00
Connor Peet
314d7b6c47 debug: allow setting breakpoints in plain .js files (#168921)
* debug: allow setting breakpoints in plain .js files

Fixes #159684

* fixup! don't change sourceURLs in build
2023-01-06 09:22:46 +01:00
João Moreno
983b06e9bf polish mangler output to align with build (#169388) 2022-12-16 13:20:07 +01:00
Johannes
f73bb21f27 wip 2022-12-02 13:03:16 +01:00
Johannes
aeb79e48a0 free memory when TS2TS mangling is done 2022-11-14 16:54:13 +01:00
Johannes
d481999d09 make TS-mangler part of compile-build 2022-11-14 15:55:02 +01:00
Johannes
87e54a0759 consume swc as libaray and wire up into the existing transpiler logic 2022-09-07 10:46:27 +02:00
Johannes
7ec1ebdd5f * tweak createSwcClientStream to have async exec
* add `transpileClientSWC` and corresponding gulp task
2022-08-26 15:02:01 +02:00
João Moreno
3e014a7459 argh, still wrong EOL (#159160) 2022-08-25 08:48:58 -04:00
João Moreno
76758809f1 fix api proposal generation EOL (#155991)
on Windows, my files are checked out with LF. the script which generates extensionApiProposals.ts always uses os.EOL, so it always is dirty on my repo every time I compile
2022-07-22 14:21:20 -07:00
Johannes
214e276bd5 have compilation#transpileTask as a separate place for tweaks 2022-06-23 17:32:20 +02:00
Matt Bierner
2a84b0fb6d Enable alwaysStrict for build scripts (#152778)
Turns on `alwaysStrict` and removes `'use strict';` from our `.ts` files
2022-06-21 19:00:43 +00:00
Johannes Rieken
9e21aff42e joh/ts transpile (#152199)
transpile-only tasks for client and extensions

* extract transpile into its own file
* add transpile-client task, polish transpiler
* add transpile-extensions, improve transpile logic
* move declaration of "const enum" above it usage so that it can be used with const-enum-inlining
* (ugly) make d.ts transpilation configurable because it is needed for extensions but a problem for client
* hack my way around so that `getOwnEmitOutputFilePath` is reusable by our transpile
* honor `noEmit` flag
2022-06-15 16:52:48 +02:00
Johannes
eda80f2065 Merge branch 'main' into joh/voluminous-lobster 2022-06-09 16:47:09 +02:00
Johannes
ba66d68c76 add transpile only stream to tsb, using ts.transpile.
https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-simple-transform-function
2022-06-09 15:00:55 +02:00
Johannes
0656d21d11 auto-fixed prefer-const violation 2022-06-08 17:49:21 +02:00
Johannes
c13d581bce move gulp-tsb into the build/lib remove as dependency 2022-05-05 11:35:33 +02:00
Johannes Rieken
4a130c40ed enable @typescript-eslint/member-delimiter-style, https://github.com/microsoft/vscode/issues/140391 2022-02-02 14:35:33 +01:00
Joao Moreno
acdd512060 make api proposal names task play better with gulp
cc @jrieken
2021-12-13 11:36:37 +01:00
Joao Moreno
18214d3dbd fix EOL for generated extensionsApiProposals.ts 2021-12-08 15:19:51 +01:00
Johannes Rieken
7ac327281a make sure proposal name generation is sorted, https://github.com/microsoft/vscode/issues/131165 2021-11-12 11:05:56 +01:00
Johannes Rieken
788d959222 simplify extensionsApiProposals, https://github.com/microsoft/vscode/issues/131165 2021-11-11 17:17:21 +01:00
Johannes Rieken
b48a7f385e tweak generation of propsal file a little bit 2021-11-11 12:55:28 +01:00
Johannes Rieken
0613f0caf2 generate apiProposalNames as ReadonlySet 2021-11-10 15:20:44 +01:00
Johannes Rieken
fe6b867b00 declare proposed API properties for package.json and link them with actual proposal names 2021-11-10 12:34:07 +01:00
Johannes Rieken
da967b591e add generated file api proposal names, add compile script that generates this file 2021-11-10 11:54:24 +01:00