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

update addon blueprint with ember-cli-update #377

Open
wants to merge 1 commit into
base: main
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
45 changes: 34 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,55 @@ on:
pull_request: {}

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

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

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: pnpm
- run: pnpm i --frozen-lockfile
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Run Tests
run: pnpm --filter test-app test:ember
run: pnpm test

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

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --no-lockfile
- name: Run Tests
run: pnpm test

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

strategy:
fail-fast: false
Expand All @@ -48,6 +69,7 @@ jobs:
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-lts-5.4
- ember-release
- ember-beta
- ember-canary
Expand All @@ -59,14 +81,15 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: pnpm
- run: pnpm i --frozen-lockfile
- name: Install Dependencies
run: pnpm 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 }} --skip-cleanup
working-directory: test-app
11 changes: 7 additions & 4 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@ jobs:
push-dist:
name: Push dist
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: pnpm
- run: pnpm i --frozen-lockfile
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- uses: kategengler/[email protected]
with:
branch: dist
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: ember-cli-notifications
working-directory: 'ember-cli-notifications'
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@

## Compatibility

* Ember.js v3.8 or above
* Ember CLI v3.8 or above

- Ember.js v3.8 or above
- Embroider or ember-auto-import v2

## Installation

Expand Down
2 changes: 1 addition & 1 deletion config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"packages": [
{
"name": "@embroider/addon-blueprint",
"version": "2.8.0",
"version": "2.17.0",
"blueprints": [
{
"name": "@embroider/addon-blueprint",
Expand Down
65 changes: 46 additions & 19 deletions ember-cli-notifications/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,48 @@

module.exports = {
root: true,
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
babelOptions: {
root: __dirname,
},
},
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true,
},
rules: {},
// Only use overrides
// https://github.com/ember-cli/eslint-plugin-ember?tab=readme-ov-file#gtsgjs
overrides: [
{
files: ['**/*.js'],
env: { browser: true },
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
babelOptions: {
root: __dirname,
},
},
plugins: ['ember', 'import'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
rules: {
// require relative imports use full extensions
'import/extensions': ['error', 'always', { ignorePackages: true }],
// Add any custom rules here
},
},
{
files: ['**/*.gjs'],
parser: 'ember-eslint-parser',
plugins: ['ember', 'import'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:ember/recommended-gjs',
'plugin:prettier/recommended',
],
rules: {
// require relative imports use full extensions
'import/extensions': ['error', 'always', { ignorePackages: true }],
// Add any custom rules here
},
},
// node files
{
files: [
Expand All @@ -37,7 +60,11 @@ module.exports = {
node: true,
},
plugins: ['n'],
extends: ['plugin:n/recommended'],
extends: [
'eslint:recommended',
'plugin:n/recommended',
'plugin:prettier/recommended',
],
},
],
};
9 changes: 7 additions & 2 deletions ember-cli-notifications/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
/LICENSE.md

# compiled output
/dist
/declarations
dist/
declarations/

# npm/pnpm/yarn pack output
*.tgz

# deps & caches
node_modules/
.eslintcache
.prettiercache
4 changes: 1 addition & 3 deletions ember-cli-notifications/babel.config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"plugins": [
"@embroider/addon-dev/template-colocation-plugin",
"@babel/plugin-transform-class-static-block",
["babel-plugin-ember-template-compilation", {
"targetFormat": "hbs",
"transforms": []
}],
["@babel/plugin-proposal-decorators", { "version": "legacy" }],
"@babel/plugin-proposal-class-properties"
["module:decorator-transforms", { "runtime": { "import": "decorator-transforms/runtime" } }],
]
}
49 changes: 24 additions & 25 deletions ember-cli-notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
],
"scripts": {
"build": "rollup --config",
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:'",
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
"lint": "concurrently 'pnpm:lint:*(!fix)' --names 'lint:'",
"lint:fix": "concurrently 'pnpm:lint:*:fix' --names 'fix:'",
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
"lint:js": "eslint . --cache",
Expand All @@ -38,34 +38,33 @@
"test": "echo 'A v2 addon does not have tests, run tests in test-app'"
},
"dependencies": {
"@embroider/addon-shim": "^1.0.0"
"@embroider/addon-shim": "^1.8.7",
"decorator-transforms": "^2.0.0"
},
"devDependencies": {
"@babel/core": "^7.17.0",
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-decorators": "^7.20.13",
"@babel/plugin-transform-class-static-block": "^7.20.0",
"@babel/runtime": "^7.17.0",
"@embroider/addon-dev": "^4.1.0",
"@rollup/plugin-babel": "^6.0.3",
"babel-plugin-ember-template-compilation": "^2.2.0",
"concurrently": "^8.0.1",
"ember-template-lint": "^5.11.2",
"eslint": "^8.33.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-ember": "^11.11.1",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-prettier": "^5.0.0",
"@babel/core": "^7.24.4",
"@babel/eslint-parser": "^7.24.1",
"@babel/runtime": "^7.24.4",
"@embroider/addon-dev": "^4.3.1",
"@rollup/plugin-babel": "^6.0.4",
"babel-plugin-ember-template-compilation": "^2.2.5",
"concurrently": "^8.2.2",
"ember-template-lint": "^6.0.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-ember": "^12.0.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.3.1",
"eslint-plugin-prettier": "^5.1.3",
"lint-to-the-future": "^2.0.0",
"lint-to-the-future-ember-template": "^1.2.0",
"lint-to-the-future-eslint": "^2.0.1",
"postcss": "^8.4.31",
"postcss-preset-env": "^9.3.0",
"prettier": "^3.0.3",
"prettier-plugin-ember-template-tag": "^1.1.0",
"rollup": "^3.21.8",
"rollup-plugin-copy": "^3.4.0",
"postcss": "^8.4.39",
"postcss-preset-env": "^9.6.0",
"prettier": "^3.2.5",
"prettier-plugin-ember-template-tag": "^2.0.2",
"rollup": "^4.16.4",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-postcss": "^4.0.2"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion ember-cli-notifications/src/services/notifications.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable ember/no-classic-classes, ember/no-get, prettier/prettier */
/* eslint-disable ember/no-classic-classes, ember/no-get, prettier/prettier, ember/no-runloop */
import Service from '@ember/service';
import { A } from '@ember/array';
import EmberObject, { set } from '@ember/object';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint": "pnpm --filter '*' lint",
"lint:fix": "pnpm --filter '*' lint:fix",
"prepare": "pnpm build",
"start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start": "concurrently 'pnpm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start:addon": "pnpm --filter ember-cli-notifications start --no-watch.clearScreen",
"start:docs-app": "pnpm --filter docs-app start",
"start:test-app": "pnpm --filter test-app start",
Expand Down
Loading
Loading