functionalscript 0.13.1 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{types → fs}/asn.1/module.f.d.ts +1 -1
- package/{types → fs}/asn.1/module.f.js +3 -3
- package/{types → fs}/asn.1/test.f.js +2 -2
- package/{types → fs}/base128/module.f.d.ts +1 -1
- package/{types → fs}/base128/module.f.js +1 -1
- package/{types → fs}/base128/test.f.js +2 -2
- package/{bnf → fs/bnf}/data/module.f.d.ts +1 -1
- package/{cas → fs/cas}/module.f.d.ts +4 -4
- package/{cas → fs/cas}/module.f.js +1 -1
- package/{types → fs}/cbase32/module.f.d.ts +2 -2
- package/{types → fs}/cbase32/module.f.js +1 -1
- package/{types → fs}/cbase32/test.f.js +1 -1
- package/fs/ci/bun/module.f.d.ts +2 -0
- package/fs/ci/bun/module.f.js +20 -0
- package/fs/ci/common/module.f.d.ts +43 -0
- package/fs/ci/common/module.f.js +32 -0
- package/fs/ci/config/module.f.d.ts +25 -0
- package/fs/ci/config/module.f.js +34 -0
- package/fs/ci/deno/module.f.d.ts +2 -0
- package/fs/ci/deno/module.f.js +13 -0
- package/{ci → fs/ci}/module.f.d.ts +1 -1
- package/fs/ci/module.f.js +43 -0
- package/fs/ci/node/module.f.d.ts +6 -0
- package/fs/ci/node/module.f.js +36 -0
- package/fs/ci/playwright/module.f.d.ts +2 -0
- package/fs/ci/playwright/module.f.js +23 -0
- package/fs/ci/rust/module.f.d.ts +2 -0
- package/fs/ci/rust/module.f.js +49 -0
- package/{dev/tf → fs/ci}/test.f.d.ts +2 -1
- package/fs/ci/test.f.js +40 -0
- package/{crypto → fs/crypto}/secp/module.f.d.ts +1 -2
- package/{dev → fs/dev}/module.f.d.ts +2 -0
- package/{dev → fs/dev}/module.f.js +5 -0
- package/{dev → fs/dev}/tf/all.test.js +7 -5
- package/{dev → fs/dev}/tf/module.f.d.ts +1 -1
- package/{dev → fs/dev}/tf/module.f.js +12 -9
- package/fs/dev/tf/test.f.d.ts +16 -0
- package/fs/dev/tf/test.f.js +22 -0
- package/fs/dev/version/module.f.d.ts +3 -0
- package/{djs → fs/djs}/tokenizer/module.f.js +3 -3
- package/{djs/parser-new → fs/djs/tokenizer-new}/test.f.d.ts +2 -1
- package/fs/djs/tokenizer-new/test.f.js +894 -0
- package/{js → fs/js}/tokenizer/module.f.js +34 -34
- package/{json → fs/json}/tokenizer/module.f.js +1 -1
- package/{path → fs/path}/module.f.d.ts +1 -1
- package/fs/sul/id/module.f.d.ts +33 -0
- package/fs/sul/id/module.f.js +94 -0
- package/fs/sul/id/test.f.d.ts +21 -0
- package/fs/sul/id/test.f.js +75 -0
- package/fs/sul/level/hash/module.f.d.ts +38 -0
- package/fs/sul/level/hash/module.f.js +43 -0
- package/fs/sul/level/hash/test.f.d.ts +14 -0
- package/fs/sul/level/hash/test.f.js +112 -0
- package/fs/sul/level/literal/module.f.d.ts +64 -0
- package/fs/sul/level/literal/module.f.js +88 -0
- package/fs/sul/level/literal/test.f.d.ts +12 -0
- package/fs/sul/level/literal/test.f.js +722 -0
- package/fs/sul/module.f.d.ts +23 -0
- package/fs/sul/module.f.js +46 -0
- package/fs/sul/test.f.d.ts +10 -0
- package/fs/sul/test.f.js +47 -0
- package/{text → fs/text}/module.f.d.ts +1 -1
- package/{text → fs/text}/utf16/module.f.js +8 -8
- package/{text → fs/text}/utf8/module.f.js +2 -2
- package/{types → fs/types}/bit_vec/module.f.d.ts +13 -1
- package/{types → fs/types}/bit_vec/module.f.js +33 -15
- package/{types → fs/types}/effects/module.f.d.ts +1 -0
- package/{types → fs/types}/effects/node/virtual/module.f.d.ts +3 -3
- package/{types → fs/types}/function/operator/module.f.d.ts +1 -1
- package/{types → fs/types}/function/operator/module.f.js +1 -1
- package/{types → fs/types}/list/module.f.js +1 -1
- package/fs/types/patricia_trie/module.f.d.ts +25 -0
- package/fs/types/patricia_trie/module.f.js +35 -0
- package/fs/types/patricia_trie/test.f.d.ts +8 -0
- package/fs/types/patricia_trie/test.f.js +121 -0
- package/{types → fs/types}/rtti/module.f.d.ts +12 -1
- package/fs/types/rtti/module.f.js +100 -0
- package/fs/types/rtti/parse/module.f.d.ts +32 -0
- package/fs/types/rtti/parse/module.f.js +113 -0
- package/fs/types/rtti/parse/test.f.d.ts +116 -0
- package/fs/types/rtti/parse/test.f.js +345 -0
- package/fs/types/rtti/test.f.d.ts +34 -0
- package/fs/types/rtti/test.f.js +123 -0
- package/fs/types/rtti/validate/module.f.d.ts +80 -0
- package/{types → fs/types}/rtti/validate/module.f.js +33 -25
- package/{types → fs/types}/rtti/validate/test.f.d.ts +23 -0
- package/{types → fs/types}/rtti/validate/test.f.js +67 -0
- package/{types → fs/types}/uint8array/module.f.d.ts +2 -2
- package/package.json +8 -8
- package/ci/module.f.js +0 -183
- package/dev/tf/test.f.js +0 -5
- package/dev/version/module.f.d.ts +0 -3
- package/djs/parser-new/test.f.js +0 -202
- package/types/rtti/module.f.js +0 -27
- package/types/rtti/test.f.d.ts +0 -6
- package/types/rtti/test.f.js +0 -22
- package/types/rtti/validate/module.f.d.ts +0 -50
- /package/{types → fs}/asn.1/test.f.d.ts +0 -0
- /package/{cas → fs/base128}/test.f.d.ts +0 -0
- /package/{bnf → fs/bnf}/data/module.f.js +0 -0
- /package/{bnf → fs/bnf}/data/test.f.d.ts +0 -0
- /package/{bnf → fs/bnf}/data/test.f.js +0 -0
- /package/{bnf → fs/bnf}/module.f.d.ts +0 -0
- /package/{bnf → fs/bnf}/module.f.js +0 -0
- /package/{bnf → fs/bnf}/test.f.d.ts +0 -0
- /package/{bnf → fs/bnf}/test.f.js +0 -0
- /package/{bnf → fs/bnf}/testlib.f.d.ts +0 -0
- /package/{bnf → fs/bnf}/testlib.f.js +0 -0
- /package/{types/base128 → fs/cas}/test.f.d.ts +0 -0
- /package/{cas → fs/cas}/test.f.js +0 -0
- /package/{types → fs}/cbase32/test.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/hmac/module.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/hmac/module.f.js +0 -0
- /package/{crypto → fs/crypto}/hmac/test.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/hmac/test.f.js +0 -0
- /package/{crypto → fs/crypto}/secp/module.f.js +0 -0
- /package/{crypto → fs/crypto}/secp/test.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/secp/test.f.js +0 -0
- /package/{crypto → fs/crypto}/sha2/module.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/sha2/module.f.js +0 -0
- /package/{crypto → fs/crypto}/sha2/test.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/sha2/test.f.js +0 -0
- /package/{crypto → fs/crypto}/sign/module.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/sign/module.f.js +0 -0
- /package/{crypto → fs/crypto}/sign/test.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/sign/test.f.js +0 -0
- /package/{dev → fs/dev}/index/module.f.d.ts +0 -0
- /package/{dev → fs/dev}/index/module.f.js +0 -0
- /package/{dev → fs/dev}/test.f.d.ts +0 -0
- /package/{dev → fs/dev}/test.f.js +0 -0
- /package/{dev → fs/dev}/tf/all.test.d.ts +0 -0
- /package/{dev → fs/dev}/version/module.f.js +0 -0
- /package/{dev → fs/dev}/version/test.f.d.ts +0 -0
- /package/{dev → fs/dev}/version/test.f.js +0 -0
- /package/{djs → fs/djs}/ast/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/ast/module.f.js +0 -0
- /package/{djs → fs/djs}/ast/test.f.d.ts +0 -0
- /package/{djs → fs/djs}/ast/test.f.js +0 -0
- /package/{djs → fs/djs}/examples/input.f.d.ts +0 -0
- /package/{djs → fs/djs}/examples/input.f.js +0 -0
- /package/{djs → fs/djs}/examples/m.f.d.ts +0 -0
- /package/{djs → fs/djs}/examples/m.f.js +0 -0
- /package/{djs → fs/djs}/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/module.f.js +0 -0
- /package/{djs → fs/djs}/parser/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/parser/module.f.js +0 -0
- /package/{djs → fs/djs}/parser/test.f.d.ts +0 -0
- /package/{djs → fs/djs}/parser/test.f.js +0 -0
- /package/{djs → fs/djs}/serializer/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/serializer/module.f.js +0 -0
- /package/{djs → fs/djs}/serializer/test.f.d.ts +0 -0
- /package/{djs → fs/djs}/serializer/test.f.js +0 -0
- /package/{djs → fs/djs}/tokenizer/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/tokenizer/test.f.d.ts +0 -0
- /package/{djs → fs/djs}/tokenizer/test.f.js +0 -0
- /package/{djs/parser-new → fs/djs/tokenizer-new}/module.f.d.ts +0 -0
- /package/{djs/parser-new → fs/djs/tokenizer-new}/module.f.js +0 -0
- /package/{djs → fs/djs}/transpiler/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/transpiler/module.f.js +0 -0
- /package/{djs → fs/djs}/transpiler/test.f.d.ts +0 -0
- /package/{djs → fs/djs}/transpiler/test.f.js +0 -0
- /package/{fjs → fs/fjs}/module.d.ts +0 -0
- /package/{fjs → fs/fjs}/module.f.d.ts +0 -0
- /package/{fjs → fs/fjs}/module.f.js +0 -0
- /package/{fjs → fs/fjs}/module.js +0 -0
- /package/{fsc → fs/fsc}/bnf.f.d.ts +0 -0
- /package/{fsc → fs/fsc}/bnf.f.js +0 -0
- /package/{fsc → fs/fsc}/json.f.d.ts +0 -0
- /package/{fsc → fs/fsc}/json.f.js +0 -0
- /package/{fsc → fs/fsc}/module.f.d.ts +0 -0
- /package/{fsc → fs/fsc}/module.f.js +0 -0
- /package/{fsc → fs/fsc}/test.f.d.ts +0 -0
- /package/{fsc → fs/fsc}/test.f.js +0 -0
- /package/{fsm → fs/fsm}/module.f.d.ts +0 -0
- /package/{fsm → fs/fsm}/module.f.js +0 -0
- /package/{fsm → fs/fsm}/test.f.d.ts +0 -0
- /package/{fsm → fs/fsm}/test.f.js +0 -0
- /package/{html → fs/html}/module.f.d.ts +0 -0
- /package/{html → fs/html}/module.f.js +0 -0
- /package/{html → fs/html}/test.f.d.ts +0 -0
- /package/{html → fs/html}/test.f.js +0 -0
- /package/{io → fs/io}/module.d.ts +0 -0
- /package/{io → fs/io}/module.f.d.ts +0 -0
- /package/{io → fs/io}/module.f.js +0 -0
- /package/{io → fs/io}/module.js +0 -0
- /package/{io → fs/io}/virtual/module.f.d.ts +0 -0
- /package/{io → fs/io}/virtual/module.f.js +0 -0
- /package/{js → fs/js}/tokenizer/module.f.d.ts +0 -0
- /package/{js → fs/js}/tokenizer/test.f.d.ts +0 -0
- /package/{js → fs/js}/tokenizer/test.f.js +0 -0
- /package/{json → fs/json}/module.f.d.ts +0 -0
- /package/{json → fs/json}/module.f.js +0 -0
- /package/{json → fs/json}/parser/module.f.d.ts +0 -0
- /package/{json → fs/json}/parser/module.f.js +0 -0
- /package/{json → fs/json}/parser/test.f.d.ts +0 -0
- /package/{json → fs/json}/parser/test.f.js +0 -0
- /package/{json → fs/json}/serializer/module.f.d.ts +0 -0
- /package/{json → fs/json}/serializer/module.f.js +0 -0
- /package/{json → fs/json}/serializer/test.f.d.ts +0 -0
- /package/{json → fs/json}/serializer/test.f.js +0 -0
- /package/{json → fs/json}/test.f.d.ts +0 -0
- /package/{json → fs/json}/test.f.js +0 -0
- /package/{json → fs/json}/tokenizer/module.f.d.ts +0 -0
- /package/{json → fs/json}/tokenizer/test.f.d.ts +0 -0
- /package/{json → fs/json}/tokenizer/test.f.js +0 -0
- /package/{path → fs/path}/module.f.js +0 -0
- /package/{path → fs/path}/test.f.d.ts +0 -0
- /package/{path → fs/path}/test.f.js +0 -0
- /package/{text → fs/text}/ascii/module.f.d.ts +0 -0
- /package/{text → fs/text}/ascii/module.f.js +0 -0
- /package/{text → fs/text}/ascii/test.f.d.ts +0 -0
- /package/{text → fs/text}/ascii/test.f.js +0 -0
- /package/{text → fs/text}/module.f.js +0 -0
- /package/{text → fs/text}/sgr/module.f.d.ts +0 -0
- /package/{text → fs/text}/sgr/module.f.js +0 -0
- /package/{text → fs/text}/sgr/test.f.d.ts +0 -0
- /package/{text → fs/text}/sgr/test.f.js +0 -0
- /package/{text → fs/text}/test.f.d.ts +0 -0
- /package/{text → fs/text}/test.f.js +0 -0
- /package/{text → fs/text}/utf16/module.f.d.ts +0 -0
- /package/{text → fs/text}/utf16/test.f.d.ts +0 -0
- /package/{text → fs/text}/utf16/test.f.js +0 -0
- /package/{text → fs/text}/utf8/module.f.d.ts +0 -0
- /package/{text → fs/text}/utf8/test.f.d.ts +0 -0
- /package/{text → fs/text}/utf8/test.f.js +0 -0
- /package/{types → fs/types}/array/module.f.d.ts +0 -0
- /package/{types → fs/types}/array/module.f.js +0 -0
- /package/{types → fs/types}/array/test.f.d.ts +0 -0
- /package/{types → fs/types}/array/test.f.js +0 -0
- /package/{types → fs/types}/bigfloat/module.f.d.ts +0 -0
- /package/{types → fs/types}/bigfloat/module.f.js +0 -0
- /package/{types → fs/types}/bigfloat/test.f.d.ts +0 -0
- /package/{types → fs/types}/bigfloat/test.f.js +0 -0
- /package/{types → fs/types}/bigint/module.f.d.ts +0 -0
- /package/{types → fs/types}/bigint/module.f.js +0 -0
- /package/{types → fs/types}/bigint/test.f.d.ts +0 -0
- /package/{types → fs/types}/bigint/test.f.js +0 -0
- /package/{types → fs/types}/bit_vec/test.f.d.ts +0 -0
- /package/{types → fs/types}/bit_vec/test.f.js +0 -0
- /package/{types → fs/types}/btree/find/module.f.d.ts +0 -0
- /package/{types → fs/types}/btree/find/module.f.js +0 -0
- /package/{types → fs/types}/btree/find/test.f.d.ts +0 -0
- /package/{types → fs/types}/btree/find/test.f.js +0 -0
- /package/{types → fs/types}/btree/module.f.d.ts +0 -0
- /package/{types → fs/types}/btree/module.f.js +0 -0
- /package/{types → fs/types}/btree/remove/module.f.d.ts +0 -0
- /package/{types → fs/types}/btree/remove/module.f.js +0 -0
- /package/{types → fs/types}/btree/remove/test.f.d.ts +0 -0
- /package/{types → fs/types}/btree/remove/test.f.js +0 -0
- /package/{types → fs/types}/btree/set/module.f.d.ts +0 -0
- /package/{types → fs/types}/btree/set/module.f.js +0 -0
- /package/{types → fs/types}/btree/set/test.f.d.ts +0 -0
- /package/{types → fs/types}/btree/set/test.f.js +0 -0
- /package/{types → fs/types}/btree/test.f.d.ts +0 -0
- /package/{types → fs/types}/btree/test.f.js +0 -0
- /package/{types → fs/types}/btree/types/module.f.d.ts +0 -0
- /package/{types → fs/types}/btree/types/module.f.js +0 -0
- /package/{types → fs/types}/byte_set/module.f.d.ts +0 -0
- /package/{types → fs/types}/byte_set/module.f.js +0 -0
- /package/{types → fs/types}/byte_set/test.f.d.ts +0 -0
- /package/{types → fs/types}/byte_set/test.f.js +0 -0
- /package/{types → fs/types}/effects/mock/module.f.d.ts +0 -0
- /package/{types → fs/types}/effects/mock/module.f.js +0 -0
- /package/{types → fs/types}/effects/module.d.ts +0 -0
- /package/{types → fs/types}/effects/module.f.js +0 -0
- /package/{types → fs/types}/effects/module.js +0 -0
- /package/{types → fs/types}/effects/node/module.f.d.ts +0 -0
- /package/{types → fs/types}/effects/node/module.f.js +0 -0
- /package/{types → fs/types}/effects/node/test.f.d.ts +0 -0
- /package/{types → fs/types}/effects/node/test.f.js +0 -0
- /package/{types → fs/types}/effects/node/virtual/module.f.js +0 -0
- /package/{types → fs/types}/function/compare/module.f.d.ts +0 -0
- /package/{types → fs/types}/function/compare/module.f.js +0 -0
- /package/{types → fs/types}/function/compare/test.f.d.ts +0 -0
- /package/{types → fs/types}/function/compare/test.f.js +0 -0
- /package/{types → fs/types}/function/module.f.d.ts +0 -0
- /package/{types → fs/types}/function/module.f.js +0 -0
- /package/{types → fs/types}/function/test.f.d.ts +0 -0
- /package/{types → fs/types}/function/test.f.js +0 -0
- /package/{types → fs/types}/list/module.f.d.ts +0 -0
- /package/{types → fs/types}/list/test.f.d.ts +0 -0
- /package/{types → fs/types}/list/test.f.js +0 -0
- /package/{types → fs/types}/map/module.f.d.ts +0 -0
- /package/{types → fs/types}/map/module.f.js +0 -0
- /package/{types → fs/types}/map/test.f.d.ts +0 -0
- /package/{types → fs/types}/map/test.f.js +0 -0
- /package/{types → fs/types}/monoid/module.f.d.ts +0 -0
- /package/{types → fs/types}/monoid/module.f.js +0 -0
- /package/{types → fs/types}/monoid/test.f.d.ts +0 -0
- /package/{types → fs/types}/monoid/test.f.js +0 -0
- /package/{types → fs/types}/nibble_set/module.f.d.ts +0 -0
- /package/{types → fs/types}/nibble_set/module.f.js +0 -0
- /package/{types → fs/types}/nibble_set/test.f.d.ts +0 -0
- /package/{types → fs/types}/nibble_set/test.f.js +0 -0
- /package/{types → fs/types}/nominal/module.f.d.ts +0 -0
- /package/{types → fs/types}/nominal/module.f.js +0 -0
- /package/{types → fs/types}/nominal/test.f.d.ts +0 -0
- /package/{types → fs/types}/nominal/test.f.js +0 -0
- /package/{types → fs/types}/nullable/module.f.d.ts +0 -0
- /package/{types → fs/types}/nullable/module.f.js +0 -0
- /package/{types → fs/types}/nullable/test.f.d.ts +0 -0
- /package/{types → fs/types}/nullable/test.f.js +0 -0
- /package/{types → fs/types}/number/module.f.d.ts +0 -0
- /package/{types → fs/types}/number/module.f.js +0 -0
- /package/{types → fs/types}/number/test.f.d.ts +0 -0
- /package/{types → fs/types}/number/test.f.js +0 -0
- /package/{types → fs/types}/object/module.f.d.ts +0 -0
- /package/{types → fs/types}/object/module.f.js +0 -0
- /package/{types → fs/types}/object/test.f.d.ts +0 -0
- /package/{types → fs/types}/object/test.f.js +0 -0
- /package/{types → fs/types}/option/module.f.d.ts +0 -0
- /package/{types → fs/types}/option/module.f.js +0 -0
- /package/{types → fs/types}/ordered_map/module.f.d.ts +0 -0
- /package/{types → fs/types}/ordered_map/module.f.js +0 -0
- /package/{types → fs/types}/ordered_map/test.f.d.ts +0 -0
- /package/{types → fs/types}/ordered_map/test.f.js +0 -0
- /package/{types → fs/types}/prime_field/module.f.d.ts +0 -0
- /package/{types → fs/types}/prime_field/module.f.js +0 -0
- /package/{types → fs/types}/prime_field/test.f.d.ts +0 -0
- /package/{types → fs/types}/prime_field/test.f.js +0 -0
- /package/{types → fs/types}/range/module.f.d.ts +0 -0
- /package/{types → fs/types}/range/module.f.js +0 -0
- /package/{types → fs/types}/range/test.f.d.ts +0 -0
- /package/{types → fs/types}/range/test.f.js +0 -0
- /package/{types → fs/types}/range_map/module.f.d.ts +0 -0
- /package/{types → fs/types}/range_map/module.f.js +0 -0
- /package/{types → fs/types}/range_map/test.f.d.ts +0 -0
- /package/{types → fs/types}/range_map/test.f.js +0 -0
- /package/{types → fs/types}/result/module.d.ts +0 -0
- /package/{types → fs/types}/result/module.f.d.ts +0 -0
- /package/{types → fs/types}/result/module.f.js +0 -0
- /package/{types → fs/types}/result/module.js +0 -0
- /package/{types → fs/types}/result/test.f.d.ts +0 -0
- /package/{types → fs/types}/result/test.f.js +0 -0
- /package/{types → fs/types}/rtti/ts/module.f.d.ts +0 -0
- /package/{types → fs/types}/rtti/ts/module.f.js +0 -0
- /package/{types → fs/types}/rtti/ts/test.f.d.ts +0 -0
- /package/{types → fs/types}/rtti/ts/test.f.js +0 -0
- /package/{types → fs/types}/sorted_list/module.f.d.ts +0 -0
- /package/{types → fs/types}/sorted_list/module.f.js +0 -0
- /package/{types → fs/types}/sorted_list/test.f.d.ts +0 -0
- /package/{types → fs/types}/sorted_list/test.f.js +0 -0
- /package/{types → fs/types}/sorted_set/module.f.d.ts +0 -0
- /package/{types → fs/types}/sorted_set/module.f.js +0 -0
- /package/{types → fs/types}/sorted_set/test.f.d.ts +0 -0
- /package/{types → fs/types}/sorted_set/test.f.js +0 -0
- /package/{types → fs/types}/string/module.f.d.ts +0 -0
- /package/{types → fs/types}/string/module.f.js +0 -0
- /package/{types → fs/types}/string/test.f.d.ts +0 -0
- /package/{types → fs/types}/string/test.f.js +0 -0
- /package/{types → fs/types}/string_set/module.f.d.ts +0 -0
- /package/{types → fs/types}/string_set/module.f.js +0 -0
- /package/{types → fs/types}/string_set/test.f.d.ts +0 -0
- /package/{types → fs/types}/string_set/test.f.js +0 -0
- /package/{types → fs/types}/ts/module.f.d.ts +0 -0
- /package/{types → fs/types}/ts/module.f.js +0 -0
- /package/{types → fs/types}/uint8array/module.f.js +0 -0
- /package/{types → fs/types}/uint8array/test.f.d.ts +0 -0
- /package/{types → fs/types}/uint8array/test.f.js +0 -0
- /package/{website → fs/website}/module.f.d.ts +0 -0
- /package/{website → fs/website}/module.f.js +0 -0
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {} from "../module.f.js";
|
|
2
2
|
import { error, ok } from "../../result/module.f.js";
|
|
3
3
|
import { isArray as commonIsArray } from "../../array/module.f.js";
|
|
4
4
|
import { isObject as commonIsObject } from "../../object/module.f.js";
|
|
5
|
-
|
|
5
|
+
/** Builds an error result with empty path and the given message. */
|
|
6
|
+
export const verror = (message) => error({ path: [], message });
|
|
7
|
+
/** Prepends `key` to the error's path, used to build the path bottom-up. */
|
|
8
|
+
export const prependPath = (key, r) => error({ path: [key, ...r[1].path], message: r[1].message });
|
|
6
9
|
/**
|
|
7
10
|
* Builds a validator for `array` or `record` schemas.
|
|
8
11
|
* The inner item validator is instantiated lazily (only when the container is
|
|
9
12
|
* non-empty) to avoid infinite recursion with recursive schemas.
|
|
10
13
|
*/
|
|
11
|
-
const containerValidate = (isContainer,
|
|
14
|
+
const containerValidate = (isContainer, getEntries) => (item) => value => {
|
|
12
15
|
if (!isContainer(value)) {
|
|
13
|
-
return
|
|
16
|
+
return verror('unexpected value');
|
|
14
17
|
}
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
18
|
+
const entries = getEntries(value);
|
|
19
|
+
if (entries.length === 0) {
|
|
17
20
|
return ok(value);
|
|
18
21
|
}
|
|
19
|
-
// Note: we shouldn't instantiate `itemValidate` until we make sure `
|
|
22
|
+
// Note: we shouldn't instantiate `itemValidate` until we make sure `entries` is not empty.
|
|
20
23
|
// Otherwise, we can get infinite recursion on empty arrays and objects
|
|
21
24
|
const itemValidate = validate(item);
|
|
22
|
-
for (const
|
|
23
|
-
const r = itemValidate(
|
|
25
|
+
for (const [k, v] of entries) {
|
|
26
|
+
const r = itemValidate(v);
|
|
24
27
|
if (r[0] === 'error') {
|
|
25
|
-
return r;
|
|
28
|
+
return prependPath(k, r);
|
|
26
29
|
}
|
|
27
30
|
}
|
|
28
31
|
return ok(value);
|
|
29
32
|
};
|
|
30
33
|
const isArray = value => commonIsArray(value);
|
|
31
|
-
const
|
|
34
|
+
const arrayEntries = (value) => value.map((v, i) => [String(i), v]);
|
|
35
|
+
const arrayValidate = containerValidate(isArray, arrayEntries);
|
|
32
36
|
const isObject = value => commonIsObject(value);
|
|
33
|
-
const recordValidate = containerValidate(isObject, Object.
|
|
34
|
-
const tag1Validate = ([tag, item]) => tag === 'array'
|
|
35
|
-
? arrayValidate(item)
|
|
36
|
-
: recordValidate(item);
|
|
37
|
+
const recordValidate = containerValidate(isObject, Object.entries);
|
|
37
38
|
/** Validates a `Tag0` primitive schema using `typeof`. */
|
|
38
|
-
const primitive0Validate = (tag) => value => typeof value === tag ? ok(value) :
|
|
39
|
+
export const primitive0Validate = (tag) => value => typeof value === tag ? ok(value) : verror('unexpected value');
|
|
39
40
|
/**
|
|
40
41
|
* Builds a validator for `Tuple` or `Struct` const schemas.
|
|
41
42
|
* Iterates over the schema's entries and validates each corresponding
|
|
@@ -43,13 +44,13 @@ const primitive0Validate = (tag) => value => typeof value === tag ? ok(value) :
|
|
|
43
44
|
*/
|
|
44
45
|
const constContainerValidate = (isContainer, getItem) => (rtti) => value => {
|
|
45
46
|
if (!isContainer(value)) {
|
|
46
|
-
return
|
|
47
|
+
return verror('unexpected value');
|
|
47
48
|
}
|
|
48
49
|
for (const [k, v] of Object.entries(rtti)) {
|
|
49
50
|
const item = getItem(value, k);
|
|
50
51
|
const r = validate(v)(item);
|
|
51
52
|
if (r[0] === 'error') {
|
|
52
|
-
return r;
|
|
53
|
+
return prependPath(k, r);
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
return ok(value);
|
|
@@ -59,10 +60,16 @@ const structValidate = constContainerValidate(isObject, (value, k) => value[k]);
|
|
|
59
60
|
const constObjectValidate = (rtti) => commonIsArray(rtti)
|
|
60
61
|
? tupleValidate(rtti)
|
|
61
62
|
: structValidate(rtti);
|
|
62
|
-
/**
|
|
63
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Validates a primitive `Const` schema using `Object.is` (SameValue).
|
|
65
|
+
*
|
|
66
|
+
* `Object.is` is used instead of `===` so that:
|
|
67
|
+
* - `NaN` const schemas match `NaN` values (`===` would always fail because `NaN !== NaN`).
|
|
68
|
+
* - `+0` and `-0` are treated as distinct const values.
|
|
69
|
+
*/
|
|
70
|
+
export const constPrimitiveValidate = (rtti) => value => Object.is(rtti, value)
|
|
64
71
|
? ok(value)
|
|
65
|
-
:
|
|
72
|
+
: verror('unexpected value');
|
|
66
73
|
const constValidate = (rtti) => typeof rtti === 'object' && rtti !== null
|
|
67
74
|
? constObjectValidate(rtti)
|
|
68
75
|
: constPrimitiveValidate(rtti);
|
|
@@ -75,7 +82,7 @@ const orValidate = (rtti) => {
|
|
|
75
82
|
return r;
|
|
76
83
|
}
|
|
77
84
|
}
|
|
78
|
-
return
|
|
85
|
+
return verror('no match');
|
|
79
86
|
};
|
|
80
87
|
};
|
|
81
88
|
/**
|
|
@@ -84,13 +91,14 @@ const orValidate = (rtti) => {
|
|
|
84
91
|
* @param rtti - A schema `Type`: a `Thunk` for tag-based schemas, or a `Const`
|
|
85
92
|
* (primitive literal, tuple, or struct) for exact-value schemas.
|
|
86
93
|
* @returns A `Validate<T>` function that checks an unknown value and returns
|
|
87
|
-
* `['ok', value]` or `['error', message]`.
|
|
94
|
+
* `['ok', value]` or `['error', { path, message }]`.
|
|
88
95
|
*
|
|
89
96
|
* @example
|
|
90
97
|
* ```ts
|
|
91
98
|
* const v = validate(array(number))
|
|
92
|
-
* v([1, 2, 3])
|
|
93
|
-
* v([
|
|
99
|
+
* v([1, 2, 3]) // ['ok', [1, 2, 3]]
|
|
100
|
+
* v([1, 'two']) // ['error', { path: ['1'], message: 'unexpected value' }]
|
|
101
|
+
* v(['a']) // ['error', { path: ['0'], message: 'unexpected value' }]
|
|
94
102
|
* ```
|
|
95
103
|
*/
|
|
96
104
|
export const validate = (rtti) => {
|
|
@@ -31,6 +31,18 @@ declare const _default: {
|
|
|
31
31
|
ok: () => void;
|
|
32
32
|
error: () => void;
|
|
33
33
|
};
|
|
34
|
+
nan: {
|
|
35
|
+
ok: () => void;
|
|
36
|
+
error: () => void;
|
|
37
|
+
};
|
|
38
|
+
infinity: {
|
|
39
|
+
ok: () => void;
|
|
40
|
+
error: () => void;
|
|
41
|
+
};
|
|
42
|
+
signedZero: {
|
|
43
|
+
distinct: () => void;
|
|
44
|
+
self: () => void;
|
|
45
|
+
};
|
|
34
46
|
string: {
|
|
35
47
|
ok: () => void;
|
|
36
48
|
error: () => void;
|
|
@@ -86,6 +98,17 @@ declare const _default: {
|
|
|
86
98
|
ok: () => void;
|
|
87
99
|
error: () => void;
|
|
88
100
|
};
|
|
101
|
+
path: {
|
|
102
|
+
rootMismatch: () => void;
|
|
103
|
+
arrayIndex: () => void;
|
|
104
|
+
recordKey: () => void;
|
|
105
|
+
nestedArray: () => void;
|
|
106
|
+
tupleIndex: () => void;
|
|
107
|
+
structKey: () => void;
|
|
108
|
+
deepStruct: () => void;
|
|
109
|
+
recursiveSchema: () => void;
|
|
110
|
+
orRoot: () => void;
|
|
111
|
+
};
|
|
89
112
|
recursive: {
|
|
90
113
|
arrayOfArrays: () => void;
|
|
91
114
|
recordOfRecords: () => void;
|
|
@@ -6,6 +6,20 @@ const assertOk = ([k]) => { if (k !== 'ok') {
|
|
|
6
6
|
const assertError = ([k]) => { if (k !== 'error') {
|
|
7
7
|
throw 'expected error';
|
|
8
8
|
} };
|
|
9
|
+
const assertErrorPath = (expected) => (r) => {
|
|
10
|
+
if (r[0] !== 'error') {
|
|
11
|
+
throw 'expected error';
|
|
12
|
+
}
|
|
13
|
+
const e = r[1];
|
|
14
|
+
if (e.path.length !== expected.length) {
|
|
15
|
+
throw `path length ${e.path.length} != ${expected.length}`;
|
|
16
|
+
}
|
|
17
|
+
for (let i = 0; i < expected.length; i++) {
|
|
18
|
+
if (e.path[i] !== expected[i]) {
|
|
19
|
+
throw `path[${i}] ${e.path[i]} != ${expected[i]}`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
9
23
|
export default {
|
|
10
24
|
boolean: {
|
|
11
25
|
ok: () => {
|
|
@@ -77,6 +91,35 @@ export default {
|
|
|
77
91
|
},
|
|
78
92
|
error: () => assertError(validate(42)(43)),
|
|
79
93
|
},
|
|
94
|
+
nan: {
|
|
95
|
+
ok: () => assertOk(validate(NaN)(NaN)),
|
|
96
|
+
error: () => {
|
|
97
|
+
assertError(validate(NaN)(0));
|
|
98
|
+
assertError(validate(0)(NaN));
|
|
99
|
+
assertError(validate(42)(NaN));
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
infinity: {
|
|
103
|
+
ok: () => {
|
|
104
|
+
assertOk(validate(Infinity)(Infinity));
|
|
105
|
+
assertOk(validate(-Infinity)(-Infinity));
|
|
106
|
+
},
|
|
107
|
+
error: () => {
|
|
108
|
+
assertError(validate(Infinity)(-Infinity));
|
|
109
|
+
assertError(validate(Infinity)(0));
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
signedZero: {
|
|
113
|
+
// `Object.is` distinguishes +0 and -0; `===` treats them equal.
|
|
114
|
+
distinct: () => {
|
|
115
|
+
assertError(validate(0)(-0));
|
|
116
|
+
assertError(validate(-0)(0));
|
|
117
|
+
},
|
|
118
|
+
self: () => {
|
|
119
|
+
assertOk(validate(0)(0));
|
|
120
|
+
assertOk(validate(-0)(-0));
|
|
121
|
+
},
|
|
122
|
+
},
|
|
80
123
|
string: {
|
|
81
124
|
ok: () => {
|
|
82
125
|
assertOk(validate('hello')('hello'));
|
|
@@ -207,6 +250,30 @@ export default {
|
|
|
207
250
|
assertError(validate(t)('42'));
|
|
208
251
|
},
|
|
209
252
|
},
|
|
253
|
+
path: {
|
|
254
|
+
rootMismatch: () => assertErrorPath([])(validate(number)('not a number')),
|
|
255
|
+
arrayIndex: () => assertErrorPath(['1'])(validate(array(number))([1, 'two', 3])),
|
|
256
|
+
recordKey: () => {
|
|
257
|
+
const r = validate(record(number))({ a: 1, b: 'two', c: 3 });
|
|
258
|
+
// record iteration order matches Object.entries; 'b' is the failing key
|
|
259
|
+
assertErrorPath(['b'])(r);
|
|
260
|
+
},
|
|
261
|
+
nestedArray: () => assertErrorPath(['0', '1'])(validate(array(array(number)))([[1, 'x'], [2, 3]])),
|
|
262
|
+
tupleIndex: () => assertErrorPath(['1'])(validate([number, number])([1, 'two'])),
|
|
263
|
+
structKey: () => assertErrorPath(['b'])(validate({ a: number, b: number })({ a: 1, b: 'two' })),
|
|
264
|
+
deepStruct: () => {
|
|
265
|
+
const schema = { user: { name: string, age: number } };
|
|
266
|
+
const r = validate(schema)({ user: { name: 'A', age: 'old' } });
|
|
267
|
+
assertErrorPath(['user', 'age'])(r);
|
|
268
|
+
},
|
|
269
|
+
recursiveSchema: () => {
|
|
270
|
+
const list = () => ['array', list];
|
|
271
|
+
// [[[42]]] — innermost element 42 is a number, not an array
|
|
272
|
+
const r = validate(list)([[[42]]]);
|
|
273
|
+
assertErrorPath(['0', '0', '0'])(r);
|
|
274
|
+
},
|
|
275
|
+
orRoot: () => assertErrorPath([])(validate(or(number, string))(true)),
|
|
276
|
+
},
|
|
210
277
|
recursive: {
|
|
211
278
|
arrayOfArrays: () => {
|
|
212
279
|
// self-referential schema: an array whose elements are also arrays of the same type
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Vec } from
|
|
2
|
-
import { type List } from
|
|
1
|
+
import { type Vec } from '../bit_vec/module.f.ts';
|
|
2
|
+
import { type List } from '../list/module.f.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Converts a Uint8Array into an MSB-first bit vector.
|
|
5
5
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "functionalscript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
"prepack": "tsc --NoEmit false",
|
|
12
12
|
"test20": "npm run prepack && node --test",
|
|
13
13
|
"test": "tsc && node --test --experimental-strip-types --experimental-test-coverage --test-coverage-include=**/module.f.ts",
|
|
14
|
-
"index": "node ./fjs/module.ts r ./dev/index/module.f.ts",
|
|
15
|
-
"fst": "node ./fjs/module.ts t",
|
|
16
|
-
"start": "node ./fjs/module.ts",
|
|
17
|
-
"ci-update": "node ./fjs/module.ts r ./ci/module.f.ts",
|
|
18
|
-
"update": "
|
|
19
|
-
"website": "node --experimental-strip-types ./fjs/module.ts r ./website/module.f.ts"
|
|
14
|
+
"index": "node ./fs/fjs/module.ts r ./fs/dev/index/module.f.ts",
|
|
15
|
+
"fst": "node ./fs/fjs/module.ts t",
|
|
16
|
+
"start": "node ./fs/fjs/module.ts",
|
|
17
|
+
"ci-update": "node ./fs/fjs/module.ts r ./fs/ci/module.f.ts",
|
|
18
|
+
"update": "npm install && npm run index && npm run ci-update",
|
|
19
|
+
"website": "node --experimental-strip-types ./fs/fjs/module.ts r ./fs/website/module.f.ts"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=20"
|
|
23
23
|
},
|
|
24
24
|
"bin": {
|
|
25
|
-
"fjs": "fjs/module.js"
|
|
25
|
+
"fjs": "fs/fjs/module.js"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
package/ci/module.f.js
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Continuous integration helper commands for repository automation tasks.
|
|
3
|
-
*
|
|
4
|
-
* @module
|
|
5
|
-
*/
|
|
6
|
-
import { utf8 } from "../text/module.f.js";
|
|
7
|
-
import { begin, pure } from "../types/effects/module.f.js";
|
|
8
|
-
import { writeFile } from "../types/effects/node/module.f.js";
|
|
9
|
-
const os = ['ubuntu', 'macos', 'windows'];
|
|
10
|
-
const architecture = ['intel', 'arm'];
|
|
11
|
-
// https://docs.github.com/en/actions/reference/runners/github-hosted-runners#standard-github-hosted-runners-for-public-repositories
|
|
12
|
-
const images = {
|
|
13
|
-
ubuntu: {
|
|
14
|
-
intel: 'ubuntu-24.04',
|
|
15
|
-
arm: 'ubuntu-24.04-arm'
|
|
16
|
-
},
|
|
17
|
-
macos: {
|
|
18
|
-
intel: 'macos-26-intel',
|
|
19
|
-
arm: 'macos-26'
|
|
20
|
-
},
|
|
21
|
-
windows: {
|
|
22
|
-
intel: 'windows-2025',
|
|
23
|
-
arm: 'windows-11-arm',
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const install = (step) => ({ type: 'install', step });
|
|
27
|
-
const test = (step) => ({ type: 'test', step });
|
|
28
|
-
const installOnWindowsArm = ({ def, name, path }) => (v) => (a) => install(v === 'windows' && a === 'arm'
|
|
29
|
-
? { run: `irm ${path}/install.ps1 | iex; "$env:USERPROFILE\\.${name}\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append` }
|
|
30
|
-
: def);
|
|
31
|
-
const installBun = installOnWindowsArm({
|
|
32
|
-
def: { uses: 'oven-sh/setup-bun@v1' },
|
|
33
|
-
name: 'bun',
|
|
34
|
-
path: 'bun.sh'
|
|
35
|
-
});
|
|
36
|
-
const installDeno = install({ uses: 'denoland/setup-deno@v2', with: { 'deno-version': '2' } });
|
|
37
|
-
const cargoTest = (target, config) => {
|
|
38
|
-
const to = target ? ` --target ${target}` : '';
|
|
39
|
-
const co = config ? ` --config ${config}` : '';
|
|
40
|
-
const main = `cargo test${to}${co}`;
|
|
41
|
-
return [
|
|
42
|
-
test({ run: main }),
|
|
43
|
-
test({ run: `${main} --release` })
|
|
44
|
-
];
|
|
45
|
-
};
|
|
46
|
-
const customTarget = (target) => [
|
|
47
|
-
{ type: 'rust', target },
|
|
48
|
-
...cargoTest(target)
|
|
49
|
-
];
|
|
50
|
-
const wasmTarget = (target) => [
|
|
51
|
-
...customTarget(target),
|
|
52
|
-
...cargoTest(target, '.cargo/config.wasmer.toml')
|
|
53
|
-
];
|
|
54
|
-
const clean = (steps) => [
|
|
55
|
-
...steps,
|
|
56
|
-
test({ run: 'git reset --hard HEAD && git clean -fdx' })
|
|
57
|
-
];
|
|
58
|
-
const installNode = (version) => ({ uses: 'actions/setup-node@v6', with: { 'node-version': version } });
|
|
59
|
-
const basicNode = (version) => (extra) => clean([
|
|
60
|
-
install(installNode(version)),
|
|
61
|
-
test({ run: 'npm ci' }),
|
|
62
|
-
...extra,
|
|
63
|
-
]);
|
|
64
|
-
const node = (version) => (extra) => basicNode(version)([
|
|
65
|
-
test({ run: 'npm test' }),
|
|
66
|
-
test({ run: 'npm run fst' }),
|
|
67
|
-
...extra,
|
|
68
|
-
]);
|
|
69
|
-
const findTgz = (v) => v === 'windows' ? '(Get-ChildItem *.tgz).FullName' : './*.tgz';
|
|
70
|
-
const playwrightVersion = '1.58.2';
|
|
71
|
-
const playwrightAndVersion = `playwright@${playwrightVersion}`;
|
|
72
|
-
const rustToolchain = '1.95.0';
|
|
73
|
-
const toSteps = (m) => {
|
|
74
|
-
const filter = (st) => m.flatMap((mt) => mt.type === st ? [mt.step] : []);
|
|
75
|
-
const aptGet = m.flatMap(v => v.type === 'apt-get' ? [v.package] : []).join(' ');
|
|
76
|
-
const rust = m.find(v => v.type === 'rust') !== undefined;
|
|
77
|
-
const targets = m.flatMap(v => v.type === 'rust' && v.target !== undefined ? [v.target] : []).join(',');
|
|
78
|
-
return [
|
|
79
|
-
...(aptGet !== '' ? [{ run: `sudo apt-get update && sudo apt-get install -y ${aptGet}` }] : []),
|
|
80
|
-
...(rust ? [{
|
|
81
|
-
uses: `dtolnay/rust-toolchain@${rustToolchain}`,
|
|
82
|
-
with: {
|
|
83
|
-
components: 'rustfmt,clippy',
|
|
84
|
-
targets
|
|
85
|
-
}
|
|
86
|
-
}] : []),
|
|
87
|
-
...filter('install'),
|
|
88
|
-
{ uses: 'actions/checkout@v5' },
|
|
89
|
-
...filter('test'),
|
|
90
|
-
];
|
|
91
|
-
};
|
|
92
|
-
const nodes = ['20', '22', '25'];
|
|
93
|
-
const nodeTest = (v) => v === '20' ? 'run test20' : 'test';
|
|
94
|
-
const nodeSteps = (v) => [
|
|
95
|
-
install(installNode(v)),
|
|
96
|
-
test({ run: 'npm ci' }),
|
|
97
|
-
test({ run: `npm ${nodeTest(v)}` }),
|
|
98
|
-
];
|
|
99
|
-
const ubuntu = (ms) => ({
|
|
100
|
-
'runs-on': 'ubuntu-24.04',
|
|
101
|
-
steps: toSteps(ms)
|
|
102
|
-
});
|
|
103
|
-
const nodeVersions = Object.fromEntries(nodes.map(v => [`node${v}`, ubuntu(nodeSteps(v))]));
|
|
104
|
-
const defaultNodeVersion = '24';
|
|
105
|
-
const playwright = ubuntu(basicNode(defaultNodeVersion)([
|
|
106
|
-
//install({ uses: 'actions/cache@v4', with: { path: '~/.cache/ms-playwright', key: `${images.ubuntu.intel}-${playwrightAndVersion}` } }),
|
|
107
|
-
install({ run: `npm install -g ${playwrightAndVersion}` }),
|
|
108
|
-
install({ run: 'playwright install --with-deps' }),
|
|
109
|
-
// we have to use `npx` to make sure that we respect `@playwright/test` version from
|
|
110
|
-
// the `package.json`.
|
|
111
|
-
...['chromium', 'firefox', 'webkit'].map(browser => test({ run: `npx playwright test --browser=${browser}` })),
|
|
112
|
-
]));
|
|
113
|
-
const i686 = (a, v) => {
|
|
114
|
-
if (a === 'intel') {
|
|
115
|
-
switch (v) {
|
|
116
|
-
case 'windows': return customTarget('i686-pc-windows-msvc');
|
|
117
|
-
case 'ubuntu': return [
|
|
118
|
-
{ type: 'apt-get', package: 'libc6-dev-i386' },
|
|
119
|
-
...customTarget('i686-unknown-linux-gnu'),
|
|
120
|
-
];
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return [];
|
|
124
|
-
};
|
|
125
|
-
const job = (v) => (a) => {
|
|
126
|
-
const id = `${v}-${a}`;
|
|
127
|
-
const image = images[v][a];
|
|
128
|
-
const result = [
|
|
129
|
-
// Rust
|
|
130
|
-
test({ run: 'cargo fmt -- --check' }),
|
|
131
|
-
test({ run: 'cargo clippy -- -D warnings' }),
|
|
132
|
-
...cargoTest(),
|
|
133
|
-
install({ uses: 'bytecodealliance/actions/wasmtime/setup@v1' }),
|
|
134
|
-
install({ uses: 'wasmerio/setup-wasmer@v1' }),
|
|
135
|
-
...wasmTarget('wasm32-wasip1'),
|
|
136
|
-
...wasmTarget('wasm32-wasip2'),
|
|
137
|
-
...wasmTarget('wasm32-unknown-unknown'),
|
|
138
|
-
...wasmTarget('wasm32-wasip1-threads'),
|
|
139
|
-
...i686(a, v),
|
|
140
|
-
// Node.js
|
|
141
|
-
...node(defaultNodeVersion)([
|
|
142
|
-
// TypeScript Preview
|
|
143
|
-
install({ run: 'npm install -g @typescript/native-preview' }),
|
|
144
|
-
test({ run: 'tsgo' }),
|
|
145
|
-
// publishing
|
|
146
|
-
test({ run: 'npm pack' }),
|
|
147
|
-
test({ run: `npm install -g ${findTgz(v)}` }),
|
|
148
|
-
test({ run: 'fjs compile issues/demo/data/tree.json _tree.f.js' }),
|
|
149
|
-
test({ run: 'fjs t' }),
|
|
150
|
-
test({ run: 'npm uninstall functionalscript -g' }),
|
|
151
|
-
]),
|
|
152
|
-
// Deno
|
|
153
|
-
...clean([
|
|
154
|
-
installDeno,
|
|
155
|
-
test({ run: 'deno install' }),
|
|
156
|
-
test({ run: 'deno task test' }),
|
|
157
|
-
test({ run: 'deno task fjs compile issues/demo/data/tree.json _tree.f.js' }),
|
|
158
|
-
test({ run: 'deno task fjs t' }),
|
|
159
|
-
test({ run: 'deno publish --dry-run' }),
|
|
160
|
-
]),
|
|
161
|
-
// Bun
|
|
162
|
-
...clean([
|
|
163
|
-
installBun(v)(a),
|
|
164
|
-
test({ run: 'bun test --timeout 20000' }),
|
|
165
|
-
test({ run: 'bun ./fjs/module.ts t' }),
|
|
166
|
-
]),
|
|
167
|
-
];
|
|
168
|
-
return [id, { 'runs-on': image, steps: toSteps(result) }];
|
|
169
|
-
};
|
|
170
|
-
const jobs = {
|
|
171
|
-
...Object.fromEntries(os.flatMap(v => architecture.map(job(v)))),
|
|
172
|
-
...nodeVersions,
|
|
173
|
-
playwright,
|
|
174
|
-
};
|
|
175
|
-
const gha = {
|
|
176
|
-
name: 'CI',
|
|
177
|
-
on: { pull_request: {} },
|
|
178
|
-
jobs,
|
|
179
|
-
};
|
|
180
|
-
export const effect = begin
|
|
181
|
-
.step(() => writeFile('.github/workflows/ci.yml', utf8(JSON.stringify(gha, null, ' '))))
|
|
182
|
-
.step(() => pure(0));
|
|
183
|
-
export default () => effect;
|
package/dev/tf/test.f.js
DELETED