From adc7ca2f079b96e69c42c1225d261e9a15814732 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Tue, 12 Sep 2023 11:16:59 +0800 Subject: [PATCH] Update dependencies; enforce Node 18 (#45) --- .github/workflows/npm-publish.yml | 21 +++++++++++---------- package.json | 13 ++++++++----- tsconfig.json | 5 ++++- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 4d44577..8440108 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -20,20 +20,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - fetch-depth: 20 - uses: actions/setup-node@v3 with: - node-version: 14.x - registry-url: 'https://registry.npmjs.org' + node-version: 18 + registry-url: https://registry.npmjs.org - run: npm ci || npm install - - uses: fregante/setup-git-user@v1 - - run: npm version ${{ github.event.inputs.Version }} + - uses: fregante/setup-git-user@v2 + - name: Create version + # Get the generated version, this enables support for keywords: `npm version patch` + run: | + VERSION="$(npm version "${{ github.event.inputs.Version }}")" + echo "VERSION=$VERSION" >> $GITHUB_ENV - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: git push --follow-tags - - uses: fregante/release-with-changelog@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - exclude: true + - run: gh release create "$VERSION" --generate-notes + env: + GH_TOKEN: ${{ github.token }} diff --git a/package.json b/package.json index ec24bfe..2623447 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,9 @@ "funding": "https://github.com/sponsors/fregante", "license": "MIT", "author": "Federico Brigante (https://fregante.com)", + "exports": "./index.js", + "main": "./index.js", + "types": "./index.d.ts", "files": [ "index.js", "index.d.ts" @@ -34,15 +37,15 @@ } }, "dependencies": { - "github-reserved-names": "^2.0.4" + "github-reserved-names": "^2.0.5" }, "devDependencies": { - "@sindresorhus/tsconfig": "^3.0.1", - "ava": "^4.3.3", - "tsd": "^0.23.0", + "@sindresorhus/tsconfig": "^4.0.0", + "ava": "^5.3.1", + "tsd": "^0.29.0", "xo": "^0.56.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=18" } } diff --git a/tsconfig.json b/tsconfig.json index e492827..9e1916f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,6 @@ { - "extends": "@sindresorhus/tsconfig" + "extends": "@sindresorhus/tsconfig", + "compilerOptions": { + "target": "ES2022", + } }