Skip to content

Commit

Permalink
refactor: deno v2 and imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jbolda authored Dec 21, 2024
1 parent 5d117f5 commit ce7d484
Show file tree
Hide file tree
Showing 56 changed files with 883 additions and 896 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# need entire history
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: '1.22'
go-version: "1.22"
- name: generate site
run: |
go mod tidy
Expand All @@ -29,7 +29,7 @@ jobs:
with:
user: erock
key: ${{ secrets.PRIVATE_KEY }}
src: './docs/public/'
src: "./docs/public/"
project: "starfx-docs-${{ steps.vars.outputs.sha_short }}"
promote: "starfx-prod"
retain: "starfx-docs"
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
uses: denoland/setup-deno@v2
- name: get version
id: vars
run: echo ::set-output name=version::$(echo ${{github.ref_name}} | sed 's/^v//')
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test-ecosystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ jobs:
path: "starfx"

- name: setup deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
uses: denoland/setup-deno@v2

# determines branch and sets it as output available through the `id`
- name: dynamically determine ${{ matrix.example.owner }}/${{ matrix.example.repo }} branch
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
uses: denoland/setup-deno@v2

- name: format
run: deno fmt --check
Expand Down
6 changes: 2 additions & 4 deletions action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SignalQueueFactory,
spawn,
Stream,
} from "./deps.ts";
} from "effection";
import { ActionPattern, matcher } from "./matcher.ts";
import type { Action, ActionWithPayload, AnyAction } from "./types.ts";
import { createFilterQueue } from "./queue.ts";
Expand Down Expand Up @@ -105,9 +105,7 @@ export function* takeLeading<T>(
}
}

export function* waitFor(
predicate: Callable<boolean>,
) {
export function* waitFor(predicate: Callable<boolean>) {
const init = yield* call(predicate as any);
if (init) {
return;
Expand Down
2 changes: 1 addition & 1 deletion api-type-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ import type {
Supervisor,
} from "./types.ts";
import type { Next, Payload } from "../types.ts";
import type { Operation } from "../deps.ts";
import type { Operation } from "effection";
export type ApiName = string | string[];
Expand Down
2 changes: 1 addition & 1 deletion compose.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Instruction, Operation } from "./deps.ts";
import { Instruction, Operation } from "effection";
import type { Next } from "./types.ts";

export interface BaseCtx {
Expand Down
19 changes: 17 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"tasks": {
"types": "deno run --allow-write ./api-type-template.ts",
"npm": "deno run -A ./npm.ts",
"test": "deno test --allow-env --allow-read",
"npm": "deno run -A ./scripts/npm.ts",
"test": "deno test --allow-env --allow-read --allow-import",
"sync-build-to": "deno run -A ./scripts/sync.ts"
},
"lint": {
Expand All @@ -14,5 +14,20 @@
},
"fmt": {
"exclude": ["npm/", "examples/"]
},
"compilerOptions": {
"strict": true,
"lib": ["deno.window", "dom"],
"jsx": "react",
"jsxFactory": "React.createElement",
"jsxFragmentFactory": "React.Fragment"
},
"imports": {
"react": "npm:react@^18.2.0",
"react-dom": "npm:react-dom@^18.2.0",
"react-redux": "npm:react-redux@^8.0.5",
"reselect": "npm:reselect@^4.1.8",
"immer": "npm:immer@^10.0.2",
"effection": "https://deno.land/x/[email protected]/mod.ts"
}
}
Loading

0 comments on commit ce7d484

Please sign in to comment.