diff --git a/.github/workflows/ci-test-win.yml b/.github/workflows/ci-test-win.yml deleted file mode 100644 index 5e483be..0000000 --- a/.github/workflows/ci-test-win.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Windows CI Tests - -on: [ push, pull_request ] - -# no docker/images support on Windows (currently), so run w/o Redis -# also, stack run commands so test doesn't begin before install completes - -jobs: - - ci-test-win: - - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ windows-latest ] - node-version: [ 12.x, 14.x, 16.x ] - fail-fast: false - - steps: - - uses: actions/checkout@v2 - name: git checkout - with: - fetch-depth: 1 - - - uses: actions/setup-node@v1 - name: Use Node.js ${{ matrix.node-version }} - with: - node-version: ${{ matrix.node-version }} - - - name: npm install and test - run: | - npm install - npm run test - - env: - CI: true diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml deleted file mode 100644 index fd095f3..0000000 --- a/.github/workflows/ci-test.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Ubuntu CI Tests - -on: [ push, pull_request ] - -jobs: - - ci-test: - - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ ubuntu-latest ] - node-version: [ 12.x, 14.x, 16.x ] - fail-fast: false - - steps: - - uses: actions/checkout@v2 - name: git checkout - with: - fetch-depth: 1 - - - uses: actions/setup-node@v1 - name: Use Node.js ${{ matrix.node-version }} - with: - node-version: ${{ matrix.node-version }} - - - name: npm install - run: npm install - - - name: Run test suite - run: npm run test - - env: - CI: true - - services: - redis: - image: redis - ports: - - 6379/tcp diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..74e7a36 --- /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 + runs-on: ${{ matrix.os }} + # services: + # redis: + # image: redis + # ports: + # - 6379:6379 + strategy: + matrix: + os: [ ubuntu-latest, windows-latest ] + node-version: [ 14, 16, 18 ] + 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 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..3627451 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,14 @@ +name: CodeQL + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + 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 1ac1cd2..0000000 --- a/.github/workflows/coveralls.yml +++ /dev/null @@ -1,34 +0,0 @@ -on: [ pull_request ] - -name: Test Coverage - -jobs: - - coverage: - name: Codecov - runs-on: ubuntu-latest - - steps: - - - uses: actions/checkout@master - name: Checkout haraka-config - with: - fetch-depth: 1 - - - name: Use Node.js 12 - uses: actions/setup-node@master - with: - version: 12.x - - - name: Install - run: npm install - - - name: Test - run: | - npm install nyc codecov - npm run cover - - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index cb1b5b4..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Lint - -on: [ push, pull_request ] - -jobs: - - lint: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [ 14.x ] - - steps: - - uses: actions/checkout@v2 - name: git checkout - with: - fetch-depth: 1 - - - uses: actions/setup-node@v1 - name: Use Node.js ${{ matrix.node-version }} - with: - node-version: ${{ matrix.node-version }} - - - name: Install - run: npm install - - - name: Lint - run: npm run lint - - env: - CI: true - diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d489fbd --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,16 @@ +name: publish + +on: + push: + branches: + - master + paths: + - package.json + +env: + CI: true + +jobs: + publish: + uses: haraka/.github/.github/workflows/publish.yml@master + secrets: inherit \ No newline at end of file diff --git a/Changes.md b/Changes.md index 3d82bd3..f1abd6b 100644 --- a/Changes.md +++ b/Changes.md @@ -1,12 +1,20 @@ ## NEXT - 202Y-MM-DD -## 1.0.20 - 2021-09-01 -- update YAML dep to v4 +### 1.1.0 - 2022-05-27 +- chore(ci): depend on shared GHA workflows +- chore(dep): eslint 6 -> 8 +- chore(dep): mocha 8 -> 9 -## 1.0.19 - 2021-06-10 + +### 1.0.20 - 2021-09-01 + +- chore(dep): update YAML 3.13 -> 4.1 (#65) + + +### 1.0.19 - 2021-06-10 - configfile: disable watch dir when platform not mac or win - configfile: convert to es6 class @@ -15,12 +23,12 @@ - getDir tests, use os.EOL for comparison -## 1.0.18 - 2019-10-11 +### 1.0.18 - 2019-10-11 - add support for loading `.js` configurations -## 1.0.17 - 2018-12-19 +### 1.0.17 - 2018-12-19 - refactor ./config.js as an es6 class - update README syntax and improve formatting @@ -29,13 +37,13 @@ - permit retrieval of fully qualified path -## 1.0.16 - 2018-11-02 +### 1.0.16 - 2018-11-02 - remove trailing ; from function declarations - add config.getInt(filename, default_value) -## 1.0.15 - 2017-09-21 +### 1.0.15 - 2017-09-21 - additional test for 'missing json loads yaml' - modify get_path_to_config_dir regex to also match windows paths @@ -44,35 +52,35 @@ - add test for json/yaml !filename overloads -## 1.0.14 - 2017-09-19 +### 1.0.14 - 2017-09-19 - add __dirname/../../config to config_dir_candidates for haraka/Haraka/tests/* - sync process.env.HARAKA_TEST_DIR from haraka/Haraka/config - eslint no-var updates #25 -## 1.0.13 - 2017-06-16 +### 1.0.13 - 2017-06-16 - lint updates for eslint 4 -## 1.0.12 - 2017-05-21 +### 1.0.12 - 2017-05-21 - unref() the setInterval so that Haraka can gracefully exit -## 1.0.11 - 2017-03-04 +### 1.0.11 - 2017-03-04 - add config.getDir, loads all files in a directory -## 1.0.10 - 2017-02-05 +### 1.0.10 - 2017-02-05 - log error vs throw on bad YAML - fix appveyor badge URL -## 1.0.9 - 2017-01-27 +### 1.0.9 - 2017-01-27 - config cache fix (see haraka/Haraka#1738) - config: add overrides handling (sync with Haraka) @@ -82,28 +90,28 @@ - lint updates -## 1.0.8 - 2017-01-02 +### 1.0.8 - 2017-01-02 - version bump, lint updates & sync - lint fixes -## 1.0.7 - 2016-11-17 +### 1.0.7 - 2016-11-17 - update tests for appveyor (Windows) compatibility #9 -## 1.0.6 - 2016-11-10 +### 1.0.6 - 2016-11-10 - handle invalid .ini lines properly (skip them) -## 1.0.5 - 2016-10-25 +### 1.0.5 - 2016-10-25 - do not leave behind a `*` section in config (due to wildcard boolean) -## 1.0.3 +### 1.0.3 - added wildcard boolean support - reduce node required 4.3 -> 0.10.43 diff --git a/package.json b/package.json index 4815483..28cdf1c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "haraka-config", "license": "MIT", "description": "Haraka's config file loader", - "version": "1.0.20", + "version": "1.1.0", "homepage": "http://haraka.github.io", "repository": { "type": "git", @@ -20,9 +20,9 @@ "hjson": "^3.2.0" }, "devDependencies": { - "eslint": ">=6", + "eslint": ">=8", "eslint-plugin-haraka": "*", - "mocha": ">=8" + "mocha": ">=9" }, "bugs": { "mail": "haraka.mail@gmail.com", @@ -30,8 +30,8 @@ }, "scripts": { "test": "npx mocha test test/readers", - "lint": "npx eslint *.js readers/*.js test/*.js test/*/*.js", - "lintfix": "npx eslint --fix *.js readers/*.js test/*.js test/*/*.js", - "cover": "npx nyc --reporter=lcov npm test" + "lint": "npx eslint *.js readers test test/*/*.js", + "lintfix": "npx eslint --fix *.js readers test test/*/*.js", + "versions": "npx dependency-version-checker check" } }