Skip to content

Commit

Permalink
chore: update deps (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop authored Feb 2, 2024
1 parent 93abd35 commit fcec7fa
Show file tree
Hide file tree
Showing 8 changed files with 587 additions and 465 deletions.
5 changes: 5 additions & 0 deletions .changeset/sweet-insects-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hasura-auth': patch
---

chore: update dependencies
83 changes: 83 additions & 0 deletions .github/workflows/gen_schedule_update_deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: "gen: update depenendencies"
on:
schedule:
- cron: '0 2 1 * *'

jobs:
run:
runs-on: ubuntu-latest

permissions:
id-token: write
contents: write
pull-requests: write

steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure aws
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}:role/github-actions-nhost-be
aws-region: eu-central-1

- uses: nixbuild/nix-quick-install-action@v26
with:
nix_version: 2.16.2
nix_conf: |
experimental-features = nix-command flakes
sandbox = false
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org/?priority=40 s3://nhost-nix-cache?region=eu-central-1&priority=50
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ${{ secrets.NIX_CACHE_PUB_KEY }}
- name: Cache nix store
uses: actions/cache@v4
with:
path: /nix
key: nix-update-deps-${{ hashFiles('flakes.nix', 'flake.lock') }}

- name: Update nix flakes
run: nix flake update

- name: Update golang dependencies
run: |
nix develop -c bash -c "
go mod tidy
go get -u ./...
go mod tidy
go mod vendor
"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update dependencies
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: automated/update-deps
delete-branch: true
title: '[Scheduled] Update dependencies'
body: |
Dependencies updated
Note - If you see this PR and the checks haven't run, close and reopen the PR. See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
labels: |
dependencies
draft: false

- name: "Cache nix store on s3"
run: |
echo ${{ secrets.NIX_CACHE_PRIV_KEY }} > cache-priv-key.pem
nix build .\#devShells.x86_64-linux.default
nix store sign --key-file cache-priv-key.pem --all
nix copy --to s3://nhost-nix-cache\?region=eu-central-1 .\#devShells.x86_64-linux.default
- run: rm cache-priv-key.pem
if: always()
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dev: check-port dev-env-up ## Start development environment.

.PHONY: test
test: check-port dev-env-up ## Run end-to-end tests.
pnpm audit
pnpx audit-ci --config ./audit-ci.jsonc
pnpm test

.PHONY: check-port
Expand Down
6 changes: 6 additions & 0 deletions audit-ci.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
// $schema provides code completion hints to IDEs.
"$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
"moderate": true,
"allowlist": []
}
54 changes: 42 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
description = "Nhost Hasura Auth";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-filter.url = "github:numtide/nix-filter";
flake-utils.url = "github:numtide/flake-utils";
nixops.url = "github:nhost/nixops";
nixpkgs.follows = "nixops/nixpkgs";
flake-utils.follows = "nixops/flake-utils";
nix-filter.follows = "nixops/nix-filter";
};

outputs = { self, nixpkgs, flake-utils, nix-filter }:
outputs = { self, nixops, nixpkgs, flake-utils, nix-filter }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
nixops.overlays.default
(final: prev: {
nodejs = prev.nodejs-18_x;
})
Expand Down Expand Up @@ -87,11 +89,11 @@
gnumake
] ++ buildInputs ++ nativeBuildInputs;

shellHook = ''
export PATH=${node_modules}/node_modules/.bin:$PATH
rm -rf node_modules
ln -sf ${node_modules}/node_modules/ node_modules
'';
# shellHook = ''
# export PATH=${node_modules}/node_modules/.bin:$PATH
# rm -rf node_modules
# ln -sf ${node_modules}/node_modules/ node_modules
# '';
};
};
}
Expand Down
21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"dependencies": {
"@djgrant/postgres-migrations": "4.1.0-rc.1",
"@simplewebauthn/server": "^7.2.0",
"axios": "^1.6.5",
"@simplewebauthn/server": "^7.4.0",
"axios": "^1.6.7",
"bcryptjs": "^2.4.3",
"body-parser": "1.19.0",
"compare-urls": "^2.0.0",
Expand All @@ -36,7 +36,7 @@
"email-validator": "^2.0.4",
"express": "4.17.1",
"express-jsdoc-swagger": "^1.8.0",
"express-session": "^1.17.3",
"express-session": "^1.18.0",
"express-winston": "^4.2.0",
"grant": "^5.4.22",
"graphql": "16.2.0",
Expand All @@ -46,15 +46,15 @@
"helmet": "3.22.0",
"hibp": "9.0.0",
"http-status-codes": "^2.3.0",
"joi": "^17.11.0",
"joi": "^17.12.1",
"joi-to-swagger": "^6.2.0",
"jose": "^5.2.0",
"js-yaml": "3.13.1",
"json-to-graphql-query": "^2.2.5",
"jsonata": "^1.8.6",
"jsonwebtoken": "^9.0.2",
"jsrsasign": "11.0.0",
"libphonenumber-js": "^1.10.53",
"libphonenumber-js": "^1.10.54",
"micromatch": "^4.0.5",
"nocache": "^2.1.0",
"node-fetch": "^2.7.0",
Expand All @@ -79,7 +79,7 @@
"@graphql-codegen/typescript": "^2.8.8",
"@graphql-codegen/typescript-graphql-request": "^4.5.9",
"@graphql-codegen/typescript-operations": "^2.5.13",
"@simplewebauthn/types": "^9.0.0",
"@simplewebauthn/types": "^9.0.1",
"@simplewebauthn/typescript-types": "^5.4.0",
"@types/bcryptjs": "^2.4.6",
"@types/body-parser": "1.19.0",
Expand All @@ -96,7 +96,7 @@
"@types/jsonwebtoken": "^8.5.9",
"@types/micromatch": "^4.0.6",
"@types/node": "^17.0.45",
"@types/node-fetch": "^2.6.10",
"@types/node-fetch": "^2.6.11",
"@types/nodemailer": "6.4.14",
"@types/pg": "^7.14.11",
"@types/qrcode": "1.3.4",
Expand All @@ -109,6 +109,7 @@
"@typescript-eslint/eslint-plugin": "2.28.0",
"@typescript-eslint/parser": "2.28.0",
"@vuepress/plugin-back-to-top": "1.4.1",
"audit-ci": "^6.6.1",
"codecov": "^3.8.3",
"commitizen": "^4.3.0",
"cz-conventional-changelog": "3.1.0",
Expand All @@ -128,7 +129,7 @@
"prettier": "^2.8.8",
"rfc2047": "^3.0.1",
"rimraf": "^3.0.2",
"supertest": "^6.3.3",
"supertest": "^6.3.4",
"ts-jest": "^27.1.5",
"ts-node-dev": "^1.1.8",
"tsc-alias": "^1.8.8",
Expand Down Expand Up @@ -162,7 +163,9 @@
"axios@>=0.8.1 <1.6.0": ">=1.6.0",
"axios@<0.21.2": ">=0.21.2",
"semver@<5.7.2": ">=5.7.2",
"semver@>=7.0.0 <7.5.2": ">=7.5.2"
"semver@>=7.0.0 <7.5.2": ">=7.5.2",
"jsrsasign@<11.0.0": ">=11.0.0",
"nodemailer@<=6.9.8": ">=6.9.9"
}
}
}
Loading

0 comments on commit fcec7fa

Please sign in to comment.