Skip to content

Commit

Permalink
v5.0.0 - boundation, changelog, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Mar 25, 2020
1 parent 51d9e50 commit c034b4f
Show file tree
Hide file tree
Showing 12 changed files with 1,369 additions and 912 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ patreon: bevry
open_collective: bevry
ko_fi: balupton
liberapay: bevry
custom: ['https://bevry.me/fund']
custom: ['https://bevry.me/fund']
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ node_modules/
.pnp/
.pnp.js

# Ecosystem Files
.dependabout
.github

# Documentation Files
docs/
guides/
Expand Down
26 changes: 15 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
version: ~> 1.0
sudo: false
language: node_js
node_js:
- '8'
- '10'
- '12'
- '10'
- '12'
matrix:
fast_finish: true
allow_failures: []
cache: npm
install:
- eval "$(curl -fsSL https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-install.bash)"
- >-
eval "$(curl -fsSL
https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-install.bash)"
before_script:
- eval "$(curl -fsSL https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-verify.bash)"
- >-
eval "$(curl -fsSL
https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-verify.bash)"
after_success:
- eval "$(curl -fsSL https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/surge.bash)"
- eval "$(curl -fsSL https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-publish.bash)"
notifications:
email:
recipients:
secure: LpxzjIq7b3LhLJTJjkfMZ1RUz7Ks2MwrLDE/CmAyeUiafvc7VN0IjhrUWHbObE4FqXYl/cgL0nvdfaCmM5joSYRumDpXcdQYk6im1Q86beu5XPJfJFjU6c2890mBiRUyOUQx05Y5E98NjZzkkFEyW41e60j6KIwa1703UASBOkw=
- >-
eval "$(curl -fsSL
https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/surge.bash)"
- >-
eval "$(curl -fsSL
https://raw.githubusercontent.com/bevry/awesome-travis/c91c9d5eef34ecb0e92029667fd5052640225fa3/scripts/node-publish.bash)"
36 changes: 15 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
2019 February 28
2020 March 26
https://github.com/bevry/base
-->

Expand All @@ -9,12 +9,10 @@ https://github.com/bevry/base

