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

[DO NOT MERGE] Fork of Pixelik's PR to fix tests and security issues #753

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3df5e83
chore: supports Ember 5 by removing { assign} @ember/polyfill
Pixelik Nov 1, 2023
75e7565
breaking: drops Ember < 3.28 & upgrades to Ember 4.12
Pixelik Nov 6, 2023
85942f4
chore: runs yarn lint:fix
Pixelik Nov 6, 2023
3c61268
chore: replaces with assert.strictEqual
Pixelik Nov 6, 2023
21309d3
chore: sets typescript project: true
Pixelik Nov 6, 2023
1878aaf
breaking: drops Node < 16.13
Pixelik Nov 9, 2023
ad70a52
chore: removes unused css file
Pixelik Nov 10, 2023
6a97a33
chore: turns off .eslint rules
Pixelik Nov 10, 2023
72efcbf
chore: uses assert.expect in tests
Pixelik Nov 10, 2023
a010fe3
chore: updates to TS v5 to remove linter errors
Pixelik Nov 10, 2023
0fc511b
breaking: updates ember-source peerDependency
Pixelik Nov 10, 2023
34b5bc5
chore: runs yarn lint:fix
Pixelik Nov 10, 2023
79962ec
ci: updates tests & includes Node 16.14,18,20
Pixelik Nov 11, 2023
c6ebc58
chore: updates TS to fix ci errors
Pixelik Nov 13, 2023
9a0f479
fix security vulnerability in node-fetch
Gaurav0 Oct 31, 2024
f34a08e
fix critical security vulnerability in semver
Gaurav0 Oct 31, 2024
9a6b56f
fix critical security vulnerability in minimist
Gaurav0 Oct 31, 2024
fd80276
fix missing peerDependency @babel/core
Gaurav0 Oct 31, 2024
f038588
run npx browserslist@latest --update-db
Gaurav0 Oct 31, 2024
a999fc3
fix critical security vulnerability in @babel/traverse
Gaurav0 Oct 31, 2024
0e97413
update ember-cli-fastboot
Gaurav0 Nov 1, 2024
0970211
update broccoli-rollup
Gaurav0 Nov 1, 2024
c088e79
fix security vulnerability in lodash.template
Gaurav0 Nov 1, 2024
9c61aad
add tests for Ember 4.12, 5.x
Gaurav0 Nov 1, 2024
d7c17ea
update to fix bug in ember-cli-addon-tests
Gaurav0 Nov 4, 2024
faa3131
pin versions to fix node tests
Gaurav0 Nov 4, 2024
487e447
ajax feature was removed; remove from fixture
Gaurav0 Nov 4, 2024
2d9b45f
update dependencies to SeeClickFix repos
Gaurav0 Dec 17, 2024
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
8 changes: 7 additions & 1 deletion .ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
"disableAnalytics": false,

/**
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.
*/
"isTypeScriptProject": true
}
7 changes: 5 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
# misc
/coverage/
!.*
.*/
.eslintcache

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

test/fixtures
/package-lock.json.ember-try
/yarn.lock.ember-try
91 changes: 51 additions & 40 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
ecmaVersion: 'latest',
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
],
},
},
plugins: ['ember'],
extends: ['eslint:recommended', 'plugin:ember/recommended'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true
browser: true,
},
globals: {
fetch: 'off',
Headers: 'off',
Request: 'off',
Response: 'off',
AbortController: 'off'
require: true,
beforeEach: true,
it: true,
describe: true,
afterEach: true,
process: true,
module: true,
},
rules: {
'ember/no-new-mixins': 'off',
'ember/no-jquery': 'error',
'no-console': ['error', { allow: ['warn'] }]
'no-console': ['error', { allow: ['warn'] }],
'ember/no-classic-classes': 'off',
'ember/no-actions-hash': 'off',
},
overrides: [
// TypeScript files
Expand All @@ -30,45 +46,40 @@ module.exports = {
plugins: ['@typescript-eslint'],
rules: {
'no-undef': 'off',
'no-unused-var': 'off'
}
'no-unused-var': 'off',
},
},
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'test/**/*.js',
'tests/dummy/config/**/*.js'
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
],
excludedFiles: ['app/**', 'addon-test-support/**', 'addon/**', 'tests/dummy/app/**'],
parserOptions: {
sourceType: 'script'
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 tests
{
files: ['test/**/*.js'],
env: {
mocha: true
node: true,
},
extends: ['plugin:n/recommended'],
rules: {
'node/no-unpublished-require': 'off',
'node/no-extraneous-require': 'off'
}
}
]
'node/no-extraneous-require': 'off',
},
},
{
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
85 changes: 58 additions & 27 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,102 +11,133 @@ on:
tags:
- "*"

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: "Linting"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn lint:js
- run: yarn lint

ember-tests:
ember-default-tests:
needs: lint
name: "Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["12"]
node-version:
- 16.14
- 18
- 20

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn test

prefer-native-tests:
needs: ember-tests
prefer-native-ember-default-tests:
needs: ember-default-tests
name: "PREFER_NATIVE=true Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["12"]
node-version:
- 16.14
- 18
- 20

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile --non-interactive
- run: PREFER_NATIVE=true yarn test

native-promise-tests:
needs: ember-tests
native-promise-ember-default-tests:
needs: ember-default-tests
name: "NATIVE_PROMISE=true Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["12"]
node-version:
- 16.14
- 18
- 20

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --non-interactive
- run: NATIVE_PROMISE=true yarn test

node-tests:
needs: ember-tests
needs: ember-default-tests
name: "Node Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["12"]
node-version:
- 16.14
- 18
- 20

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn run test:node

try-scenarios:
ember-try-scenarios:
name: Tests - ${{ matrix.ember-try-scenario }}
timeout-minutes: 60
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allow-failure }}
needs: ember-tests
needs: ember-default-tests

strategy:
fail-fast: true
matrix:
ember-try-scenario:
- ember-lts-3.4
- ember-lts-3.8
- ember-lts-3.12
- ember-lts-3.16
- ember-lts-3.20
- ember-lts-3.24
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-lts-5.4
- ember-lts-5.8
- ember-lts-5.12
- ember-release
- ember-beta
allow-failure: [false]
include:
- ember-try-scenario: ember-beta
allow-failure: true
- ember-try-scenario: ember-canary
allow-failure: true
- ember-try-scenario: embroider-safe
allow-failure: true
- ember-try-scenario: embroider-optimized
allow-failure: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 12.x
node-version: 16.14
- name: install dependencies
run: yarn install
- name: test
Expand Down
13 changes: 10 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# misc
/.sass-cache
/.eslintcache
/connect.lock
/coverage/*
/libpeerconnection.log
Expand All @@ -19,6 +20,12 @@ yarn-error.log
testem.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.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/
10 changes: 9 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,30 @@
/.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
/npm-debug.log*
/testem.js
/tests/
/yarn-error.log
/yarn.lock
/yarn-error.log
.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
Loading