Browse Source

feat: remove yarn dependency (#2297)

Baptiste Augrain 1 month ago
parent
commit
c9976ec085

+ 0 - 4
.github/workflows/insider-linux.yml

@@ -107,10 +107,6 @@ jobs:
           node-version: '20.18.2'
         if: env.SHOULD_BUILD == 'yes'
 
-      - name: Install Yarn
-        run: npm install -g yarn
-        if: env.SHOULD_BUILD == 'yes'
-
       - name: Setup Python 3
         uses: actions/setup-python@v5
         with:

+ 0 - 8
.github/workflows/insider-windows.yml

@@ -105,10 +105,6 @@ jobs:
           node-version: '20.18.2'
         if: env.SHOULD_BUILD == 'yes'
 
-      - name: Install Yarn
-        run: npm install -g yarn
-        if: env.SHOULD_BUILD == 'yes'
-
       - name: Setup Python 3
         uses: actions/setup-python@v5
         with:
@@ -190,10 +186,6 @@ jobs:
           node-version: '20.18.2'
         if: env.SHOULD_BUILD == 'yes'
 
-      - name: Install Yarn
-        run: npm install -g yarn
-        if: env.SHOULD_BUILD == 'yes'
-
       - name: Setup Python 3
         uses: actions/setup-python@v5
         with:

+ 0 - 4
.github/workflows/stable-linux.yml

@@ -108,10 +108,6 @@ jobs:
           node-version: '20.18.2'
         if: env.SHOULD_BUILD == 'yes'
 
-      - name: Install Yarn
-        run: npm install -g yarn
-        if: env.SHOULD_BUILD == 'yes'
-
       - name: Setup Python 3
         uses: actions/setup-python@v5
         with:

+ 0 - 8
.github/workflows/stable-windows.yml

@@ -104,10 +104,6 @@ jobs:
           node-version: '20.18.2'
         if: env.SHOULD_BUILD == 'yes'
 
-      - name: Install Yarn
-        run: npm install -g yarn
-        if: env.SHOULD_BUILD == 'yes'
-
       - name: Setup Python 3
         uses: actions/setup-python@v5
         with:
@@ -189,10 +185,6 @@ jobs:
           node-version: '20.18.2'
         if: env.SHOULD_BUILD == 'yes'
 
-      - name: Install Yarn
-        run: npm install -g yarn
-        if: env.SHOULD_BUILD == 'yes'
-
       - name: Setup Python 3
         uses: actions/setup-python@v5
         with:

+ 1 - 1
CONTRIBUTING.md

@@ -36,7 +36,7 @@ If you want to update the existing patches, please follow the section [`Patch Up
 - first, you need to build VSCodium
 - then use the command `./dev/patch.sh <your patch name>`, to initiate a new patch
 - when the script pauses at `Press any key when the conflict have been resolved...`, open `vscode` directory in **VSCodium**
-- run `yarn watch`
+- run `npm run watch`
 - run `./script/code.sh`
 - make your changes
 - press any key to continue the script `patch.sh`

+ 13 - 13
build.sh

@@ -14,19 +14,19 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
 
   export NODE_OPTIONS="--max-old-space-size=8192"
 
-  yarn monaco-compile-check
-  yarn valid-layers-check
+  npm run monaco-compile-check
+  npm run valid-layers-check
 
-  yarn gulp compile-build-without-mangling
-  yarn gulp compile-extension-media
-  yarn gulp compile-extensions-build
-  yarn gulp minify-vscode
+  npm run gulp compile-build-without-mangling
+  npm run gulp compile-extension-media
+  npm run gulp compile-extensions-build
+  npm run gulp minify-vscode
 
   if [[ "${OS_NAME}" == "osx" ]]; then
     # generate Group Policy definitions
     node build/lib/policies darwin
 
-    yarn gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
+    npm run gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
 
     find "../VSCode-darwin-${VSCODE_ARCH}" -print0 | xargs -0 touch -c
 
@@ -39,7 +39,7 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
     if [[ "${CI_BUILD}" == "no" ]]; then
       . ../build/windows/rtf/make.sh
 
-      yarn gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
+      npm run gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
 
       if [[ "${VSCODE_ARCH}" != "x64" ]]; then
         SHOULD_BUILD_REH="no"
@@ -51,7 +51,7 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
   else # linux
     # in CI, packaging will be done by a different job
     if [[ "${CI_BUILD}" == "no" ]]; then
-      yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
+      npm run gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
 
       find "../VSCode-linux-${VSCODE_ARCH}" -print0 | xargs -0 touch -c
     fi
@@ -60,13 +60,13 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
   fi
 
   if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
-    yarn gulp minify-vscode-reh
-    yarn gulp "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
+    npm run gulp minify-vscode-reh
+    npm run gulp "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
   fi
 
   if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
-    yarn gulp minify-vscode-reh-web
-    yarn gulp "vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
+    npm run gulp minify-vscode-reh-web
+    npm run gulp "vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
   fi
 
   cd ..

+ 4 - 4
build/alpine/package_reh.sh

@@ -51,8 +51,8 @@ fi
 
 if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
   echo "Building REH"
-  yarn gulp minify-vscode-reh
-  yarn gulp "vscode-reh-${PA_NAME}-min-ci"
+  npm run gulp minify-vscode-reh
+  npm run gulp "vscode-reh-${PA_NAME}-min-ci"
 
   pushd "../vscode-reh-${PA_NAME}"
 
@@ -64,8 +64,8 @@ fi
 
 if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
   echo "Building REH-web"
-  yarn gulp minify-vscode-reh-web
-  yarn gulp "vscode-reh-web-${PA_NAME}-min-ci"
+  npm run gulp minify-vscode-reh-web
+  npm run gulp "vscode-reh-web-${PA_NAME}-min-ci"
 
   pushd "../vscode-reh-web-${PA_NAME}"
 

+ 2 - 2
build/linux/package_bin.sh

@@ -54,7 +54,7 @@ if [[ -f "../build/linux/${VSCODE_ARCH}/electron.sh" ]]; then
   # shellcheck disable=SC1090
   source "../build/linux/${VSCODE_ARCH}/electron.sh"
 
-  TARGET=$( yarn config get target )
+  TARGET=$( npm config get target )
 
   # Only fails at different major versions
   if [[ "${ELECTRON_VERSION%%.*}" != "${TARGET%%.*}" ]]; then
@@ -128,7 +128,7 @@ done
 
 node build/azure-pipelines/distro/mixin-npm
 
-yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
+npm run gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
 
 if [[ -f "../build/linux/${VSCODE_ARCH}/ripgrep.sh" ]]; then
   bash "../build/linux/${VSCODE_ARCH}/ripgrep.sh" "../VSCode-linux-${VSCODE_ARCH}/resources/app/node_modules"

+ 4 - 4
build/linux/package_reh.sh

@@ -164,8 +164,8 @@ export VSCODE_NODE_GLIBC="-glibc-${GLIBC_VERSION}"
 
 if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
   echo "Building REH"
-  yarn gulp minify-vscode-reh
-  yarn gulp "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
+  npm run gulp minify-vscode-reh
+  npm run gulp "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
 
   EXPECTED_GLIBC_VERSION="${EXPECTED_GLIBC_VERSION}" EXPECTED_GLIBCXX_VERSION="${GLIBCXX_VERSION}" SEARCH_PATH="../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ./build/azure-pipelines/linux/verify-glibc-requirements.sh
 
@@ -183,8 +183,8 @@ fi
 
 if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
   echo "Building REH-web"
-  yarn gulp minify-vscode-reh-web
-  yarn gulp "vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
+  npm run gulp minify-vscode-reh-web
+  npm run gulp "vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
 
   EXPECTED_GLIBC_VERSION="${EXPECTED_GLIBC_VERSION}" EXPECTED_GLIBCXX_VERSION="${GLIBCXX_VERSION}" SEARCH_PATH="../vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ./build/azure-pipelines/linux/verify-glibc-requirements.sh
 

+ 5 - 5
build/windows/package.sh

@@ -24,19 +24,19 @@ node build/azure-pipelines/distro/mixin-npm
 
 . ../build/windows/rtf/make.sh
 
-yarn gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
+npm run gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
 
 if [[ "${VSCODE_ARCH}" == "x64" ]]; then
   if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
     echo "Building REH"
-    yarn gulp minify-vscode-reh
-    yarn gulp "vscode-reh-win32-${VSCODE_ARCH}-min-ci"
+    npm run gulp minify-vscode-reh
+    npm run gulp "vscode-reh-win32-${VSCODE_ARCH}-min-ci"
   fi
 
   if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
     echo "Building REH-web"
-    yarn gulp minify-vscode-reh-web
-    yarn gulp "vscode-reh-web-win32-${VSCODE_ARCH}-min-ci"
+    npm run gulp minify-vscode-reh-web
+    npm run gulp "vscode-reh-web-win32-${VSCODE_ARCH}-min-ci"
   fi
 fi
 

+ 1 - 8
dev/build_docker.sh

@@ -20,20 +20,13 @@ while getopts ":ilp" opt; do
       export VSCODE_LATEST="yes"
       ;;
     p)
-      export SKIP_ASSETS="no" 
+      export SKIP_ASSETS="no"
       ;;
     *)
       ;;
   esac
 done
 
-if ! exists yarn; then
-  curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
-  sudo apt-get install -y nodejs desktop-file-utils
-
-  npm install -g yarn
-fi
-
 UNAME_ARCH=$( uname -m )
 
 if [[ "${UNAME_ARCH}" == "x86_64" ]]; then

+ 2 - 3
docs/howto-build.md

@@ -15,7 +15,6 @@
 ## <a id="dependencies"></a>Dependencies
 
 - node 20.14
-- yarn
 - jq
 - git
 - python3 3.11
@@ -97,7 +96,7 @@ review-tools.snap-review --allow-classic codium*.snap
 - run `./dev/update_patches.sh`
 - when the script pauses at `Press any key when the conflict have been resolved...`, open `vscode` directory in **VSCodium**
 - fix all the `*.rej` files
-- run `yarn watch`
+- run `npm run watch`
 - run `./script/code.sh` until everything is ok
 - press any key to continue the script `update_patches.sh`
 
@@ -108,7 +107,7 @@ review-tools.snap-review --allow-classic codium*.snap
 - revert all changes
 - run `git apply --reject ../patches/<name>.patch`
 - fix all the `*.rej` files
-- run `yarn watch`
+- run `npm run watch`
 - run `./script/code.sh` until everything is ok
 - run `git diff > ../patches/<name>.patch`
 

+ 7 - 7
prepare_assets.sh

@@ -95,18 +95,18 @@ if [[ "${OS_NAME}" == "osx" ]]; then
 elif [[ "${OS_NAME}" == "windows" ]]; then
   cd vscode || { echo "'vscode' dir not found"; exit 1; }
 
-  yarn gulp "vscode-win32-${VSCODE_ARCH}-inno-updater"
+  npm run gulp "vscode-win32-${VSCODE_ARCH}-inno-updater"
 
   if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
     7z.exe a -tzip "../assets/${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" -x!CodeSignSummary*.md -x!tools "../VSCode-win32-${VSCODE_ARCH}/*" -r
   fi
 
   if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
-    yarn gulp "vscode-win32-${VSCODE_ARCH}-system-setup"
+    npm run gulp "vscode-win32-${VSCODE_ARCH}-system-setup"
   fi
 
   if [[ "${SHOULD_BUILD_EXE_USR}" != "no" ]]; then
-    yarn gulp "vscode-win32-${VSCODE_ARCH}-user-setup"
+    npm run gulp "vscode-win32-${VSCODE_ARCH}-user-setup"
   fi
 
   if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
@@ -152,13 +152,13 @@ else
   fi
 
   if [[ "${SHOULD_BUILD_DEB}" != "no" || "${SHOULD_BUILD_APPIMAGE}" != "no" ]]; then
-    yarn gulp "vscode-linux-${VSCODE_ARCH}-prepare-deb"
-    yarn gulp "vscode-linux-${VSCODE_ARCH}-build-deb"
+    npm run gulp "vscode-linux-${VSCODE_ARCH}-prepare-deb"
+    npm run gulp "vscode-linux-${VSCODE_ARCH}-build-deb"
   fi
 
   if [[ "${SHOULD_BUILD_RPM}" != "no" ]]; then
-    yarn gulp "vscode-linux-${VSCODE_ARCH}-prepare-rpm"
-    yarn gulp "vscode-linux-${VSCODE_ARCH}-build-rpm"
+    npm run gulp "vscode-linux-${VSCODE_ARCH}-prepare-rpm"
+    npm run gulp "vscode-linux-${VSCODE_ARCH}-build-rpm"
   fi
 
   if [[ "${SHOULD_BUILD_APPIMAGE}" != "no" ]]; then