Skip to content

Commit

Permalink
Update ember to 5.8 (#57)
Browse files Browse the repository at this point in the history
* run ember-cli-update to move to 5.8

* remove unused libs

* fix the linter

* write a first iteration of tests for components and modifier

* adjust CI: timeout and pnpm usage
  • Loading branch information
BlueCutOfficial authored May 31, 2024
1 parent 5cf92dd commit 805222d
Show file tree
Hide file tree
Showing 26 changed files with 653 additions and 1,089 deletions.
8 changes: 0 additions & 8 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"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.
Expand Down
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# libs
/app/utilities/pure-dropdown.js

# unconventional js
/blueprints/*/files/

# compiled output
/declarations/
/dist/

# misc
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches:
- main
- master
pull_request: {}

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

jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- uses: actions/checkout@v4
- uses: pnpm/[email protected]
with:
version: 8
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install
- name: Lint
run: pnpm run lint

test:
name: "Test"
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- uses: actions/checkout@v4
- uses: pnpm/[email protected]
with:
version: 8
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install
- name: Run Tests
run: pnpm test:ember
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# compiled output
/dist/
/declarations/

# dependencies
/node_modules/
Expand Down
4 changes: 2 additions & 2 deletions app/components/adr-article-button.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<div class="pure-g">
<div class="article-button-icon pure-u-3-24">🔗</div>
<div class="pure-u-21-24">
<strong>{{@title}}</strong>
<strong data-test-title>{{@title}}</strong>
<br />
<span>sur {{@platform}}</span>
<span data-test-platform>sur {{@platform}}</span>
</div>
</div>
</a>
6 changes: 4 additions & 2 deletions app/components/adr-book-details.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
<button
class="pure-button pure-button--black"
type="button"
{{on "click" this.previous}}>
{{on "click" this.previous}}
data-test-previous>
&lt;
</button>
<button
class="pure-button pure-button--black"
type="button"
{{on "click" this.next}}>
{{on "click" this.next}}
data-test-next>
&gt;
</button>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion app/components/adr-quote.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="quote">
<div class="quote" data-test-quote>
<q><em>{{@content}}</em></q>
<span>-&nbsp;<strong>{{@author}}</strong></span>
</div>
2 changes: 1 addition & 1 deletion app/components/form/adr-question.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div>
<p>{{@question.label}}</p>
<p data-test-label>{{@question.label}}</p>
{{#each @question.choices as |choice|}}
<div>
<input
Expand Down
2 changes: 1 addition & 1 deletion app/utilities/what-to-read.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export function getQuestions() {
export function computeTmpScore(currentQuestion, answer) {
// Compute the temporary score from actual score and current question
let questionScore = currentQuestion.choices.find(
({ id }) => id === answer
({ id }) => id === answer,
).score;
for (let [key] of Object.entries(window.tmpScore)) {
window.tmpScore[key] = window.score[key] + questionScore[key];
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 @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "5.0.0",
"version": "5.8.1",
"blueprints": [
{
"name": "app",
Expand Down
3 changes: 2 additions & 1 deletion config/optional-features.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"application-template-wrapper": false,
"default-async-observers": true,
"jquery-integration": false,
"template-only-glimmer-components": true
"template-only-glimmer-components": true,
"no-implicit-route-model": true
}
66 changes: 32 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand All @@ -33,62 +31,62 @@
"test:ember": "ember test"
},
"devDependencies": {
"@babel/eslint-parser": "^7.22.5",
"@babel/plugin-proposal-decorators": "^7.22.5",
"@ember/optional-features": "^2.0.0",
"@babel/core": "^7.24.4",
"@babel/eslint-parser": "^7.24.1",
"@babel/plugin-proposal-decorators": "^7.24.1",
"@ember/optional-features": "^2.1.0",
"@ember/render-modifiers": "^2.1.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^3.0.3",
"@ember/test-helpers": "^3.3.0",
"@embroider/compat": "^3.4.7",
"@embroider/core": "^3.4.7",
"@embroider/util": "^1.13.0",
"@embroider/webpack": "^3.2.3",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"broccoli-asset-rev": "^3.0.0",
"concurrently": "^8.2.0",
"ember-auto-import": "^2.6.3",
"ember-cli": "~5.0.0",
"ember-cli-app-version": "^6.0.0",
"ember-cli-babel": "^7.26.11",
"ember-cli-clean-css": "^2.0.0",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-htmlbars": "^6.2.0",
"concurrently": "^8.2.2",
"ember-auto-import": "^2.7.2",
"ember-cli": "~5.8.1",
"ember-cli-app-version": "^6.0.1",
"ember-cli-babel": "^8.2.0",
"ember-cli-clean-css": "^3.0.0",
"ember-cli-dependency-checker": "^3.3.2",
"ember-cli-htmlbars": "^6.3.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sass": "^11.0.1",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-composable-helpers": "^5.0.0",
"ember-data": "~5.0.0",
"ember-fetch": "^8.1.2",
"ember-load-initializers": "^2.1.2",
"ember-math-helpers": "^4.0.0",
"ember-modifier": "^4.1.0",
"ember-page-title": "^7.0.0",
"ember-qunit": "^7.0.0",
"ember-resolver": "^10.1.0",
"ember-source": "~5.0.0",
"ember-template-lint": "^5.10.1",
"ember-page-title": "^8.2.3",
"ember-qunit": "^8.0.2",
"ember-resolver": "^11.0.1",
"ember-source": "~5.8.0",
"ember-template-lint": "^5.13.0",
"ember-test-selectors": "^6.0.0",
"ember-truth-helpers": "^4.0.3",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-ember": "^11.8.0",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-qunit": "^7.3.4",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-ember": "^11.12.0",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-qunit": "^8.1.1",
"loader.js": "^4.7.0",
"prettier": "^2.8.8",
"qunit": "^2.19.4",
"prettier": "^3.2.5",
"qunit": "^2.20.1",
"qunit-dom": "^2.0.0",
"sass": "^1.75.0",
"stylelint": "^15.7.0",
"stylelint-config-standard": "^33.0.0",
"stylelint-prettier": "^3.0.0",
"tracked-built-ins": "^3.1.1",
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^4.1.0",
"tracked-built-ins": "^3.3.0",
"webpack": "^5.91.0"
},
"engines": {
"node": "16.* || >= 18"
"node": ">= 18"
},
"ember": {
"edition": "octane"
Expand Down
Loading

0 comments on commit 805222d

Please sign in to comment.