Skip to content

Commit

Permalink
Update to Ember 5.4 (#1118)
Browse files Browse the repository at this point in the history
  • Loading branch information
backspace authored Apr 3, 2024
1 parent 01ec57b commit 96473c4
Show file tree
Hide file tree
Showing 78 changed files with 1,997 additions and 1,580 deletions.
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
"ignore_dirs": ["dist"]
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"overrides": {
"@types/eslint": "8.4.1",
"@embroider/util": "1.12.0",
"@glimmer/tracking>@glimmer/validator": "0.84.3",
"jsesc": "^3.0.0",
"ember-modifier": "^4.1.0",
"prettier": "github:cardstack/prettier#glimmer-style-tag-in-template-support"
Expand All @@ -45,15 +46,15 @@
"@actions/github": "^4.0.0",
"@babel/core": "^7.24.3",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.0.4",
"@glimmer/tracking": "^1.1.2",
"@glint/core": "1.3.0",
"@glint/environment-ember-loose": "1.3.0",
"@glint/environment-ember-template-imports": "1.3.0",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"ember-cli-htmlbars": "^6.3.0",
"ember-resources": "^6.3.1",
"ember-source": "~4.12.0",
"ember-source": "~5.4.0",
"ember-template-imports": "^3.0.1",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.4.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/base/cards-grid.gts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { action } from '@ember/object';
import type Owner from '@ember/owner';
import { on } from '@ember/modifier';
import { restartableTask } from 'ember-concurrency';
import {
Expand Down Expand Up @@ -176,7 +177,7 @@ class Isolated extends Component<typeof CardsGrid> {
isLoading: boolean;
};

constructor(owner: unknown, args: any) {
constructor(owner: Owner, args: any) {
super(owner, args);
this.liveQuery = getLiveCards(
{
Expand Down
2 changes: 1 addition & 1 deletion packages/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"tracked-built-ins": "^2.0.1"
},
"peerDependencies": {
"ember-source": "~4.12.0"
"ember-source": "~5.4.0"
},
"scripts": {}
}
1 change: 0 additions & 1 deletion packages/base/room.gts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
getCard,
type LooseSingleCardDocument,
} from '@cardstack/runtime-common';
//@ts-expect-error cached type not available yet
import { cached } from '@glimmer/tracking';
import { initSharedState } from './shared-state';
import BooleanField from './boolean';
Expand Down
12 changes: 6 additions & 6 deletions packages/boxel-motion/addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"test": "tests"
},
"scripts": {
"build": "concurrently \"npm:build:*\" --names \"build:\"",
"build": "concurrently \"pnpm:build:*\" --names \"build:\"",
"build:js": "rollup --config",
"build:types": "glint --declaration",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\"",
"lint:glint": "glint",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand All @@ -27,7 +27,7 @@
"rebuild:icons": "node bin/rebuild-icons.mjs",
"rebuild:usage": "node bin/rebuild-usage.mjs",
"prepack": "rollup --config",
"start": "concurrently \"npm:start:*\" --names \"start:\"",
"start": "concurrently \"pnpm:start:*\" --names \"start:\"",
"start:js": "rollup --config --watch --no-watch.clearScreen",
"start:types": "glint --declaration --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
Expand Down Expand Up @@ -70,7 +70,7 @@
"@typescript-eslint/parser": "^5.48.1",
"babel-plugin-ember-template-compilation": "^2.2.1",
"concurrently": "^8.0.1",
"ember-source": "~4.12.0",
"ember-source": "~5.4.0",
"ember-template-imports": "^3.1.2",
"ember-template-lint": "^5.11.2",
"ember-template-lint-plugin-prettier": "^5.0.0",
Expand All @@ -89,7 +89,7 @@
},
"peerDependencies": {
"@glint/environment-ember-loose": "1.3.0",
"ember-source": "^4.0.0",
"ember-source": "^5.4.0",
"typescript": "^5.1.6"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/boxel-motion/addon/src/utils/scheduling.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
/* eslint-disable @typescript-eslint/no-explicit-any */
import { cancel, schedule } from '@ember/runloop';
import { EmberRunTimer } from '@ember/runloop/types';
import { Timer } from '@ember/runloop';

const cancellation: WeakMap<
Promise<any>,
Expand All @@ -16,7 +16,7 @@ export function registerCancellation(
}

export function afterRender() {
let ticket: EmberRunTimer;
let ticket: Timer;
let promise = new Promise((resolve) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Expand Down
8 changes: 0 additions & 8 deletions packages/boxel-motion/test-app/.ember-cli
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
/**
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,

/**
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.
Expand Down
9 changes: 0 additions & 9 deletions packages/boxel-motion/test-app/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

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

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
15 changes: 6 additions & 9 deletions packages/boxel-motion/test-app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
# 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

/.idea/
# broccoli-debug
/DEBUG/
10 changes: 1 addition & 9 deletions packages/boxel-motion/test-app/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

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

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import Route from '@ember/routing/route';

interface Params {
id: string;
}

export default class MotionStudyDetails extends Route {
model(params: Params): string {
model(params: Record<string, string>): string {
return params.id;
}
}
6 changes: 4 additions & 2 deletions packages/boxel-motion/test-app/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
"packages": [
{
"name": "ember-cli",
"version": "4.12.1",
"version": "5.4.1",
"blueprints": [
{
"name": "app",
"outputRepo": "https://github.com/ember-cli/ember-new-output",
"codemodsSource": "ember-app-codemods-manifest@1",
"isBaseBlueprint": true,
"options": ["--no-welcome"]
"options": [
"--no-welcome"
]
}
]
}
Expand Down
51 changes: 26 additions & 25 deletions packages/boxel-motion/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"pnpm: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:glint": "glint",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"pnpm:lint\" \"pnpm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test"
},
"devDependencies": {
"@babel/core": "^7.24.3",
"@babel/eslint-parser": "^7.23.10",
"@babel/plugin-proposal-decorators": "^7.21.0",
"@babel/plugin-proposal-decorators": "^7.23.2",
"@cardstack/boxel-motion": "workspace:*",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^2.9.3",
"@ember/test-helpers": "^3.2.0",
"@embroider/compat": "^3.2.2",
"@embroider/core": "^3.3.0",
"@embroider/macros": "^1.13.2",
Expand All @@ -49,19 +49,20 @@
"@typescript-eslint/eslint-plugin": "^5.48.1",
"@typescript-eslint/parser": "^5.48.1",
"broccoli-asset-rev": "^3.0.0",
"concurrently": "^8.0.1",
"ember-a11y-testing": "^5.2.1",
"concurrently": "^8.2.2",
"ember-a11y-testing": "^6.1.1",
"ember-auto-import": "^2.7.2",
"ember-cli": "^4.12.1",
"ember-cli": "^5.4.1",
"ember-cli-babel": "^8.2.0",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-clean-css": "^3.0.0",
"ember-cli-dependency-checker": "^3.3.2",
"ember-cli-deprecation-workflow": "mixonic/ember-cli-deprecation-workflow#0b4cbe7",
"ember-cli-deploy": "^1.0.2",
"ember-cli-deploy-build": "^2.0.0",
"ember-cli-deploy-cloudfront": "^5.0.0",
"ember-cli-deploy-revision-data": "^2.0.0",
"ember-cli-deploy-s3": "^3.1.0",
"ember-cli-deploy-smart-compress": "^2.0.0",
"ember-cli-deprecation-workflow": "mixonic/ember-cli-deprecation-workflow#0b4cbe7",
"ember-cli-htmlbars": "^6.3.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
Expand All @@ -71,34 +72,34 @@
"ember-keyboard": "^8.2.0",
"ember-load-initializers": "^2.1.2",
"ember-modifier": "^4.1.0",
"ember-page-title": "^7.0.0",
"ember-qunit": "^6.2.0",
"ember-resolver": "^10.0.0",
"ember-page-title": "^8.0.0",
"ember-qunit": "^8.0.1",
"ember-resolver": "^11.0.1",
"ember-resources": "^6.3.1",
"ember-source": "^4.12.0",
"ember-source": "^5.4.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-imports": "^3.0.1",
"ember-template-lint": "^5.7.2",
"ember-template-lint": "^5.11.2",
"ember-try": "^2.0.0",
"eslint": "^8.37.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-ember": "^11.6.0",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-qunit": "^7.3.4",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-ember": "^11.11.1",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-qunit": "^8.0.1",
"glimmer-scoped-css": "^0.4.0",
"loader.js": "^4.7.0",
"normalize.css": "8.0.1",
"prettier": "^2.8.7",
"prettier": "^3.0.3",
"prettier-plugin-ember-template-tag": "^1.1.0",
"qunit": "^2.19.4",
"qunit": "^2.20.0",
"qunit-dom": "^2.0.0",
"tracked-built-ins": "^3.2.0",
"tracked-built-ins": "^3.3.0",
"typescript": "~5.1.6",
"webpack": "^5.89.0"
},
"engines": {
"node": "14.* || 16.* || >= 18"
"node": ">= 18"
},
"volta": {
"extends": "../../../package.json"
Expand Down
10 changes: 5 additions & 5 deletions packages/boxel-ui/addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"test": "tests"
},
"scripts": {
"build": "concurrently \"npm:build:*\" --names \"build:\"",
"build": "concurrently \"pnpm:build:*\" --names \"build:\"",
"build:js": "rollup --config",
"build:types": "glint --declaration",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\"",
"lint:glint": "glint",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand All @@ -27,7 +27,7 @@
"rebuild:icons": "node bin/rebuild-icons.mjs",
"rebuild:usage": "node bin/rebuild-usage.mjs",
"prepack": "rollup --config",
"start": "concurrently \"npm:start:*\" --names \"start:\"",
"start": "concurrently \"pnpm:start:*\" --names \"start:\"",
"start:js": "rollup --config --watch --no-watch.clearScreen",
"start:types": "glint --declaration --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
Expand Down Expand Up @@ -95,7 +95,7 @@
},
"peerDependencies": {
"@glint/environment-ember-loose": "1.3.0",
"ember-source": "^4.0.0",
"ember-source": "^5.4.0",
"typescript": "^5.1.6"
},
"engines": {
Expand Down
Loading

0 comments on commit 96473c4

Please sign in to comment.