Skip to content

Commit 206f7b8

Browse files
authored
Merge pull request #1 from Gaurav0/DazzlingFugu/chore/ember-5-compatible
Fork of Pixelik's PR to fix tests and security issues
2 parents 4086737 + 2d9b45f commit 206f7b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+6680
-6248
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
root = true
66

7-
87
[*]
98
end_of_line = lf
109
charset = utf-8

.ember-cli

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@
55

66
Setting `disableAnalytics` to true will prevent any data from being sent.
77
*/
8-
"disableAnalytics": false
8+
"disableAnalytics": false,
9+
10+
/**
11+
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
12+
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
13+
*/
14+
"isTypeScriptProject": true
915
}

.eslintignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@
1313
# misc
1414
/coverage/
1515
!.*
16+
.*/
17+
.eslintcache
1618

1719
# ember-try
1820
/.node_modules.ember-try/
1921
/bower.json.ember-try
22+
/npm-shrinkwrap.json.ember-try
2023
/package.json.ember-try
21-
22-
test/fixtures
24+
/package-lock.json.ember-try
25+
/yarn.lock.ember-try

.eslintrc.js

Lines changed: 51 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
1+
'use strict';
2+
13
module.exports = {
24
root: true,
3-
parser: 'babel-eslint',
5+
parser: '@babel/eslint-parser',
46
parserOptions: {
5-
ecmaVersion: 2018,
6-
sourceType: 'module'
7+
ecmaVersion: 'latest',
8+
sourceType: 'module',
9+
requireConfigFile: false,
10+
babelOptions: {
11+
plugins: [
12+
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
13+
],
14+
},
715
},
816
plugins: ['ember'],
9-
extends: ['eslint:recommended', 'plugin:ember/recommended'],
17+
extends: [
18+
'eslint:recommended',
19+
'plugin:ember/recommended',
20+
'plugin:prettier/recommended',
21+
],
1022
env: {
11-
browser: true
23+
browser: true,
1224
},
1325
globals: {
14-
fetch: 'off',
15-
Headers: 'off',
16-
Request: 'off',
17-
Response: 'off',
18-
AbortController: 'off'
26+
require: true,
27+
beforeEach: true,
28+
it: true,
29+
describe: true,
30+
afterEach: true,
31+
process: true,
32+
module: true,
1933
},
2034
rules: {
2135
'ember/no-new-mixins': 'off',
2236
'ember/no-jquery': 'error',
23-
'no-console': ['error', { allow: ['warn'] }]
37+
'no-console': ['error', { allow: ['warn'] }],
38+
'ember/no-classic-classes': 'off',
39+
'ember/no-actions-hash': 'off',
2440
},
2541
overrides: [
2642
// TypeScript files
@@ -30,45 +46,40 @@ module.exports = {
3046
plugins: ['@typescript-eslint'],
3147
rules: {
3248
'no-undef': 'off',
33-
'no-unused-var': 'off'
34-
}
49+
'no-unused-var': 'off',
50+
},
3551
},
3652
// node files
3753
{
3854
files: [
39-
'.eslintrc.js',
40-
'.template-lintrc.js',
41-
'ember-cli-build.js',
42-
'index.js',
43-
'testem.js',
44-
'blueprints/*/index.js',
45-
'config/**/*.js',
46-
'test/**/*.js',
47-
'tests/dummy/config/**/*.js'
55+
'./.eslintrc.js',
56+
'./.prettierrc.js',
57+
'./.stylelintrc.js',
58+
'./.template-lintrc.js',
59+
'./ember-cli-build.js',
60+
'./index.js',
61+
'./testem.js',
62+
'./blueprints/*/index.js',
63+
'./config/**/*.js',
64+
'./tests/dummy/config/**/*.js',
4865
],
49-
excludedFiles: ['app/**', 'addon-test-support/**', 'addon/**', 'tests/dummy/app/**'],
5066
parserOptions: {
51-
sourceType: 'script'
67+
sourceType: 'script',
5268
},
5369
env: {
5470
browser: false,
55-
node: true
56-
},
57-
plugins: ['node'],
58-
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
59-
// add your custom rules and overrides for node files here
60-
})
61-
},
62-
// node tests
63-
{
64-
files: ['test/**/*.js'],
65-
env: {
66-
mocha: true
71+
node: true,
6772
},
73+
extends: ['plugin:n/recommended'],
6874
rules: {
6975
'node/no-unpublished-require': 'off',
70-
'node/no-extraneous-require': 'off'
71-
}
72-
}
73-
]
76+
'node/no-extraneous-require': 'off',
77+
},
78+
},
79+
{
80+
// test files
81+
files: ['tests/**/*-test.{js,ts}'],
82+
extends: ['plugin:qunit/recommended'],
83+
},
84+
],
7485
};

.github/workflows/CI.yml

Lines changed: 58 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,102 +11,133 @@ on:
1111
tags:
1212
- "*"
1313

14+
concurrency:
15+
group: ci-${{ github.head_ref || github.ref }}
16+
cancel-in-progress: true
17+
1418
jobs:
1519
lint:
1620
name: "Linting"
1721
runs-on: ubuntu-latest
1822
steps:
19-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
2024
- run: yarn install --frozen-lockfile --non-interactive
21-
- run: yarn lint:js
25+
- run: yarn lint
2226

23-
ember-tests:
27+
ember-default-tests:
2428
needs: lint
2529
name: "Tests: ubuntu (node@${{ matrix.node-version }})"
2630
runs-on: ubuntu-latest
2731
strategy:
32+
fail-fast: false
2833
matrix:
29-
node-version: ["12"]
34+
node-version:
35+
- 16.14
36+
- 18
37+
- 20
3038

