From f500f457bce0dfdfe2bbd9c0afb08432f5899f0c Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Thu, 14 Sep 2023 14:03:07 +0800 Subject: [PATCH] Meta updates --- .github/workflows/ci.yml | 14 ++++++++++---- .github/workflows/esm-lint.yml | 4 ++-- .nvmrc | 1 + package.json | 4 ++++ 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2132400..3a2f46f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,10 +13,10 @@ jobs: Lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version-file: .nvmrc - name: install run: npm ci || npm install - name: XO @@ -25,7 +25,10 @@ jobs: Test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc - name: install run: npm ci || npm install - name: build @@ -36,7 +39,10 @@ jobs: Build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc - name: install run: npm ci || npm install - name: build diff --git a/.github/workflows/esm-lint.yml b/.github/workflows/esm-lint.yml index 7b072cd..6b81417 100644 --- a/.github/workflows/esm-lint.yml +++ b/.github/workflows/esm-lint.yml @@ -19,7 +19,7 @@ jobs: Pack: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm install - run: npm run build --if-present - run: npm pack --dry-run @@ -81,7 +81,7 @@ jobs: - uses: actions/download-artifact@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - run: echo "${{ env.IMPORT_TEXT }} '${{ env.NPM_MODULE_NAME }}'" > index.mjs - run: npm install ./artifact - run: node index.mjs diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 diff --git a/package.json b/package.json index 0c18702..971b4a1 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "author": "Federico Brigante (https://fregante.com)", "type": "module", "main": "index.js", + "types": "./index.d.ts", "files": [ "index.js", "index.d.ts", @@ -68,5 +69,8 @@ "type-fest": "^4.3.1", "typescript": "^5.2.2", "xo": "^0.56.0" + }, + "engines": { + "node": ">=18" } }