-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate 2 more test and godo for now
- Loading branch information
Showing
9 changed files
with
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
import { takeFileSnapshot } from "@jsenv/snapshot"; | ||
|
||
import { writeImportmaps } from "@jsenv/importmap-node-module"; | ||
import { snapshotWriteImportsMapsSideEffects } from "@jsenv/importmap-node-module/tests/snapshot_write_importmaps_side_effects.js"; | ||
|
||
const testDirectoryUrl = new URL("./root/", import.meta.url); | ||
const devImportmapFileUrl = new URL("./root/dev.importmap", import.meta.url); | ||
const prodImportmapFileUrl = new URL("./root/prod.importmap", import.meta.url); | ||
const devimportmapFileSnapshot = takeFileSnapshot(devImportmapFileUrl); | ||
const prodimportmapFileSnapshot = takeFileSnapshot(prodImportmapFileUrl); | ||
await writeImportmaps({ | ||
logLevel: "warn", | ||
directoryUrl: testDirectoryUrl, | ||
importmaps: { | ||
"dev.importmap": { | ||
nodeMappings: { | ||
devDependencies: true, | ||
await snapshotWriteImportsMapsSideEffects( | ||
() => | ||
writeImportmaps({ | ||
logLevel: "warn", | ||
directoryUrl: new URL("./input/", import.meta.url), | ||
importmaps: { | ||
"dev.importmap": { | ||
nodeMappings: { | ||
devDependencies: true, | ||
}, | ||
}, | ||
"prod.importmap": {}, | ||
}, | ||
}, | ||
"prod.importmap": {}, | ||
}, | ||
}); | ||
devimportmapFileSnapshot.compare(); | ||
prodimportmapFileSnapshot.compare(); | ||
}), | ||
import.meta.url, | ||
`./output/dev_and_prod.md`, | ||
); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,55 @@ | ||
1. return promise | ||
|
||
2. write file "input/dev.importmap" | ||
```importmap | ||
{ | ||
"imports": { | ||
"root/": "./", | ||
"bar/": "./node_modules/bar/", | ||
"foo/": "./node_modules/foo/", | ||
"root": "./index", | ||
"bar": "./node_modules/bar/bar.js", | ||
"foo": "./node_modules/foo/foo.js" | ||
}, | ||
"scopes": {} | ||
} | ||
``` | ||
|
||
3. write file "input/prod.importmap" | ||
```importmap | ||
{ | ||
"imports": { | ||
"root/": "./", | ||
"foo/": "./node_modules/foo/", | ||
"root": "./index", | ||
"foo": "./node_modules/foo/foo.js" | ||
}, | ||
"scopes": {} | ||
} | ||
``` | ||
|
||
4. resolve | ||
```js | ||
{ | ||
"dev.importmap": { | ||
"imports": { | ||
"root/": "./", | ||
"bar/": "./node_modules/bar/", | ||
"foo/": "./node_modules/foo/", | ||
"root": "./index", | ||
"bar": "./node_modules/bar/bar.js", | ||
"foo": "./node_modules/foo/foo.js" | ||
}, | ||
"scopes": {} | ||
}, | ||
"prod.importmap": { | ||
"imports": { | ||
"root/": "./", | ||
"foo/": "./node_modules/foo/", | ||
"root": "./index", | ||
"foo": "./node_modules/foo/foo.js" | ||
}, | ||
"scopes": {} | ||
} | ||
} | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.