Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.0.6 #24

Merged
merged 6 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ engines:
config: ".eslintrc.yaml"

ratings:
paths:
- "**.js"
paths:
- "**.js"
22 changes: 2 additions & 20 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,6 @@ env:
node: true
es6: true
mocha: true
es2020: true
es2022: true

plugins:
- haraka

extends:
- eslint:recommended
- plugin:haraka/recommended

rules:
indent: [2, 2, {"SwitchCase": 1}]

root: true

globals:
OK: true
CONT: true
DENY: true
DENYSOFT: true
DENYDISCONNECT: true
DENYSOFTDISCONNECT: true
extends: ["@haraka"]
5 changes: 3 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Changes proposed in this pull request:

-
-
-
-

Fixes #

Checklist:

- [ ] docs updated
- [ ] tests updated
- [ ] Changes.md updated
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: CI

on: [ push, pull_request ]
on: [push, pull_request]

env:
CI: true

jobs:

lint:
uses: haraka/.github/.github/workflows/lint.yml@master

Expand All @@ -15,9 +14,9 @@ jobs:
# secrets: inherit

ubuntu:
needs: [ lint ]
needs: [lint]
uses: haraka/.github/.github/workflows/ubuntu.yml@master

windows:
needs: [ lint ]
needs: [lint]
uses: haraka/.github/.github/workflows/windows.yml@master
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]
schedule:
- cron: '18 7 * * 4'
- cron: "18 7 * * 4"

jobs:
codeql:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: publish

on:
release:
types: [ published ]
push:
branches:
- master
Expand Down
59 changes: 0 additions & 59 deletions .npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion .release
24 changes: 16 additions & 8 deletions Changes.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,47 @@
# Changelog

The format is based on [Keep a Changelog](https://keepachangelog.com/).

### Unreleased

### [1.0.6] - 2024-04-08

- dep: eslint-plugin-haraka -> @haraka/eslint-config
- lint: remove duplicate / stale rules from .eslintrc
- populate [files] in package.json. Delete .npmignore.
- doc: Changes.md -> CHANGELOG.md
- test: switch to node --test

### 1.0.5 - 2023-12-12

- ci: run tests on PR
- ci(publish): add on.release trigger
- deps(dev*): pin versions

- deps(dev\*): pin versions

### [1.0.3] - 2022-06-05

- ci: replace hard coded vers with node-lts-versions
- ci(publish): add secrets: inherit
- ci: use reusable workflows (#18)


### 1.0.2 - 2022-05-23
### [1.0.2] - 2022-05-23

- ci: replace hard coded node vers with node-lts-versions
- ci(publish): add secrets: inherit
- ci: use reusable workflows (#18)
- packaging updates


### 1.0.1 - 2021-02-04
### [1.0.1] - 2021-02-04

- test: added example tests that set up conn/txn
- ci: add automated package publishing
- ci(GHA): consolidate \*nix & win tests


### 1.0.0 - 2017-02-02

- initial release


[1.0.1]: https://github.com/haraka/haraka-plugin-template/releases/tag/1.0.1
[1.0.2]: https://github.com/haraka/haraka-plugin-template/releases/tag/1.0.2
[1.0.3]: https://github.com/haraka/haraka-plugin-template/releases/tag/1.0.3
[1.0.6]: https://github.com/haraka/haraka-plugin-template/releases/tag/v1.0.6
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Replaces all uses of the word `template` with your plugin's name.

You'll then be prompted to update package.json and then force push this repo onto the GitHub repo you've created earlier.


# Add your content here

## INSTALL
Expand All @@ -67,8 +66,8 @@ $EDITOR config/template.ini

## USAGE


<!-- leave these buried at the bottom of the document -->

[ci-img]: https://github.com/haraka/haraka-plugin-template/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-template/actions/workflows/ci.yml
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-template/badges/gpa.svg
Expand Down
33 changes: 17 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
'use strict'
"use strict";

exports.register = function () {
this.load_template_ini()
this.load_template_ini();

// register hooks here. More info at https://haraka.github.io/core/Plugins/
// this.register_hook('data_post', 'do_stuff_with_message')
}
};

exports.load_template_ini = function () {
const plugin = this

plugin.cfg = plugin.config.get('template.ini', {
booleans: [
'+enabled', // plugin.cfg.main.enabled=true
'-disabled', // plugin.cfg.main.disabled=false
'+feature_section.yes' // plugin.cfg.feature_section.yes=true
]
},
function () {
plugin.load_example_ini()
})
}
this.cfg = this.config.get(
"template.ini",
{
booleans: [
"+enabled", // this.cfg.main.enabled=true
"-disabled", // this.cfg.main.disabled=false
"+feature_section.yes", // this.cfg.feature_section.yes=true
],
},
() => {
this.load_example_ini();
},
);
};
24 changes: 15 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
{
"name": "haraka-plugin-template",
"version": "1.0.5",
"version": "1.0.6",
"description": "Haraka plugin that...CHANGE THIS",
"main": "index.js",
"files": [
"CHANGELOG.md",
"config"
],
"scripts": {
"lint": "npx eslint *.js test",
"lintfix": "npx eslint --fix *.js test",
"versions": "npx dependency-version-checker check",
"test": "npx mocha"
"format": "npm run prettier:fix && npm run lint:fix",
"lint": "npx eslint@^8 *.js test",
"lint:fix": "npx eslint@^8 *.js test --fix",
"prettier": "npx prettier . --check",
"prettier:fix": "npx prettier . --write --log-level=warn",
"test": "node --test",
"versions": "npx @msimerson/dependency-version-checker check",
"versions:fix": "npx @msimerson/dependency-version-checker update"
},
"repository": {
"type": "git",
Expand All @@ -25,9 +33,7 @@
},
"homepage": "https://github.com/haraka/haraka-plugin-template#readme",
"devDependencies": {
"eslint": "^8.55.0",
"eslint-plugin-haraka": "*",
"haraka-test-fixtures": "*",
"mocha": "^10.2.0"
"@haraka/eslint-config": "1.1.3",
"haraka-test-fixtures": "1.3.5"
}
}
Loading