Skip to content

Commit 9b593c6

Browse files
authored
chore: bump vscode to 1.96.2 (#614)
1 parent 2b2ab3c commit 9b593c6

File tree

118 files changed

+22303
-12959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+22303
-12959
lines changed

Diff for: .devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"forwardPorts": [8080],
2525

2626
// Use 'postCreateCommand' to run commands after the container is created.
27-
//"postCreateCommand": "yarn",
27+
//"postCreateCommand": "npm install",
2828

2929
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3030
"remoteUser": "node"

Diff for: .eslintignore

-7
This file was deleted.

Diff for: .eslintrc.json

-69
This file was deleted.

Diff for: .github/workflows/build.yml

+8-18
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,21 @@ jobs:
1212
build:
1313
strategy:
1414
matrix:
15-
os: [ubuntu-20.04]
15+
os: [macos-14]
1616
node-version: [20.x]
1717

1818
runs-on: ${{ matrix.os }}
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v2
23+
uses: actions/setup-node@v4
2424
with:
25+
cache: 'npm'
2526
node-version: ${{ matrix.node-version }}
2627

27-
- name: Get yarn cache directory path
28-
id: yarn-cache-dir-path
29-
run: echo "::set-output name=dir::$(yarn cache dir)"
30-
31-
- uses: actions/cache@v2
32-
with:
33-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
34-
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
35-
restore-keys: |
36-
${{ runner.os }}-yarn-${{ matrix.node-version }}
37-
38-
- run: yarn --frozen-lockfile
39-
- run: yarn eslint
40-
- run: yarn build
28+
- run: npm install
29+
- run: npm run eslint
30+
- run: npm run build
4131
- uses: microsoft/playwright-github-action@v1
42-
- run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} yarn test:ci
32+
- run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run test:ci

Diff for: .github/workflows/test-wtih-vscode-build.yml

+9-20
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,21 @@ jobs:
1212
build:
1313
strategy:
1414
matrix:
15-
os: [ubuntu-20.04]
16-
node-version: [20.16.0]
15+
os: [macos-14]
16+
node-version: [20.x]
1717

1818
runs-on: ${{ matrix.os }}
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v2
23+
uses: actions/setup-node@v4
2424
with:
25+
cache: 'npm'
2526
node-version: ${{ matrix.node-version }}
2627

27-
- name: Get yarn cache directory path
28-
id: yarn-cache-dir-path
29-
run: echo "::set-output name=dir::$(yarn cache dir)"
30-
31-
- uses: actions/cache@v2
32-
with:
33-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
34-
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
35-
restore-keys: |
36-
${{ runner.os }}-yarn-${{ matrix.node-version }}
37-
38-
- run: sudo apt update && sudo apt install -y libkrb5-dev
39-
- run: yarn --frozen-lockfile
40-
- run: yarn build:vscode
41-
- run: yarn yalc && yarn build
28+
- run: npm install && cd vscode-web && npm install
29+
- run: cd vscode-web && npm run clone && npm run build
30+
- run: npm run link & npm run build
4231
- uses: microsoft/playwright-github-action@v1
43-
- run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} yarn test:ci
32+
- run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run test:ci

Diff for: .gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@ lib
33
dist
44
out
55
node_modules
6-
.yalc
7-
yalc.lock
8-
yarn-error.log

Diff for: .gitpod.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ image:
22
file: .gitpod.Dockerfile
33
tasks:
44
- init: |
5-
yarn
6-
yarn build
5+
npm install
6+
npm run build
77
command: |
88
echo "======================="
9-
echo "Please run 'yarn watch'"
9+
echo "Please run 'npm run watch'"
1010
echo "======================="
1111
- command: |
1212
echo "==========================================================================="
13-
echo "Please wait for 'yarn watch' to complete compilation, then run 'yarn serve'"
13+
echo "Please wait for 'npm run watch' to complete compilation"
1414
echo "==========================================================================="
1515
ports:
1616
- port: 8080

Diff for: .husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn lint-staged
4+
npx lint-staged

Diff for: .prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ vscode-web/extensions
77
htm.module.js
88
preact.module.js
99
preact-hooks.module.js
10+
index.html

