Skip to content

Commit

Permalink
feat: update to ember 4.1
Browse files Browse the repository at this point in the history
fixes #106
  • Loading branch information
adrigzr committed Jan 31, 2022
1 parent 971a511 commit 35d6c01
Show file tree
Hide file tree
Showing 52 changed files with 6,423 additions and 5,063 deletions.
4 changes: 1 addition & 3 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

module.exports = {
extends: ['@commitlint/config-conventional']
extends: ['@commitlint/config-conventional'],
};
11 changes: 6 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
Expand All @@ -6,11 +12,6 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.{html,css,hbs,js}]
indent_style = tab
indent_size = tab
tab_width = 4

[*.hbs]
insert_final_newline = false

Expand Down
9 changes: 9 additions & 0 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
/**
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
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
Expand Down
110 changes: 52 additions & 58 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,62 +1,56 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: [
'ember',
'bbva'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'eslint-config-bbva'
],
env: {
browser: true
},
rules: {
'ember/no-jquery': 'error'
},
overrides: [{
files: [
'.huskyrc.js',
'.commitlintrc.js',
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/**/*.js',
'node-tests/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script'
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
'no-process-env': 0,
'ember/avoid-leaking-state-in-ember-objects': 0
})
}]
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
},
},
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true,
},
rules: {},
overrides: [
// node files
{
files: [
'./.commitlintrc.js',
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./lib/**/*.js',
'./node-tests/**/*.js',
'./tests/dummy/config/**/*.js',
],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
94 changes: 94 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 16
cache: yarn
- name: Install dependencies
run: yarn install
- name: Test
run: yarn test
- name: Release dry-run
run: yarn test:release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/ember/lcov.info,./coverage/node/lcov.info
fail_ci_if_error: true
regression:
if: github.ref != 'refs/heads/master'
needs: test
runs-on: ubuntu-latest
name: Regression test - ${{ matrix.ember_try_scenario }} - Experimental ${{ matrix.experimental }}
strategy:
matrix:
ember_try_scenario:
- ember-lts-3.24
- ember-lts-3.28
- ember-release
- ember-beta
- ember-classic
experimental: [false]
include:
- ember_try_scenario: ember-canary
experimental: true
- ember_try_scenario: embroider-safe
experimental: true
- ember_try_scenario: embroider-optimized
experimental: true
continue-on-error: ${{ matrix.experimental }}
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 16
cache: yarn
- name: Install dependencies
run: yarn install
- name: Test
run: yarn ember try:one ${{ matrix.ember_try_scenario }}
release:
if: github.ref == 'refs/heads/master'
needs: [test]
runs-on: ubuntu-latest
name: Release
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Configure CI Git User
run: |
git config --global user.email [email protected]
git config --global user.name adrigzr
- name: Install dependencies
run: yarn install
- name: Release
run: yarn semantic-release
env:
HUSKY: 0
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29 changes: 20 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

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

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

# misc
.DS_Store
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/.nyc_output/
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
testem.log
tags*
/.nyc_output
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn test
8 changes: 0 additions & 8 deletions .huskyrc.js

This file was deleted.

31 changes: 17 additions & 14 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,29 @@
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
/.eslintcache
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/dist
/tests
/tmp
.bowerrc
.editorconfig
.ember-cli
.gitignore
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js
/node-tests
/CONTRIBUTING.md
/ember-cli-build.js
/node-tests/
/testem.js
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
24 changes: 24 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
/.nyc_output/
!.*
.eslintcache
*.html
*.hbs

# 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,
};
Loading

0 comments on commit 35d6c01

Please sign in to comment.