Skip to content

Commit

Permalink
Merge pull request #74 from peopledoc/release-v2--01-upgrade-ember-an…
Browse files Browse the repository at this point in the history
…d-dependencies

Refresh add-on to version 3.24 and upgrade dependencies
  • Loading branch information
MrChocolatine committed May 21, 2021
2 parents 29637ee + 8fc3ceb commit b9a0c21
Show file tree
Hide file tree
Showing 55 changed files with 4,008 additions and 5,075 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

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: 1 addition & 1 deletion .ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
"disableAnalytics": true
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# misc
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
Expand Down
38 changes: 18 additions & 20 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,56 +1,54 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
legacyDecorators: true,
},
},
plugins: [
'ember'
],
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true
},
rules: {
'ember/no-jquery': 'error'
browser: true,
},
rules: {},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
'tests/dummy/config/**/*.js',
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
'tests/dummy/app/**',
],
parserOptions: {
sourceType: 'script'
sourceType: 'script',
},
env: {
browser: false,
node: true
node: true,
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
}
]
}
extends: ['plugin:node/recommended'],
},
],
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
Expand Down
3 changes: 0 additions & 3 deletions .jscsrc

This file was deleted.

32 changes: 0 additions & 32 deletions .jshintrc

This file was deleted.

3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
# misc
/.bowerrc
/.editorconfig
/.ember-cli.js
/.ember-cli
/.env*
/.eslintcache
/.eslintignore
/.eslintrc.js
/.git/
Expand Down
21 changes: 21 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
singleQuote: true,
};
6 changes: 3 additions & 3 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'
'use strict';

module.exports = {
extends: 'recommended'
}
extends: 'octane',
};
19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "10"
- "12"

sudo: false
dist: xenial
Expand Down Expand Up @@ -32,20 +32,23 @@ jobs:

include:
# runs linting and tests with current locked deps

- stage: "Tests"
name: "Tests"
script:
- yarn lint:hbs
- yarn lint:js
- yarn test
- yarn lint
- yarn test:ember

- stage: "Additional Tests"
name: "Floating Dependencies"
install:
- yarn install --no-lockfile
script:
- yarn test:ember

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- stage: "Additional Tests"
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-lts-3.20
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

## Linting

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

## Running tests

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019
Copyright (c) 2021

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ We found it especially useful, for example, when migrating an existing app to Em

## Compatibility

- Ember.js v3.4 or above
- Ember.js v3.16 or above
- Ember CLI v2.13 or above
- Node.js v8 or above
- Node.js v10 or above


## Usage
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions addon/instance-initializers/embedded.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export function initialize(appInstance) {
const appConf = appInstance.resolveRegistration('config:environment').APP;
const embedConf = appInstance.resolveRegistration('config:embedded');
return Object.assign(appConf, embedConf);
}

export default {
name: 'embedded',
initialize,
};
19 changes: 10 additions & 9 deletions addon/services/embedded.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import ObjectProxy from '@ember/object/proxy'
import { getOwner } from '@ember/application'
import ObjectProxy from '@ember/object/proxy';
import { getOwner } from '@ember/application';

// eslint-disable-next-line ember/no-classic-classes
let configService = ObjectProxy.extend({
init() {
this.content = getOwner(this).factoryFor('config:embedded').class
this._super(...arguments)
}
})
this.content = getOwner(this).factoryFor('config:embedded').class;
this._super(...arguments);
},
});

configService.reopenClass({
isServiceFactory: true
})
isServiceFactory: true,
});

export default configService
export default configService;
Empty file added app/.gitkeep
Empty file.
7 changes: 7 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# No TypeScript files in directory `/app/`

From the documentation of the add-on `ember-cli-typescript`:
https://github.com/typed-ember/ember-cli-typescript/blob/4e4b161d55aae9d3409f7b7ad9630473af87109b/docs/ts/with-addons.md

> Because addons have no control over how files in `app/` are transpiled, you cannot have `.ts`
> files in your addon's `app/` folder.
2 changes: 1 addition & 1 deletion app/initializers/embedded.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default, initialize } from 'ember-cli-embedded/initializers/embedded'
export { default, initialize } from 'ember-cli-embedded/initializers/embedded';
14 changes: 4 additions & 10 deletions app/instance-initializers/embedded.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
export function initialize(appInstance) {
const appConf = appInstance.resolveRegistration('config:environment').APP
const embedConf = appInstance.resolveRegistration('config:embedded')
return Object.assign(appConf, embedConf)
}

export default {
name: 'embedded',
initialize
}
export {
default,
initialize,
} from 'ember-cli-embedded/instance-initializers/embedded';
2 changes: 1 addition & 1 deletion app/services/embedded.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from 'ember-cli-embedded/services/embedded'
export { default } from 'ember-cli-embedded/services/embedded';
Loading

0 comments on commit b9a0c21

Please sign in to comment.