-
-
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.
- Loading branch information
1 parent
bd22f2d
commit 835692b
Showing
7 changed files
with
85 additions
and
82 deletions.
There are no files selected for viewing
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
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,72 +1,75 @@ | ||
import { Generator } from "@jspm/generator"; | ||
import { strictEqual } from "assert"; | ||
// TODO: re-enable this test once the CDN builder can reliably build these | ||
// packages. At the moment this fails constantly from build errors. | ||
|
||
const BASE_CONFIG = { | ||
mapUrl: "about:blank", | ||
ignore: [ | ||
"react", | ||
"react/jsx-runtime", | ||
"react-dom", | ||
"react-dom/server", | ||
"framer", | ||
"framer-motion", | ||
"framer-motion/three", | ||
], | ||
env: ["production", "browser", "module"], | ||
resolutions: { | ||
three: "0.142.0", | ||
zustand: "3.7.1", | ||
ethers: "5.7.2", // workaround for incorrect version pin in @wagmi/core | ||
}, | ||
}; | ||
// import { Generator } from "@jspm/generator"; | ||
// import { strictEqual } from "assert"; | ||
|
||
const generatorOne = new Generator({ | ||
...BASE_CONFIG, | ||
}); | ||
await generatorOne.install("@react-three/fiber"); | ||
const mapOne = generatorOne.getMap(); | ||
|
||
strictEqual( | ||
mapOne.scopes["https://ga.jspm.io/"].zustand, | ||
"https://ga.jspm.io/npm:zustand@3.7.1/esm/index.js" | ||
); | ||
|
||
const generatorTwo = new Generator({ | ||
...BASE_CONFIG, | ||
inputMap: mapOne, | ||
}); | ||
await generatorTwo.install("wagmi"); | ||
const mapTwo = generatorTwo.getMap(); | ||
|
||
strictEqual( | ||
mapTwo.scopes["https://ga.jspm.io/"].zustand, | ||
"https://ga.jspm.io/npm:zustand@3.7.1/esm/index.js" | ||
); | ||
|
||
const generatorThree = new Generator({ | ||
...BASE_CONFIG, | ||
inputMap: mapTwo, | ||
}); | ||
await generatorThree.install("connectkit"); | ||
const mapThree = generatorThree.getMap(); | ||
|
||
strictEqual( | ||
mapThree.scopes["https://ga.jspm.io/"].zustand, | ||
"https://ga.jspm.io/npm:zustand@3.7.1/esm/index.js" | ||
); | ||
|
||
const generatorFour = new Generator({ | ||
...BASE_CONFIG, | ||
inputMap: mapThree, | ||
}); | ||
await generatorFour.reinstall(); | ||
const mapFour = generatorFour.getMap(); | ||
|
||
strictEqual( | ||
mapFour.scopes["https://ga.jspm.io/"].zustand, | ||
"https://ga.jspm.io/npm:zustand@3.7.1/esm/index.js" | ||
); | ||
strictEqual( | ||
mapFour.scopes["https://ga.jspm.io/"].three, | ||
"https://ga.jspm.io/npm:three@0.142.0/build/three.module.js" | ||
); | ||
// const BASE_CONFIG = { | ||
// mapUrl: "about:blank", | ||
// ignore: [ | ||
// "react", | ||
// "react/jsx-runtime", | ||
// "react-dom", | ||
// "react-dom/server", | ||
// "framer", | ||
// "framer-motion", | ||
// "framer-motion/three", | ||
// ], | ||
// env: ["production", "browser", "module"], | ||
// resolutions: { | ||
// three: "0.142.0", | ||
// zustand: "3.7.1", | ||
// ethers: "5.7.2", // workaround for incorrect version pin in @wagmi/core | ||
// }, | ||
// }; | ||
// | ||
// const generatorOne = new Generator({ | ||
// ...BASE_CONFIG, | ||
// }); | ||
// await generatorOne.install("@react-three/fiber"); | ||
// const mapOne = generatorOne.getMap(); | ||
// | ||
// strictEqual( | ||
// mapOne.scopes["https://ga.jspm.io/"].zustand, | ||
// "https://ga.jspm.io/npm:zustand@3.7.1/esm/index.js" | ||
// ); | ||
// | ||
// const generatorTwo = new Generator({ | ||
// ...BASE_CONFIG, | ||
// inputMap: mapOne, | ||
// }); | ||
// await generatorTwo.install("wagmi"); | ||
// const mapTwo = generatorTwo.getMap(); | ||
// | ||
// strictEqual( | ||
// mapTwo.scopes["https://ga.jspm.io/"].zustand, | ||
// "https://ga.jspm.io/npm:zustand@3.7.1/esm/index.js" | ||
// ); | ||
// | ||
// const generatorThree = new Generator({ | ||
// ...BASE_CONFIG, | ||
// inputMap: mapTwo, | ||
// }); | ||
// await generatorThree.install("connectkit"); | ||
// const mapThree = generatorThree.getMap(); | ||
// | ||
// strictEqual( | ||
// mapThree.scopes["https://ga.jspm.io/"].zustand, | ||
// "https://ga.jspm.io/npm:zustand@3.7.1/esm/index.js" | ||
// ); | ||
// | ||
// const generatorFour = new Generator({ | ||
// ...BASE_CONFIG, | ||
// inputMap: mapThree, | ||
// }); | ||
// await generatorFour.reinstall(); | ||
// const mapFour = generatorFour.getMap(); | ||
// | ||
// strictEqual( | ||
// mapFour.scopes["https://ga.jspm.io/"].zustand, | ||
// "https://ga.jspm.io/npm:zustand@3.7.1/esm/index.js" | ||
// ); | ||
// strictEqual( | ||
// mapFour.scopes["https://ga.jspm.io/"].three, | ||
// "https://ga.jspm.io/npm:three@0.142.0/build/three.module.js" | ||
// ); |
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