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

Ember 4 Upgrade #515

Merged
merged 5 commits into from
Apr 3, 2023
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
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": false
}
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
# 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

# snippets
/tests/dummy/snippets/
Expand Down
8 changes: 3 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module.exports = {
],
env: {
browser: true,
es6: true,
},
rules: {
'require-yield': 0,
Expand Down Expand Up @@ -66,8 +65,7 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
},
{
files: ['addon/index.d.ts', 'tests/types/**/*.ts'],
Expand All @@ -89,8 +87,8 @@ module.exports = {
},
},
{
// Test files:
files: ['tests/**/*-test.js'],
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
env: {
embertest: true,
Expand Down
30 changes: 13 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Set up Volta
uses: volta-cli/action@v1
uses: volta-cli/action@v4

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
Expand Down Expand Up @@ -62,20 +62,20 @@ jobs:
browser: [chrome, firefox]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Set up Volta
uses: volta-cli/action@v1
uses: volta-cli/action@v4

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
Expand Down Expand Up @@ -106,20 +106,20 @@ jobs:
browser: [chrome, firefox]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Set up Volta
uses: volta-cli/action@v1
uses: volta-cli/action@v4

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
Expand Down Expand Up @@ -150,12 +150,8 @@ jobs:
fail-fast: false
matrix:
ember-try-scenario:
- 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-release
- ember-default
- typescript-3.9
Expand All @@ -169,20 +165,20 @@ jobs:
allow-failure: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Set up Volta
uses: volta-cli/action@v1
uses: volta-cli/action@v4

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
# 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/

.DS_Store
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
Expand All @@ -34,4 +33,7 @@
# 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
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
/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
9 changes: 8 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
'use strict';

module.exports = {
singleQuote: true,
overrides: [
{
files: '*.{js,ts}',
options: {
singleQuote: true,
},
},
],
};
4 changes: 4 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

module.exports = {
extends: 'recommended',
rules: {
'no-whitespace-for-layout': false,
'require-input-label': false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turned off these two new rules because they had a couple violations that didn't make sense to fix:

  1. A test rendered an input without a label
  2. 2 of the docs templates threw "extra whitespace" errors but it seemed like a bug. I couldn't fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only 3 violations exist between the two of them, so they could be reenabled pretty easily if someone wants to attempt a fix.

},
};
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This project uses `yarn` as a package manager. If you're adding a new dependency

* `ember build`

For more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).
For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).

### Releasing new versions / publishing to NPM

Expand Down
5 changes: 0 additions & 5 deletions config/environment.js

This file was deleted.

2 changes: 1 addition & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { maybeEmbroider } = require('@embroider/test-setup');
const urls = require('./lib/prember-urls');

module.exports = function (defaults) {
let app = new EmberAddon(defaults, {
const app = new EmberAddon(defaults, {
minifyJS: {
enabled: false,
},
Expand Down
71 changes: 37 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@
"scripts": {
"build": "ember build --environment=production",
"docs:build": "node_modules/.bin/jsdoc -c .jsdoc --verbose",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"lint:ts": "tsc --noEmit",
"start": "ember serve",
"test": "npm-run-all lint test:*",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
"peerDependencies": {
"ember-source": "^3.28.0 || ^4.0.0"
},
"engines": {
"node": "10.* || 12.* || 14.* || >= 16"
"node": "10.* || 12.* || 14.* || 16.* || >= 18"
},
"types": "./addon/index.d.ts",
"devDependencies": {
Expand All @@ -29,11 +32,12 @@
"@babel/plugin-syntax-decorators": "^7.12.13",
"@babel/preset-env": "^7.18.2",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.6.0",
"@ember/string": "^3.0.1",
"@ember/test-helpers": "^2.9.3",
"@ember/test-waiters": "^3.0.0",
"@embroider/macros": "^0.48.1",
"@embroider/test-setup": "^1.0.0",
"@glimmer/component": "^1.0.4",
"@embroider/test-setup": "^2.1.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.0.4",
"@types/express-serve-static-core": "^4.17.33",
"@types/node": "^18.11.19",
Expand All @@ -43,50 +47,49 @@
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"broccoli-clean-css": "^1.1.0",
"concurrently": "^7.6.0",
"documentation": "^3.0.4",
"ember-auto-import": "^2.2.4",
"ember-cli": "~4.1.1",
"ember-auto-import": "^2.6.1",
"ember-cli": "~4.11.0",
"ember-cli-app-version": "^5.0.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-fastboot": "^3.3.0",
"ember-cli-github-pages": "^0.2.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sass": "^10.0.1",
"ember-cli-terser": "^4.0.2",
"ember-code-snippet": "^2.4.0",
"ember-concurrency-ts": "^0.3.1",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-fn-helper-polyfill": "^1.0.2",
"ember-load-initializers": "^2.1.2",
"ember-modifier": "^2.1.2",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.2",
"ember-source": "~4.10.0",
"ember-modifier": "^3.2.7",
"ember-page-title": "^7.0.0",
"ember-qunit": "^6.2.0",
"ember-resolver": "^10.0.0",
"ember-sinon-qunit": "^7.1.4",
"ember-source": "~4.11.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^3.6.0",
"ember-try": "^1.4.0",
"ember-template-lint": "^5.6.0",
"ember-try": "^2.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-qunit": "^6.2.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-ember": "^11.4.7",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-qunit": "^7.3.4",
"expect-type": "^0.15.0",
"jsdoc": "^3.6.6",
"jsdom": "^16.7.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prember": "https://github.com/ef4/prember.git#b87f23575c97f6f8f8fae70a7e54827366bd9ba7",
"prettier": "^2.3.2",
"qunit": "^2.16.0",
"qunit-dom": "^1.6.0",
"prettier": "^2.8.4",
"qunit": "^2.19.4",
"qunit-dom": "^2.0.0",
"sass": "^1.22.12",
"sinon": "^11.0.0",
"sinon": "^15.0.2",
"testem": "^3.4.2",
"typescript": "~4.9.5",
"webpack": "^5.65.0"
"webpack": "^5.75.0"
},
"keywords": [
"ember-addon",
Expand All @@ -106,10 +109,10 @@
"dependencies": {
"@babel/helper-plugin-utils": "^7.12.13",
"@babel/types": "^7.12.13",
"@glimmer/tracking": "^1.0.4",
"@glimmer/tracking": "^1.1.2",
"ember-cli-babel": "^7.26.11",
"ember-cli-babel-plugin-helpers": "^1.1.1",
"ember-cli-htmlbars": "^5.7.1",
"ember-cli-htmlbars": "^6.2.0",
"ember-compatibility-helpers": "^1.2.0",
"ember-destroyable-polyfill": "^2.0.2"
},
Expand All @@ -128,7 +131,7 @@
}
},
"volta": {
"node": "16.17.0",
"yarn": "1.22.17"
"node": "16.19.0",
"yarn": "1.22.19"
}
}
Loading