3139
steps:
32-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v4
3341
with:
3442
node-version: ${{ matrix.node-version }}
43+
cache: yarn
3544
- run: yarn install --frozen-lockfile --non-interactive
3645
- run: yarn test
3746

38-
prefer-native-tests:
39-
needs: ember-tests
47+
prefer-native-ember-default-tests:
48+
needs: ember-default-tests
4049
name: "PREFER_NATIVE=true Tests: ubuntu (node@${{ matrix.node-version }})"
4150
runs-on: ubuntu-latest
4251
strategy:
52+
fail-fast: false
4353
matrix:
44-
node-version: ["12"]
54+
node-version:
55+
- 16.14
56+
- 18
57+
- 20
4558

4659
steps:
47-
- uses: actions/checkout@v2
60+
- uses: actions/checkout@v4
4861
with:
4962
node-version: ${{ matrix.node-version }}
63+
cache: yarn
5064
- run: yarn install --frozen-lockfile --non-interactive
5165
- run: PREFER_NATIVE=true yarn test
5266

53-
native-promise-tests:
54-
needs: ember-tests
67+
native-promise-ember-default-tests:
68+
needs: ember-default-tests
5569
name: "NATIVE_PROMISE=true Tests: ubuntu (node@${{ matrix.node-version }})"
5670
runs-on: ubuntu-latest
5771
strategy:
72+
fail-fast: false
5873
matrix:
59-
node-version: ["12"]
74+
node-version:
75+
- 16.14
76+
- 18
77+
- 20
6078

6179
steps:
62-
- uses: actions/checkout@v2
80+
- uses: actions/checkout@v4
6381
with:
6482
node-version: ${{ matrix.node-version }}
6583
- run: yarn install --frozen-lockfile --non-interactive
6684
- run: NATIVE_PROMISE=true yarn test
6785

6886
node-tests:
69-
needs: ember-tests
87+
needs: ember-default-tests
7088
name: "Node Tests: ubuntu (node@${{ matrix.node-version }})"
7189
runs-on: ubuntu-latest
7290
strategy:
91+
fail-fast: false
7392
matrix:
74-
node-version: ["12"]
93+
node-version:
94+
- 16.14
95+
- 18
96+
- 20
7597

7698
steps:
77-
- uses: actions/checkout@v2
99+
- uses: actions/checkout@v4
78100
with:
79101
node-version: ${{ matrix.node-version }}
80102
- run: yarn install --frozen-lockfile --non-interactive
81103
- run: yarn run test:node
82104

83-
try-scenarios:
105+
ember-try-scenarios:
84106
name: Tests - ${{ matrix.ember-try-scenario }}
85107
timeout-minutes: 60
86108
runs-on: ubuntu-latest
87109
continue-on-error: ${{ matrix.allow-failure }}
88-
needs: ember-tests
110+
needs: ember-default-tests
89111

90112
strategy:
91113
fail-fast: true
92114
matrix:
93115
ember-try-scenario:
94-
- ember-lts-3.4
95-
- ember-lts-3.8
96-
- ember-lts-3.12
97-
- ember-lts-3.16
98-
- ember-lts-3.20
99-
- ember-lts-3.24
116+
- ember-lts-3.28
117+
- ember-lts-4.4
118+
- ember-lts-4.8
119+
- ember-lts-4.12
120+
- ember-lts-5.4
121+
- ember-lts-5.8
122+
- ember-lts-5.12
100123
- ember-release
101-
- ember-beta
102124
allow-failure: [false]
103125
include:
126+
- ember-try-scenario: ember-beta
127+
allow-failure: true
104128
- ember-try-scenario: ember-canary
105129
allow-failure: true
130+
- ember-try-scenario: embroider-safe
131+
allow-failure: true
132+
- ember-try-scenario: embroider-optimized
133+
allow-failure: true
134+
106135
steps:
107-
- uses: actions/checkout@v2
136+
- uses: actions/checkout@v4
137+
- name: Install Node
138+
uses: actions/setup-node@v4
108139
with:
109-
node-version: 12.x
140+
node-version: 16.14
110141
- name: install dependencies
111142
run: yarn install
112143
- name: test

.gitignore

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# misc
1212
/.sass-cache
13+
/.eslintcache
1314
/connect.lock
1415
/coverage/*
1516
/libpeerconnection.log
@@ -19,6 +20,12 @@ yarn-error.log
1920
testem.log
2021

2122
# ember-try
22-
.node_modules.ember-try/
23-
bower.json.ember-try
24-
package.json.ember-try
23+
/.node_modules.ember-try/
24+
/bower.json.ember-try
25+
/npm-shrinkwrap.json.ember-try
26+
/package.json.ember-try
27+
/package-lock.json.ember-try
28+
/yarn.lock.ember-try
29+
30+
# broccoli-debug
31+
/DEBUG/

.npmignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,30 @@
1414
/.eslintignore
1515
/.eslintrc.js
1616
/.git/
17+
/.github/
1718
/.gitignore
19+
/.prettierignore
20+
/.prettierrc.js
21+
/.stylelintignore
22+
/.stylelintrc.js
1823
/.template-lintrc.js
1924
/.travis.yml
2025
/.watchmanconfig
2126
/bower.json
22-
/config/ember-try.js
2327
/CONTRIBUTING.md
2428
/ember-cli-build.js
2529
/npm-debug.log*
2630
/testem.js
2731
/tests/
32+
/yarn-error.log
2833
/yarn.lock
2934
/yarn-error.log
3035
.gitkeep
3136

3237
# ember-try
3338
/.node_modules.ember-try/
3439
/bower.json.ember-try
40+
/npm-shrinkwrap.json.ember-try
3541
/package.json.ember-try
42+
/package-lock.json.ember-try
43+
/yarn.lock.ember-try

0 commit comments

Comments
 (0)