-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: first-class Deno installs (#146)
- Loading branch information
1 parent
142b859
commit 8f89dc8
Showing
6 changed files
with
110 additions
and
40 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,35 @@ | ||
import { Generator } from '@jspm/generator'; | ||
import assert from 'assert'; | ||
|
||
const generator = new Generator({ | ||
mapUrl: new URL('../../', import.meta.url), | ||
defaultProvider: 'deno' | ||
}); | ||
{ | ||
const generator = new Generator({ | ||
mapUrl: new URL('../../', import.meta.url), | ||
defaultRegistry: 'denoland' | ||
}); | ||
|
||
await generator.install('oak@10.6.0'); | ||
await generator.install('oak@10.6.0'); | ||
|
||
const json = generator.getMap(); | ||
const json = generator.getMap(); | ||
|
||
assert.strictEqual(json.imports['oak'], 'https://deno.land/x/oak@v10.6.0/mod.ts'); | ||
assert.strictEqual(json.imports['oak'], 'https://deno.land/x/oak@v10.6.0/mod.ts'); | ||
} | ||
|
||
{ | ||
const generator = new Generator(); | ||
|
||
await generator.install('denoland:oak'); | ||
|
||
const json = generator.getMap(); | ||
|
||
assert.strictEqual(json.imports['oak'], 'https://deno.land/x/oak@v10.6.0/mod.ts'); | ||
} | ||
|
||
{ | ||
const generator = new Generator(); | ||
|
||
await generator.install('deno:path'); | ||
|
||
const json = generator.getMap(); | ||
|
||
assert.strictEqual(json.imports['path'], 'https://deno.land/std@0.148.0/path/mod.ts'); | ||
} |