diff --git a/.github/workflows/publish-utils.yml b/.github/workflows/publish-utils.yml deleted file mode 100644 index 3b62793d..00000000 --- a/.github/workflows/publish-utils.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: publish hyper utils - -on: - push: - tags: - - "hyper-utils@*" - -jobs: - publish-egg: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: denoland/setup-deno@v1 - with: - deno-version: v1.x - # - run: deno install -A -f --unstable --no-check https://x.nest.land/eggs@0.3.6/eggs.ts - # - run: | - # export PATH="/home/runner/.deno/bin:$PATH" - # eggs link ${{ secrets.NESTAPIKEY }} - # cd packages/utils - # eggs publish --yes diff --git a/.github/workflows/test-utils.yml b/.github/workflows/test-utils.yml deleted file mode 100644 index e73cc6a1..00000000 --- a/.github/workflows/test-utils.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: test hyper utils -on: - pull_request: - branches: - - main - paths: - - "packages/utils/**" - push: - branches: - - "main" - paths: - - "packages/utils/**" -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - deno-version: [1.x] - steps: - - uses: actions/checkout@v2 - - name: Use Deno ${{ matrix.deno-version }} - uses: denoland/setup-deno@v1 - with: - deno-version: ${{ matrix.deno-version }} - - run: cd packages/utils && ./scripts/test.sh - env: - CI: true diff --git a/.github/workflows/utils.yml b/.github/workflows/utils.yml new file mode 100644 index 00000000..1b30af99 --- /dev/null +++ b/.github/workflows/utils.yml @@ -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/eggs@0.3.10/eggs.ts + # export PATH="/home/runner/.deno/bin:$PATH" + # eggs link ${{ secrets.NESTAPIKEY }} + + # - name: 📘 Publish to Nest + # run: | + # cd packages/utils + # eggs publish --yes diff --git a/packages/utils/deep-swap.js b/packages/utils/deep-swap.js index 84365f76..0a8ff10f 100644 --- a/packages/utils/deep-swap.js +++ b/packages/utils/deep-swap.js @@ -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, diff --git a/packages/utils/deno.jsonc b/packages/utils/deno.jsonc new file mode 100644 index 00000000..26d6ffc2 --- /dev/null +++ b/packages/utils/deno.jsonc @@ -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 +} diff --git a/packages/utils/dev_deps.js b/packages/utils/dev_deps.js index 24cc0857..623d44f9 100644 --- a/packages/utils/dev_deps.js +++ b/packages/utils/dev_deps.js @@ -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' diff --git a/packages/utils/hyper-err.js b/packages/utils/hyper-err.js index 6b59b98c..2d1844d3 100644 --- a/packages/utils/hyper-err.js +++ b/packages/utils/hyper-err.js @@ -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, @@ -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 diff --git a/packages/utils/scripts/test.sh b/packages/utils/scripts/test.sh deleted file mode 100755 index ffa03181..00000000 --- a/packages/utils/scripts/test.sh +++ /dev/null @@ -1 +0,0 @@ -deno lint && deno fmt --check && deno test \ No newline at end of file