Commit Graph

66 Commits

Author SHA1 Message Date
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
c79433c9de Fix import and use clearer file name 2025-10-30 08:57:26 -07:00
Matt Bierner
883485b3b5 Pick up esbuild target from tsconfig files 2025-10-30 08:53:24 -07:00
Matt Bierner
fe8fc75455 Pick up latest TS native preview
Fixes the emit for copyright headers
2025-10-28 09:18:27 -07:00
Matt Bierner
77ed219366 Convert some any -> unknown in build scripts 2025-10-08 10:22:21 -07:00
Johannes Rieken
626370b3f7 no more any-casts in tsb land, https://github.com/microsoft/vscode/issues/269213 (#270192) 2025-10-07 15:07:24 +02:00
Matt Bierner
1174f9b951 Compile build scripts too 2025-10-02 23:46:45 -07: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
Johannes Rieken
3f527562bb Fix cyclic dependency reporting in chat module (#269095)
* fix cyclic dependency in chat land

* make sure cyclic dependencies are correctly reported when running  complie-client task
2025-09-30 15:09:13 +00:00
Matt Bierner
e4e8f2ad79 Update build TS versions 2025-08-25 10:32:36 -07:00
Matt Bierner
12a275ffe7 Use ts-native to compile our build scripts
There are a few minor differences in output, mostly around formatting/comments. Const enums are also not inlined but that seems fine in these cases
2025-08-06 11:41:52 -07:00
Robo
2305e3bbcd ci: fix linux node_modules publish pipeline (#256781)
* ci: fix linux node_modules publish pipeline

* fix: build
2025-07-21 18:09:57 +09:00
Aman Karmani
e539ff9ae1 [engineering] remove dead references to Swc transpile (#252375) 2025-06-25 10:40:10 +02:00
Connor Peet
cac4de4186 fix cycle checker on windows 2025-06-09 10:57:54 -07:00
Johannes
9a7cbdef4d stable cycle reporting 2025-06-09 15:38:23 +02:00
Johannes
c5af7e2424 fix & improve reporting of cyclic dependencies 2025-06-09 15:02:25 +02:00
Johannes
6bb8066506 fix tsb cyclic dependency check 2025-06-09 14:37:05 +02:00
Johannes Rieken
938caeaa2f Merge branch 'main' into tmm1/build-improvements 2025-04-01 11:59:57 +02:00
Johannes Rieken
b14a80cb7f fix https://github.com/microsoft/vscode/issues/241094 (#241114) 2025-02-18 19:53:44 +01:00
Johannes Rieken
f6fb04a2bb Merge pull request #238409 from tmm1/tmm1/tsb-edgecase
tsb: fix for deleted and re-added source file not being re-generated
2025-01-31 14:01:03 +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
Aman Karmani
61e52c3265 tsb: fix for deleted and re-added source file not being re-generated 2025-01-21 14:21:13 -08:00
Aman Karmani
fb0388deb6 tsb: avoid processing css imports 2025-01-07 18:04:08 -08:00
Aman Karmani
33c3dbafa4 tsb - normalize filenames consistently in add/removeScriptSnapshot 2025-01-07 18:03:38 -08:00
Johannes Rieken
a40e594f25 Check for cyclic dependencies during compile (#235808)
* Check for cyclic dependencies during compile

Changes gulp-tsb to check the emitted JS code for cyclic dependencies. Historically we never cared about cycles between TS files as long as they dissappeared after compile (e.g type-dependencies, not runtime dependencies)

https://github.com/microsoft/vscode-internalbacklog/issues/5271

* fix cycling dependencies

fyi @aeschli @aiday-mar

* remove cyclic dependency with unused `BasedTextEdit` fyi @hediet

* remove cycle between chatEditService and chatEditingSession

fyi @alexdima

* remove cyclic dependency between chatSetup and chatViewPane

fyi @roblourens

* better cycle detection

* don't check cycles when not needed

* clear graph when reprocessing file dependencies

* remove cycle between with `notebookChatEditController` fyi @DonJayamanne

* modernize and cleanup tsb/utils
2024-12-11 11:26:59 +01:00
Johannes
6e4221f0ec remove swc 2024-10-04 11:23:51 +02:00
Johannes
4a5fdb2ff1 some more esbuild trickery 2024-10-03 18:39:45 +02:00
Johannes Rieken
2a96e0d571 Merge branch 'main' into joh/super-monkey 2024-10-03 17:18:23 +02:00
Martin Aeschlimann
fc6d94b806 [css/json/html] adopt latest lsp, update to module: node16 (#230371)
* adopt latest language-server/client

* update package-locks

* transpiler to support Node16
2024-10-03 13:49:56 +02:00
Johannes
c4093a5112 tweak transpile and pasteUrl.test 2024-10-02 10:30:35 +02:00
Johannes
3ae94fbae4 more transpile tweaks 2024-10-02 10:04:41 +02:00
Johannes
c1fb7325bd add esbuild transpiler for fast CI 2024-10-01 16:26:50 +02:00
Benjamin Pasero
3b8c31c64a esm - fix transpile 2024-09-27 08:32:14 +02:00
Robo
b5a6aa14a8 feat: switch to npm as default package manager (#226927)
* feat: move from yarn to npm

* chore: skip yarn.lock files

* fix: playwright download

* chore: fix compile and hygiene

* chore: bump vsce@2.17.0

Refs 8b49e9dfdf

* test: update results for bat and sh colorizer tests

* fix: add missing lock files for windows

* fix: switch to legacy-peer-deps

* chore: update markdown-it@14.1.0

Refs 737c95a129

esbuild step in extensions-ci-pr was previously using markdown-it
from root which had userland punycode and was able to compile successfully.

* ci: increase pr timeout for windows integration tests

* chore: fix product build

* build: ignore extension dev dependency for rcedit

* build: fix working directory inside container

* build: fix dependency generation

* npm: update dependencies

* ci: use global npmrc

* ci: update cache

* ci: setup global npmrc for private npm auth

* build: fix extension bundling

* chore: sync npm dependencies

* ci: debug env variables for container

* ci: fix win32 cli pipeline

* build: fix npmrc config usage for build/ and remote/ dirs

* fix: windows build

* fix: container builds

* fix: markdown-language-features tests and bundling

```
[03:58:22] Error: Command failed: /Users/demohan/.nvm/versions/node/v20.15.1/bin/node /Users/demohan/github/vscode/extensions/markdown-language-features/esbuild-notebook.js --outputRoot /Users/demohan/github/vscode/.build/extensions/markdown-language-features
✘ [ERROR] Could not resolve "punycode"

    extensions/markdown-language-features/node_modules/markdown-it/lib/index.js:14:27:
      14 │ var punycode     = require('punycode');
         ╵                            ~~~~~~~~~~

  The package "punycode" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
```

Adds userland package based on beed9aee2c

* fix: container builds for distro

* chore: update yarn occurrences

* fixup! chore: bump vsce@2.17.0

Uses the closest version to `main` branch that does not
include d3cc84cdec
while still having the fix 8b49e9dfdf

* chore: sync npm dependencies

* chore: sync npm dependencies

* chore: sync npm dependencies

* chore: throw error when yarn is used for installation

* chore: add review feedback

* chore: switch exec => run where needed

* chore: npm sync dependencies

* fix: markdown-language-features bundling

```
✘ [ERROR] Could not resolve "punycode"

    extensions/markdown-language-features/node_modules/markdown-it/lib/index.js:14:27:
      14 │ var punycode     = require('punycode');
         ╵                            ~~~~~~~~~~

  The package "punycode" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
```

Adds missing userland package based on markdown-it/markdown-it@beed9ae,
can be removed once we update markdown-it >= 14.1.0

* ci: rename no-yarn-lock-changes.yml

* chore: sync npm dependencies

* ci: restore no-yarn-lock-changes.yml

We can disable it in a separate PR to keep the required
checks happy and also need workflow edit perms.

* chore: sync npm dependencies

* ci: rebuild cache

* ci: fix no-package-lock-changes.yml

* chore: bump distro

* chore: rm yarn.lock files

* chore: rm yarn.lock files without dependencies

* chore: add vscode-selfhost-import-aid to postinstall dirs

* chore: bump distro
2024-09-06 22:18:02 +09:00
Johannes Rieken
e1cc3fa181 tsb should handle .js suffix (#227544)
fixes https://github.com/microsoft/vscode/issues/227540
2024-09-04 10:36:15 +02:00
Johannes
b9b51f0fb0 tweak SWC options to allow module interop 2024-06-03 18:40:56 +02:00
Matt Bierner
6403b4367b Pick up latest TS for building VS Code (#207096) 2024-03-07 12:59:59 -08:00
Johannes Rieken
236d5dc072 sha256 over md5 (#202985)
* `sha256` over `md5`

* add missing JS file
2024-01-22 14:40:18 +01:00
João Moreno
e469272e45 remove inline sourcemaps from build files (#198842) 2023-11-22 14:05:46 +01:00
Matt Bierner
10d94ba0f3 Pick up latest TS nightly for building VS Code (#194631) 2023-10-02 19:40:35 +01:00
Johannes
eeae481e47 set emit-target and libs to ES2022, avoid static-blocks, fix Error#cause conflict
https://github.com/microsoft/vscode/issues/185991
2023-06-30 11:43:19 +02:00
Johannes
56c917debf update SWC config to disable useDefineForClassFields 2023-06-23 12:55:32 +02:00
Matt Bierner
03540d605f Pick up latest TS for building VS code (#180706) 2023-04-24 20:14:30 +02:00
Johannes
f7f42dbd63 print/fwd SWC errors properly
https://github.com/microsoft/vscode/issues/173074
2023-02-02 11:57:38 +01:00
Matt Bierner
d67db9d358 Pick up latest TS for building VS Code (#172033) 2023-01-23 11:39:28 -08:00
Johannes
0d5f87e9dd change source map merge logic to be like applying line edits to the typescript source maps (based on the input source maps) 2022-12-14 15:57:55 +01:00
Johannes
f73bb21f27 wip 2022-12-02 13:03:16 +01:00
Johannes
696c1cf199 build utils with source map to enable JS debug console 2022-11-10 15:05:47 +01:00
Matt Bierner
e7e403d83f Bump target for build scripts (#165287) 2022-11-03 12:19:54 -07:00
Johannes
d6f5727021 also use SWC for extensions transpile 2022-09-07 11:18:53 +02:00