Skip to content

Commit

Permalink
Merge pull request #137 from ember-learn/update-deps
Browse files Browse the repository at this point in the history
Move to Ember 5.10
  • Loading branch information
MinThaMie authored Jul 25, 2024
2 parents 64ac94c + b9b1b63 commit 8d10caf
Show file tree
Hide file tree
Showing 36 changed files with 41,861 additions and 32,978 deletions.
7 changes: 6 additions & 1 deletion .ember-cli
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"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
}
10 changes: 1 addition & 9 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/declarations/
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
22 changes: 10 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

module.exports = {
root: true,
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
requireConfigFile: false,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
],
},
},
plugins: ['ember'],
Expand All @@ -26,6 +29,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
Expand All @@ -41,16 +45,10 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: {
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off',
},
extends: ['plugin:n/recommended'],
},
{
// Test files:
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
Expand Down
57 changes: 26 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,47 @@
name: CI

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

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

jobs:
lint:
name: Lint files
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v2
timeout-minutes: 10

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

- name: Install dependencies
node-version: 18
cache: npm
- name: Install Dependencies
run: npm ci

- name: Lint
run: npm run lint


test-app:
name: Test app
test:
name: "Test"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v2
timeout-minutes: 10

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

- name: Install dependencies
node-version: 18
cache: npm
- name: Install Dependencies
run: npm ci

- name: Test
- name: Run Tests
run: npm test
15 changes: 7 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
/declarations/

# dependencies
/bower_components/
/node_modules/

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

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
.DS_Store
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/
10 changes: 1 addition & 9 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache
.*/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.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 .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
"ignore_dirs": ["dist"]
}
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,39 @@ This is a working repository for the Ember Upgrade Guide.

You will need the following things properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/)
* [Ember CLI](https://ember-cli.com/)
* [Google Chrome](https://google.com/chrome/)
- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/) (with npm)
- [Ember CLI](https://cli.emberjs.com/release/)
- [Google Chrome](https://google.com/chrome/)


## Installation

* `git clone <repository-url>` this repository
* `cd upgrade-guide`
* `npm install`
- `git clone <repository-url>` this repository
- `cd upgrade-guide`
- `npm install`


## Running / Development

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).
- `npm run start`
- Visit your app at [http://localhost:4200](http://localhost:4200).
- Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

### Running Tests

* `npm test`
* `npm test --server`
- `npm run test`
- `npm run test:ember -- --server`

### Linting

* `npm run lint`
* `npm run lint:fix`
- `npm run lint`
- `npm run lint:fix`

### Building

* `npm build` (production)
- `npm exec ember build` (development)
- `npm run build` (production)

### Deploying

Expand Down
2 changes: 1 addition & 1 deletion app/components/ember-versions-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</div>

<EsButton
type='submit'
@type='submit'
data-test-button='Find Changes'
disabled={{unless this.areVersionsValid true}}
@label='Find Changes'
Expand Down
2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Upgrade Guide - Ember.js</title>
<meta name="description" content="Ember.js upgrade guide">
<meta name="viewport" content="width=device-width, initial-scale=1">

Expand Down
4 changes: 4 additions & 0 deletions app/routes/changes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import Route from '@ember/routing/route';
import { hash } from 'rsvp';
import { inject as service } from '@ember/service';

export default class ChangesRoute extends Route {
@service store;

model() {
return hash({
emberJSChanges: this.store.findAll('ember-js-change'),
Expand Down
1 change: 1 addition & 0 deletions app/services/store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'ember-data/store';
1 change: 1 addition & 0 deletions app/styles/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */
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": "3.28.4",
"version": "5.10.0",
"blueprints": [
{
"name": "app",
Expand Down
9 changes: 3 additions & 6 deletions config/environment.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
'use strict';

module.exports = function (environment) {
let ENV = {
const ENV = {
modulePrefix: 'upgrade-guide',
environment,
rootURL: '/',
locationType: 'auto',
locationType: 'history',
EmberENV: {
EXTEND_PROTOTYPES: false,
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
},
},

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
}
Loading

0 comments on commit 8d10caf

Please sign in to comment.