Diff for: .prettierrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
tabWidth: 2,
33
useTabs: true,
44
semi: true,

Diff for: README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ You can start an online development environment with [Gitpod](https://www.gitpod
6060
```bash
6161
git clone [email protected]:conwnet/github1s.git
6262
cd github1s
63-
yarn
64-
yarn watch
63+
npm install
64+
npm run watch
6565
# The cli will automatically open http://localhost:8080 once the build is completed.
6666
# You can visit http://localhost:8080/conwnet/github1s if it doesn't.
6767
```
@@ -75,15 +75,15 @@ To verify the build:
7575

7676
```bash
7777
cd github1s
78-
yarn build:vscode
78+
npm run build:vscode
7979
```
8080

8181
After the initial successful build, you could use the watch mode:
8282

8383
```bash
8484
cd github1s
85-
yarn
86-
yarn watch-with-vscode
85+
npm install
86+
npm run watch-with-vscode
8787
# The cli will automatically open http://localhost:8080 once the build is completed.
8888
# You can visit http://localhost:8080/conwnet/github1s if it doesn't.
8989
```
@@ -99,28 +99,28 @@ You can use the VS Code plugin [Remote-Containers](https://marketplace.visualstu
9999

100100
- Now VS Code will create the docker container and connect to the new container so you can use this as a fully setup environment!
101101

102-
5. Open a new VS Code Terminal, then you can run the `yarn` commands listed above.
102+
5. Open a new VS Code Terminal, then you can run the `npm install` commands listed above.
103103

104104
```bash
105-
yarn
106-
yarn watch
105+
npm install
106+
npm run watch
107107
# The cli will automatically open http://localhost:8080 once the build is completed.
108108
# You can visit http://localhost:8080/conwnet/github1s if it doesn't.
109109
```
110110

111111
### Format all codes
112112

113113
```bash
114-
yarn format
114+
npm run format
115115
```
116116

117117
It uses `prettier` to format all possible codes.
118118

119119
## Build
120120

121121
```bash
122-
yarn
123-
yarn build
122+
npm install
123+
npm run build
124124
```
125125

126126
## Feedback

Diff for: docs/guide.md

+20-12
Original file line numberDiff line numberDiff line change
@@ -26,42 +26,48 @@ So, if you meet some problems when you use GitHub1s, even if you are using newer
2626

2727
But this does not mean the token is absolutely safe, **don't forget to clean it while you are using a device that doesn't belong to you**.
2828

29+
# Sourcegraph API
30+
31+
Due to the potential RateLimit of the GitHub API, we will prioritize the use of the [Sourcegraph API](https://sourcegraph.com/docs) for public repositories, with the exception of the Read interface, the code search capability is also provided by the Sourcegraph API.
32+
33+
By default, GitHub1s will only try to use the GitHub API when the Sourcegraph API request fails, and you can adjust this option in the settings.
34+
2935
# Development
3036

3137
As you see, running GitHub1s locally is not difficult. After cloning the repository, just run these commands:
3238

3339
```shell
34-
$ yarn
35-
$ yarn watch # or yarn build, it may take minutes, wait please
40+
$ npm install
41+
$ npm run watch
3642
```
3743

38-
Then, there will be a new directory named `dist` generated in the project root. The `yarn watch:dev-server` (part of `yarn watch` command) will automatically open http://localhost:8080 in the browser.
44+
Then, there will be a new directory named `dist` generated in the project root. The `npm run watch:dev-server` (part of `npm run watch` command) will automatically open http://localhost:8080 in the browser.
3945

4046
If you get a 404 error for some static files, please wait a minute for the building to complete.
4147

4248
## Watch Mode
4349

44-
What happens after you run `yarn watch-with-vscode`?
50+
What happens after you run `npm run watch-with-vscode`?
4551

46-
1. Copy some necessary resources (`index.html`, extensions config, libraries, etc.) to the `dist` directory.
52+
1. Copy some necessary resources (`index.html`, `favicons.ico`, etc.) to the `dist` directory.
4753

48-
2. Go to `vscode-web/lib/vscode` and run `yarn gulp compile-web` to build the necessary extensions, then copy it to the `dist/extensions` directory.
54+
2. This command will compile the codes in `src` and generate application entry script (see `webpack.config.js`). This command also compile the custom extensions (for example `github1s`) in `extensions` directory.
4955

50-
3. Go to `vscode-web/lib/vscode` and run `yarn watch` (the native watch of vscode), it will trigger a new build if something in it has been changed.
56+
3. Redirect vscode-web static requests (vscode, extensisions, dependencies) to `vscode-web/lib/vscode` which should be generated by vscode compile process.
5157

52-
4. Watch the `vscode-web/src` directory, merge it in to `vscode-web/lib/vscode/src` if something in it has been changed. (When a new file is merged into `lib/vscode/src`, it will trigger the watcher that is described in Step 3)
58+
You should also compile the vscode manually in another terminal.
5359

54-
5. Go to `extensions/github1s` and run `yarn watch`, it will trigger a new build if something has been changed.
60+
1. Go to `vscode-web` and run `npm install && npm run watch` (the native watch of vscode), it will trigger a new build if something in it has been changed.
5561

56-
6. Watch the `extensions` directory and the `lib/vscode/out` directory, merge them into the `dist` directory if something changed in them.
62+
2. This command will alose watch the `vscode-web/src` and `vscode-web/extensions` directory, merge it in to `vscode-web/lib/vscode` if something in it has been changed. (When a new file is merged into `lib/vscode`, it will trigger the watcher that is described in Step 3)
5763

5864
Note that since we have modified the source code of VS Code, it may get into trouble when merging a newer version VS Code.
5965

6066
It is a little laborious to complete the watch process, but I didn't think of a better solution.
6167

62-
What happens after you run `yarn watch`?
68+
What happens after you run `npm run watch`?
6369

64-
It's the same procedure as `yarn watch-with-vscode` without the step 2, 3, and 4. Instead of the local VS Code, it uses the prebuilt [@github1s/vscode-web](https://www.npmjs.com/package/@github1s/vscode-web) version.
70+
It's the same procedure as `` without the step 3. Instead of the local VS Code, it uses the prebuilt [@github1s/vscode-web](https://www.npmjs.com/package/@github1s/vscode-web) version.
6571

6672
## Build mode
6773

@@ -73,6 +79,8 @@ Put simply, we build the necessary code and do a minify. The minify script is mo
7379

7480
- `src` - the code in here will be patched into VS Code source.
7581

82+
- `vscode-web` - This contains the code to patch VS Code.
83+
7684
- `scripts` - some scripts for build, watch, package, etc.
7785

7886
- `resources` - some resource files such as templates, pictures, configuration files, etc.

Diff for: eslint.config.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import jsdoc from 'eslint-plugin-jsdoc';
2+
import tseslint from 'typescript-eslint';
3+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
4+
5+
export default [
6+
{ ignores: ['**/dist', '**/assets', 'vscode-web/lib', '**/vs', '**/vscode.proposed.d.ts'] },
7+
...tseslint.configs.recommended,
8+
jsdoc.configs['flat/recommended-typescript'],
9+
eslintPluginPrettierRecommended,
10+
{
11+
rules: {
12+
'@typescript-eslint/no-explicit-any': 'off',
13+
'@typescript-eslint/no-unused-expressions': 'off',
14+
'@typescript-eslint/no-unused-vars': 'off',
15+
},
16+
},
17+
];

Diff for: extensions/github1s/assets/pages/github1s-authentication.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ const AuthenticationFeatures = () => {
88
return html`
99
<ul class="authentication-features">
1010
${(pageConfig.authenticationFeatures || []).map(
11-
(feature) => html`<li class="feature-item">
12-
<a class="link" href=${feature.link} target="_blank" rel="noopener noreferrer">${feature.text}</a>
13-
</li>`
11+
(feature) =>
12+
html`<li class="feature-item">
13+
<a class="link" href=${feature.link} target="_blank" rel="noopener noreferrer">${feature.text}</a>
14+
</li>`,
1415
)}
1516
</ul>
1617
`;

0 commit comments

Comments
 (0)