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

Fix ember-try scenarios #341

Closed
wants to merge 10 commits into from
Closed
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
8 changes: 7 additions & 1 deletion .ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
"disableAnalytics": false,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": false
}
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
45 changes: 21 additions & 24 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ module.exports = {
root: true,
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
plugins: [['@babel/plugin-proposal-decorators', { legacy: true }]],
},
ecmaVersion: 2018,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
],
},
requireConfigFile: false,
},
Expand All @@ -28,22 +27,16 @@ module.exports = {
// node files
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js',
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'docs/**',
'tests/dummy/app/**',
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
],
parserOptions: {
sourceType: 'script',
Expand All @@ -52,8 +45,12 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
},
{
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
70 changes: 36 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,73 +3,74 @@ name: CI
on:
push:
branches:
- master
- main
- "v*"
pull_request:
- master
pull_request: {}

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

env:
FORCE_COLOR: 1
NODE_VERSION: 16.x

jobs:
lint:
name: Linting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- run: npm ci
- run: npm run lint:hbs
- run: npm run lint:js

test:
name: Tests
name: "Tests"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: mansona/npm-lockfile-version@v1
- uses: actions/setup-node@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- run: npm ci
- run: npm run test:ember
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Run Tests
run: npm run test:ember

floating-dependencies:
name: Floating Dependencies
floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- run: npm install --no-package-lock
- run: npm run test:ember
- name: Install Dependencies
run: npm install --no-package-lock
- name: Run Tests
run: npm run test:ember

try-scenarios:
name: "ember-try: ${{ matrix.ember-try-scenario }}"
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
timeout-minutes: 10
needs: test
needs: "test"

strategy:
fail-fast: false
matrix:
ember-try-scenario:
try-scenario:
- ember-lts-3.16
- ember-lts-3.20
- ember-lts-3.24
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-release
- ember-beta
- ember-canary
- ember-default-with-jquery
- ember-classic
- embroider-safe
- embroider-optimized
Expand All @@ -78,11 +79,12 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- run: npm ci

- name: test
run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/

/.changelog/
8 changes: 7 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,28 @@
/.eslintignore
/.eslintrc.js
/.git/
/.github/
/.gitignore
/.prettierignore
/.prettierrc.js
/.stylelintignore
/.stylelintrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
/coverage/
!.*
.eslintcache
.lint-todo/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
9 changes: 8 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
'use strict';

module.exports = {
singleQuote: true,
overrides: [
{
files: '*.{js,ts}',
options: {
singleQuote: true,
},
},
],
};
8 changes: 8 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

# addons
/.node_modules.ember-try/
5 changes: 5 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,21 @@
[![Maintainability](https://api.codeclimate.com/v1/badges/2d7784a2ad1c27cb8250/maintainability)](https://codeclimate.com/github/mansona/ember-cli-notifications/maintainability)


Compatibility
------------------------------------------------------------------------------
## Compatibility

* Ember.js v3.8 or above
* Ember CLI v3.8 or above
* Node.js v12 or above
* Ember.js v3.16 or above
* Ember CLI v3.16 or above
* Node.js v16 or above


Installation
------------------------------------------------------------------------------
## Installation

```
ember install ember-cli-notifications
```


Usage
------------------------------------------------------------------------------
## Usage

An [Ember](http://emberjs.com) addon that adds [Atom](https://github.com/atom/notifications) inspired notification messages to your app.

Expand Down Expand Up @@ -71,6 +68,11 @@ export default Controller.extend({

We have removed the use of CSS Modules so you can now override the styles more effectively without needing as many hacks. You can remove any strange hacks that you might have implemented in your app to override styles.

Contributing
------------------------------------------------------------------------------
## Contributing

See the [Contributing](CONTRIBUTING.md) guide for details.


## License

This project is licensed under the [MIT License](LICENSE.md).
1 change: 1 addition & 0 deletions addon/styles/addon.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/* stylelint-disable prettier/prettier, import-notation */
@import 'components/notification-container.css';
@import 'components/notification-message.css';
1 change: 1 addition & 0 deletions addon/styles/components/notification-container.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* stylelint-disable prettier/prettier, alpha-value-notation, color-function-notation, custom-property-empty-line-before, selector-class-pattern */
:root {
--ecn-container-position: 10px;
--ecn-container-width: 80%;
Expand Down
2 changes: 2 additions & 0 deletions addon/styles/components/notification-message.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* stylelint-disable prettier/prettier, number-max-precision, selector-class-pattern */

/* Values */
.ember-cli-notifications-notification__container .c-notification {
display: flex;
Expand Down
5 changes: 0 additions & 5 deletions config/environment.js

This file was deleted.

4 changes: 1 addition & 3 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function (defaults) {
let app = new EmberAddon(defaults, {
const app = new EmberAddon(defaults, {
minifyCSS: {
enabled: false,
},
Expand All @@ -22,8 +22,6 @@ module.exports = function (defaults) {

const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app, {
compatAdapters: new Map([['ember-get-config', null]]),
// Needed for IE11 https://github.com/embroider-build/embroider/issues/731
skipBabel: [
{
package: 'qunit',
Expand Down
Loading