Skip to content

Commit c4b091b

Browse files
authored
Update packaging infrastructure (zed-industries#242)
This PR updates the packaging infrastructure to make it a bit more suited for a longer-term project. Packaging extensions can be invoked by running `pnpm package-extensions` or `just package-extensions` (if you have [`just`](https://github.com/casey/just) installed).
1 parent 673be3c commit c4b091b

9 files changed

+1220
-1565
lines changed

.github/ISSUE_TEMPLATE/0_theme_request.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ description: Request a theme extension
33
title: "<name_of_theme>"
44
labels: ["theme"]
55
body:
6-
- type: checkboxes
7-
attributes:
8-
label: Check for existing issues
9-
description: Check the backlog of issues to reduce the chances of creating duplicates; if an issue already exists, place a `+1` (👍) on it.
10-
options:
11-
- label: Completed
12-
required: true
13-
- type: textarea
14-
attributes:
15-
label: Misc notes
16-
validations:
17-
required: false
6+
- type: checkboxes
7+
attributes:
8+
label: Check for existing issues
9+
description: Check the backlog of issues to reduce the chances of creating duplicates; if an issue already exists, place a `+1` (👍) on it.
10+
options:
11+
- label: Completed
12+
required: true
13+
- type: textarea
14+
attributes:
15+
label: Misc notes
16+
validations:
17+
required: false

.github/ISSUE_TEMPLATE/1_language_request.yml

+37-37
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,41 @@ description: Request a language extensions
33
title: "<name_of_language>"
44
labels: ["language"]
55
body:
6-
- type: checkboxes
7-
attributes:
8-
label: Check for existing issues
9-
description: Check the backlog of issues to reduce the chances of creating duplicates; if an issue already exists, place a `+1` (👍) on it.
10-
options:
11-
- label: Completed
12-
required: true
13-
- type: input
14-
attributes:
15-
label: Language
16-
description: What language do you want support for?
17-
placeholder: HTML
18-
validations:
6+
- type: checkboxes
7+
attributes:
8+
label: Check for existing issues
9+
description: Check the backlog of issues to reduce the chances of creating duplicates; if an issue already exists, place a `+1` (👍) on it.
10+
options:
11+
- label: Completed
1912
required: true
20-
- type: input
21-
attributes:
22-
label: Tree Sitter parser link
23-
description: |
24-
If applicable, provide a link to the appropriate tree sitter parser.
25-
Look here first: https://tree-sitter.github.io/tree-sitter/#available-parsers
26-
placeholder: https://github.com/tree-sitter/tree-sitter-html
27-
validations:
28-
required: false
29-
- type: input
30-
attributes:
31-
label: Language server link
32-
description: |
33-
If applicable, provide a link to the appropriate language server.
34-
Look here first: https://microsoft.github.io/language-server-protocol/implementors/servers/
35-
Note: extensions don't yet support language servers, but include the link for future reference.
36-
placeholder: https://github.com/Microsoft/vscode/tree/main/extensions/html-language-features/server
37-
validations:
38-
required: false
39-
- type: textarea
40-
attributes:
41-
label: Misc notes
42-
validations:
43-
required: false
13+
- type: input
14+
attributes:
15+
label: Language
16+
description: What language do you want support for?
17+
placeholder: HTML
18+
validations:
19+
required: true
20+
- type: input
21+
attributes:
22+
label: Tree Sitter parser link
23+
description: |
24+
If applicable, provide a link to the appropriate tree sitter parser.
25+
Look here first: https://tree-sitter.github.io/tree-sitter/#available-parsers
26+
placeholder: https://github.com/tree-sitter/tree-sitter-html
27+
validations:
28+
required: false
29+
- type: input
30+
attributes:
31+
label: Language server link
32+
description: |
33+
If applicable, provide a link to the appropriate language server.
34+
Look here first: https://microsoft.github.io/language-server-protocol/implementors/servers/
35+
Note: extensions don't yet support language servers, but include the link for future reference.
36+
placeholder: https://github.com/Microsoft/vscode/tree/main/extensions/html-language-features/server
37+
validations:
38+
required: false
39+
- type: textarea
40+
attributes:
41+
label: Misc notes
42+
validations:
43+
required: false

.github/workflows/ci.yml

+15-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- 'main'
7+
- "main"
88

99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
@@ -21,15 +21,25 @@ jobs:
2121
submodules: "recursive"
2222
fetch-depth: 0
2323

24+
- uses: pnpm/action-setup@v3
25+
with:
26+
version: 8
27+
28+
- uses: actions/setup-node@v3
29+
with:
30+
node-version: "20"
31+
cache: "pnpm"
32+
2433
- name: Install Emscripten
2534
uses: mymindstorm/setup-emsdk@v14
2635
with:
27-
version: '3.1.37'
28-
actions-cache-folder: 'emsdk-cache'
36+
version: "3.1.37"
37+
actions-cache-folder: "emsdk-cache"
2938

30-
- run: npm install
39+
- name: Install dependencies
40+
run: pnpm install
3141

32-
- run: ./script/package-extensions
42+
- run: pnpm package-extensions
3343
env:
3444
SHOULD_PUBLISH: ${{ github.ref_name == 'main' }}
3545
S3_BUCKET: ${{ secrets.S3_BUCKET }}

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pnpm-lock.yaml
2+
extensions/

justfile

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# Packages the extensions.
2+
package-extensions:
3+
pnpm package-extensions
4+
15
# Updates the Git submodules containing extensions.
26
submodules:
37
git submodule update --init --recursive
8+
9+
# Resets all of the Git submodules containing extensions.
10+
reset-submodules:
11+
git submodule deinit --force .
12+
git submodule update --init --recursive

0 commit comments

Comments
 (0)