Skip to content

Commit

Permalink
Merge pull request #1768 from filipedeschamps/fix/crypto-edge-runtime
Browse files Browse the repository at this point in the history
Atualiza Node.js para v20 e usa o `crypto` de maneira compatível com a Edge
  • Loading branch information
aprendendofelipe authored Jul 27, 2024
2 parents e388bc7 + a470b7b commit 7966bbb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run dev & npx vitest run
Expand All @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run lint
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/hydrogen
lts/iron
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Rodar o TabNews em sua máquina local é uma tarefa extremamente simples.

Você precisa ter duas principais dependências instaladas:

- Node.js LTS v18 (ou qualquer versão superior)
- Node.js LTS v20 (ou qualquer versão superior)
- Docker Engine v17.12.0 com Docker Compose v1.29.2 (ou qualquer versão superior)

### Dependências locais
Expand Down
4 changes: 1 addition & 3 deletions errors/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { randomUUID as uuid } from 'crypto';

class BaseError extends Error {
constructor({
name,
Expand All @@ -20,7 +18,7 @@ class BaseError extends Error {
this.message = message;
this.action = action;
this.statusCode = statusCode || 500;
this.errorId = errorId || uuid();
this.errorId = errorId || crypto.randomUUID();
this.requestId = requestId;
this.context = context;
this.stack = stack;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
]
},
"engines": {
"node": "18"
"node": "20"
},
"name": "tabnews.com.br",
"description": "Conteúdos para quem vive de programação e tecnologia.",
Expand Down

0 comments on commit 7966bbb

Please sign in to comment.