Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 53 additions & 31 deletions spago.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"spec": ">=8.0.0 <9.0.0"
},
{
"spec-node": ">=0.0.2 <0.0.3"
"spec-node": ">=0.0.3 <0.0.4"
}
],
"build_plan": [
Expand Down Expand Up @@ -107,7 +107,7 @@
},
"package_set": {
"address": {
"registry": "60.2.1"
"registry": "63.5.0"
},
"compiler": ">=0.15.15 <0.16.0",
"content": {
Expand Down Expand Up @@ -143,7 +143,7 @@
"ask": "1.0.0",
"assert": "6.0.0",
"assert-multiple": "0.4.0",
"avar": "5.0.0",
"avar": "5.0.1",
"b64": "0.0.8",
"barbies": "1.0.1",
"barlow-lens": "0.9.0",
Expand All @@ -165,7 +165,7 @@
"chameleon-transformers": "1.0.0",
"channel": "1.0.0",
"checked-exceptions": "3.1.1",
"choku": "1.0.1",
"choku": "1.0.2",
"classless": "0.1.1",
"classless-arbitrary": "0.1.1",
"classless-decode-json": "0.1.1",
Expand All @@ -185,6 +185,7 @@
"convertable-options": "1.0.0",
"coroutines": "7.0.0",
"css": "6.0.0",
"css-class-name-extractor": "0.0.4",
"css-frameworks": "1.0.1",
"csv-stream": "2.3.0",
"data-mvc": "0.0.2",
Expand All @@ -198,6 +199,7 @@
"deno": "0.0.5",
"dissect": "1.0.0",
"distributive": "6.0.0",
"dodo-printer": "2.2.3",
"dom-filereader": "7.0.0",
"dom-indexed": "12.0.0",
"dom-simple": "0.4.0",
Expand All @@ -224,7 +226,7 @@
"exists": "6.0.0",
"exitcodes": "4.0.0",
"expect-inferred": "3.0.0",
"ezfetch": "1.0.0",
"ezfetch": "1.1.0",
"fahrtwind": "2.0.0",
"fallback": "0.1.0",
"fast-vect": "1.2.0",
Expand Down Expand Up @@ -315,19 +317,20 @@
"js-date": "8.0.0",
"js-fetch": "0.2.1",
"js-fileio": "3.0.0",
"js-intl": "1.0.4",
"js-intl": "1.1.4",
"js-iterators": "0.1.1",
"js-maps": "0.1.2",
"js-promise": "1.0.0",
"js-promise-aff": "1.0.0",
"js-timers": "6.1.0",
"js-uri": "3.1.0",
"jsdom": "1.0.0",
"json": "1.1.0",
"json-codecs": "5.0.0",
"justifill": "0.5.0",
"jwt": "0.0.9",
"labeled-data": "0.2.0",
"language-cst-parser": "0.14.0",
"language-cst-parser": "0.14.1",
"lazy": "6.0.0",
"lazy-joe": "1.0.0",
"lcg": "4.0.0",
Expand Down Expand Up @@ -378,20 +381,21 @@
"node-event-emitter": "3.0.0",
"node-execa": "5.0.0",
"node-fs": "9.2.0",
"node-glob-basic": "1.3.0",
"node-glob-basic": "2.0.0",
"node-http": "9.1.0",
"node-http2": "1.1.1",
"node-human-signals": "1.0.0",
"node-net": "5.1.0",
"node-os": "5.1.0",
"node-path": "5.0.0",
"node-path": "5.0.1",
"node-process": "11.2.0",
"node-readline": "8.1.1",
"node-sqlite3": "8.0.0",
"node-stream-pipes": "2.1.6",
"node-streams": "9.0.0",
"node-streams": "9.0.1",
"node-tls": "0.3.1",
"node-url": "7.0.1",
"node-workerbees": "0.3.1",
"node-zlib": "0.4.0",
"nonempty": "7.0.0",
"now": "6.0.0",
Expand All @@ -404,6 +408,7 @@
"object-maps": "0.3.0",
"ocarina": "1.5.4",
"oooooooooorrrrrrrmm-lib": "0.0.1",
"open-colors-scales-and-schemes": "1.0.0",
"open-folds": "6.4.0",
"open-foreign-generic": "11.0.3",
"open-memoize": "6.2.0",
Expand All @@ -418,7 +423,7 @@
"owoify": "1.2.0",
"pairs": "9.0.1",
"parallel": "7.0.0",
"parsing": "10.2.0",
"parsing": "10.3.0",
"parsing-dataview": "3.2.4",
"partial": "4.0.0",
"pathy": "9.0.0",
Expand All @@ -432,15 +437,16 @@
"pointed-list": "0.5.1",
"polymorphic-vectors": "4.0.0",
"posix-types": "6.0.0",
"postgresql": "2.0.19",
"postgresql": "2.0.20",
"precise": "6.0.0",
"precise-datetime": "7.0.0",
"prelude": "6.0.1",
"prelude": "6.0.2",
"prettier-printer": "3.0.0",
"printf": "0.1.0",
"priority-queue": "0.1.2",
"profunctor": "6.0.1",
"profunctor-lenses": "8.0.0",
"protobuf": "4.3.0",
"protobuf": "4.4.0",
"psa-utils": "8.0.0",
"psci-support": "6.0.0",
"punycode": "1.0.0",
Expand All @@ -458,7 +464,8 @@
"react-basic": "17.0.0",
"react-basic-classic": "3.0.0",
"react-basic-dnd": "10.1.0",
"react-basic-dom": "6.1.0",
"react-basic-dom": "7.0.0",
"react-basic-dom-beta": "0.1.1",
"react-basic-emotion": "7.1.0",
"react-basic-hooks": "8.2.0",
"react-basic-storybook": "2.0.0",
Expand Down Expand Up @@ -496,6 +503,7 @@
"selection-foldable": "0.2.0",
"selective-functors": "1.0.1",
"semirings": "7.0.0",
"shuffle": "1.1.0",
"signal": "13.0.0",
"simple-emitter": "3.0.1",
"simple-i18n": "2.0.1",
Expand All @@ -509,10 +517,10 @@
"soundfonts": "4.1.0",
"sparse-matrices": "2.0.1",
"sparse-polynomials": "3.0.1",
"spec": "8.0.0",
"spec-discovery": "8.3.0",
"spec": "8.1.1",
"spec-discovery": "8.4.0",
"spec-mocha": "5.1.1",
"spec-node": "0.0.2",
"spec-node": "0.0.3",
"spec-quickcheck": "5.0.2",
"spec-reporter-xunit": "0.7.1",
"splitmix": "2.1.0",
Expand All @@ -530,18 +538,22 @@
"systemd-journald": "0.3.0",
"tagged": "4.0.2",
"tailrec": "6.1.0",
"tanstack-query": "2.0.0",
"tecton": "0.2.1",
"tecton-halogen": "0.2.0",
"test-unit": "17.0.0",
"thermite": "6.3.1",
"thermite-dom": "0.3.1",
"these": "6.0.0",
"threading": "0.0.3",
"tidy": "0.11.1",
"tidy-codegen": "4.0.1",
"tldr": "0.0.0",
"toestand": "0.9.0",
"transformation-matrix": "1.0.1",
"transformers": "6.1.0",
"tree-rose": "4.0.2",
"trivial-unfold": "0.4.1",
"ts-bridge": "4.0.0",
"tuples": "7.0.0",
"two-or-more": "1.0.0",
Expand Down Expand Up @@ -579,6 +591,7 @@
"vectors": "2.1.0",
"versions": "7.0.0",
"visx": "0.0.2",
"vitest": "1.0.0",
"web-clipboard": "6.0.0",
"web-cssom": "2.0.0",
"web-cssom-view": "0.1.0",
Expand Down Expand Up @@ -607,11 +620,14 @@
"webextension-polyfill": "0.1.0",
"webgpu": "0.0.1",
"which": "2.0.0",
"whine-core": "0.0.28",
"xterm": "1.0.0",
"yoga-fetch": "1.0.1",
"yoga-json": "5.1.0",
"yoga-om": "0.1.0",
"yoga-postgres": "6.0.0",
"yoga-react-dom": "1.0.1",
"yoga-subtlecrypto": "0.1.0",
"yoga-tree": "1.0.0",
"z3": "0.0.2",
"zipperarray": "2.0.0"
Expand Down Expand Up @@ -718,8 +734,8 @@
},
"avar": {
"type": "registry",
"version": "5.0.0",
"integrity": "sha256-e7hf0x4hEpcygXP0LtvfvAQ49Bbj2aWtZT3gqM///0A=",
"version": "5.0.1",
"integrity": "sha256-f+bRR3qQPa/GVe4UbLQiJBy7+PzJkUCwT6qNn0UlkMY=",
"dependencies": [
"aff",
"effect",
Expand Down Expand Up @@ -1176,8 +1192,8 @@
},
"node-path": {
"type": "registry",
"version": "5.0.0",
"integrity": "sha256-pd82nQ+2l5UThzaxPdKttgDt7xlsgIDLpPG0yxDEdyE=",
"version": "5.0.1",
"integrity": "sha256-ePOElFamHkffhwJcS0Ozq4A14rflnkasFU6X2B8/yXs=",
"dependencies": [
"effect"
]
Expand All @@ -1200,17 +1216,23 @@
},
"node-streams": {
"type": "registry",
"version": "9.0.0",
"integrity": "sha256-2n6dq7YWleTDmD1Kur/ul7Cn08IvWrScgPf+0PgX2TQ=",
"version": "9.0.1",
"integrity": "sha256-7RJ6RqjOlhW+QlDFQNUHlkCG/CuYTTLT8yary5jhhsU=",
"dependencies": [
"aff",
"arrays",
"effect",
"either",
"exceptions",
"maybe",
"node-buffer",
"node-event-emitter",
"nullable",
"prelude"
"prelude",
"refs",
"st",
"tailrec",
"unsafe-coerce"
]
},
"nonempty": {
Expand Down Expand Up @@ -1383,8 +1405,8 @@
},
"prelude": {
"type": "registry",
"version": "6.0.1",
"integrity": "sha256-o8p6SLYmVPqzXZhQFd2hGAWEwBoXl1swxLG/scpJ0V0=",
"version": "6.0.2",
"integrity": "sha256-kiAPZxihtAel8uRiTNdccf4qylp/9J3jNkEHNAD0MsE=",
"dependencies": []
},
"profunctor": {
Expand Down Expand Up @@ -1431,8 +1453,8 @@
},
"spec": {
"type": "registry",
"version": "8.0.0",
"integrity": "sha256-Yn7MhDai1YULlQF45+9FTOTf2rcjoda1Jf2IrEFCoeg=",
"version": "8.1.1",
"integrity": "sha256-EM7UfQIaSgiw13LJ4ZASkfYmmRDKIlec3nYbGKFqGhk=",
"dependencies": [
"aff",
"ansi",
Expand Down Expand Up @@ -1465,8 +1487,8 @@
},
"spec-node": {
"type": "registry",
"version": "0.0.2",
"integrity": "sha256-2SZRy6QjokHms6+d150pShlbnOg+9XWYkrUUdX/QDjc=",
"version": "0.0.3",
"integrity": "sha256-Bjzg6l4uOfMN/FV0SKuT1Mm8eMP9sloLGVcY/0MeMnI=",
"dependencies": [
"aff",
"argonaut-codecs",
Expand Down
4 changes: 2 additions & 2 deletions spago.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
workspace:
packageSet:
registry: 60.2.1
registry: 63.5.0

package:
name: spec-discovery
Expand All @@ -16,7 +16,7 @@ package:
- foldable-traversable: ">=6.0.0 <7.0.0"
- prelude: ">=6.0.1 <7.0.0"
- spec: ">=8.0.0 <9.0.0"
- spec-node: ">=0.0.2 <0.0.3"
- spec-node: ">=0.0.3 <0.0.4"
test:
main: Test.Main
dependencies: []
15 changes: 11 additions & 4 deletions src/Test/Spec/Discovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (import.meta.url === `file://${process.argv[1]}`) {
)
}

export function getSpecs(pattern) {
export function getSpecs(pattern, mapToAff) {
return (onError, onSuccess) => {
const regex = new RegExp(pattern)
const modulePromises = fs
Expand All @@ -22,9 +22,16 @@ export function getSpecs(pattern) {
const fullPath = __onWindows
? path.join('file://', __dirname, '..', name, 'index.js')
: path.join(__dirname, '..', name, 'index.js')
return import(fullPath).then(module =>
module && typeof module.spec !== 'undefined' ? module.spec : null
)
return import(fullPath).then(module => {
const spec = module && module.spec;
if (!spec) return null;

if (spec.constructor.name !== "Aff") {
return mapToAff(spec);
}

return spec;
})
})

Promise.all(modulePromises)
Expand Down
Loading