Skip to content

Commit

Permalink
Merge pull request #591 from SergeAstapov/v2-addon
Browse files Browse the repository at this point in the history
Convert to monorepo
  • Loading branch information
SergeAstapov authored Feb 9, 2022
2 parents 4042fe4 + 8c71a1c commit 90e87bf
Show file tree
Hide file tree
Showing 150 changed files with 2,168 additions and 2,969 deletions.
71 changes: 8 additions & 63 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,14 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
directory: "/addon"
schedule:
interval: daily
time: "02:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: ember-cli
versions:
- 3.24.0
- 3.25.0
- 3.25.1
- 3.25.2
- 3.25.3
- 3.26.0
- dependency-name: eslint
versions:
- 7.20.0
- 7.21.0
- 7.22.0
- 7.23.0
- 7.24.0
- dependency-name: release-it
versions:
- 14.3.0
- 14.4.0
- 14.4.1
- 14.5.0
- 14.5.1
- dependency-name: y18n
versions:
- 4.0.1
- dependency-name: ember-template-lint
versions:
- 2.18.1
- 2.19.0
- 2.20.0
- 2.21.0
- 3.0.0
- 3.0.1
- 3.1.1
- 3.2.0
- dependency-name: ember-source
versions:
- 3.24.1
- 3.25.0
- 3.25.1
- 3.25.2
- 3.25.3
- 3.26.0
- dependency-name: eslint-plugin-ember
versions:
- 10.1.2
- 10.2.0
- 10.3.0
- dependency-name: ember-cli-htmlbars
versions:
- 5.3.2
- 5.4.0
- 5.6.2
- 5.6.3
- 5.6.4
- 5.6.5
- 5.7.0
- dependency-name: marked
versions:
- 1.2.9
open-pull-requests-limit: 4
- package-ecosystem: npm
directory: "/test-app"
schedule:
interval: daily
time: "02:00"
open-pull-requests-limit: 3
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- master
pull_request: {}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test:
name: "Tests"
Expand All @@ -21,10 +25,15 @@ jobs:
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
- name: Lint Addon
run: yarn lint
working-directory: addon
- name: Lint Test App
run: yarn lint
working-directory: test-app
- name: Run Tests
run: yarn test:ember
working-directory: test-app

floating:
name: "Floating Dependencies"
Expand All @@ -40,6 +49,7 @@ jobs:
run: yarn install --no-lockfile
- name: Run Tests
run: yarn test:ember
working-directory: test-app

try-scenarios:
name: ${{ matrix.try-scenario }}
Expand Down Expand Up @@ -74,4 +84,5 @@ jobs:
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
run: ../node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
working-directory: test-app
30 changes: 3 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
/yarn.lock.ember-try
node_modules
npm-debug.log*
yarn-error.log
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions addon/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
/yarn.lock.ember-try
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions addon/addon/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import getMouseCode from 'ember-keyboard/utils/get-mouse-code';
import { default as keyResponder } from 'ember-keyboard/decorators/key-responder';
import { default as onKey } from 'ember-keyboard/decorators/on-key';

function getCode() {
throw new Error(
'ember-keyboard: `getCode` has been removed. There is no longer a need for this function as you can directly specify `key` and/or `code` values'
);
}

function getKeyCode() {
throw new Error(
'ember-keyboard: `getKeyCode` has been removed. There is no longer a need for this function as you can directly specify `key` and/or `code` values'
);
}

export { getCode, getKeyCode, getMouseCode, keyResponder, onKey };

export { keyDown, keyUp, keyPress } from 'ember-keyboard/listeners/key-events';
export {
click,
mouseDown,
mouseUp,
} from 'ember-keyboard/listeners/mouse-events';
export { touchStart, touchEnd } from 'ember-keyboard/listeners/touch-events';
export {
triggerKeyDown,
triggerKeyPress,
triggerKeyUp,
} from 'ember-keyboard/utils/trigger-event';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
58 changes: 32 additions & 26 deletions addon/index.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
import getMouseCode from 'ember-keyboard/utils/get-mouse-code';
import { default as keyResponder } from 'ember-keyboard/decorators/key-responder';
import { default as onKey } from 'ember-keyboard/decorators/on-key';
'use strict';

function getCode() {
throw new Error(
'ember-keyboard: `getCode` has been removed. There is no longer a need for this function as you can directly specify `key` and/or `code` values'
);
}
module.exports = {
name: require('./package').name,

function getKeyCode() {
throw new Error(
'ember-keyboard: `getKeyCode` has been removed. There is no longer a need for this function as you can directly specify `key` and/or `code` values'
);
}
config(environment, appConfig) {
const addonConfig = appConfig['emberKeyboard'] || {};

export { getCode, getKeyCode, getMouseCode, keyResponder, onKey };
if (
'disableInputsInitializer' in addonConfig &&
!this.disableInputsInitializerDeprecationPrinted
) {
// Do not print deprecation message multiple times
// as this hook may be invoked more than once.
this.disableInputsInitializerDeprecationPrinted = true;

export { keyDown, keyUp, keyPress } from 'ember-keyboard/listeners/key-events';
export {
click,
mouseDown,
mouseUp,
} from 'ember-keyboard/listeners/mouse-events';
export { touchStart, touchEnd } from 'ember-keyboard/listeners/touch-events';
export {
triggerKeyDown,
triggerKeyPress,
triggerKeyUp,
} from 'ember-keyboard/utils/trigger-event';
this.ui.writeDeprecateLine(
'[ember-keyboard] The `emberKeyboard.disableInputsInitializer` option is obsolete. ' +
'You can remove it from your `config/environment.js` file.',
false
);
}

if ('propagation' in addonConfig && !this.propagationDeprecationPrinted) {
// Do not print deprecation message multiple times
// as this hook may be invoked more than once.
this.propagationDeprecationPrinted = true;

this.ui.writeDeprecateLine(
'[ember-keyboard] The `emberKeyboard.propagation` option is obsolete. ' +
'You can remove it from your `config/environment.js` file.',
false
);
}
},
};
64 changes: 64 additions & 0 deletions addon/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "ember-keyboard",
"version": "7.0.1",
"description": "An Ember.js addon for the painless support of keyboard events",
"keywords": [
"ember-addon"
],
"repository": "https://github.com/adopted-ember-addons/ember-keyboard",
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix"
},
"dependencies": {
"ember-cli-babel": "^7.26.6",
"ember-modifier": "^2.1.2 || ^3.0.0",
"ember-modifier-manager-polyfill": "^1.2.0"
},
"devDependencies": {
"ember-template-lint": "^4.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.7",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^7.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.4.1"
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"ember": {
"edition": "octane"
},
"ember-addon": {
"demoURL": "https://adopted-ember-addons.github.io/ember-keyboard/"
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"tokenRef": "GITHUB_AUTH"
}
},
"volta": {
"extends": "../package.json"
}
}
36 changes: 0 additions & 36 deletions index.js

This file was deleted.

Loading

0 comments on commit 90e87bf

Please sign in to comment.