67 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
João Moreno
f4c2700d45
cleanup any casts (#270371)
related to #269213
cc @mjbvz @jrieken
2025-10-08 14:05:31 +00: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
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
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
Benjamin Pasero
c7caef00ea
esm - make optimize.ts ESM only 2024-09-27 08:05:06 +02:00
Benjamin Pasero
d34e895b8e
esm - more AMD removal 2024-09-27 08:04:23 +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
Connor Peet
2138622b04
build: add watch/compile tasks for CLI (#182344)
* build: add watch/compile tasks for CLI

I spent time this morning working on the 'developer experience' of the
CLI in vscode, mainly getting the CLI to cross-compile chasing our
initial idea of having it auto-build in a devcontainer.

After some effort and disabling tunnels connections (to avoid having to
pull in OpenSSL which is a huge pain to cross compile), I was able to
get it to cross-compile from Linux to Windows, using the mingw linker.
I could probably figure out how to get macOS working as well with more
effort. However, I'm not a big fan of this, effectively it's one more
'platform' of build we need to support and test.

I think a better approach is downloading the latest compiled CLI from
the update server instead, as needed. That's what this PR does. It just
places the CLI where it _would_ normally get compiled to by cargo; so
far we don't need to do anything special outside of that.
A notice is shown to users if this fallback happens.

* update from review
2023-06-20 14:34:11 -07:00
Robo
8fb5ea0142
feat: use custom tag instead of custom version for MS electron releases (#181309)
* feat: use custom tag instead of custom version for MS electron releases

* chore: bump @vscode/gulp-electron

* chore: move build id to .yarnrc

* chore: rename enableUNCAccessChecks => restrictUNCAccess

* chore: update electron@22.3.11

* chore: add build info to about dialog

* chore: simplify helper function

* chore: remove unused node.js checksums

* chore: bump nodejs internal version

* chore: bump distro

* fix: revert changes to sign.ts

* chore: bump distro
2023-06-17 03:03:35 +02:00
Connor Peet
ccc5e48e92
fix: breakpoints in extension subdirs on windows not working (#184195)
It did not normalize to forward slashes, so the empty sourcemap was
created with a source called `foo\\bar.js`. Then the build process was
adding a new source `foo/bar.js` since it didn't see it already in the
sourcemap, but `foo\\bar.js` was later normalized. This normalized
version came first in the mapping, but didn't have any mapped locations,
so breakpoints never got set.
2023-06-02 20:15:04 +02:00
Connor Peet
0c94abc4a5
implement sign service for web (#182815)
* signing: implement signing service on the web

* update distro
2023-05-17 16:52:56 -07:00
Alexandru Dima
0255bb0b03
If defined, use the runtime configured baseUrl (#176573) 2023-03-09 07:20:15 -07:00
Johannes Rieken
7e69465303
don't use underscore for native JS things (#173282) 2023-02-03 03:47:51 -08: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
易良
59faab44cd
Only use string of the remote/web/package.json browser field (#165163)
fix(build): Close #165162, only use string of the package.json `browser` field
2022-11-08 10:30:02 -05:00
Connor Peet
18f743d534
address pr comments 2022-10-05 12:56:07 -07:00
Connor Peet
665eb030a6
Merge remote-tracking branch 'origin/main' into build-integrated-cli 2022-09-23 13:33:35 -07:00
Connor Peet
9bcc88eafe
cli: get builds in order 2022-09-23 13:28:26 -07:00
Benjamin Pasero
9db57e76e9
Build: bundle / concat entry points (#161161)
* perf - concatenate windows main files

* Revert "Revert "Use `esbuild` to bundle some CommonJS main files (#160957)" (#161118)"

This reverts commit 84c46b71a5d292a0a9c6cae60e850088270db37d.

* build - exclude server main files

* build - make concat a task that runs like the others

* some renames

* Avoid overwriting the nodejs closure require

* Revert "build - exclude server main files"

This reverts commit 736516624ea73fd13a4e2ac5359e5b54ec851553.

Co-authored-by: Alex Dima <alexdima@microsoft.com>
2022-09-21 00:38:44 -07:00
Matt Bierner
b5a1bb34e9
Pick up latest TS for building VS Code (#158420) 2022-08-26 23:00:38 +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
Logan Ramos
963c961b59
Ensure 1DS can load on the web (#152678)
* Ensure 1DS can load on the web

* Add compiled file
2022-06-20 16:06:16 -07:00
Johannes
0656d21d11
auto-fixed prefer-const violation 2022-06-08 17:49:21 +02:00
João Moreno
726eeffa71
introduce distro private builds 2022-03-21 14:40:00 +01:00
Joao Moreno
a9acf06479
fix webignore patterns for appinsights
also, web: look for minified entrypoints as well

Closes: #140158
2022-01-07 15:18:18 +01:00
Joao Moreno
acdd512060
make api proposal names task play better with gulp
cc @jrieken
2021-12-13 11:36:37 +01:00
Logan Ramos
f0654a2f62
Fix #138361 2021-12-03 10:00:47 -05:00
Logan Ramos
d2a8f91fb5
Update build scripts 2021-08-31 10:21:19 -04:00
Logan Ramos
279c4d8fcb
Use the new loader format for web selfhost (#130592)
* Update workbench html and bump distro

* Bump distro

* Add web node paths to the build task too

* Split task for reuse

* Bump distro
2021-08-11 11:59:14 -04:00
Logan Ramos
8079e0b721
Move webNodePaths to run on compile since we rimraf out 2021-08-10 16:56:23 -04:00
Martin Aeschlimann
975408db6b use uploaded node_modules sourcemaps 2020-10-26 16:19:44 +01:00
João Moreno
a780a45757
fix unnecessary regex 2020-06-11 17:32:55 +02:00
Robo
d5372eb159
Reland "fix: use electron-osx-sign instead of manual code signing (#97582)" (#98145)
This reverts commit f291767f0904ea447794001c2e5e7e2b044980df.
2020-05-20 10:06:15 +02:00
deepak1556
f291767f09 Revert "fix: use electron-osx-sign instead of manual code signing (#97582)"
This reverts commit a1ddfae7825e8a6aad0b625d9e8986d7594c9867.
2020-05-19 00:49:44 -07:00
João Moreno
a1ddfae782
fix: use electron-osx-sign instead of manual code signing (#97582)
* fix: use electron-osx-sign instead of manual code signing

* build/gulpfile.vscode.darwin.js -> build/darwin/sign.ts

* fix script call in pipeline

* fix incorrect keychain path

* fix update path to entitlements

* sign children first

* move electron-osx-sign deps to build/

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2020-05-18 08:43:30 -07:00
Alexandru Dima
b5ce6014d7
Improve output in case of errors and generate an analysis folder with the source content (for easy diffing) 2019-11-13 11:15:38 +01:00
Joao Moreno
5048816ebf
extract yarn electron 2019-10-16 11:15:43 +02:00
Johannes Rieken
c695729eb1 remove gulp-tsb hack, fixes #80629 2019-09-10 14:51:46 +02:00
Joao Moreno
9d75c4e528 cleanup node tasks 2019-07-01 15:20:38 +02:00
Joao Moreno
399ff1a2fe gulp ci build task 2019-07-01 12:24:33 +02:00
Joao Moreno
a477e1eafe extract native modules ignore rules 2019-05-09 16:27:37 +02:00
Alex Dima
c4bed46784 Add a download util that uses a separate process 2019-03-06 10:19:17 +01:00
Alex Dima
af95b7d343 Adopt task.define (better task names) 2019-02-12 20:43:55 +01:00
Alex Dima
c25de7d09f Extract task code to its own file 2019-02-12 15:13:43 +01:00
Alex Dima
7d38cdcb51 Render more task names 2019-02-08 15:55:19 +01:00
Alex Dima
c9352c4ca9 Adopt new style gulp tasks for the editor (#67863) 2019-02-05 19:23:51 +01:00
Alex Dima
c0c719c651 More gulp task work (#67863) 2019-02-04 18:06:23 +01:00
Alex Dima
4676da4595 More gulp clean task simiplifications (#67863) 2019-02-04 17:34:26 +01:00