Skip to content
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
20 changes: 20 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
51 changes: 46 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,54 @@
module.exports = {
root: true,
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module'
ecmaVersion: 2020,
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
configFile: false,
// your babel options
presets: ["@babel/preset-env"],
},
},
extends: 'eslint:recommended',
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
node: true
browser: true
},
rules: {
}
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/**/*.js'
],
parserOptions: {
sourceType: 'script'
},
env: {
browser: false,
node: true
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
'ember/avoid-leaking-state-in-ember-objects': 'off'
})
}
]
};
43 changes: 43 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Continuous Integration

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
FORCE_COLOR: true

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn test

test-floating:
name: Floating Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: volta-cli/action@v1
- name: install dependencies
run: yarn install --no-lockfile
- name: test
run: yarn test
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

60 changes: 60 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Release Process

Releases are mostly automated using
[release-it](https://github.com/release-it/release-it/) and
[lerna-changelog](https://github.com/lerna/lerna-changelog/).

## Preparation

Since the majority of the actual release process is automated, the primary
remaining task prior to releasing is confirming that all pull requests that
have been merged since the last release have been labeled with the appropriate
`lerna-changelog` labels and the titles have been updated to ensure they
represent something that would make sense to our users. Some great information
on why this is important can be found at
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

* breaking - Used when the PR is considered a breaking change.
* enhancement - Used when the PR adds a new feature or enhancement.
* bug - Used when the PR fixes a bug included in a previous release.
* documentation - Used when the PR adds or updates documentation.
* internal - Used for internal changes that still require a mention in the
changelog/release notes.

## Release

Once the prep work is completed, the actual release is straight forward:

* First, ensure that you have installed your projects dependencies:

```sh
yarn install
```

* Second, ensure that you have obtained a
[GitHub personal access token][generate-token] with the `repo` scope (no
other permissions are needed). Make sure the token is available as the
`GITHUB_AUTH` environment variable.

For instance:

```bash
export GITHUB_AUTH=abc123def456
```

[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable

* And last (but not least 😁) do your release.

```sh
npx release-it
```

[release-it](https://github.com/release-it/release-it/) manages the actual
release process. It will prompt you to to choose the version number after which
you will have the chance to hand tweak the changelog to be used (for the
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
pushing the tag and commits, etc.
75 changes: 54 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,68 @@
"name": "ember-cli-deploy-ssh-tunnel",
"version": "1.0.0",
"description": "Open an ssh-tunnel during your ember-cli deploy",
"keywords": [
"ember-addon",
"ember-cli-deploy-plugin"
],
"repository": "https://github.com/ghedamat/ember-cli-deploy-ssh-tunnel",
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"test": "node tests/runner.js && ./node_modules/.bin/eslint index.js lib/* tests/*"
"lint:js": "eslint .",
"test": "node tests/runner.js && ./node_modules/.bin/eslint index.js tests/*"
},
"repository": "https://github.com/ghedamat/ember-cli-deploy-ssh-tunnel",
"engines": {
"node": ">= 4"
"dependencies": {
"ember-cli-deploy-plugin": "^0.2.9",
"rsvp": "^4.8.5",
"tunnel-ssh": "^5.0.5",
"untildify": "^2.1.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"chai-as-promised": "^6.0.0",
"chai": "^3.5.0",
"ember-cli-release": "1.0.0-beta.2",
"ember-cli": "^2.12.0",
"eslint": "^3.18.0",
"glob": "^7.1.1",
"mocha": "^3.2.0"
"@babel/core": "^7.23.0",
"@babel/eslint-parser": "^7.22.15",
"@babel/preset-env": "^7.22.20",
"@release-it-plugins/lerna-changelog": "^5.0.0",
"chai": "^4.3.8",
"chai-as-promised": "^7.1.1",
"ember-cli": "^3.28.6",
"eslint": "^8.50.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^11.8.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.0.0",
"glob": "^7.2.3",
"mocha": "^3.5.3",
"prettier": "^3.0.3",
"release-it": "^15.5.0"
},
"keywords": [
"ember-addon",
"ember-cli-deploy-plugin"
],
"dependencies": {
"ember-cli-deploy-plugin": "^0.2.6",
"tunnel-ssh": "^5.0.5",
"untildify": "^2.0.0"
"engines": {
"node": ">= 14"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"release-it": {
"plugins": {
"@release-it-plugins/lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": false
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"tokenRef": "GITHUB_AUTH"
}
},
"volta": {
"node": "16.20.2",
"yarn": "1.22.19"
}
}
1 change: 1 addition & 0 deletions tests/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if (arg === 'all') {

mocha.run(function(failures) {
process.on('exit', function() {
// eslint-disable-next-line no-process-exit -- this sets the unix return code for the process
process.exit(failures);
});
});
6 changes: 3 additions & 3 deletions tests/unit/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ describe('ssh-tunnel plugin', function() {
});
});

it('raises about missing required config', function() {
it('raises about missing required config', async function() {
config = {};
context = {
ui: mockUi,
config: config
};
plugin.beforeHook(context);
assert.throws(function(){
await assert.throws(function(){
plugin.configure(context);
});
}, /Missing required/);
var messages = mockUi.messages.reduce(function(previous, current) {
if (/- Missing required config:\s.*/.test(current)) {
previous.push(current);
Expand Down
Loading