-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jsonc): added jsonc support (#1234)
* feat(jsonc): added jsonc support * chore: removed unnecessary println * chore: clippy * add snapshot test for jsonc --------- Co-authored-by: Jake Runzer <[email protected]>
- Loading branch information
1 parent
38c42fa
commit 75bca15
Showing
7 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// THIS FILE HAS ALL KINDS OF COMMENTS POSSIBLE TO TEST JSONC | ||
{ | ||
//some random comment | ||
"tasks": { | ||
// random afterline comment | ||
/* :) */ "dev": "deno run --watch main.ts", | ||
"start": "deno start main.ts" | ||
} /* | ||
This | ||
is some multiline comment | ||
*/, | ||
"imports": { | ||
"@std/assert": "jsr:@std/assert@1" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export function add(a: number, b: number): number { | ||
return a + b; | ||
} | ||
// Learn more at https://docs.deno.com/runtime/manual/examples/module_metadata#concepts | ||
if (import.meta.main) { | ||
console.log("Add 2 + 3 =", add(2, 3)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { assertEquals } from "@std/assert"; | ||
import { add } from "./main.ts"; | ||
|
||
Deno.test(function addTest() { | ||
assertEquals(add(2, 3), 5); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
source: tests/generate_plan_tests.rs | ||
expression: plan | ||
--- | ||
{ | ||
"providers": [], | ||
"buildImage": "[build_image]", | ||
"variables": { | ||
"NIXPACKS_METADATA": "deno" | ||
}, | ||
"phases": { | ||
"setup": { | ||
"name": "setup", | ||
"nixPkgs": [ | ||
"deno" | ||
], | ||
"nixOverlays": [], | ||
"nixpkgsArchive": "[archive]" | ||
} | ||
}, | ||
"start": { | ||
"cmd": "deno start main.ts" | ||
} | ||
} |