We offer support through our [Official Support Channels](https://bevry.me/support). Do not use GitHub Issues for support, your issue will be closed.


## Contribute

Our [Contributing Guide](https://bevry.me/contribute) contains useful tips and suggestions for how to contribute to this project, it's worth the read.


## Development

### Setup
Expand All @@ -25,40 +23,38 @@ Our [Contributing Guide](https://bevry.me/contribute) contains useful tips and s

1. Setup the project for development

``` bash
```bash
npm run our:setup
```


### Developing

1. Compile changes

``` bash
```bash
npm run our:compile
```

1. Run tests

``` bash
```bash
npm test
```


### Publishing

Follow these steps in order to implement your changes/improvements into your desired project:


#### Preparation

1. Make sure your changes are on their own branch that is branched off from master.

1. You can do this by: `git checkout master; git checkout -b your-new-branch`
1. And push the changes up by: `git push origin your-new-branch`

1. Ensure all tests pass:

``` bash
```bash
npm test
```

Expand All @@ -70,7 +66,6 @@ Follow these steps in order to implement your changes/improvements into your des
npm run our:release:prepare
```


#### Pull Request

To send your changes for the project owner to merge in:
Expand All @@ -79,38 +74,37 @@ To send your changes for the project owner to merge in:
1. When submitting, if the original project has a `dev` or `integrate` branch, use that as the target branch for your pull request instead of the default `master`
1. By submitting a pull request you agree for your changes to have the same license as the original plugin


#### Publish

To publish your changes as the project owner:

1. Switch to the master branch:

``` bash
```bash
git checkout master
```

1. Merge in the changes of the feature branch (if applicable)

1. Increment the version number in the `package.json` file according to the [semantic versioning](http://semver.org) standard, that is:

1. `x.0.0` MAJOR version when you make incompatible API changes (note: DocPad plugins must use v2 as the major version, as v2 corresponds to the current DocPad v6.x releases)
1. `x.y.0` MINOR version when you add functionality in a backwards-compatible manner
1. `x.y.z` PATCH version when you make backwards-compatible bug fixes

1. Add an entry to the changelog following the format of the previous entries, an example of this is:

``` markdown
```markdown
## v6.29.0 2013 April 1
- Progress on [issue #474](https://github.com/bevry/docpad/issues/474)
- DocPad will now set permissions based on the process's ability
- Thanks to [Avi Deitcher](https://github.com/deitch), [Stephan Lough](https://github.com/stephanlough) for [issue #165](https://github.com/bevry/docpad/issues/165)
- Updated dependencies
```
- Progress on [issue #474](https://github.com/docpad/docpad/issues/474)
- DocPad will now set permissions based on the process's ability
- Thanks to [Avi Deitcher](https://github.com/deitch), [Stephan Lough](https://github.com/stephanlough) for [issue #165](https://github.com/docpad/docpad/issues/165)
- Updated dependencies
```
1. Commit the changes with the commit title set to something like `v6.29.0. Bugfix. Improvement.` and commit description set to the changelog entry
1. Ensure the project is ready for publishing:
```
Expand All @@ -119,6 +113,6 @@ To publish your changes as the project owner:
1. Prepare the release and publish it to npm and git:
``` bash
```bash
npm run our:release
```
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# History

## v5.0.0 2020 March 26

- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
- Minimum required node version changed from `node: >=8` to `node: >=10` to keep up with mandatory ecosystem changes

## v4.5.0 2019 December 9

- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
Expand Down
91 changes: 46 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,50 +46,9 @@ d : 4

They are commonly also called envfiles, .env files, and dotenv files.

<!-- INSTALL/ -->

<h2>Install</h2>

<a href="https://npmjs.com" title="npm is a package manager for javascript"><h3>npm</h3></a>
<ul>
<li>Install: <code>npm install --save envfile</code></li>
<li>Require: <code>require('envfile')</code></li>
</ul>

<a href="https://jspm.io" title="Native ES Modules CDN"><h3>jspm</h3></a>

``` html
<script type="module">
import * as pkg from '//dev.jspm.io/envfile'
</script>
```

<h3><a href="https://editions.bevry.me" title="Editions are the best way to produce and consume packages you care about.">Editions</a></h3>

<p>This package is published with the following editions:</p>

<ul><li><code>envfile</code> aliases <code>envfile/source/index.js</code></li>
<li><code>envfile/source/index.js</code> is esnext source code with require for modules</li>
<li><code>envfile/edition-browsers/index.js</code> is esnext compiled for browsers with require for modules</li></ul>

<h3><a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a></h3>

This project provides its type information via inline <a href="http://usejsdoc.org" title="JSDoc is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor">JSDoc Comments</a>. To make use of this in <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a>, set your <code>maxNodeModuleJsDepth</code> compiler option to `5` or thereabouts. You can accomlish this via your `tsconfig.json` file like so:

``` json
{
"compilerOptions": {
"maxNodeModuleJsDepth": 5
}
}
```

<!-- /INSTALL -->


## Usage

[API Documentation.](http://master.envfile.bevry.surge.sh/docs/)
[Complete API Documentation.](http://master.envfile.bevry.surge.sh/docs/)

### Via the Command Line

Expand All @@ -114,29 +73,71 @@ const sourceObject = { a: 1, b: 2 }

// Parse an envfile path
// async
envfile.parseFile(sourcePath, function(err, obj) {
envfile.parseFile(sourcePath, function (err, obj) {
console.log(err, obj)
})
// sync
console.log(envfile.parseFileSync(sourcePath))

// Parse an envfile string
// async
envfile.parse(sourceString, function(err, obj) {
envfile.parse(sourceString, function (err, obj) {
console.log(err, obj)
})
// sync
console.log(envfile.parseSync(sourceString))

// Stringify a javascript object to an envfile string
// async
envfile.stringify(sourceObject, function(err, str) {
envfile.stringify(sourceObject, function (err, str) {
console.log(err, str)
})
// sync
console.log(envfile.stringifySync(sourceObject))
```

<!-- INSTALL/ -->

<h2>Install</h2>

<a href="https://npmjs.com" title="npm is a package manager for javascript"><h3>npm</h3></a>
<ul>
<li>Install: <code>npm install --save envfile</code></li>
<li>Import: <code>import * as pkg from ('envfile')</code></li>
<li>Require: <code>const pkg = require('envfile')</code></li>
</ul>

<a href="https://jspm.io" title="Native ES Modules CDN"><h3>jspm</h3></a>

``` html
<script type="module">
import * as pkg from '//dev.jspm.io/[email protected]'
</script>
```

<h3><a href="https://editions.bevry.me" title="Editions are the best way to produce and consume packages you care about.">Editions</a></h3>

<p>This package is published with the following editions:</p>

<ul><li><code>envfile</code> aliases <code>envfile/source/index.js</code></li>
<li><code>envfile/source/index.js</code> is <a href="https://en.wikipedia.org/wiki/ECMAScript#ES.Next" title="ECMAScript Next">ESNext</a> source code for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> with <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a> for modules</li>
<li><code>envfile/edition-browsers/index.js</code> is <a href="https://en.wikipedia.org/wiki/ECMAScript#ES.Next" title="ECMAScript Next">ESNext</a> compiled for web browsers with <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a> for modules</li></ul>

<h3><a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a></h3>

This project provides its type information via inline <a href="http://usejsdoc.org" title="JSDoc is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor">JSDoc Comments</a>. To make use of this in <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a>, set your <code>maxNodeModuleJsDepth</code> compiler option to `5` or thereabouts. You can accomlish this via your `tsconfig.json` file like so:

``` json
{
"compilerOptions": {
"maxNodeModuleJsDepth": 5
}
}
```

<!-- /INSTALL -->


<!-- HISTORY/ -->

<h2>History</h2>
Expand Down
2 changes: 1 addition & 1 deletion bin/envfile2json.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var data = ''
process.stdin.on('readable', function () {
var chunk = process.stdin.read()
if (chunk) data += chunk.toString()
if (chunk) data += chunk.toString()
})
process.stdin.on('end', function () {
var result = JSON.stringify(require('../').parseSync(data))
Expand Down
2 changes: 1 addition & 1 deletion bin/json2envfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var data = ''
process.stdin.on('readable', function () {
var chunk = process.stdin.read()
if (chunk) data += chunk.toString()
if (chunk) data += chunk.toString()
})
process.stdin.on('end', function () {
var result = require('../').stringifySync(JSON.parse(data))
Expand Down
Loading

0 comments on commit c034b4f

Please sign in to comment.