File tree 7 files changed +56
-13
lines changed
7 files changed +56
-13
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ release-gcp/
9
9
release-images /
10
10
node_modules
11
11
vendor /modules
12
- /node_modules.asar
13
12
node- *
14
13
/plugins
15
14
/lib /coder-cloud-agent
Original file line number Diff line number Diff line change 99
99
# yarn to fetch node_modules if necessary without build scripts running.
100
100
# We cannot use --no-scripts because we still want dependent package scripts to run.
101
101
jq ' del(.scripts)' < " $VSCODE_SRC_PATH /package.json" > " $VSCODE_OUT_PATH /package.json"
102
+
103
+ pushd " $VSCODE_OUT_PATH "
104
+ symlink_asar
105
+ popd
102
106
}
103
107
104
108
main " $@ "
Original file line number Diff line number Diff line change @@ -76,13 +76,26 @@ main() {
76
76
fi
77
77
}
78
78
79
+ # This is a copy of symlink_asar in ../lib.sh. Look there for details.
80
+ symlink_asar () {
81
+ rm -rf node_modules.asar
82
+ if [ " ${WINDIR-} " ]; then
83
+ mklink /J node_modules.asar node_modules
84
+ else
85
+ ln -s node_modules node_modules.asar
86
+ fi
87
+ }
88
+
79
89
vscode_yarn () {
80
90
echo ' Installing vendor dependencies...'
81
91
cd vendor/modules/code-oss-dev
82
92
yarn --production --frozen-lockfile
83
93
94
+ symlink_asar
95
+
84
96
cd extensions
85
97
yarn --production --frozen-lockfile
98
+
86
99
for ext in * /; do
87
100
ext=" ${ext%/ } "
88
101
echo " extensions/$ext : installing dependencies"
Original file line number Diff line number Diff line change @@ -32,14 +32,14 @@ main() {
32
32
doctoc --title ' # iPad' docs/ipad.md > /dev/null
33
33
doctoc --title ' # Termux' docs/termux.md > /dev/null
34
34
35
- # # TODO: replace with a method that generates fewer false positives.
36
- # if [[ ${CI-} && $(git ls-files --other --modified --exclude-standard) ]]; then
37
- # echo "Files need generation or are formatted incorrectly:"
38
- # git -c color.ui=always status | grep --color=no '\[31m'
39
- # echo "Please run the following locally:"
40
- # echo " yarn fmt"
41
- # exit 1
42
- # fi
35
+ # TODO: replace with a method that generates fewer false positives.
36
+ if [[ ${CI-} && $( git ls-files --other --modified --exclude-standard) ]]; then
37
+ echo " Files need generation or are formatted incorrectly:"
38
+ git -c color.ui=always status | grep --color=no ' \[31m'
39
+ echo " Please run the following locally:"
40
+ echo " yarn fmt"
41
+ exit 1
42
+ fi
43
43
}
44
44
45
45
main " $@ "
Original file line number Diff line number Diff line change @@ -13,8 +13,17 @@ main() {
13
13
cd vendor
14
14
echo ' Installing vendor dependencies...'
15
15
16
- # Ignore scripts to prevent partial install which omits development dependencies.
17
- yarn install --modules-folder modules --ignore-scripts
16
+ # * We install in 'modules' instead of 'node_modules' because VS Code's extensions
17
+ # use a webpack config which cannot differentiate between its own node_modules
18
+ # and itself being in a directory with the same name.
19
+ #
20
+ # * We ignore scripts because NPM/Yarn's default behavior is to assume that
21
+ # devDependencies are not needed, and that even git repo based packages are
22
+ # assumed to be compiled. Because the default behavior for VS Code's `postinstall`
23
+ # assumes we're also compiled, this needs to be ignored.
24
+ yarn install --modules-folder modules --ignore-scripts --frozen-lockfile
25
+
26
+ # Finally, run the vendor `postinstall`
18
27
yarn run postinstall
19
28
}
20
29
Original file line number Diff line number Diff line change @@ -104,3 +104,21 @@ export OS
104
104
# RELEASE_PATH is the destination directory for the release from the root.
105
105
# Defaults to release
106
106
RELEASE_PATH=" ${RELEASE_PATH-release} "
107
+
108
+ # VS Code bundles some modules into an asar which is an archive format that
109
+ # works like tar. It then seems to get unpacked into node_modules.asar.
110
+ #
111
+ # I don't know why they do this but all the dependencies they bundle already
112
+ # exist in node_modules so just symlink it. We have to do this since not only VS
113
+ # Code itself but also extensions will look specifically in this directory for
114
+ # files (like the ripgrep binary or the oniguruma wasm).
115
+ symlink_asar () {
116
+ rm -rf node_modules.asar
117
+ if [ " ${WINDIR-} " ]; then
118
+ # mklink takes the link name first.
119
+ mklink /J node_modules.asar node_modules
120
+ else
121
+ # ln takes the link name second.
122
+ ln -s node_modules node_modules.asar
123
+ fi
124
+ }
Original file line number Diff line number Diff line change 250
250
commander "2.11.x"
251
251
ws "^7.2.0"
252
252
253
- code-oss-dev@cdr/vscode#50f8fff79d612104eed6eb067daf596031fe9f83 :
253
+ code-oss-dev@cdr/vscode#96a09a7846538c3bbedb6a2aeca729537bb8202b :
254
254
version "1.60.0"
255
- resolved "https://codeload.github.com/cdr/vscode/tar.gz/50f8fff79d612104eed6eb067daf596031fe9f83 "
255
+ resolved "https://codeload.github.com/cdr/vscode/tar.gz/96a09a7846538c3bbedb6a2aeca729537bb8202b "
256
256
dependencies :
257
257
" @coder/logger" " ^1.1.16"
258
258
" @microsoft/applicationinsights-web" " ^2.6.4"
You can’t perform that action at this time.
0 commit comments