diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index eaf2ed6..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - // this is required for dynamic import() - ecmaVersion: 2020 - }, - env: { - node: true - }, - extends: ['digitalbazaar', 'digitalbazaar/jsdoc'], - ignorePatterns: ['node_modules/'] -}; diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..d0bed6a --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,20 @@ +name: Bedrock Node.js CI + +on: [push] + +jobs: + lint: + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + matrix: + node-version: [24.x] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - name: Run eslint + run: npm run lint diff --git a/CHANGELOG.md b/CHANGELOG.md index 832bc3a..bf32ab2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # bedrock-mail ChangeLog +## 7.2.0 - 2026-06-dd + +### Changed +- Update dependencies: + - `ejs@6.0.1`, + - `html-to-text@10.0.0`, + - `lru-cache@11.5.1`, + - `mailparser@3.9.9`, + - `nodemailer@8.0.10`, + - `open@11.0.0`. + ## 7.1.2 - 2025-10-10 ### Fixed diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..42b4cfe --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,23 @@ +/*! + * Copyright 2022 - 2026 Digital Bazaar, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import config from '@digitalbazaar/eslint-config/node-recommended'; + +export default [ + ...config +]; diff --git a/lib/EmailClient.js b/lib/EmailClient.js index f26fe6f..55f1071 100644 --- a/lib/EmailClient.js +++ b/lib/EmailClient.js @@ -1,5 +1,5 @@ /*! - * Copyright (c) 2025 Digital Bazaar, Inc. All rights reserved. + * Copyright (c) 2025-2026 Digital Bazaar, Inc. */ import * as bedrock from '@bedrock/core'; import {readFile, stat} from 'node:fs/promises'; @@ -192,7 +192,7 @@ export class EmailClient { throw error; } return true; - } catch(e) { + } catch { return false; } } diff --git a/lib/index.js b/lib/index.js index 1b97b24..7f50518 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,5 +1,5 @@ /*! - * Copyright (c) 2012-2025 Digital Bazaar, Inc. All rights reserved. + * Copyright (c) 2012-2026 Digital Bazaar, Inc. */ import * as bedrock from '@bedrock/core'; import appRoot from 'app-root-path'; @@ -153,7 +153,7 @@ async function _useTransport(transportConfig) { preview: cfg.preview, // message defaults for all emails message: cfg.message, - subjectPrefix: cfg.subjectPrefix, + subjectPrefix: cfg.subjectPrefix }); logger.debug('transport configured'); } diff --git a/package.json b/package.json index 78fd570..3b9616e 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "main": "./lib/index.js", "scripts": { "test": "node test.js", - "lint": "eslint 'lib/*.js' test/*.js" + "lint": "eslint" }, "repository": { "type": "git", @@ -28,12 +28,12 @@ "homepage": "https://github.com/digitalbazaar/bedrock-mail", "dependencies": { "app-root-path": "^3.1.0", - "ejs": "^3.1.10", - "html-to-text": "^9.0.5", - "lru-cache": "^11.2.1", - "mailparser": "^3.7.5", - "nodemailer": "^7.0.9", - "open": "^10.2.0" + "ejs": "^6.0.1", + "html-to-text": "^10.0.0", + "lru-cache": "^11.5.1", + "mailparser": "^3.9.9", + "nodemailer": "^8.0.10", + "open": "^11.0.0" }, "peerDependencies": { "@bedrock/core": "^6.0.0" @@ -42,9 +42,7 @@ "lib": "./lib" }, "devDependencies": { - "eslint": "^8.57.1", - "eslint-config-digitalbazaar": "^5.2.0", - "eslint-plugin-jsdoc": "^50.4.1", - "jsdoc-to-markdown": "^9.0.2" + "@digitalbazaar/eslint-config": "^8.0.1", + "eslint": "^9.39.4" } }