Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to ESM #166033

Closed
wants to merge 330 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
330 commits
Select commit Hold shift + click to select a range
0062af8
fix ESM module loading in worker stuff
jrieken Jan 19, 2023
ab3a2ad
add missing jsdoc-types
jrieken Jan 19, 2023
3e1567b
Merge branch 'main' into alex/esm
jrieken Jan 20, 2023
e758c13
Merge branch 'main' into alex/esm
jrieken Jan 26, 2023
77ac5c1
Merge branch 'main' into alex/esm
jrieken Jan 27, 2023
8723f28
add ugly graceful-fs workaround
jrieken Jan 27, 2023
0c734be
Revert "add ugly graceful-fs workaround"
jrieken Jan 27, 2023
d77120d
remove all AMD and loader references from perf editor
jrieken Jan 29, 2023
172bec5
fix timers with bootstrap-window ESM mode
jrieken Jan 29, 2023
bbc21df
bundle experiments
jrieken Jan 29, 2023
c31cc1a
experiment with some bundle options,
jrieken Jan 29, 2023
774557c
Merge branch 'main' into alex/esm
jrieken Jan 31, 2023
80435e5
add CSS register function and use after imports
jrieken Feb 2, 2023
6faba27
build workbench.main for browser target
jrieken Feb 2, 2023
e7ad97c
use `importAMDNodeModule` for EXP assignment service
jrieken Feb 2, 2023
6e9266a
only use/import `registerStyleSheet` when having a CSS import
jrieken Feb 2, 2023
830b64a
Merge branch 'main' into alex/esm
jrieken Feb 2, 2023
6321ecf
more bundle experiments
jrieken Feb 2, 2023
30b4994
Merge branch 'main' into alex/esm
jrieken Feb 3, 2023
6d04ca1
fix CSS migration part
jrieken Feb 3, 2023
0ac7700
fix keyboard layout imports
jrieken Feb 3, 2023
cc05b97
add another build script that works off the same entry points as the …
jrieken Feb 3, 2023
266d745
Merge branch 'main' into alex/esm
jrieken Feb 20, 2023
1d6854d
fix merge error
jrieken Feb 20, 2023
abade4b
Merge branch 'main' into alex/esm
jrieken Mar 30, 2023
59e1010
ensure vscode-textmate is loaded via the `importAMDNodeModule`-util, …
jrieken Mar 30, 2023
b2bd87a
Merge branch 'main' into alex/esm
jrieken Mar 30, 2023
bf30c8c
fix shared process
jrieken Mar 30, 2023
45a4fe9
Merge branch 'main' into alex/esm
jrieken Mar 31, 2023
972a59c
Merge branch 'main' into alex/esm
jrieken Apr 25, 2023
402ab15
make src2 compile again
jrieken Apr 25, 2023
41b78c8
Merge branch 'main' into alex/esm
jrieken May 3, 2023
a585aab
update esm-typings
jrieken May 3, 2023
9fe7063
Merge branch 'main' into alex/esm
jrieken Jun 22, 2023
37fa317
make it run again (mostly)
jrieken Jun 22, 2023
2daf3bd
Merge branch 'main' into alex/esm
jrieken Jun 28, 2023
55e0607
Merge branch 'main' into alex/esm
jrieken Jun 30, 2023
01e2105
make changes a little smaller
jrieken Jun 30, 2023
c2bf564
Merge branch 'main' into alex/esm
jrieken Jun 30, 2023
ed8df25
Merge branch 'main' into alex/esm
jrieken Jun 30, 2023
5e6987a
remove duplicated module def
jrieken Jun 30, 2023
beab89d
Revert "make changes a little smaller"
jrieken Jun 30, 2023
1b41afe
Merge branch 'main' into alex/esm
jrieken Jul 4, 2023
3609876
Merge branch 'main' into alex/esm
jrieken Jul 4, 2023
a935186
less changes
jrieken Jul 4, 2023
db1796d
add empty no-op loaders, no more need for workbench-esm tricks 'cos o…
jrieken Jul 4, 2023
e4f7419
Merge branch 'main' into alex/esm
jrieken Jul 4, 2023
895b4f7
smaller diff
jrieken Jul 4, 2023
187ff91
support COI for worker factory ESM path
jrieken Jul 5, 2023
d10e668
remove shared process html
jrieken Jul 5, 2023
30a2f35
Merge branch 'main' into alex/esm
jrieken Jul 5, 2023
b306a1e
Merge branch 'main' into alex/esm
jrieken Jul 5, 2023
1afdabb
more fake/stub require function when running ESM
jrieken Jul 5, 2023
ac0293e
Do serve correct page for web client bits
jrieken Jul 5, 2023
4cc751c
Merge branch 'main' into alex/esm
jrieken Sep 4, 2023
842c28a
Merge branch 'main' into alex/esm
jrieken Sep 4, 2023
1732a8d
update test runners to support snapshots
jrieken Sep 5, 2023
6cda0af
Merge branch 'main' into alex/esm
jrieken Sep 5, 2023
739f38e
also update node unit test runner
jrieken Sep 5, 2023
de6a870
Merge branch 'main' into alex/esm
jrieken Sep 5, 2023
e18f7ea
towards happy eslint
jrieken Sep 5, 2023
4f1cf92
Merge branch 'main' into alex/esm
jrieken Sep 5, 2023
6ce77f4
Merge branch 'main' into alex/esm
jrieken Sep 6, 2023
787f214
Change how CSS file are imported with ESM
jrieken Sep 8, 2023
bdceb68
Merge branch 'main' into alex/esm
jrieken Sep 8, 2023
9311f08
update migrate script
jrieken Jun 3, 2024
3301f0b
Merge branch 'main' into alex/esm
jrieken Jun 3, 2024
c498d9d
fix test runner script
jrieken Jun 3, 2024
124de0b
fix some compile errors
jrieken Jun 3, 2024
7413ccd
update esbuild
jrieken Jun 4, 2024
0eac2b2
fix compile issues with dompurify
jrieken Jun 4, 2024
39b1ff8
adjust build script to ignore `suspicious-nullish-coalescing` warnings
jrieken Jun 4, 2024
6b8b955
Merge branch 'main' into alex/esm
jrieken Jun 5, 2024
bb3f5f3
no more graceful, no more assert-rewriting
jrieken Jun 5, 2024
16eb1b4
Merge branch 'main' into alex/esm
jrieken Jul 1, 2024
8bdc6dc
get things to compile and start again
jrieken Jul 1, 2024
25fe3d7
use latest esbuild
jrieken Jul 2, 2024
0cf8f0e
nls tweaks for server-main
jrieken Jul 2, 2024
2a82c2c
send CSS modules along when running browser tests
jrieken Jul 2, 2024
e9ee89a
towards snapshots in browser tests
jrieken Jul 2, 2024
38e4705
reuse CSS dev util for webClientServer
jrieken Jul 3, 2024
fef9011
use `node:module#register` and `--import`-switch to enable dev-time n…
jrieken Jul 3, 2024
ef03438
remove some unneeded changes
jrieken Jul 3, 2024
091edb8
enable snapshots in ESM, enables `yarn test-browser`
jrieken Jul 3, 2024
c36a485
bootstrap polish
jrieken Jul 3, 2024
7090988
update to latest `test-web`
jrieken Jul 3, 2024
0340c29
Merge branch 'main' into alex/esm
jrieken Jul 3, 2024
90601a5
Merge branch 'main' into alex/esm
jrieken Jul 4, 2024
0f0b63f
fix issue with dev service path
jrieken Jul 4, 2024
cfb3452
no more `languagePacks`
jrieken Jul 4, 2024
c12a07c
pass CSS modules via window config and not via url-query
jrieken Jul 4, 2024
617e378
make sure process explorer works
jrieken Jul 4, 2024
b5d79c5
instead of adding rules, modify the textContext of the style sheet di…
jrieken Jul 4, 2024
f58d488
Merge branch 'main' into alex/esm
jrieken Jul 5, 2024
73cfa35
:lipstick:
jrieken Jul 5, 2024
a6b326b
implement server dev-time node_module redirector more like the origin…
jrieken Jul 5, 2024
45756d1
Merge branch 'main' into alex/esm
jrieken Jul 5, 2024
3303ce2
cleanup migrate script
jrieken Jul 5, 2024
4d66004
tweak build script (watch, minify), ghetto handle vs/css! from entry …
jrieken Jul 5, 2024
b075a5c
allow to run `yarn test-node`
bpasero Jul 5, 2024
5462fb4
workaround jschardet load issue
jrieken Jul 5, 2024
5149438
allow `type: module` for main entry points
bpasero Jul 6, 2024
b7f17c2
debt - remove `electron.ts`
bpasero Jul 8, 2024
eb73523
tweak migrate script to emit esm-package.json one level up
jrieken Jul 8, 2024
118f7aa
make sure to expose 'electron' as module in tests
jrieken Jul 8, 2024
f7d1102
tweak build script
jrieken Jul 8, 2024
ee251e5
Merge branch 'main' into alex/esm
jrieken Jul 8, 2024
4980e0f
make migrate script an ESM module
jrieken Jul 8, 2024
9e625e9
Merge branch 'main' into alex/esm
jrieken Jul 8, 2024
d5e7a22
tweak bootstrap-node
jrieken Jul 8, 2024
af5f959
reduce diff a bit
bpasero Jul 8, 2024
fec8c05
can use `assert` now
bpasero Jul 8, 2024
51a08b3
Merge branch 'main' into alex/esm
bpasero Jul 9, 2024
0ca4c6c
bad mere
bpasero Jul 9, 2024
bb71c8d
reduce diff
bpasero Jul 9, 2024
f2f9c07
fix issues
bpasero Jul 9, 2024
0fb948d
Merge branch 'main' into alex/esm
bpasero Jul 9, 2024
032b22d
cleanup migrate
bpasero Jul 9, 2024
f04a7ba
Tweak tests and other entry points so that they don't require the `--…
jrieken Jul 9, 2024
c7b36ad
Merge branch 'main' into alex/esm
jrieken Jul 9, 2024
5bbb716
fix test runner, needs a file handler
jrieken Jul 9, 2024
0c47b98
add `loader-original-fs` so that amd code uses the "correct" fs modul…
jrieken Jul 9, 2024
320c22f
Merge branch 'main' into alex/esm
jrieken Jul 9, 2024
690af87
Merge branch 'main' into alex/esm
jrieken Jul 9, 2024
296ae2a
special esm handling when loading wasm-files from node_modules
jrieken Jul 9, 2024
35386f5
update comment on `jschardet` issue
bpasero Jul 9, 2024
5dd3eb6
start working on `optimizeESMTask` which is a drop-in for `optimizeAM…
jrieken Jul 10, 2024
122c77a
Merge branch 'main' into alex/esm
jrieken Jul 10, 2024
2c914d6
Merge branch 'main' into alex/esm
jrieken Jul 10, 2024
d164b83
Merge branch 'main' into alex/esm
jrieken Jul 12, 2024
10417ae
remove `typings-esm` because they aren't needed anymore
jrieken Jul 12, 2024
59a068a
reduce diff
jrieken Jul 12, 2024
54ca069
send `_VSCODE_FILE_ROOT` to workerMain so that code loading of worker…
jrieken Jul 12, 2024
25b31d9
reduce diff
jrieken Jul 12, 2024
7a19d02
reduce diff further
jrieken Jul 12, 2024
1feee64
compile from src2 and w/o mangle
jrieken Jul 12, 2024
151f819
Revert "remove `typings-esm` because they aren't needed anymore"
jrieken Jul 12, 2024
a002dde
update yarn lock
jrieken Jul 12, 2024
301de6f
Merge branch 'main' into alex/esm
bpasero Jul 29, 2024
e821b12
reduce diff
bpasero Jul 29, 2024
b31dd2b
Merge branch 'main' into alex/esm
bpasero Jul 29, 2024
fc75b06
bundle - add top level bootstrap files and preserve `package.json` th…
bpasero Jul 30, 2024
fde844d
bundle - get the build to open
bpasero Jul 30, 2024
3158264
build - trigger migration
bpasero Jul 30, 2024
290b583
build - trigger migration without watching
bpasero Jul 30, 2024
f11895a
build - fix lint warnings
bpasero Jul 30, 2024
4f894c2
esm - use "type module" for all windows
bpasero Jul 31, 2024
01aed6e
Merge branch 'main' into alex/esm
bpasero Jul 31, 2024
d870f79
transpile to `src2` too
bpasero Jul 31, 2024
ff17937
missed migration when transpiling
bpasero Jul 31, 2024
2f48217
Merge branch 'main' into alex/esm
bpasero Jul 31, 2024
ab3dcfe
build - skip failing test
bpasero Jul 31, 2024
6964db7
build - set `type: module` also for REH
bpasero Jul 31, 2024
6b46ba0
build - skip mk in deps
bpasero Jul 31, 2024
00f013d
Merge branch 'main' into alex/esm
bpasero Aug 2, 2024
b183bf4
esm - try to fix workers
bpasero Aug 2, 2024
a5adcf3
esm - fix web built
bpasero Aug 2, 2024
20ced7c
build - make sure to include `webWorkerExtensionHost-esm.html`
bpasero Aug 2, 2024
980ef38
esm - enable nls processing
bpasero Aug 2, 2024
4f3b037
esm - try to fix web worker ext host and load workers with type `module`
bpasero Aug 3, 2024
67201f8
esm - skip flakes
bpasero Aug 3, 2024
bcbcb4f
esm - bring NLS support back for web
bpasero Aug 3, 2024
4bf8e78
esm - fix race condition in ESM workers being ready
bpasero Aug 3, 2024
9052d41
esm - try to fix unit tests in build with NLS support
bpasero Aug 3, 2024
436355b
esm - do not use `importScripts`
bpasero Aug 4, 2024
f25b65f
esm - try to fix vsda path
bpasero Aug 4, 2024
888d8ea
Merge branch 'main' into alex/esm
bpasero Aug 5, 2024
26f4e4c
esm - disable minify for diagnosing REH issue
bpasero Aug 5, 2024
6d9e936
esm - avoid `require` (vsda, sign)
bpasero Aug 5, 2024
f1501c4
Revert "esm - disable minify for diagnosing REH issue"
bpasero Aug 5, 2024
d392dd0
esm - convert backslash to slash when checking paths in migrate script
bpasero Aug 5, 2024
f513f4e
esm - unblock skipped test
bpasero Aug 5, 2024
9e11604
esm - removal of bootstrap.js
bpasero Aug 6, 2024
74e706f
esm - drop extra ESM html files
bpasero Aug 6, 2024
69e8edf
fix typo around `bundlesStream`
bpasero Aug 6, 2024
ac014a8
esm - inline `original-fs` loader
bpasero Aug 6, 2024
f02cb89
reduce diff
bpasero Aug 6, 2024
88d18e0
reduce diff
bpasero Aug 6, 2024
42e76f6
reduce diff
bpasero Aug 6, 2024
67d1025
esm - fix process explorer styles
bpasero Aug 6, 2024
7b7e320
Merge branch 'main' into alex/esm
bpasero Aug 6, 2024
47815dd
esm - fix windows to work with esm
bpasero Aug 6, 2024
5dffbf5
esm - fix CSS paths backslash
bpasero Aug 6, 2024
27f2cae
esm - fix tests o Windows
bpasero Aug 7, 2024
94b5d07
copy more files
jrieken Aug 7, 2024
6cdf3e0
make amdX more graceful for faux AMD modules
jrieken Aug 7, 2024
ebedf5c
esm - try to fix linux
bpasero Aug 7, 2024
ae86e06
esm - try to fix macOS universal build
bpasero Aug 7, 2024
374a2f0
more complete `optimizeESMTask`
jrieken Aug 7, 2024
054774d
esm - update `vscode-universal-bundler`
bpasero Aug 7, 2024
aa6f913
chore: bump vscode-universal-bundler@0.1.2
deepak1556 Aug 8, 2024
78fc136
undo bad import
jrieken Aug 8, 2024
bd394d5
Merge branch 'main' into alex/esm
bpasero Aug 9, 2024
dd5e6a1
esm - unblock marked.js
bpasero Aug 9, 2024
01408e7
have `esm` and `amd` targets for some build entry points (like workers)
jrieken Aug 9, 2024
4a1c5f7
default worker factory simply loads final/target module when using ESM
jrieken Aug 9, 2024
2cd5382
add `extensionHostWorker.esm` entry point for web worker EH
jrieken Aug 9, 2024
f6ebcb6
simple worker bootstrap for notebook, profile analysis, and languageD…
jrieken Aug 9, 2024
e250090
continue to use two step worker loading for things that use/extend si…
jrieken Aug 9, 2024
5a80431
define `postMessage` and `onmessage` so that the layers check doesn't…
jrieken Aug 9, 2024
20c4409
Remove ts boilder plate from each file before bundling and preprend `…
jrieken Aug 9, 2024
1aa1b24
try `createRequire` for vsda (which is a true node_module with depend…
jrieken Aug 9, 2024
3179104
`createRequire` only available from "static" import
jrieken Aug 9, 2024
c686bba
Merge branch 'main' into alex/esm
bpasero Aug 9, 2024
b4a879b
fix textmate
bpasero Aug 12, 2024
c2bdf21
Merge branch 'main' into alex/esm
bpasero Aug 12, 2024
51e39f1
some more modules tests
bpasero Aug 12, 2024
89a3ef7
fix 1ds
bpasero Aug 12, 2024
9de0aba
revert error logging in vsda
bpasero Aug 12, 2024
f827dcf
use `require` for `@vscode/vsce-sign`
bpasero Aug 12, 2024
8be09bf
:lipstick:
bpasero Aug 12, 2024
e6c05f9
tweaks
bpasero Aug 13, 2024
42c2694
Welcome view image does not load in ESM exploration (fix #225430)
bpasero Aug 13, 2024
4893ee0
Merge branch 'main' into alex/esm
bpasero Aug 13, 2024
299d106
fix tests and add more
bpasero Aug 13, 2024
680d313
fix tests
bpasero Aug 13, 2024
2d759fa
ok
bpasero Aug 13, 2024
e8784ca
unblock pr ci
bpasero Aug 13, 2024
4649a5a
fix vsda
bpasero Aug 13, 2024
5c45bc9
more use of `original-fs`
bpasero Aug 13, 2024
5ff7b27
Revert "more use of `original-fs`"
bpasero Aug 13, 2024
447ee1d
ESM: relative paths do not work from command line (fix #225482)
bpasero Aug 13, 2024
c7a8498
ESM: enable mangling (#225580)
bpasero Aug 14, 2024
b4cc376
Merge branch 'main' into alex/esm
bpasero Aug 14, 2024
68c6d90
more cleanup
bpasero Aug 14, 2024
ad11ba6
update for main build
bpasero Aug 14, 2024
1a719b3
back to src2
bpasero Aug 14, 2024
54c1f2d
Merge branch 'main' into alex/esm
bpasero Aug 14, 2024
62b93e5
fix merge
bpasero Aug 14, 2024
9dd702c
Merge branch 'main' into alex/esm
bpasero Aug 14, 2024
5d90548
Merge branch 'main' into alex/esm
bpasero Aug 14, 2024
b3832bf
remove duplicate
bpasero Aug 14, 2024
19da0c4
Merge branch 'main' into alex/esm
bpasero Aug 15, 2024
59794ba
revert some changes
bpasero Aug 15, 2024
d909920
update
bpasero Aug 15, 2024
5b158da
?
bpasero Aug 15, 2024
e41e384
skip failing test
bpasero Aug 15, 2024
637f4d3
Merge branch 'main' into alex/esm
bpasero Aug 15, 2024
41f3d0d
align
bpasero Aug 15, 2024
06dde2f
remove dupe
bpasero Aug 15, 2024
f3acb6f
Merge branch 'main' into alex/esm
bpasero Aug 15, 2024
0adacfd
reduce
bpasero Aug 15, 2024
53a9982
fix warning
bpasero Aug 15, 2024
f529dba
remove potentially unused and fix things
bpasero Aug 15, 2024
3e83276
unskip test
bpasero Aug 15, 2024
5014de6
Merge branch 'main' into alex/esm
bpasero Aug 15, 2024
840ce1b
Merge branch 'main' into alex/esm
bpasero Aug 15, 2024
7303b10
merge
bpasero Aug 15, 2024
8971905
Merge branch 'main' into alex/esm
bpasero Aug 15, 2024
f7288bb
merge from main
bpasero Aug 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build/azure-pipelines/linux/product-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ steps:
displayName: Check GLIBC and GLIBCXX dependencies in server archive

- ${{ else }}:
- script: node migrate.mjs --disable-watch
displayName: Migrate to ESM

- script: yarn gulp "transpile-client-swc" "transpile-extensions"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
Expand Down
3 changes: 3 additions & 0 deletions build/azure-pipelines/win32/product-build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ steps:
retryCountOnTaskFailure: 3

- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- powershell: node migrate.mjs --disable-watch
displayName: Migrate to ESM

- powershell: yarn gulp "transpile-client-swc" "transpile-extensions"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
Expand Down
6 changes: 3 additions & 3 deletions build/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ gulp.task(compileApiProposalNamesTask);
gulp.task(watchApiProposalNamesTask);

// SWC Client Transpile
const transpileClientSWCTask = task.define('transpile-client-swc', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), transpileTask('src', 'out', true)));
const transpileClientSWCTask = task.define('transpile-client-swc', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), transpileTask('src2', 'out', true)));
gulp.task(transpileClientSWCTask);

// Transpile only
const transpileClientTask = task.define('transpile-client', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), transpileTask('src', 'out')));
const transpileClientTask = task.define('transpile-client', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), transpileTask('src2', 'out')));
gulp.task(transpileClientTask);

// Fast compile for development time
const compileClientTask = task.define('compile-client', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), compileApiProposalNamesTask, compileTask('src', 'out', false)));
const compileClientTask = task.define('compile-client', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), compileApiProposalNamesTask, compileTask('src2', 'out', false)));
gulp.task(compileClientTask);

const watchClientTask = task.define('watch-client', task.series(util.rimraf('out'), util.buildWebNodePaths('out'), task.parallel(watchTask('out', false), watchApiProposalNamesTask)));
Expand Down
Loading