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 ember-cli to 5.8.1 and add ember-data peer dependencies #190

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
8 changes: 3 additions & 5 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
/**
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.
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.
*/
"disableAnalytics": false
"isTypeScriptProject": true
}
9 changes: 1 addition & 8 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
# 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
ember-try.js
ember-cli-build.js
Expand Down
15 changes: 9 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
requireConfigFile: false,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
],
},
},
plugins: ['ember', 'prettier', '@typescript-eslint'],
Expand All @@ -29,6 +32,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
Expand All @@ -44,11 +48,10 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
},
{
// Test files:
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
Expand Down
45 changes: 21 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ on:
pull_request:

env:
NODE_VERSION: '14.x'
NODE_VERSION: '18.x'

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

Expand All @@ -56,7 +56,7 @@ jobs:

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
Expand Down Expand Up @@ -89,11 +89,11 @@ jobs:
browser: [chrome]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

Expand All @@ -103,7 +103,7 @@ jobs:

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
Expand Down Expand Up @@ -133,11 +133,11 @@ jobs:
browser: [chrome]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

Expand All @@ -147,7 +147,7 @@ jobs:

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
Expand All @@ -163,32 +163,29 @@ jobs:
run: yarn test:ember --launch ${{ matrix.browser }}

try-scenarios:
name: Tests - ${{ matrix.ember-try-scenario }}
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
continue-on-error: true
needs: test

strategy:
fail-fast: true
matrix:
ember-try-scenario:
[
ember-lts-3.24,
ember-lts-3.28,
ember-release,
ember-beta,
ember-canary,
ember-classic,
embroider-safe,
embroider-optimized,
]
try-scenario:
- ember-lts-4.12
- ember-lts-5.4
- ember-release
- ember-beta
- ember-canary
- embroider-safe
- embroider-optimized

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

Expand Down
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
/yarn-error.log

# 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/
15 changes: 8 additions & 7 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,37 @@
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
/.eslintcache
/.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
/jsconfig.json
/testem.js
/tests/
/tsconfig.declarations.json
/tsconfig.json
/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
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"]
}
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

## Linting

* `yarn lint`
* `yarn lint:fix`
- `yarn lint`
- `yarn lint:fix`

## Running tests

Expand All @@ -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/).
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

`ember install active-model-adapter`

* Ember.js v3.24 or above
* Ember CLI v3.24 or above
* Node.js v12 or above
- Ember.js v4.12 or above
- Ember CLI v4.12 or above
- Node.js v18 or above

You should make an `ApplicationAdapter` if you don't already have one:

Expand Down
6 changes: 2 additions & 4 deletions addon/active-model-adapter.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import RESTAdapter from '@ember-data/adapter/rest';
import AdapterError, {
InvalidError,
errorsHashToArray,
} from '@ember-data/adapter/error';
import AdapterError, { InvalidError } from '@ember-data/adapter/error';
import errorsHashToArray from './errors-hash-to-array';
import { pluralize } from 'ember-inflector';
import { AnyObject } from 'active-model-adapter';
import { decamelize, underscore } from '@ember/string';
Expand Down
Loading
Loading