This repository has been archived by the owner on May 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove JSON import statement. Now, you cannot import JSON module.
- Loading branch information
Showing
14 changed files
with
78 additions
and
38 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
...t/deps/https/example.com/8611ea80bb4f73e9a0c1207b611d77892ac9a19f840b2d389275e6e4d22c0259
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...xample.com/8611ea80bb4f73e9a0c1207b611d77892ac9a19f840b2d389275e6e4d22c0259.metadata.json
This file was deleted.
Oops, something went wrong.
Empty file.
5 changes: 5 additions & 0 deletions
5
...d_meta.com/1d6ab9051e9ae4e3a9d501b1a4316583ae8ecd51d41d327b514abf0194c14dc4.metadata.json
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,5 @@ | ||
{ | ||
"headers": { | ||
"missing-url": true | ||
} | ||
} |
Empty file.
3 changes: 3 additions & 0 deletions
3
...d_meta.com/2f5c120425d2222c81506ea48f25c608a89272ed179233ab4fd47debb0f5d05f.metadata.json
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,3 @@ | ||
{ | ||
"url": "https://invalid_meta.com/missing_headers" | ||
} |
Empty file.
4 changes: 4 additions & 0 deletions
4
...module.com/27e936010957fa71c39ae46b56a40b4b4c5b388f50d950637e4522708a340663.metadata.json
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,4 @@ | ||
{ | ||
"headers": {}, | ||
"url": "https://unknown_module.com/unknown_module_without_extension" | ||
} |
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 |
---|---|---|
@@ -1,12 +1,22 @@ | ||
import { getExtensionFromFile } from "./extension"; | ||
import { getExtensionFromFile, isValidDenoModuleExtension } from "./extension"; | ||
|
||
test("core / extension: getExtensionFromFile", async () => { | ||
expect(getExtensionFromFile("./foo.ts")).toBe(".ts"); | ||
expect(getExtensionFromFile("./foo.tsx")).toBe(".tsx"); | ||
expect(getExtensionFromFile("./foo.js")).toBe(".js"); | ||
expect(getExtensionFromFile("./foo.jsx")).toBe(".jsx"); | ||
expect(getExtensionFromFile("./foo.d.ts")).toBe(".d.ts"); | ||
expect(getExtensionFromFile("./foo.json")).toBe(".json"); | ||
expect(getExtensionFromFile("./foo.wasm")).toBe(".wasm"); | ||
expect(getExtensionFromFile("./foo")).toBe(""); | ||
}); | ||
|
||
test("core / extension: isValidDenoModuleExtension", async () => { | ||
expect(isValidDenoModuleExtension("./foo.ts")).toBeTruthy(); | ||
expect(isValidDenoModuleExtension("./foo.tsx")).toBeTruthy(); | ||
expect(isValidDenoModuleExtension("./foo.js")).toBeTruthy(); | ||
expect(isValidDenoModuleExtension("./foo.jsx")).toBeTruthy(); | ||
expect(isValidDenoModuleExtension("./foo.d.ts")).toBeTruthy(); | ||
expect(isValidDenoModuleExtension("./foo.wasm")).toBeTruthy(); | ||
expect(isValidDenoModuleExtension("./foo")).toBeFalsy(); | ||
expect(isValidDenoModuleExtension("./foo.json")).toBeFalsy(); | ||
}); |
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
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