- commit
- 6396f79
- parent
- 856e366
- author
- Eric Bower
- date
- 2024-02-06 05:08:56 +0000 UTC
fix(ci): shell string
3 files changed,
+11,
-8
+5,
-1
1@@ -41,7 +41,8 @@ jobs:
2 # determines branch and sets it as output available through the `id`
3 - name: dynamically determine ${{ matrix.example.owner }}/${{ matrix.example.repo }} branch
4 id: conditionalBranch
5- run: deno run -A ./starfx/scripts/branch-exists.ts $GITHUB_HEAD_REF neurosnap/starfx-examples
6+ shell: bash
7+ run: deno run -A ./starfx/scripts/branch-exists.ts "$GITHUB_HEAD_REF" neurosnap/starfx-examples
8
9 - name: checkout ${{ matrix.example.owner }}/${{ matrix.example.repo }} on ${{ steps.conditionalBranch.outputs.branch }}
10 uses: actions/checkout@v4
11@@ -51,16 +52,19 @@ jobs:
12 ref: ${{ steps.conditionalBranch.outputs.branch }}
13
14 - name: bundle for npm
15+ shell: bash
16 run: deno task npm 0.0.0
17 working-directory: starfx
18
19 # install in example repos
20 - name: install ${{ matrix.example.owner }}/${{ matrix.example.repo }}
21+ shell: bash
22 working-directory: ${{ matrix.example.repo }}/${{ matrix.example.folder }}
23 run: npm install
24
25 # symlink example repos
26 - name: symlink built assets
27+ shell: bash
28 run: deno task sync-build-to install ${{ matrix.example.repo }}/${{ matrix.example.folder }}
29 working-directory: starfx
30
+3,
-4
1@@ -103,10 +103,9 @@ export function* takeLeading<T>(
2 }
3 }
4
5-export const API_ACTION_PREFIX = "@@starfx";
6-export const createAction = (curType: string) => {
7- if (!curType) throw new Error("createAction requires non-empty string");
8- const type = `${API_ACTION_PREFIX}${curType}`;
9+export const API_ACTION_PREFIX = "@@starfx:";
10+export const createAction = (type: string) => {
11+ if (!type) throw new Error("createAction requires non-empty string");
12 const action = () => ({ type });
13 action.toString = () => type;
14 return action;
+3,
-3
1@@ -1,14 +1,14 @@
2 import { describe, expect, it } from "../test.ts";
3-import { API_ACTION_PREFIX, createAction } from "../mod.ts";
4+import { createAction } from "../mod.ts";
5
6 const tests = describe("createAction()");
7
8 it(tests, "should return action type when stringified", () => {
9 const undo = createAction("UNDO");
10- expect(`${API_ACTION_PREFIX}UNDO`).toEqual(`${undo}`);
11+ expect(`UNDO`).toEqual(`${undo}`);
12 });
13
14 it(tests, "return object with type", () => {
15 const undo = createAction("UNDO");
16- expect(undo()).toEqual({ type: `${API_ACTION_PREFIX}UNDO` });
17+ expect(undo()).toEqual({ type: `UNDO` });
18 });