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

Updated dependencies and ember-try scenarios #408

Merged
merged 15 commits into from
Dec 2, 2024
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
13 changes: 1 addition & 12 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
# unconventional js
/blueprints/*/files/
/vendor/

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

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.*/
.eslintcache

# 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
/pnpm-lock.yaml.ember-try
27 changes: 14 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@

module.exports = {
root: true,
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2020,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
requireConfigFile: false,
babelOptions: {
plugins: [
[
'@babel/plugin-proposal-decorators',
{
decoratorsBeforeExport: true,
},
],
],
},
},
plugins: ['ember'],
Expand All @@ -19,30 +27,24 @@ module.exports = {
env: {
browser: true,
},
globals: {
globalThis: 'readonly',
},
rules: {
'no-setter-return': 'off',
'ember/classic-decorator-no-classic-methods': 'warn',
'ember/classic-decorator-hooks': 'warn',
'ember/no-actions-hash': 'warn',
'ember/no-classic-classes': 'warn',
'ember/no-classic-components': 'warn',
'ember/no-component-lifecycle-hooks': 'warn',
'ember/no-computed-properties-in-native-classes': 'warn',
'ember/no-get': 'warn',
'ember/no-observers': 'warn',
'ember/require-computed-macros': 'warn',
'ember/require-tagless-components': 'warn',
'ember/no-jquery': 'error',
},
overrides: [
// node files
{
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
Expand All @@ -58,8 +60,7 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
},
{
// test files
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
test:
name: "Tests"
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -46,11 +47,12 @@ jobs:
- name: Lint
run: pnpm lint
- name: Run Tests
run: pnpm test:ember
run: pnpm test

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
Expand All @@ -77,29 +79,25 @@ jobs:
shell: bash
run: pnpm store prune
- name: Run Tests
run: pnpm test:ember
run: pnpm test

try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: 'test'
timeout-minutes: 5

strategy:
fail-fast: false
matrix:
try-scenario:
- 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
- ember-canary
- embroider-safe
- embroider-optimized
# - embroider-optimized
Copy link
Collaborator Author

@ijlee2 ijlee2 Nov 27, 2024

Choose a reason for hiding this comment

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

I saw that ember-modal-dialog passes embroider-safe. It's unlikely that it'll ever pass embroider-optimized due to liquid-* packages.


steps:
- uses: actions/checkout@v4
Expand All @@ -126,4 +124,4 @@ jobs:
shell: bash
run: pnpm store prune
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
run: pnpm test:ember-compatibility ${{ matrix.try-scenario }} --- pnpm test
12 changes: 4 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

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

# dependencies
/bower_components/
/node_modules/

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

# 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
/pnpm-lock.yaml.ember-try

# broccoli-debug
/DEBUG/
12 changes: 4 additions & 8 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
Expand All @@ -18,23 +14,23 @@
/.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
/testem.js
/tests/
/tsconfig.declarations.json
/tsconfig.json
/yarn-error.log
/yarn.lock
/pnpm-lock.yaml
.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
Expand Down
14 changes: 1 addition & 13 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache
.lint-todo/
.*/

# 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
/pnpm-lock.yaml.ember-try
17 changes: 16 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
'use strict';

module.exports = {
singleQuote: true,
overrides: [
{
files: '*.hbs',
options: {
printWidth: 64,
singleQuote: false,
},
},
{
files: '*.{js,ts}',
options: {
printWidth: 80,
singleQuote: true,
},
},
],
};
13 changes: 10 additions & 3 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
'use strict';

module.exports = {
extends: 'recommended',
plugins: ['ember-template-lint-plugin-prettier'],
extends: ['recommended', 'ember-template-lint-plugin-prettier:recommended'],
rules: {
'no-action': false,
'no-curly-component-invocation': false,
'require-button-type': false,
},
overrides: [
{
files: ['tests/**/*-test.{js,ts}'],
rules: {
prettier: 'off',
},
},
],
};
6 changes: 3 additions & 3 deletions addon/components/basic-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class BasicDialog extends Component {
'attachmentClass',
'containerClass',
'containerClassNames.{[],join}',
'targetAttachmentClass'
'targetAttachmentClass',
)
get containerClassNamesString() {
let classNames =
Expand Down Expand Up @@ -72,7 +72,7 @@ export default class BasicDialog extends Component {
'targetAttachmentClass',
'variantWrapperClass',
'wrapperClass',
'wrapperClassNames.{[],join}'
'wrapperClassNames.{[],join}',
)
get wrapperClassNamesString() {
let classNames =
Expand Down Expand Up @@ -100,7 +100,7 @@ export default class BasicDialog extends Component {
// Convert tether-styled values like 'middle right' to 'right'
targetAttachment = targetAttachment.split(' ').slice(-1)[0];
return `ember-modal-dialog-target-attachment-${dasherize(
targetAttachment
targetAttachment,
)} emd-target-attachment-${dasherize(targetAttachment)}`;
}

Expand Down
2 changes: 1 addition & 1 deletion addon/components/liquid-tether-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class LiquidTetherDialog extends BasicDialog {
// Convert tether-styled values like 'middle right' to 'right'
targetAttachment = targetAttachment.split(' ').slice(-1)[0];
return `ember-modal-dialog-target-attachment-${dasherize(
targetAttachment
targetAttachment,
)} emd-target-attachment-${dasherize(targetAttachment)}`;
}

Expand Down
14 changes: 7 additions & 7 deletions addon/components/modal-dialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ export default class ModalDialog extends Component {
if (VALID_OVERLAY_POSITIONS.indexOf(overlayPosition) === -1) {
warn(
`overlayPosition value '${overlayPosition}' is not valid (valid values [${VALID_OVERLAY_POSITIONS.join(
', '
', ',
)}])`,
false,
{ id: 'ember-modal-dialog.validate-overlay-position' }
{ id: 'ember-modal-dialog.validate-overlay-position' },
);
}
}
Expand All @@ -128,10 +128,10 @@ export default class ModalDialog extends Component {
if (DEBUG && VALID_OVERLAY_POSITIONS.indexOf(result) === -1) {
warn(
`overlayPosition value '${result}' is not valid (valid values [${VALID_OVERLAY_POSITIONS.join(
', '
', ',
)}])`,
false,
{ id: 'ember-modal-dialog.validate-overlay-position' }
{ id: 'ember-modal-dialog.validate-overlay-position' },
);
}
return result;
Expand All @@ -140,7 +140,7 @@ export default class ModalDialog extends Component {
ensureEmberTetherPresent() {
if (!this.modalService.hasEmberTether) {
throw new Error(
'Please install ember-tether in order to pass a tetherTarget to modal-dialog'
'Please install ember-tether in order to pass a tetherTarget to modal-dialog',
);
}
}
Expand All @@ -154,7 +154,7 @@ export default class ModalDialog extends Component {

assert(
'onClose handler must be a function',
typeOf(onClose) === 'function'
typeOf(onClose) === 'function',
);

onClose();
Expand All @@ -172,7 +172,7 @@ export default class ModalDialog extends Component {

assert(
'onClickOverlay handler must be a function',
typeOf(onClickOverlay) === 'function'
typeOf(onClickOverlay) === 'function',
);

onClickOverlay();
Expand Down
Loading