Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tillathehun0/refactor utils #598

Merged
merged 2 commits into from
May 26, 2023
Merged
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
21 changes: 0 additions & 21 deletions .github/workflows/publish-utils.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/test-utils.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/utils.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: 🛠 Test & Deploy Utils

on:
pull_request:
branches:
- main
paths:
- "packages/utils/**"
push:
branches:
- main
paths:
- "packages/utils/**"
tags:
- 'hyper-utils@*'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
deno-version: [1.x]

steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: 🦕 Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}

- name: ⚡ Run Tests
run: |
cd packages/utils
deno task test
env:
CI: true

publish:
if: startsWith(github.ref, 'refs/tags/hyper-utils@')
needs: [test]
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: 🦕 Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

# - name: 🥚 Setup Eggs CLI
# run: |
# deno install -A -f --unstable --no-check https://x.nest.land/[email protected]/eggs.ts
# export PATH="/home/runner/.deno/bin:$PATH"
# eggs link ${{ secrets.NESTAPIKEY }}

# - name: 📘 Publish to Nest
# run: |
# cd packages/utils
# eggs publish --yes
2 changes: 1 addition & 1 deletion packages/utils/deep-swap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as R from 'https://cdn.skypack.dev/ramda@0.28.0'
import * as R from 'https://cdn.skypack.dev/ramda@0.29.0'

const {
curry,
Expand Down
12 changes: 12 additions & 0 deletions packages/utils/deno.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"tasks": {
"test": "deno lint && deno fmt --check && deno test --no-check"
},
"fmt": {
"include": ["./"],
"lineWidth": 100,
"singleQuote": true,
"semiColons": false
},
"lock": false
}
2 changes: 1 addition & 1 deletion packages/utils/dev_deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export {
assert,
assertEquals,
assertThrows,
} from 'https://deno.land/std@0.128.0/testing/asserts.ts'
} from 'https://deno.land/std@0.188.0/testing/asserts.ts'
4 changes: 2 additions & 2 deletions packages/utils/hyper-err.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as R from 'https://cdn.skypack.dev/ramda@0.28.0'
import * as R from 'https://cdn.skypack.dev/ramda@0.29.0'

const {
ifElse,
Expand Down Expand Up @@ -38,7 +38,7 @@ const checkIfDefined = (pred, msg) =>
)

export const isHyperErr = allPass([
propEq('ok', false),
propEq(false, 'ok'),
/**
* should not have an _id.
* Otherwise it's a document ie data.retrieveDocument
Expand Down
1 change: 0 additions & 1 deletion packages/utils/scripts/test.sh

This file was deleted.