diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 0000000..cb62b23 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,2 @@ +codecov: + comment: false diff --git a/.github/dependabot.yml b/.github/dependabot.yml index feb90ba..0449e4a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,10 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - package-ecosystem: "npm" - directory: "/" # Location of package manifests + directory: "/" schedule: interval: "weekly" + allow: + - dependency-type: production diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml deleted file mode 100644 index 3268620..0000000 --- a/.github/workflows/ci-test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: CI Tests - -on: [ push ] - -env: - CI: true - -jobs: - ci-test: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ ubuntu-latest, windows-latest ] - node-version: [ 12, 14, 16, 18 ] - fail-fast: false - - steps: - - uses: actions/checkout@v2 - name: Checkout Code - with: - fetch-depth: 1 - - - uses: actions/setup-node@v3 - name: Use Node.js ${{ matrix.node-version }} - with: - node-version: ${{ matrix.node-version }} - - - run: npm install - - - run: npm run test - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..452832a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: [ push ] + +env: + CI: true + +jobs: + + lint: + uses: haraka/.github/.github/workflows/lint.yml@master + + coverage: + uses: haraka/.github/.github/workflows/coverage.yml@master + secrets: inherit + + test: + needs: [ lint, get-lts ] + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, windows-latest ] + node-version: ${{ fromJson(needs.get-lts.outputs.active) }} + fail-fast: false + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + name: Node ${{ matrix.node-version }} on ${{ matrix.os }} + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test + + get-lts: + runs-on: ubuntu-latest + steps: + - id: get + uses: msimerson/node-lts-versions@v1 + outputs: + active: ${{ steps.get.outputs.active }} + lts: ${{ steps.get.outputs.lts }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..383aca2 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,13 @@ +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + - cron: '18 7 * * 4' + +jobs: + codeql: + uses: haraka/.github/.github/workflows/codeql.yml@master diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml deleted file mode 100644 index a312f6f..0000000 --- a/.github/workflows/coveralls.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: [ pull_request ] - -name: Test Coverage - -jobs: - - coverage: - name: Codecov - runs-on: ubuntu-latest - - steps: - - - uses: actions/checkout@master - name: Checkout Code - with: - fetch-depth: 1 - - - name: Use Node.js - uses: actions/setup-node@master - with: - node-version: 16.x - - - name: install, run - run: | - npm install - npm install --no-save nyc codecov - npm run cover - - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 1537e84..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Lint - -on: [ push, pull_request ] - -env: - CI: true - -jobs: - - lint: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [ 16.x ] - - steps: - - uses: actions/checkout@v2 - name: Checkout Code - with: - fetch-depth: 1 - - - uses: actions/setup-node@v3 - name: Use Node.js ${{ matrix.node-version }} - with: - node-version: ${{ matrix.node-version }} - - - run: npm install - - - run: npm run lint diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml deleted file mode 100644 index 5182875..0000000 --- a/.github/workflows/master.yml +++ /dev/null @@ -1,40 +0,0 @@ - -name: publish - -on: - push: - branches: - - master - -env: - node_version: 14 - -jobs: - - publish-npm: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Setup node.js ${{ env.node_version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ env.node_version }} - registry-url: https://registry.npmjs.org/ - - - run: npm install - - - run: npm run test - - - name: publish to NPM - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - - name: GitHub Release - uses: justincy/github-action-npm-release@2.0.1 - id: release diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..42a9bb9 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,14 @@ +name: publish + +on: + push: + branches: + - master + +env: + CI: true + +jobs: + publish: + uses: haraka/.github/.github/workflows/publish.yml@master + secrets: inherit \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a8e94cb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".release"] + path = .release + url = git@github.com:msimerson/.release.git diff --git a/.release b/.release new file mode 160000 index 0000000..9be2b27 --- /dev/null +++ b/.release @@ -0,0 +1 @@ +Subproject commit 9be2b270ef836bcfefda085674bf62e2a91defe8 diff --git a/Changes.md b/Changes.md index 6134888..25c8b9d 100644 --- a/Changes.md +++ b/Changes.md @@ -1,26 +1,35 @@ +### Unreleased -## 1.0.34 - 2022-05-23 + +### [1.0.35] - 2022-06-05 + +- ci: update GHA workflow with shared +- doc(changes): add Unreleased marker +- ci: add submodule .release + + +### 1.0.34 - 2022-05-23 - dep(eslint): 6 -> 8 - ci(node): add v18 testing -## 1.0.33 - 2020-12-17 +### 1.0.33 - 2020-12-17 - conn: pass config to new transactions -## 1.0.32 - 2020-07-28 +### 1.0.32 - 2020-07-28 - transaction: add logging methods -## 1.0.31 - 2020-07-28 +### 1.0.31 - 2020-07-28 - transaction: lowercase the keys in class Header -## 1.0.30 - 2019-10-14 +### 1.0.30 - 2019-10-14 - codeclimate: update eslint to v6 - convert eslintrc from json to yaml @@ -31,33 +40,33 @@ - test runner: replace deprecated nodeunit with mocha -## 1.0.29 - 2019-04-11 +### 1.0.29 - 2019-04-11 - put results in transaction. This time for real. -## 1.0.28 - 2019-04-01 +### 1.0.28 - 2019-04-01 - transaction: populate this.results -## 1.0.27 - 2018-11-15 +### 1.0.27 - 2018-11-15 - transaction: have header.add() populate header_decoded too -## 1.0.26 - 2018-11-15 +### 1.0.26 - 2018-11-15 - transaction: add header.get_decoded() -## 1.0.25 - 2018-05-10 +### 1.0.25 - 2018-05-10 - transaction: make t.header a class (as it is in Haraka). Making transaction into an es6 class (in 1.0.24) changed how 'this' resolves. -## 1.0.24 - 2018-05-10 +### 1.0.24 - 2018-05-10 - connection: add get() and improved set() - connection: add init_transaction() @@ -65,79 +74,82 @@ - transaction: use es6 classes -## 1.0.23 - 2018-04-04 +### 1.0.23 - 2018-04-04 - added array values to transaction.header and header.get_all support -## 1.0.22 - 2017-09-22 +### 1.0.22 - 2017-09-22 - plugins: provide haraka_require -## 1.0.21 - 2017-09-14 +### 1.0.21 - 2017-09-14 - lint updates -## 1.0.20 - 2017-09-04 +### 1.0.20 - 2017-09-04 - use [haraka-notes](https://github.com/haraka/haraka-notes) -## 1.0.19 - 2017-06-16 +### 1.0.19 - 2017-06-16 - remove version from haraka-results, fixes #21 -## 1.0.18 - 2017-05-25 +### 1.0.18 - 2017-05-25 - replace local rules with eslint-plugin-haraka - add server and setImmedate to the plugin sandbox -## 1.0.17 - 2017-01-26 +### 1.0.17 - 2017-01-26 - add alias of haraka-results at fixtures.results (finger friendly) -## 1.0.16 - Jan 26, 2017 +### 1.0.16 - Jan 26, 2017 - replace copied results_store with freshly packaged haraka-results -## 1.0.15 - Jan 25, 2017 +### 1.0.15 - Jan 25, 2017 - update result_store, adding get(plugin) syntax. -## 1.0.14 - Jan 24, 2017 +### 1.0.14 - Jan 24, 2017 - add path for npm packaged plugin inheriting an npm packaged plugin -## 1.0.13 - Jan 03, 2017 +### 1.0.13 - Jan 03, 2017 - use path.join in place of path/to/stuff - remove grunt - add Appveyor badge -## 1.0.11 - Jan 01, 2017 +### 1.0.11 - Jan 01, 2017 - lint fixes - packaging updates -## 1.0.8 - Sep 02, 2016 +### 1.0.8 - Sep 02, 2016 - add connection.set() -## 1.0.7 - Jul 20, 2016 +### 1.0.7 - Jul 20, 2016 - normalized connection properties (haraka/Haraka#1098) -## 1.0.6 - Mar 26, 2016 +### 1.0.6 - Mar 26, 2016 - more reliable package.json detection * encapsulate package.json detection in _has_package_json - don't reset plugin.name when a plugin inherits -## 1.0.5 - Mar 19, 2016 +### 1.0.5 - Mar 19, 2016 - inheritance tests and package support - enable more Haraka tests to depend on this - updates for compat with Haraka/tests/plugins - better plugin path resolution + + +[1.0.35]: https://github.com/haraka/haraka-test-fixtures/releases/tag/1.0.35 diff --git a/README.md b/README.md index 2aa33a8..4895b13 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ [![Build Status][ci-img]][ci-url] [![Code Coverage][cov-img]][cov-url] [![Code Climate][clim-img]][clim-url] -[![Windows Build status][win-img]][win-url] [![NPM][npm-img]][npm-url] @@ -29,13 +28,11 @@ varying levels of completeness. If there are functions necessary to enhance your ability to test, please do add them here. -[ci-img]: https://github.com/haraka/haraka-test-fixtures/workflows/CI%20Tests/badge.svg -[ci-url]: https://github.com/haraka/haraka-test-fixtures/actions +[ci-img]: https://github.com/haraka/haraka-test-fixtures/actions/workflows/ci.yml/badge.svg +[ci-url]: https://github.com/haraka/haraka-test-fixtures/actions/workflows/ci.yml [cov-img]: https://codecov.io/github/haraka/haraka-test-fixtures/coverage.svg [cov-url]: https://codecov.io/github/haraka/haraka-test-fixtures [clim-img]: https://codeclimate.com/github/haraka/haraka-test-fixtures/badges/gpa.svg [clim-url]: https://codeclimate.com/github/haraka/haraka-test-fixtures [npm-img]: https://nodei.co/npm/haraka-test-fixtures.png [npm-url]: https://www.npmjs.com/package/haraka-test-fixtures -[win-img]: https://github.com/haraka/haraka-test-fixtures/workflows/Tests%20-%20Windows/badge.svg -[win-url]: https://github.com/haraka/haraka-test-fixtures/actions/ diff --git a/package.json b/package.json index 02e733a..a346185 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "haraka-test-fixtures", "license": "MIT", "description": "Haraka Test Fixtures", - "version": "1.0.34", + "version": "1.0.35", "repository": { "type": "git", "url": "git@github.com:haraka/haraka-test-fixtures.git" @@ -23,7 +23,7 @@ "devDependencies": { "eslint": ">=8", "eslint-plugin-haraka": "*", - "mocha": "*" + "mocha": ">=9" }, "bugs": { "mail": "haraka.mail@gmail.com", @@ -31,8 +31,7 @@ }, "scripts": { "test": "npx mocha", - "lint": "npx eslint index.js lib/*.js test/*.js", - "lintfix": "npx eslint --fix index.js lib/*.js test/*.js", - "cover": "npx nyc --reporter=lcov npm run test" + "lint": "npx eslint index.js lib/*.js test", + "lintfix": "npx eslint --fix index.js lib test" } }