diff --git a/.release b/.release index 0890e94..13098cf 160000 --- a/.release +++ b/.release @@ -1 +1 @@ -Subproject commit 0890e945e4e061c96c7b2ab45017525904c17728 +Subproject commit 13098cf7d6da30333b94499f7cb3d8b3d027e2d8 diff --git a/Changes.md b/CHANGELOG.md similarity index 92% rename from Changes.md rename to CHANGELOG.md index 147666f..50a4fc7 100644 --- a/Changes.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ +# Changelog + +The format is based on [Keep a Changelog](https://keepachangelog.com/). + ### Unreleased +### [1.3.4] - 2024-04-05 + +- populate [files] in package.json +- plugin: fix comment typo +- doc(README): verbiage improvements +- dep(address-rfc2821): bump from 2.1.1 to 2.1.2 (#61) +- deps: bump to latest + + ### [1.3.3] - 2023-12-12 - deps(\*): pin versions to latest @@ -199,3 +212,4 @@ [1.3.1]: https://github.com/haraka/test-fixtures/releases/tag/v1.3.1 [1.3.2]: https://github.com/haraka/test-fixtures/releases/tag/v1.3.2 [1.3.3]: https://github.com/haraka/test-fixtures/releases/tag/1.3.3 +[1.3.4]: https://github.com/haraka/test-fixtures/releases/tag/v1.3.4 diff --git a/README.md b/README.md index ec91347..0f4ecdc 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Fixtures for testing Haraka and plugins # Usage -var fixtures = require('haraka-test-fixtures'); +`const fixtures = require('haraka-test-fixtures');` # Exports the following fixture types: @@ -23,7 +23,7 @@ var fixtures = require('haraka-test-fixtures'); * transaction * util_hmailitem -These fixtures are rough analogs of their like-named siblings in Haraka with varying levels of completeness. If there are functions necessary to enhance your ability to test, please do add them here. +These fixtures are analogs of their like-named siblings in Haraka with varying levels of completeness. If there are functions necessary to enhance your ability to test, please do add them. [ci-img]: https://github.com/haraka/test-fixtures/actions/workflows/ci.yml/badge.svg diff --git a/lib/plugin.js b/lib/plugin.js index 8193cd6..4769378 100644 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -53,16 +53,15 @@ class Plugin { } _get_plugin_path (name) { - const plugin = this; - plugin.hasPackageJson = false; - if (!name) name = plugin.name; + this.hasPackageJson = false; + if (!name) name = this.name; const paths = []; if (path.basename(__dirname) === 'lib' && path.basename(path.dirname(__dirname)) === 'haraka-test-fixtures' && path.basename(path.dirname(path.dirname(__dirname))) === 'node_modules') { - // __dirname ends with node_modules/haraka-text-fixtures/lib + // __dirname ends with node_modules/haraka-test-fixtures/lib /*eslint no-global-assign: ["error", {"exceptions": ["__dirname"]}] */ /*eslint no-native-reassign: ["error", {"exceptions": ["__dirname"]}] */ @@ -132,9 +131,8 @@ class Plugin { } _get_code (pi_path) { - const plugin = this; - if (plugin.hasPackageJson) { + if (this.hasPackageJson) { const ppd = path.dirname(pi_path); // this isn't working for haraka-test-fixtures tests. Why? diff --git a/package.json b/package.json index 8e782d9..06272a8 100644 --- a/package.json +++ b/package.json @@ -3,35 +3,34 @@ "name": "haraka-test-fixtures", "license": "MIT", "description": "Haraka Test Fixtures", - "version": "1.3.3", + "version": "1.3.4", "repository": { "type": "git", "url": "git@github.com:haraka/test-fixtures.git" }, "main": "index.js", + "files": [ "CHANGELOG.md", "lib", "config" ], "engines": { "node": ">=12" }, "dependencies": { - "address-rfc2821": "2.1.2", + "address-rfc2821": "^2.1.2", "haraka-config": "^1.1.0", - "haraka-constants": "1.0.6", - "haraka-email-message": "~1.2.0", - "haraka-notes": "1.0.6", + "haraka-constants": "^1.0.6", + "haraka-email-message": "^1.2.1", + "haraka-notes": "^1.0.6", "haraka-results": "^2.2.3" }, "devDependencies": { - "eslint": "^8.55.0", - "eslint-plugin-haraka": "*", - "mocha": "^10.2.0" + "eslint-plugin-haraka": "1.0.15" }, "bugs": { "url": "https://github.com/haraka/test-fixtures/issues" }, "scripts": { - "test": "npx mocha", - "lint": "npx eslint index.js lib test", - "lintfix": "npx eslint --fix index.js lib test", + "test": "npx mocha@^10", + "lint": "npx eslint@^8 index.js lib test", + "lintfix": "npx eslint@^8 --fix index.js lib test", "versions": "npx dependency-version-checker check" } }