Skip to content

Commit d35aabc

Browse files
committed
feat: Use .yml extension as default for workspace file
1 parent 612a2e4 commit d35aabc

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/const.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const CURRENT_VERSION = "0.2.0";
22
const GITHUB_REPO_NAME = "BentoumiTech/denox";
33
const DENO_WORKSPACE_FILES = [
4-
"deno-workspace",
54
"deno-workspace.yml",
5+
"deno-workspace",
66
"deno-workspace.yaml",
77
".deno-workspace",
88
".deno-workspace.yml",

src/utils/DenoErrors.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class DenoXError extends Error {
88
class WorkspaceNotFoundError extends DenoXError {
99
constructor() {
1010
super(`
11-
deno-workspace file not found in "${Deno.cwd()}"
11+
deno-workspace.yml file not found in "${Deno.cwd()}"
1212
Run "denox init" in your project root directory.
1313
`);
1414
}
@@ -17,15 +17,15 @@ class WorkspaceNotFoundError extends DenoXError {
1717
class ScriptNotFoundError extends DenoXError {
1818
constructor(script: string) {
1919
super(
20-
`Script "${script}" not found please add it to deno-workspace file`,
20+
`Script "${script}" not found please add it to deno-workspace.yml file`,
2121
);
2222
}
2323
}
2424

2525
class WorkspaceFileIsMalformed extends DenoXError {
2626
constructor(parserMessage: string) {
2727
super(`
28-
"deno-workspace" file is not valid
28+
"deno-workspace.yml" file is not valid
2929
3030
${parserMessage}
3131
`);

test/fixture/workspace_multiple_names/deno-workspace/deno-workspace.yml renamed to test/fixture/workspace_multiple_names/deno-workspace.yml/deno-workspace

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
scripts:
22
start:
3-
file: deno-workspace.yml.ts
3+
file: deno-workspace.ts
44
permissions:
55
reload: true
66
globals:

test/src/parser/deno_workspace.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ Deno.test("throw WorkspaceMalformed when workspace file is not valid", async ()
3131

3232
Deno.test("load valid workspaces with correct order of priority", async () => {
3333
const files = [
34-
"deno-workspace",
3534
"deno-workspace.yml",
35+
"deno-workspace",
3636
"deno-workspace.yaml",
3737
".deno-workspace",
3838
".deno-workspace.yml",

0 commit comments

Comments
 (0)