Skip to content

Commit

Permalink
feat: upgrade project dependencies, nodejs version and fastify
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Min fastify is version set to 5
  • Loading branch information
sargisshahinyan committed Dec 11, 2024
1 parent 80846c0 commit e09aa69
Show file tree
Hide file tree
Showing 14 changed files with 8,604 additions and 27,405 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

16 changes: 0 additions & 16 deletions .eslintrc

This file was deleted.

23 changes: 16 additions & 7 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@ jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
- run: npm run lint
- run: npm run test
- run: npm run build
cache: "pnpm"
node-version: "22"
registry-url: https://npm.pkg.github.com
scope: "@blastorg"
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: latest
- run: pnpm install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_READ_TOKEN }}
- run: pnpm run lint
- run: pnpm run test
- run: pnpm run build
86 changes: 59 additions & 27 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,44 @@ jobs:
install-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
- run: npm run lint
- run: npm run test
cache: "pnpm"
node-version: "22"
registry-url: https://npm.pkg.github.com
scope: "@blastorg"
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: latest
- run: pnpm install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_READ_TOKEN }}
- run: pnpm run lint
- run: pnpm run test

release:
if: "!startsWith(github.event.head_commit.message, '[skip ci]')"
needs: install-and-test
runs-on: ubuntu-latest
name: "Create a new release & update changelog using semantic-release"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version: "22"
registry-url: https://npm.pkg.github.com
scope: "@blastorg"
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
node-version: 18
- run: npm ci
- run: npm run build
version: latest
- run: pnpm install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_READ_TOKEN }}
- run: pnpm run build
- name: semantic-release
run: npx semantic-release
id: semantic-release
Expand All @@ -44,18 +62,25 @@ jobs:
runs-on: ubuntu-latest
name: "Releases package to Github Packages registry"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-tags: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
cache: "pnpm"
node-version: "22"
registry-url: https://npm.pkg.github.com
scope: "@blastorg"
- run: npm ci
- run: npm run build
- run: npm version ${{ needs.release.outputs.new-release-version }} --no-git-tag-version --no-commit-hooks
- run: npm publish
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: latest
- run: pnpm install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_READ_TOKEN }}
- run: pnpm run build
- run: pnpm version ${{ needs.release.outputs.new-release-version }} --no-git-tag-version --no-commit-hooks
- run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

Expand All @@ -65,17 +90,24 @@ jobs:
runs-on: ubuntu-latest
name: "Releases package to NPM registry"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-tags: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: "pnpm"
node-version: "22"
registry-url: https://npm.pkg.github.com
scope: "@blastorg"
- run: npm ci
- run: npm run build
- run: npm version ${{ needs.release.outputs.new-release-version }} --no-git-tag-version --no-commit-hooks
- run: npm publish
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: latest
- run: pnpm install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_READ_TOKEN }}
- run: pnpm run build
- run: pnpm version ${{ needs.release.outputs.new-release-version }} --no-git-tag-version --no-commit-hooks
- run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPMJS_READWRITE_TOKEN}}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v22
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Package containing AWS DynamoDB caching plugin, which you can use to use DynamoD

## Requirements

In order to install this package you need at lease Node version 18 installed on your operating system of choice.
In order to install this package you need at lease Node version 22 installed on your operating system of choice.

Then you need a DynamoDB table set up in your region of choice with the structure matching:

Expand Down
17 changes: 17 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { includeIgnoreFile } from "@eslint/compat";
import path from "node:path";
import { fileURLToPath } from "node:url";
import config from "@blastorg/eslint-config-blast/ts-config.mjs";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const gitignorePath = path.resolve(__dirname, ".gitignore");

export default [
...config,
// Ignore files and folders from gitignore
includeIgnoreFile(gitignorePath),
{
ignores: ["eslint.config.mjs", "jest.config.js"],
},
];
Loading

0 comments on commit e09aa69

Please sign in to comment.