Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Evren Sen committed Apr 13, 2024
2 parents 6527b38 + 7457f87 commit 13f7907
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 13 deletions.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/2_other_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Other Request
description: Request a non-theme, non-language extension
labels: ["needs infrastructure"]
body:
- type: checkboxes
attributes:
label: Check for existing issues
description: Check the backlog of issues to reduce the chances of creating duplicates; if an issue already exists, place a `+1` (👍) on it.
options:
- label: Completed
required: true
- type: textarea
attributes:
label: Misc notes
validations:
required: false
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ Looking for extension ideas? Check out:

- [Top theme requests](https://github.com/zed-industries/extensions/issues?q=is%3Aissue+is%3Aopen+label%3Atheme+sort%3Areactions-%2B1-desc)
- [Top language requests](https://github.com/zed-industries/extensions/issues?q=is%3Aissue+is%3Aopen+label%3Alanguage+sort%3Areactions-%2B1-desc)

If an issue requesting an extension is tagged with the `needs infrastructure` label, it indicates that the extension cannot currently be developed due to the absence of necessary system infrastructure.
54 changes: 47 additions & 7 deletions extensions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ version = "0.0.1"

[csv]
submodule = "extensions/csv"
version = "0.0.1"
version = "0.0.2"

[cue]
submodule = "extensions/cue"
Expand All @@ -86,6 +86,11 @@ version = "0.7.3"
submodule = "extensions/elisp"
version = "0.0.4"

[elm]
submodule = "extensions/zed"
path = "extensions/elm"
version = "0.0.1"

[ember]
submodule = "extensions/ember"
version = "0.0.1"
Expand Down Expand Up @@ -145,6 +150,11 @@ submodule = "extensions/zed"
path = "extensions/gleam"
version = "0.1.0"

[glsl]
submodule = "extensions/zed"
path = "extensions/glsl"
version = "0.0.1"

[graphene]
submodule = "extensions/graphene"
version = "0.1.0"
Expand Down Expand Up @@ -173,7 +183,7 @@ version = "0.1.1"

[java]
submodule = "extensions/java"
version = "0.0.3"
version = "0.0.4"

[kiselevka]
submodule = "extensions/kiselevka"
Expand All @@ -199,6 +209,11 @@ version = "0.0.3"
submodule = "extensions/lox"
version = "0.0.1"

[lua]
submodule = "extensions/zed"
path = "extensions/lua"
version = "0.0.1"

[macos-classic]
submodule = "extensions/macos-classic"
version = "0.0.7"
Expand Down Expand Up @@ -253,7 +268,7 @@ version = "0.0.2"

[navi]
submodule = "extensions/navi"
version = "0.1.0"
version = "0.2.0"

[neosolarized]
submodule = "extensions/neosolarized"
Expand Down Expand Up @@ -287,6 +302,11 @@ version = "1.0.0"
submodule = "extensions/nu"
version = "0.0.1"

[ocaml]
submodule = "extensions/zed"
path = "extensions/ocaml"
version = "0.0.1"

[oceanic-next]
submodule = "extensions/oceanic-next"
version = "0.1.0"
Expand Down Expand Up @@ -318,7 +338,7 @@ version = "0.1.0"
[php]
submodule = "extensions/zed"
path = "extensions/php"
version = "0.0.1"
version = "0.0.2"

[pkl]
submodule = "extensions/pkl"
Expand All @@ -342,10 +362,20 @@ version = "0.0.1"
submodule = "extensions/r"
version = "0.0.1"

[racket]
submodule = "extensions/zed"
path = "extensions/racket"
version = "0.0.1"

[scala]
submodule = "extensions/scala"
version = "0.0.1"

[scheme]
submodule = "extensions/zed"
path = "extensions/scheme"
version = "0.0.1"

[siri]
submodule = "extensions/siri"
version = "0.0.3"
Expand Down Expand Up @@ -399,9 +429,14 @@ version = "0.0.1"
submodule = "extensions/templ"
version = "0.0.2"

[terraform]
submodule = "extensions/zed"
path = "extensions/terraform"
version = "0.0.1"

[the-dark-side]
submodule = "extensions/the-dark-side"
version = "0.2.4"
version = "0.2.5"

[tmux]
submodule = "extensions/tmux"
Expand All @@ -414,7 +449,7 @@ version = "0.0.2"
[toml]
submodule = "extensions/zed"
path = "extensions/toml"
version = "0.0.2"
version = "0.1.0"

[typst]
submodule = "extensions/typst"
Expand Down Expand Up @@ -449,6 +484,11 @@ version = "0.0.1"
submodule = "extensions/vscode-monokai-charcoal"
version = "0.0.2"

[vue]
submodule = "extensions/zed"
path = "extensions/vue"
version = "0.0.1"

[wgsl]
submodule = "extensions/wgsl"
version = "0.0.1"
Expand All @@ -472,4 +512,4 @@ version = "0.0.1"
[zig]
submodule = "extensions/zed"
path = "extensions/zig"
version = "0.0.1"
version = "0.1.0"
2 changes: 1 addition & 1 deletion extensions/csv
2 changes: 1 addition & 1 deletion extensions/java
Submodule java updated from cafa9e to 1f3b10
2 changes: 1 addition & 1 deletion extensions/the-dark-side
2 changes: 1 addition & 1 deletion extensions/zed
Submodule zed updated 263 files
22 changes: 22 additions & 0 deletions src/lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,25 @@ export async function readTomlFile(path) {
throw new Error(`Failed to parse TOML file '${path}': ${err}`);
}
}

/**
* @param {string} path
* @returns {Promise<boolean>}
*/
export async function fileExists(path) {
try {
const stat = await fs.stat(path);
return stat.isFile();
} catch (err) {
if (
err &&
typeof err === "object" &&
"code" in err &&
err.code === "ENOENT"
) {
return false;
}

throw err;
}
}
8 changes: 7 additions & 1 deletion src/package-extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import toml from "@iarna/toml";
import assert from "node:assert";
import fs from "node:fs/promises";
import path from "node:path";
import { readTomlFile } from "./lib/fs.js";
import { fileExists, readTomlFile } from "./lib/fs.js";
import {
checkoutGitSubmodule,
readGitmodules,
Expand Down Expand Up @@ -143,6 +143,12 @@ async function packageExtension(
const SCRATCH_DIR = "./scratch";
await fs.mkdir(SCRATCH_DIR, { recursive: true });

if (await fileExists(path.join(extensionPath, "extension.json"))) {
console.warn(
"The `extension.json` manifest format has been superseded by `extension.toml`",
);
}

const zedExtensionOutput = await exec(
"./zed-extension",
[
Expand Down

0 comments on commit 13f7907

Please sign in to comment.