Skip to content

Commit

Permalink
Merge pull request #378 from mansona/update
Browse files Browse the repository at this point in the history
Update addon blueprint using ember-cli-update
  • Loading branch information
mansona authored Jan 8, 2025
2 parents d3d1435 + c5d839e commit d4a9844
Show file tree
Hide file tree
Showing 18 changed files with 14,250 additions and 10,770 deletions.
45 changes: 31 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,45 @@ 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
with:
version: 8
- uses: pnpm/action-setup@v4
- 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@v4
- 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 }}
Expand All @@ -48,6 +65,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 +77,13 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: pnpm/action-setup@v4
- 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
13 changes: 7 additions & 6 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@ jobs:
push-dist:
name: Push dist
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: pnpm/action-setup@v4
- 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'
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
## Compatibility

* Ember.js v3.8 or above
* Ember CLI 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": "3.2.0",
"blueprints": [
{
"name": "@embroider/addon-blueprint",
Expand Down
4 changes: 1 addition & 3 deletions docs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test"
"start": "ember serve -p 0"
},
"devDependencies": {
"@babel/core": "^7.23.2",
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ this.notifications.clearAll().success('Saved successfully!', {
</label>
</div>
</div>
<button class="btn btn-primary" {{action "showNotifcation"}}>Show</button>
<button class="btn btn-primary" {{on "click" this.showNotifcation}}>Show</button>
</div>
</div>
<div class="py2">
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" } }],
]
}
59 changes: 30 additions & 29 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,38 +38,39 @@
"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.9",
"decorator-transforms": "^2.2.2"
},
"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",
"lint-to-the-future": "^2.0.0",
"lint-to-the-future-ember-template": "^1.2.0",
"lint-to-the-future-eslint": "^2.0.1",
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@babel/runtime": "^7.25.6",
"@embroider/addon-dev": "^7.1.0",
"@rollup/plugin-babel": "^6.0.4",
"babel-plugin-ember-template-compilation": "^2.2.5",
"concurrently": "^9.0.1",
"ember-source": "^5.4.0",
"ember-template-lint": "^6.0.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-ember": "^12.3.1",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-n": "^17.10.3",
"eslint-plugin-prettier": "^5.2.1",
"lint-to-the-future": "^2.6.1",
"lint-to-the-future-ember-template": "^3.0.0",
"lint-to-the-future-eslint": "^2.2.0",
"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",
"rollup-plugin-postcss": "^4.0.2"
"prettier": "^3.3.3",
"prettier-plugin-ember-template-tag": "^2.0.2",
"rollup": "^4.22.5",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-postcss": "^4.0.2",
"webpack": "^5.97.1"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
"peerDependencies": {
"ember-source": ">= 3.8.0"
},
"ember": {
"edition": "octane"
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, ember/no-runloop, prettier/prettier */
import Service from '@ember/service';
import { A } from '@ember/array';
import EmberObject, { set } from '@ember/object';
Expand Down
7 changes: 4 additions & 3 deletions 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 All @@ -21,12 +21,13 @@
"devDependencies": {
"concurrently": "^8.2.0",
"prettier": "^3.0.3",
"prettier-plugin-ember-template-tag": "^1.1.0",
"prettier-plugin-ember-template-tag": "^2.0.2",
"release-plan": "^0.9.0"
},
"pnpm": {
"overrides": {
"@types/eslint": "^7.0.0"
}
}
},
"packageManager": "[email protected]+sha512.1f79bc245a66eb0b07c5d4d83131240774642caaa86ef7d0434ab47c0d16f66b04e21e0c086eb61e62c77efc4d7f7ec071afad3796af64892fae66509173893a"
}
Loading

0 comments on commit d4a9844

Please sign in to comment.