functionalscript 0.14.5 → 0.14.7
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/fs/ci/bun/module.f.d.ts +1 -1
- package/fs/ci/bun/module.f.js +2 -2
- package/fs/ci/deno/module.f.d.ts +1 -1
- package/fs/ci/deno/module.f.js +2 -4
- package/fs/ci/module.f.d.ts +7 -1
- package/fs/ci/module.f.js +24 -13
- package/fs/ci/test.f.js +2 -2
- package/package.json +1 -1
package/fs/ci/bun/module.f.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type Architecture, type MetaStep, type Os } from '../common/module.f.ts';
|
|
2
|
-
export declare const bunSteps: (v: Os, a: Architecture) => readonly MetaStep[];
|
|
2
|
+
export declare const bunSteps: (extra: readonly MetaStep[]) => (v: Os, a: Architecture) => readonly MetaStep[];
|
package/fs/ci/bun/module.f.js
CHANGED
|
@@ -13,8 +13,8 @@ const installBun = installOnWindowsArm({
|
|
|
13
13
|
name: 'bun',
|
|
14
14
|
path: 'bun.sh',
|
|
15
15
|
});
|
|
16
|
-
export const bunSteps = (v, a) => clean([
|
|
16
|
+
export const bunSteps = (extra) => (v, a) => clean([
|
|
17
17
|
installBun(v)(a),
|
|
18
18
|
test({ run: 'bun test --timeout 20000' }),
|
|
19
|
-
|
|
19
|
+
...extra,
|
|
20
20
|
]);
|
package/fs/ci/deno/module.f.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type MetaStep } from '../common/module.f.ts';
|
|
2
|
-
export declare const denoSteps: readonly MetaStep[];
|
|
2
|
+
export declare const denoSteps: (extra: readonly MetaStep[]) => readonly MetaStep[];
|
package/fs/ci/deno/module.f.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { deno } from "../config/module.f.js";
|
|
2
2
|
import { clean, install, test } from "../common/module.f.js";
|
|
3
|
-
export const denoSteps = clean([
|
|
3
|
+
export const denoSteps = (extra) => clean([
|
|
4
4
|
install({
|
|
5
5
|
uses: 'denoland/setup-deno@v2',
|
|
6
6
|
with: { 'deno-version': deno },
|
|
7
7
|
}),
|
|
8
8
|
test({ run: 'deno install' }),
|
|
9
9
|
test({ run: 'deno task test' }),
|
|
10
|
-
|
|
11
|
-
test({ run: 'deno task fjs t' }),
|
|
12
|
-
test({ run: 'deno publish --dry-run' }),
|
|
10
|
+
...extra,
|
|
13
11
|
]);
|
package/fs/ci/module.f.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { type Effect } from '../types/effects/module.f.ts';
|
|
2
2
|
import { type NodeOp } from '../types/effects/node/module.f.ts';
|
|
3
3
|
import { type MetaStep, type Os } from './common/module.f.ts';
|
|
4
|
-
export
|
|
4
|
+
export type Setup = {
|
|
5
|
+
readonly rust: boolean;
|
|
6
|
+
readonly nodeExtra: (os: Os) => readonly MetaStep[];
|
|
7
|
+
readonly denoExtra: readonly MetaStep[];
|
|
8
|
+
readonly bunExtra: readonly MetaStep[];
|
|
9
|
+
};
|
|
10
|
+
export declare const ci: ({ rust, nodeExtra, denoExtra, bunExtra }: Setup) => Effect<NodeOp, number>;
|
|
5
11
|
declare const _default: () => Effect<NodeOp, number>;
|
|
6
12
|
export default _default;
|
package/fs/ci/module.f.js
CHANGED
|
@@ -13,20 +13,20 @@ import { nodeMainSteps, nodeVersions } from "./node/module.f.js";
|
|
|
13
13
|
import { playwrightJob } from "./playwright/module.f.js";
|
|
14
14
|
import { bunSteps } from "./bun/module.f.js";
|
|
15
15
|
import { denoSteps } from "./deno/module.f.js";
|
|
16
|
-
const job = (rust,
|
|
16
|
+
const job = (rust, nodeExtra, denoExtra, bunExtra) => (o) => (a) => {
|
|
17
17
|
const id = `${o}-${a}`;
|
|
18
18
|
const image = images[o][a];
|
|
19
19
|
const result = [
|
|
20
20
|
...(rust ? rustSteps(o, a) : []),
|
|
21
|
-
...nodeMainSteps(
|
|
22
|
-
...denoSteps,
|
|
23
|
-
...bunSteps(o, a),
|
|
21
|
+
...nodeMainSteps(nodeExtra),
|
|
22
|
+
...denoSteps(denoExtra),
|
|
23
|
+
...bunSteps(bunExtra)(o, a),
|
|
24
24
|
];
|
|
25
25
|
return [id, { 'runs-on': image, steps: toSteps(result) }];
|
|
26
26
|
};
|
|
27
|
-
export const ci = (rust,
|
|
27
|
+
export const ci = ({ rust, nodeExtra, denoExtra, bunExtra }) => {
|
|
28
28
|
const jobs = {
|
|
29
|
-
...Object.fromEntries(os.flatMap(o => architecture.map(job(rust,
|
|
29
|
+
...Object.fromEntries(os.flatMap(o => architecture.map(job(rust, nodeExtra(o), denoExtra, bunExtra)(o)))),
|
|
30
30
|
...nodeVersions,
|
|
31
31
|
playwright: playwrightJob,
|
|
32
32
|
};
|
|
@@ -39,11 +39,22 @@ export const ci = (rust, extra) => {
|
|
|
39
39
|
.step(() => writeFile('.github/workflows/ci.yml', utf8(JSON.stringify(gha, null, ' '))))
|
|
40
40
|
.step(() => pure(0));
|
|
41
41
|
};
|
|
42
|
-
const defaultEffect = ci(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
const defaultEffect = ci({
|
|
43
|
+
rust: true,
|
|
44
|
+
nodeExtra: o => [
|
|
45
|
+
test({ run: 'npm pack' }),
|
|
46
|
+
test({ run: `npm install -g ${findTgz(o)}` }),
|
|
47
|
+
test({ run: 'fjs compile issues/demo/data/tree.json _tree.f.js' }),
|
|
48
|
+
test({ run: 'fjs t' }),
|
|
49
|
+
test({ run: 'npm uninstall functionalscript -g' }),
|
|
50
|
+
],
|
|
51
|
+
denoExtra: [
|
|
52
|
+
test({ run: 'deno task fjs compile issues/demo/data/tree.json _tree.f.js' }),
|
|
53
|
+
test({ run: 'deno task fjs t' }),
|
|
54
|
+
test({ run: 'deno publish --dry-run' }),
|
|
55
|
+
],
|
|
56
|
+
bunExtra: [
|
|
57
|
+
test({ run: 'bun ./fs/fjs/module.ts t' }),
|
|
58
|
+
]
|
|
59
|
+
});
|
|
49
60
|
export default () => defaultEffect;
|
package/fs/ci/test.f.js
CHANGED
|
@@ -10,8 +10,8 @@ const githubState = {
|
|
|
10
10
|
...emptyState,
|
|
11
11
|
root: { '.github': { workflows: {} } },
|
|
12
12
|
};
|
|
13
|
-
const run = (rust,
|
|
14
|
-
const [state, result] = virtual(githubState)(ci(rust,
|
|
13
|
+
const run = (rust, nodeExtra = () => []) => {
|
|
14
|
+
const [state, result] = virtual(githubState)(ci({ rust, nodeExtra, denoExtra: [], bunExtra: [] }));
|
|
15
15
|
assert(result === 0, result);
|
|
16
16
|
const dotGithub = state.root['.github'];
|
|
17
17
|
assert(dotGithub !== undefined && !isVec(dotGithub), dotGithub);
|