Skip to content

Modernizing the library a bit #15

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
31 changes: 31 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/configuration-reference
version: 2.1

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/configuration-reference/#jobs
jobs:
test-utf7:
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub.
# See: https://circleci.com/docs/configuration-reference/#executor-job
docker:
- image: node:lts-slim
# Add steps to the job
# See: https://circleci.com/docs/configuration-reference/#steps
steps:
- checkout
- run:
name: "Install Dependancies"
command: "npm install"
- run:
name: "Run Tests"
command: "npm run test"
- store_test_results:
path: test-results.xml

# Orchestrate jobs using workflows
# See: https://circleci.com/docs/configuration-reference/#workflows
workflows:
test-utf7-workflow:
jobs:
- test-utf7
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
package-lock.json
test-results.xml
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
package-lock.json
test-results.xml
test
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This keeps the tests out of the published package, making the published package smaller

.circleci
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing to utf7

First and foremost, thank you for considering contributing to utf7! We appreciate the effort and value every contribution, no matter how big or small.

## Submitting Issues

If you've identified a bug or have a feature request, please open an issue in the repository. When doing so, provide as much detail as possible, including steps to reproduce if applicable.
Before submitting a new issue, please check existing issues to avoid duplicates.

## Pull Requests

If you're looking to contribute code, start by forking the repository and creating a new branch for your feature or fix.
Ensure that your code adheres to the existing style and structure of the project.

Once you've made your changes, submit a pull request. In the PR description, provide a clear summary of the changes and their purpose.

All pull requests will undergo a review process. Please be patient and address any feedback provided.
Code of Conduct

We aim to foster an inclusive and respectful community. Please be kind and considerate to others. Any form of harassment or inappropriate behavior will not be tolerated.

## Questions?

If you have any questions or need further clarification on any matter, feel free to reach out by opening an issue or contacting the maintainers directly.

Once again, thank you for your interest in contributing to utf7. Your efforts help make this project better for everyone!
File renamed without changes.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# UTF-7

[![CircleCI](https://circleci.com/gh/kkaefer/utf7.svg?style=svg)](https://circleci.com/gh/kkaefer/utf7)
[![CircleCI](https://circleci.com/gh/kkaefer/utf7.svg?style=svg)](https://circleci.com/gh/kkaefer/utf7) [![npm](https://img.shields.io/npm/dw/utf7)](https://www.npmjs.com/package/utf7)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a badge for your NPM package


``` bash
npm i utf7
```

Encodes and decodes JavaScript (Unicode/UCS-2) strings to UTF-7 ASCII strings. It supports two modes: UTF-7 as defined in [RFC 2152](http://tools.ietf.org/html/rfc2152) and Modified UTF-7 as defined by the IMAP standard in [RFC 3501, section 5.1.3](http://tools.ietf.org/html/rfc3501#section-5.1.3)

## Usage

**RFC 2152**
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown linters prefer using headers over emphasis here

### RFC 2152

```javascript
var utf7 = require('utf7');
Expand All @@ -20,7 +24,7 @@ assert.equal('Jyväskylä', decoded);

By default, `.encode()` only encodes the default characeters defined in RFC 2152. To also encode optional characters, use `.encodeAll()` or specify the characters you want to encode as the second argument to `.encode()`.

**IMAP (RFC 3501)**
### IMAP (RFC 3501)

```javascript
var utf7 = require('utf7').imap;
Expand Down
24 changes: 16 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
{
"name": "utf7",
"version": "1.0.2",
"version": "1.0.3",
"description": "Converts text to and from UTF-7 (RFC 2152 and IMAP)",
"author": "Konstantin Käfer <kkaefer@gmail.com>",
"licenses": [ { "type": "BSD" } ],

"main": "./utf7",

"dependencies": {
"semver": "~5.3.0"
"semver": "^5.7.2"
},

"devDependencies": {
"tape": "~4.6.0"
"tape": "~4.6.0",
"tap-xunit": "^2.4.1",
"npmrc": "^1.1.1"
},

"scripts": {
"test": "tape test/*.js"
}
"test": "tape test/*.js | tap-xunit > test-results.xml"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change allows circle CI to parse the uni test results

},
"engines": {
"node": ">=10.0.0"
},
"keywords": [
"imap",
"mail",
"utf7",
"rfc2152"
]
}