From 30acba1ddd7b08dc0e0ce4e6ffcdb50e978c8747 Mon Sep 17 00:00:00 2001 From: Harminder Virk Date: Tue, 10 Dec 2024 19:15:01 +0530 Subject: [PATCH] chore: update dependencies Closes: #137 --- .github/labels.json | 170 ---------------------------------- .github/workflows/checks.yml | 1 + .github/workflows/labels.yml | 15 +++ .github/workflows/release.yml | 32 +++++++ .husky/commit-msg | 4 - eslint.config.js | 2 + package.json | 118 +++++++++++------------ 7 files changed, 110 insertions(+), 232 deletions(-) delete mode 100644 .github/labels.json create mode 100644 .github/workflows/labels.yml create mode 100644 .github/workflows/release.yml delete mode 100755 .husky/commit-msg create mode 100644 eslint.config.js diff --git a/.github/labels.json b/.github/labels.json deleted file mode 100644 index ba001c6..0000000 --- a/.github/labels.json +++ /dev/null @@ -1,170 +0,0 @@ -[ - { - "name": "Priority: Critical", - "color": "ea0056", - "description": "The issue needs urgent attention", - "aliases": [] - }, - { - "name": "Priority: High", - "color": "5666ed", - "description": "Look into this issue before picking up any new work", - "aliases": [] - }, - { - "name": "Priority: Medium", - "color": "f4ff61", - "description": "Try to fix the issue for the next patch/minor release", - "aliases": [] - }, - { - "name": "Priority: Low", - "color": "87dfd6", - "description": "Something worth considering, but not a top priority for the team", - "aliases": [] - }, - { - "name": "Semver: Alpha", - "color": "008480", - "description": "Will make it's way to the next alpha version of the package", - "aliases": [] - }, - { - "name": "Semver: Major", - "color": "ea0056", - "description": "Has breaking changes", - "aliases": [] - }, - { - "name": "Semver: Minor", - "color": "fbe555", - "description": "Mainly new features and improvements", - "aliases": [] - }, - { - "name": "Semver: Next", - "color": "5666ed", - "description": "Will make it's way to the bleeding edge version of the package", - "aliases": [] - }, - { - "name": "Semver: Patch", - "color": "87dfd6", - "description": "A bug fix", - "aliases": [] - }, - { - "name": "Status: Abandoned", - "color": "ffffff", - "description": "Dropped and not into consideration", - "aliases": ["wontfix"] - }, - { - "name": "Status: Accepted", - "color": "e5fbf2", - "description": "The proposal or the feature has been accepted for the future versions", - "aliases": [] - }, - { - "name": "Status: Blocked", - "color": "ea0056", - "description": "The work on the issue or the PR is blocked. Check comments for reasoning", - "aliases": [] - }, - { - "name": "Status: Completed", - "color": "008672", - "description": "The work has been completed, but not released yet", - "aliases": [] - }, - { - "name": "Status: In Progress", - "color": "73dbc4", - "description": "Still banging the keyboard", - "aliases": ["in progress"] - }, - { - "name": "Status: On Hold", - "color": "f4ff61", - "description": "The work was started earlier, but is on hold now. Check comments for reasoning", - "aliases": ["On Hold"] - }, - { - "name": "Status: Review Needed", - "color": "fbe555", - "description": "Review from the core team is required before moving forward", - "aliases": [] - }, - { - "name": "Status: Awaiting More Information", - "color": "89f8ce", - "description": "Waiting on the issue reporter or PR author to provide more information", - "aliases": [] - }, - { - "name": "Status: Need Contributors", - "color": "7057ff", - "description": "Looking for contributors to help us move forward with this issue or PR", - "aliases": [] - }, - { - "name": "Type: Bug", - "color": "ea0056", - "description": "The issue has indentified a bug", - "aliases": ["bug"] - }, - { - "name": "Type: Security", - "color": "ea0056", - "description": "Spotted security vulnerability and is a top priority for the core team", - "aliases": [] - }, - { - "name": "Type: Duplicate", - "color": "00837e", - "description": "Already answered or fixed previously", - "aliases": ["duplicate"] - }, - { - "name": "Type: Enhancement", - "color": "89f8ce", - "description": "Improving an existing feature", - "aliases": ["enhancement"] - }, - { - "name": "Type: Feature Request", - "color": "483add", - "description": "Request to add a new feature to the package", - "aliases": [] - }, - { - "name": "Type: Invalid", - "color": "dbdbdb", - "description": "Doesn't really belong here. Maybe use discussion threads?", - "aliases": ["invalid"] - }, - { - "name": "Type: Question", - "color": "eceafc", - "description": "Needs clarification", - "aliases": ["help wanted", "question"] - }, - { - "name": "Type: Documentation Change", - "color": "7057ff", - "description": "Documentation needs some improvements", - "aliases": ["documentation"] - }, - { - "name": "Type: Dependencies Update", - "color": "00837e", - "description": "Bump dependencies", - "aliases": ["dependencies"] - }, - { - "name": "Good First Issue", - "color": "008480", - "description": "Want to contribute? Just filter by this label", - "aliases": ["good first issue"] - } -] diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 20087a0..e18df92 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -2,6 +2,7 @@ name: test on: - push - pull_request + - workflow_call jobs: test: diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml new file mode 100644 index 0000000..af9b6f0 --- /dev/null +++ b/.github/workflows/labels.yml @@ -0,0 +1,15 @@ +name: Sync labels +on: + workflow_dispatch: +permissions: + issues: write +jobs: + labels: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: EndBug/label-sync@v2 + with: + config-file: 'https://raw.githubusercontent.com/thetutlage/static/main/labels.yml' + delete-other-labels: true + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fde89b4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: release +on: workflow_dispatch +permissions: + contents: write + id-token: write +jobs: + checks: + uses: ./.github/workflows/checks.yml + release: + needs: checks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - name: git config + run: | + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + - name: Init npm config + run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm install + - run: npm run release -- --ci + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100755 index 4002db7..0000000 --- a/.husky/commit-msg +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -npx --no -- commitlint --edit diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..e4cad4b --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,2 @@ +import { configPkg } from '@adonisjs/eslint-config' +export default configPkg() diff --git a/package.json b/package.json index 80a19f5..5ab1503 100644 --- a/package.json +++ b/package.json @@ -31,53 +31,47 @@ "postcompile": "npm run copy:templates", "build": "npm run compile", "prepublishOnly": "npm run build", - "lint": "eslint . --ext=.ts", + "lint": "eslint .", "format": "prettier --write .", - "release": "np", + "release": "release-it", "version": "npm run build", - "sync-labels": "github-label-sync --labels .github/labels.json adonisjs/i18n", - "quick:test": "node --enable-source-maps --loader=ts-node/esm bin/test.ts" + "quick:test": "node --import=ts-node-maintained/register/esm --enable-source-maps bin/test.ts" }, "devDependencies": { - "@adonisjs/assembler": "^7.7.0", - "@adonisjs/core": "^6.12.1", - "@adonisjs/eslint-config": "^1.3.0", - "@adonisjs/prettier-config": "^1.3.0", - "@adonisjs/tsconfig": "^1.3.0", - "@commitlint/cli": "^19.3.0", - "@commitlint/config-conventional": "^19.2.2", + "@adonisjs/assembler": "^7.8.2", + "@adonisjs/core": "^6.16.0", + "@adonisjs/eslint-config": "^2.0.0-beta.7", + "@adonisjs/prettier-config": "^1.4.0", + "@adonisjs/tsconfig": "^1.4.0", "@japa/assert": "^3.0.0", "@japa/file-system": "^2.3.0", "@japa/runner": "^3.1.4", - "@swc/core": "^1.7.4", + "@swc/core": "^1.10.1", "@types/luxon": "^3.4.2", "@types/negotiator": "^0.6.3", - "@types/node": "^22.0.2", - "@vinejs/vine": "^2.1.0", + "@types/node": "^22.10.1", + "@vinejs/vine": "^3.0.0", "c8": "^10.1.2", "copyfiles": "^2.4.1", - "del-cli": "^5.1.0", - "edge.js": "^6.0.2", - "eslint": "^8.56.0", - "github-label-sync": "^2.3.1", - "husky": "^9.1.4", - "np": "^10.0.7", - "prettier": "^3.3.3", - "ts-node": "^10.9.2", - "tsup": "^8.2.3", - "typescript": "^5.5.4" + "del-cli": "^6.0.0", + "edge.js": "^6.2.0", + "eslint": "^9.16.0", + "prettier": "^3.4.2", + "ts-node-maintained": "^10.9.4", + "tsup": "^8.3.5", + "typescript": "^5.7.2" }, "dependencies": { "@poppinss/intl-formatter": "^3.0.3", - "@poppinss/utils": "^6.7.3", - "intl-messageformat": "^10.5.14", - "luxon": "^3.4.4", - "negotiator": "^0.6.3", - "yaml": "^2.5.0" + "@poppinss/utils": "^6.8.3", + "intl-messageformat": "^10.7.10", + "luxon": "^3.5.0", + "negotiator": "^1.0.0", + "yaml": "^2.6.1" }, "peerDependencies": { "@adonisjs/core": "^6.6.0", - "@vinejs/vine": "^2.0.0", + "@vinejs/vine": "^2.0.0 || ^3.0.0", "edge.js": "^6.0.2" }, "peerDependenciesMeta": { @@ -104,35 +98,9 @@ "translation", "i18n" ], - "eslintConfig": { - "extends": "@adonisjs/eslint-config/package" - }, - "prettier": "@adonisjs/prettier-config", - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, "publishConfig": { "access": "public", - "tag": "latest" - }, - "np": { - "message": "chore(release): %s", - "tag": "latest", - "branch": "main", - "anyBranch": false - }, - "c8": { - "reporter": [ - "text", - "html" - ], - "exclude": [ - "tests/**", - "test_helpers/**", - "stubs/**" - ] + "provenance": true }, "tsup": { "entry": [ @@ -149,5 +117,39 @@ "dts": false, "sourcemap": true, "target": "esnext" - } + }, + "release-it": { + "git": { + "requireCleanWorkingDir": true, + "requireUpstream": true, + "commitMessage": "chore(release): ${version}", + "tagAnnotation": "v${version}", + "push": true, + "tagName": "v${version}" + }, + "github": { + "release": true + }, + "npm": { + "publish": true, + "skipChecks": true + }, + "plugins": { + "@release-it/conventional-changelog": { + "preset": { + "name": "angular" + } + } + } + }, + "c8": { + "reporter": [ + "text", + "html" + ], + "exclude": [ + "tests/**" + ] + }, + "prettier": "@adonisjs/prettier-config" }