mirror of
https://github.com/hanzoai/code.git
synced 2026-09-30 20:53:35 +00:00
feat: swtich to npm as default package manager
This commit is contained in:
@@ -19,7 +19,7 @@ FOR /F "tokens=*" %%g IN ('node build/lib/node.js') do (SET NODE=%%g)
|
||||
|
||||
if not exist "%NODE%" (
|
||||
:: Download nodejs executable for remote
|
||||
call yarn gulp node
|
||||
call npm run gulp node
|
||||
)
|
||||
|
||||
popd
|
||||
|
||||
@@ -18,7 +18,7 @@ function code() {
|
||||
NODE=$(node build/lib/node.js)
|
||||
if [ ! -e $NODE ];then
|
||||
# Load remote node
|
||||
yarn gulp node
|
||||
npm run gulp node
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
@@ -6,14 +6,14 @@ title VSCode Web Serverless
|
||||
pushd %~dp0\..
|
||||
|
||||
:: Sync built-in extensions
|
||||
call yarn download-builtin-extensions
|
||||
call npm run download-builtin-extensions
|
||||
|
||||
:: Node executable
|
||||
FOR /F "tokens=*" %%g IN ('node build/lib/node.js') do (SET NODE=%%g)
|
||||
|
||||
if not exist "%NODE%" (
|
||||
:: Download nodejs executable for remote
|
||||
call yarn gulp node
|
||||
call npm run gulp node
|
||||
)
|
||||
|
||||
:: Launch Server
|
||||
|
||||
+2
-2
@@ -11,12 +11,12 @@ function code() {
|
||||
cd $ROOT
|
||||
|
||||
# Sync built-in extensions
|
||||
yarn download-builtin-extensions
|
||||
npm run download-builtin-extensions
|
||||
|
||||
NODE=$(node build/lib/node.js)
|
||||
if [ ! -e $NODE ];then
|
||||
# Load remote node
|
||||
yarn gulp node
|
||||
npm run gulp node
|
||||
fi
|
||||
|
||||
NODE=$(node build/lib/node.js)
|
||||
|
||||
@@ -18,7 +18,7 @@ else
|
||||
fi
|
||||
|
||||
# Get electron
|
||||
yarn electron
|
||||
npm run electron
|
||||
|
||||
popd
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
@echo off
|
||||
yarn %*
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
yarn $*
|
||||
+2
-2
@@ -24,10 +24,10 @@ fi
|
||||
VSCODECRASHDIR=$ROOT/.build/crashes
|
||||
|
||||
# Node modules
|
||||
test -d node_modules || yarn
|
||||
test -d node_modules || npm i
|
||||
|
||||
# Get electron
|
||||
yarn electron
|
||||
npm run electron
|
||||
|
||||
# Unit Tests
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
|
||||
@@ -49,7 +49,7 @@ if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Colorize tests
|
||||
call yarn test-extension -l vscode-colorize-tests
|
||||
call npm run test-extension -l vscode-colorize-tests
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
@@ -59,7 +59,7 @@ if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Markdown tests
|
||||
call yarn test-extension -l markdown-language-features
|
||||
call npm run test-extension -l markdown-language-features
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
@@ -77,24 +77,24 @@ if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Ipynb tests
|
||||
call yarn test-extension -l ipynb
|
||||
call npm run test-extension -l ipynb
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Notebook Output tests
|
||||
call yarn test-extension -l notebook-renderers
|
||||
call npm run test-extension -l notebook-renderers
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Configuration editing tests
|
||||
set CFWORKSPACE=%TEMPDIR%\cf-%RANDOM%
|
||||
mkdir %CFWORKSPACE%
|
||||
call yarn test-extension -l configuration-editing
|
||||
call npm run test-extension -l configuration-editing
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### GitHub Authentication tests
|
||||
call yarn test-extension -l github-authentication
|
||||
call npm run test-extension -l github-authentication
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
:: Tests standalone (CommonJS)
|
||||
|
||||
@@ -67,7 +67,7 @@ kill_app
|
||||
echo
|
||||
echo "### Colorize tests"
|
||||
echo
|
||||
yarn test-extension -l vscode-colorize-tests
|
||||
npm run test-extension -l vscode-colorize-tests
|
||||
kill_app
|
||||
|
||||
echo
|
||||
@@ -79,7 +79,7 @@ kill_app
|
||||
echo
|
||||
echo "### Markdown tests"
|
||||
echo
|
||||
yarn test-extension -l markdown-language-features
|
||||
npm run test-extension -l markdown-language-features
|
||||
kill_app
|
||||
|
||||
echo
|
||||
@@ -97,25 +97,25 @@ kill_app
|
||||
echo
|
||||
echo "### Ipynb tests"
|
||||
echo
|
||||
yarn test-extension -l ipynb
|
||||
npm run test-extension -l ipynb
|
||||
kill_app
|
||||
|
||||
echo
|
||||
echo "### Notebook Output tests"
|
||||
echo
|
||||
yarn test-extension -l notebook-renderers
|
||||
npm run test-extension -l notebook-renderers
|
||||
kill_app
|
||||
|
||||
echo
|
||||
echo "### Configuration editing tests"
|
||||
echo
|
||||
yarn test-extension -l configuration-editing
|
||||
npm run test-extension -l configuration-editing
|
||||
kill_app
|
||||
|
||||
echo
|
||||
echo "### GitHub Authentication tests"
|
||||
echo
|
||||
yarn test-extension -l github-authentication
|
||||
npm run test-extension -l github-authentication
|
||||
kill_app
|
||||
|
||||
# Tests standalone (CommonJS)
|
||||
|
||||
@@ -49,7 +49,7 @@ if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Colorize tests
|
||||
call yarn test-extension -l vscode-colorize-tests
|
||||
call npm run test-extension -l vscode-colorize-tests
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
@@ -59,7 +59,7 @@ if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Markdown tests
|
||||
call yarn test-extension -l markdown-language-features
|
||||
call npm run test-extension -l markdown-language-features
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
@@ -77,24 +77,24 @@ if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Ipynb tests
|
||||
call yarn test-extension -l ipynb
|
||||
call npm run test-extension -l ipynb
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Notebook Output tests
|
||||
call yarn test-extension -l notebook-renderers
|
||||
call npm run test-extension -l notebook-renderers
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### Configuration editing tests
|
||||
set CFWORKSPACE=%TEMPDIR%\cf-%RANDOM%
|
||||
mkdir %CFWORKSPACE%
|
||||
call yarn test-extension -l configuration-editing
|
||||
call npm run test-extension -l configuration-editing
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
echo.
|
||||
echo ### GitHub Authentication tests
|
||||
call yarn test-extension -l github-authentication
|
||||
call npm run test-extension -l github-authentication
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
:: Tests standalone (CommonJS)
|
||||
|
||||
@@ -67,7 +67,7 @@ kill_app
|
||||
echo
|
||||
echo "### Colorize tests"
|
||||
echo
|
||||
yarn test-extension -l vscode-colorize-tests
|
||||
npm run test-extension -l vscode-colorize-tests
|
||||
kill_app
|
||||
|
||||
echo
|
||||
@@ -79,7 +79,7 @@ kill_app
|
||||
echo
|
||||
echo "### Markdown tests"
|
||||
echo
|
||||
yarn test-extension -l markdown-language-features
|
||||
npm run test-extension -l markdown-language-features
|
||||
kill_app
|
||||
|
||||
echo
|
||||
@@ -97,25 +97,25 @@ kill_app
|
||||
echo
|
||||
echo "### Ipynb tests"
|
||||
echo
|
||||
yarn test-extension -l ipynb
|
||||
npm run test-extension -l ipynb
|
||||
kill_app
|
||||
|
||||
echo
|
||||
echo "### Notebook Output tests"
|
||||
echo
|
||||
yarn test-extension -l notebook-renderers
|
||||
npm run test-extension -l notebook-renderers
|
||||
kill_app
|
||||
|
||||
echo
|
||||
echo "### Configuration editing tests"
|
||||
echo
|
||||
yarn test-extension -l configuration-editing
|
||||
npm run test-extension -l configuration-editing
|
||||
kill_app
|
||||
|
||||
echo
|
||||
echo "### GitHub Authentication tests"
|
||||
echo
|
||||
yarn test-extension -l github-authentication
|
||||
npm run test-extension -l github-authentication
|
||||
kill_app
|
||||
|
||||
# Tests standalone (CommonJS)
|
||||
|
||||
@@ -9,7 +9,7 @@ IF "%~1" == "" (
|
||||
set EXT_PATH=%CD:\=/%/extensions
|
||||
|
||||
:: Download nodejs executable for remote
|
||||
call yarn gulp node
|
||||
call npm run gulp node
|
||||
) else (
|
||||
set AUTHORITY=%1
|
||||
set EXT_PATH=%2
|
||||
|
||||
@@ -22,7 +22,7 @@ if [[ "$1" == "" ]]; then
|
||||
AUTHORITY=vscode-remote://test+test
|
||||
EXT_PATH=$ROOT/extensions
|
||||
# Load remote node
|
||||
yarn gulp node
|
||||
npm run gulp node
|
||||
else
|
||||
AUTHORITY=$1
|
||||
EXT_PATH=$2
|
||||
|
||||
@@ -9,7 +9,7 @@ IF "%~1" == "" (
|
||||
set EXT_PATH=%CD:\=/%/extensions
|
||||
|
||||
:: Download nodejs executable for remote
|
||||
call yarn gulp node
|
||||
call npm run gulp node
|
||||
) else (
|
||||
set AUTHORITY=%1
|
||||
set EXT_PATH=%2
|
||||
@@ -26,8 +26,10 @@ if "%VSCODE_REMOTE_SERVER_PATH%"=="" (
|
||||
)
|
||||
|
||||
if not exist ".\test\integration\browser\out\index.js" (
|
||||
call yarn --cwd test/integration/browser compile
|
||||
call yarn playwright-install
|
||||
pushd test\integration\browser
|
||||
call npm run compile
|
||||
popd
|
||||
call npm run playwright-install
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ else
|
||||
fi
|
||||
|
||||
if [ ! -e 'test/integration/browser/out/index.js' ];then
|
||||
yarn --cwd test/integration/browser compile
|
||||
yarn playwright-install
|
||||
(cd test/integration/browser && npm run compile)
|
||||
npm run playwright-install
|
||||
fi
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -24,10 +24,10 @@ fi
|
||||
VSCODECRASHDIR=$ROOT/.build/crashes
|
||||
|
||||
# Node modules
|
||||
test -d node_modules || yarn
|
||||
test -d node_modules || npm i
|
||||
|
||||
# Get electron
|
||||
yarn electron
|
||||
npm run electron
|
||||
|
||||
# Unit Tests
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
|
||||
@@ -75,7 +75,7 @@ async function update() {
|
||||
if (modulesWithVersion.length > 0) {
|
||||
for (const cwd of [vscodeDir, path.join(vscodeDir, 'remote'), path.join(vscodeDir, 'remote/web')]) {
|
||||
console.log(`${path.join(cwd, 'package.json')}: Updating\n ${modulesWithVersion.join('\n ')}`);
|
||||
cp.execSync(`yarn add ${modulesWithVersion.join(' ')}`, { cwd });
|
||||
cp.execSync(`npm install ${modulesWithVersion.join(' ')}`, { cwd });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ async function update() {
|
||||
if (backendOnlyModulesWithVersion.length > 0) {
|
||||
for (const cwd of [vscodeDir, path.join(vscodeDir, 'remote')]) {
|
||||
console.log(`${path.join(cwd, 'package.json')}: Updating\n ${backendOnlyModulesWithVersion.join('\n ')}`);
|
||||
cp.execSync(`yarn add ${backendOnlyModulesWithVersion.join(' ')}`, { cwd });
|
||||
cp.execSync(`npm install ${backendOnlyModulesWithVersion.join(' ')}`, { cwd });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user