-
Notifications
You must be signed in to change notification settings - Fork 5.9k
chore: upgrade Code to 1.74.1 #5909
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
Changes from 19 commits
320f035
ec4177c
8afa5c2
be1a560
6751c82
6acfb0b
bb2a29b
4c00ad4
661e1de
da4f4c3
63fb534
093bbc0
b1b8205
0aecf9e
d00ab19
4deb156
3999279
fc54c44
b3f7a20
10ebf1b
0fabb3a
cbf00ae
e8ef8bf
b6928fa
19b7ba8
fe33adc
02d0aec
9681243
a059129
3b02151
c0d59c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,6 +139,55 @@ jobs: | |
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: yarn lint:ts | ||
|
||
test-unit: | ||
name: Run unit tests | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
**/*.ts | ||
files_ignore: | | ||
lib/vscode/** | ||
|
||
- name: Install Node.js v16 | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
|
||
- name: Fetch dependencies from cache | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: yarn-build-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
yarn-build- | ||
|
||
- name: Install dependencies | ||
if: steps.changed-files.outputs.any_changed == 'true' && steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile | ||
|
||
- name: Run unit tests | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: yarn test:unit | ||
|
||
- name: Upload coverage report to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
if: success() | ||
|
||
build: | ||
name: Build code-server | ||
runs-on: ubuntu-20.04 | ||
|
@@ -170,15 +219,17 @@ jobs: | |
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: yarn-build-${{ hashFiles('**/yarn.lock') }} | ||
key: yarn-build-code-server-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
yarn-build- | ||
yarn-build-code-server- | ||
|
||
- name: Install dependencies | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Build code-server | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: yarn build | ||
|
||
# Get Code's git hash. When this changes it means the content is | ||
|
@@ -204,19 +255,6 @@ jobs: | |
if: steps.cache-vscode.outputs.cache-hit != 'true' | ||
run: yarn build:vscode | ||
|
||
# Our code imports code from VS Code's `out` directory meaning VS Code | ||
# must be built before running these tests. | ||
# TODO: Move to its own step? | ||
- name: Run code-server unit tests | ||
run: yarn test:unit | ||
if: success() | ||
|
||
- name: Upload coverage report to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
if: success() | ||
|
||
# The release package does not contain any native modules | ||
# and is neutral to architecture/os/libc version. | ||
- name: Create release package | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,3 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extens | |
if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) { | ||
return false; | ||
} | ||
@@ -1237,6 +1241,10 @@ export class ExtensionsWorkbenchService | ||
// Skip if check updates only for builtin extensions and current extension is not builtin. | ||
continue; | ||
} | ||
+ if (installed.type !== ExtensionType.User) { | ||
+ // Never update builtin extensions. | ||
+ continue; | ||
+ } | ||
Comment on lines
-25
to
-28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unsure if we still need this. See 6751c82 cc @code-asher There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you are right! One way to see is if on load Code downloads a bunch of builtin extensions into the extensions dir. |
||
if (installed.isBuiltin && (!installed.local?.identifier.uuid || (!isWeb && this.productService.quality === 'stable'))) { | ||
// Skip checking updates for a builtin extension if it does not has Marketplace identifier or the current product is VS Code Desktop stable. | ||
continue; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi | |
=================================================================== | ||
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts | ||
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts | ||
@@ -210,7 +210,7 @@ export class BrowserWorkbenchEnvironment | ||
@@ -207,7 +207,7 @@ export class BrowserWorkbenchEnvironment | ||
|
||
@memoize | ||
get webviewExternalEndpoint(): string { | ||
|
@@ -70,12 +70,12 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index | |
<meta charset="UTF-8"> | ||
|
||
<meta http-equiv="Content-Security-Policy" | ||
- content="default-src 'none'; script-src 'sha256-lC8sxUeeYqUtmkCpPt/OX/HQdE0JbHG1Z3dzrilsRU0=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> | ||
+ content="default-src 'none'; script-src 'sha256-/9/YQU12wvTeVXCsIGB4shLwdWrMceCpKojfkloNjPU=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> | ||
- content="default-src 'none'; script-src 'sha256-6s2fEapj0jmA7ZDjzz23Uv4xLlM7KX3p9DYidJX7Zmk=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> | ||
+ content="default-src 'none'; script-src 'sha256-6/HBKMr5Cr24xXtQ+U/BxvVfCvBLYE55u8Jq3j/nzcI=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked webviews via Markdown Preview and Simple Browser. Unless the HTML files were cached, I didn't see any issues. I will double-check. |
||
|
||
<!-- Disable pinch zooming --> | ||
<meta name="viewport" | ||
@@ -331,6 +331,12 @@ | ||
@@ -325,6 +325,12 @@ | ||
|
||
const hostname = location.hostname; | ||
|
||
|
@@ -92,7 +92,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index | |
=================================================================== | ||
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index-no-csp.html | ||
+++ code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index-no-csp.html | ||
@@ -330,6 +330,12 @@ | ||
@@ -318,6 +318,12 @@ | ||
|
||
const hostname = location.hostname; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI
node .
can be used as a shortcut since it will use themain
entry inpackage.json
which points toout/node/entry.js
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL!