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

[Deps]: bump 3.16 and Node 10 minimum #396

Merged
merged 23 commits into from
Oct 7, 2020
Merged
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
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

root = true


[*]
end_of_line = lf
charset = utf-8
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
Expand Down
18 changes: 14 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
'use strict';

module.exports = {
globals: {
server: true,
},
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: [
'ember'
Expand All @@ -18,17 +24,22 @@ module.exports = {
browser: true
},
rules: {
'ember/no-jquery': 'off',
'ember/no-new-mixins': 'off',
'no-useless-escape': 'off'
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'server/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
Expand All @@ -38,16 +49,15 @@ module.exports = {
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
sourceType: 'script'
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
'node/no-unpublished-require': 'off'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've looked up this issue and still not sure why it is warning. We have glob, express, etc in devDeps 🤔

mysticatea/eslint-plugin-node#47

})
}
]
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ jobs:
matrix:
ember-version:
- 'ember-default'
- 'ember-lts-2.16'
- 'ember-lts-2.18'
- 'ember-3.1'
- 'ember-lts-3.4'
- 'ember-lts-3.8'
- 'ember-lts-3.12'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.10 is the minimum for classes and decorators and 3.6 is the minimum for classes. We could install something to get us back to 3.8 but I'm not sure that is necessary if we release a new major bump

- 'ember-lts-3.16'
- 'ember-release'
- 'ember-beta'
- 'ember-canary'
env:
CI: true
CI: true
EMBER_TRY_SCENARIO: ${{ matrix.ember-version }}

steps:
Expand Down
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/connect.lock
/coverage/
Expand All @@ -18,9 +20,6 @@
/yarn-error.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try

.DS_Store
package-lock.json
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
6 changes: 5 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.watchmanconfig
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
Expand Down
2 changes: 1 addition & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended'
extends: 'octane'
};
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: node_js
sudo: false
dist: trusty
node_js:
- "8"
- "10"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will require a major bump


addons:
chrome: stable
Expand Down Expand Up @@ -58,17 +58,13 @@ jobs:
script: yarn test

- stage: fastboot tests
node_js: "8"
node_js: "10"
env: NAME=fastboot tests
script: yarn test:fastboot

- stage: versioned tests
env: EMBER_TRY_SCENARIO=ember-lts-2.16
- env: EMBER_TRY_SCENARIO=ember-lts-2.18
- env: EMBER_TRY_SCENARIO=ember-3.1
- env: EMBER_TRY_SCENARIO=ember-lts-3.4
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
- env: EMBER_TRY_SCENARIO=ember-lts-3.12
env: EMBER_TRY_SCENARIO=ember-lts-3.16
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
Expand Down
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# How To Contribute

## Installation

* `git clone <repository-url>`
* `cd ember-data-storefront`
* `yarn install`

## Linting

* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js --fix`

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

## Running the dummy application

* `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/).
2 changes: 1 addition & 1 deletion addon/adapters/application.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import JSONAPIAdapter from 'ember-data/adapters/json-api';
import JSONAPIAdapter from '@ember-data/adapter/json-api';

export default JSONAPIAdapter.extend({

Expand Down
53 changes: 10 additions & 43 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,59 +12,26 @@ module.exports = function() {
useYarn: true,
scenarios: [
{
name: "ember-lts-2.16",
npm: {
devDependencies: {
"ember-source": "~2.16.0",
"ember-data": "~2.16.0"
}
}
},
{
name: "ember-lts-2.18",
npm: {
devDependencies: {
"ember-source": "~2.18.0",
"ember-data": "~2.18.0"
}
}
},
{
name: "ember-3.1",
npm: {
devDependencies: {
"ember-source": "~3.1.0",
"ember-data": "~3.1.0"
}
}
},
{
name: "ember-lts-3.4",
npm: {
devDependencies: {
"ember-source": "~3.4.0",
"ember-data": "~3.4.0"
}
}
},
{
name: "ember-lts-3.8",
name: "ember-lts-3.12",
npm: {
devDependencies: {
"ember-source": "~3.8.0",
"ember-data": "~3.8.0"
"ember-source": "~3.12.0",
"ember-data": "~3.12.0"
},
resolutions: {
"ember-data": "~3.12.0"
}
}
},
{
name: "ember-lts-3.12",
name: "ember-lts-3.16",
npm: {
devDependencies: {
"ember-source": "~3.12.0",
"ember-data": "~3.12.0"
"ember-source": "~3.16.0",
"ember-data": "~3.16.0"
},
resolutions: {
"ember-data": "~3.12.0"
"ember-data": "~3.16.0"
}
}
},
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@
"devDependencies": {
"@ember/jquery": "^1.1.0",
"@ember/optional-features": "^1.0.0",
"babel-eslint": "^10.0.3",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^1.5.3",
"ember-ajax": "^5.0.0",
"ember-cli": "~3.4.4",
"ember-cli-addon-docs": "0.6.16",
"ember-cli-addon-docs-yuidoc": "^0.2.1",
"ember-cli": "~3.16.0",
"ember-cli-addon-docs": "0.10.0",
"ember-cli-addon-docs-yuidoc": "^0.2.3",
"ember-cli-dependency-checker": "^3.0.0",
"ember-cli-deploy": "^1.0.2",
"ember-cli-deploy-build": "^2.0.0",
Expand All @@ -55,20 +57,20 @@
"ember-cli-uglify": "^3.0.0",
"ember-component-css": "^0.7.4",
"ember-concurrency": "^1.0.0",
"ember-data": "~3.4.0",
"ember-data": "~3.16.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.0",
"ember-fetch": "^7.0.0",
"ember-fetch": "^8.0.0",
"ember-font-awesome": "4.0.0-rc.4",
"ember-load-initializers": "^2.0.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit-assert-helpers": "^0.2.1",
"ember-resolver": "^7.0.0",
"ember-router-scroll": "~1.3.2",
"ember-source": "~3.4.0",
"ember-source": "~3.16.0",
"ember-source-channel-url": "^2.0.1",
"ember-test-selectors": "3.0.0",
"ember-try": "^1.0.0",
"ember-try": "^1.4.0",
"eslint-plugin-ember": "^7.1.0",
"eslint-plugin-node": "^11.0.0",
"express": "^4.16.4",
Expand All @@ -77,14 +79,13 @@
"liquid-fire": "^0.31.0",
"loader.js": "^4.7.0",
"morgan": "^1.9.1",
"qunit": "^2.9.2",
"qunit-dom": "^1.0.0",
"sass": "^1.17.2",
"strip-indent": "^3.0.0",
"tachyons": "4.11.1"
},
"engines": {
"node": "6.* || 8.* || >= 10.*"
"node": "10.* || >= 12.*"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand Down
3 changes: 3 additions & 0 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
'use strict';

module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: [
'Chrome'
],
launch_in_dev: [
'Chrome'
],
browser_start_timeout: 120,
browser_args: {
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/adapters/post.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import JSONAPIAdapter from 'ember-data/adapters/json-api';
import JSONAPIAdapter from '@ember-data/adapter/json-api';
import FastbootAdapter from 'ember-data-storefront/mixins/fastboot-adapter';

export default JSONAPIAdapter.extend(
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Model from '@ember-data/model';
import Application from '@ember/application';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
import DS from 'ember-data';
import LoadableModel from 'ember-data-storefront/mixins/loadable-model';
import { registerWarnHandler } from '@ember/debug';

DS.Model.reopen(LoadableModel);
Model.reopen(LoadableModel);

const App = Application.extend({
modulePrefix: config.modulePrefix,
Expand Down
13 changes: 6 additions & 7 deletions tests/dummy/app/models/author.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import DS from 'ember-data';
import Model, { attr, hasMany, belongsTo } from '@ember-data/model';

export default DS.Model.extend({
export default class AuthorModel extends Model {
@attr('string') name;

name: DS.attr('string'),
@hasMany() comments;
@belongsTo() post;

comments: DS.hasMany(),
post: DS.belongsTo()

});
}
Loading