Skip to content

Commit

Permalink
Merge pull request #1787 from NullVoxPopuli/ember-source-5-10
Browse files Browse the repository at this point in the history
Upgrade ember-source to 5.10
  • Loading branch information
NullVoxPopuli authored Aug 7, 2024
2 parents e5a9267 + 95f138b commit ba4b8b0
Show file tree
Hide file tree
Showing 13 changed files with 3,132 additions and 496 deletions.
5 changes: 1 addition & 4 deletions apps/repl/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ module.exports = function (environment) {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
},
EXTEND_PROTOTYPES: false,
},

APP: {
Expand Down
10 changes: 5 additions & 5 deletions apps/repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"@codemirror/view": "6.28.6",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^3.2.1",
"@embroider/compat": "3.5.5",
"@ember/test-helpers": "^3.3.1",
"@embroider/compat": "3.6.0",
"@embroider/core": "3.4.14",
"@embroider/webpack": "4.0.4",
"@fortawesome/ember-fontawesome": "^2.0.0",
Expand Down Expand Up @@ -75,7 +75,7 @@
"common-tags": "^1.8.2",
"concurrently": "^8.2.2",
"ember-async-data": "1.0.3",
"ember-cli": "~5.9.0",
"ember-cli": "~5.10.0",
"ember-cli-babel": "^8.2.0",
"ember-cli-browserstack": "^3.0.0",
"ember-cli-htmlbars": "^6.3.0",
Expand All @@ -90,7 +90,7 @@
"ember-qunit": "^8.0.2",
"ember-resolver": "^12.0.1",
"ember-route-template": "^1.0.3",
"ember-source": ">= 5.9.0",
"ember-source": ">= 5.10.2",
"ember-template-imports": "^4.1.1",
"ember-template-lint": "^6.0.0",
"ember-template-lint-plugin-prettier": "^5.0.0",
Expand All @@ -113,7 +113,7 @@
"type-fest": "4.20.1",
"typescript": "^5.4.5",
"vfile": "^6.0.1",
"webpack": "5.92.0",
"webpack": ">= 5.92.0",
"yn": "^5.0.0"
},
"engines": {
Expand Down
10 changes: 5 additions & 5 deletions apps/tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
"@babel/runtime": "^7.24.5",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^3.2.1",
"@ember/test-helpers": "^3.3.1",
"@ember/test-waiters": "^3.1.0",
"@embroider/compat": "3.5.5",
"@embroider/compat": "3.6.0",
"@embroider/core": "3.4.14",
"@embroider/webpack": "4.0.4",
"@fortawesome/ember-fontawesome": "^2.0.0",
Expand All @@ -76,7 +76,7 @@
"concurrently": "^8.2.2",
"ember-auto-import": "^2.7.2",
"ember-cached-decorator-polyfill": "^1.0.2",
"ember-cli": "~5.9.0",
"ember-cli": "~5.10.0",
"ember-cli-babel": "^8.2.0",
"ember-cli-dependency-checker": "^3.3.2",
"ember-cli-htmlbars": "^6.3.0",
Expand All @@ -87,7 +87,7 @@
"ember-page-title": "^8.2.1",
"ember-qunit": "^8.0.2",
"ember-resolver": "^12.0.1",
"ember-source": ">= 5.9.0",
"ember-source": ">= 5.10.2",
"ember-template-imports": "^4.1.1",
"ember-template-lint": "^6.0.0",
"eslint": "^8.55.0",
Expand All @@ -105,7 +105,7 @@
"qunit-dom": "3.2.0",
"typescript": "^5.4.5",
"unplugin": "^1.5.1",
"webpack": "5.92.0"
"webpack": ">= 5.92.0"
},
"engines": {
"node": ">= v16",
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"ember-element-helper": "^0.8.5",
"ember-auto-import": "^2.7.2",
"ember-repl": "workspace:*",
"ember-source": ">= 5.9.0",
"webpack": "5.92.0"
"ember-source": ">= 5.10.2",
"webpack": ">= 5.92.0"
},
"allowedDeprecatedVersions": {
"source-map-url": "^0.3.0",
Expand All @@ -56,7 +56,6 @@
"ember-source"
],
"ignoreMissing": [
"webpack",
"rollup",
"rsvp"
]
Expand Down
10 changes: 5 additions & 5 deletions packages/app-support/limber-ui/addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"ember-modifier": "^4.1.0",
"ember-primitives": ">= 0.11.0",
"ember-resources": ">= 6.4.2",
"ember-source": ">= 5.9.0",
"webpack": "5.92.0"
"ember-source": ">= 5.10.2",
"webpack": ">= 5.92.0"
},
"dependencies": {
"@babel/runtime": "^7.24.5",
Expand All @@ -63,7 +63,7 @@
"@babel/plugin-transform-typescript": "^7.24.5",
"@babel/preset-typescript": "^7.23.3",
"@ember/test-waiters": "^3.1.0",
"@embroider/addon-dev": "4.3.1",
"@embroider/addon-dev": "5.0.0",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@glint/core": "1.4.0",
Expand All @@ -83,7 +83,7 @@
"ember-modifier": "^4.1.0",
"ember-primitives": "^0.21.0",
"ember-resources": "^7.0.1",
"ember-source": ">= 5.9.0",
"ember-source": ">= 5.10.2",
"ember-template-imports": "^4.1.1",
"ember-template-lint": "^6.0.0",
"eslint": "^8.55.0",
Expand All @@ -97,7 +97,7 @@
"rollup": "^4.17.2",
"rollup-plugin-copy": "^3.5.0",
"typescript": "^5.4.5",
"webpack": "5.92.0"
"webpack": ">= 5.92.0"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
8 changes: 4 additions & 4 deletions packages/app-support/limber-ui/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@babel/eslint-parser": "^7.24.5",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^3.2.1",
"@ember/test-helpers": "^3.3.1",
"@embroider/test-setup": "4.0.0",
"@fortawesome/ember-fontawesome": "^2.0.0",
"@fortawesome/fontawesome-svg-core": "^6.5.1",
Expand All @@ -49,7 +49,7 @@
"broccoli-asset-rev": "^3.0.0",
"concurrently": "^8.2.2",
"ember-auto-import": "^2.7.2",
"ember-cli": "~5.9.0",
"ember-cli": "~5.10.0",
"ember-cli-babel": "^8.2.0",
"ember-cli-dependency-checker": "^3.3.2",
"ember-cli-htmlbars": "^6.3.0",
Expand All @@ -62,7 +62,7 @@
"ember-page-title": "^8.2.1",
"ember-qunit": "^8.0.2",
"ember-resolver": "^12.0.1",
"ember-source": ">= 5.9.0",
"ember-source": ">= 5.10.2",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^6.0.0",
"ember-try": "^3.0.0",
Expand All @@ -79,7 +79,7 @@
"qunit": "^2.20.0",
"qunit-dom": "3.2.0",
"typescript": "^5.4.5",
"webpack": "5.92.0"
"webpack": ">= 5.92.0"
},
"engines": {
"node": ">= v16",
Expand Down
4 changes: 2 additions & 2 deletions packages/app-support/transpilation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"babel-loader": "^9.1.3",
"ember-source": ">= 5.9.0",
"ember-source": ">= 5.10.2",
"esbuild": "0.22.0",
"eslint": "^8.55.0",
"prettier": "^3.2.5",
"prettier-plugin-ember-template-tag": "2.0.2",
"typescript": "^5.4.5",
"webpack": "5.92.0",
"webpack": ">= 5.92.0",
"webpack-cli": "^5.1.4",
"webpack-node-externals": "^3.0.0"
},
Expand Down
11 changes: 6 additions & 5 deletions packages/ember-repl/addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@
"@babel/plugin-transform-typescript": "^7.24.5",
"@babel/preset-typescript": "^7.23.3",
"@babel/types": "^7.24.5",
"@ember/test-helpers": "^3.2.1",
"@ember/test-helpers": "^3.3.1",
"@ember/test-waiters": "^3.1.0",
"@embroider/addon-dev": "4.3.1",
"@embroider/addon-dev": "5.0.0",
"@glimmer/compiler": "^0.92.0",
"@glimmer/component": "^1.1.2",
"@glimmer/interfaces": "^0.92.0",
Expand Down Expand Up @@ -135,7 +135,7 @@
"@typescript-eslint/parser": "^7.9.0",
"concurrently": "^8.2.2",
"ember-resources": "^7.0.0",
"ember-source": ">= 5.9.0",
"ember-source": ">= 5.10.2",
"ember-template-imports": "^4.1.1",
"ember-template-lint": "^6.0.0",
"eslint": "^8.55.0",
Expand All @@ -149,7 +149,7 @@
"rollup": "~4.18.0",
"rollup-plugin-copy": "^3.5.0",
"typescript": "^5.4.5",
"webpack": "5.92.0"
"webpack": ">= 5.92.0"
},
"volta": {
"extends": "../../../package.json"
Expand All @@ -161,13 +161,14 @@
"version": 2,
"type": "addon",
"main": "addon-main.cjs",
"externals": ["ember-template-compiler"],
"app-js": {}
},
"peerDependencies": {
"@glimmer/compiler": ">= 0.86.0",
"@glimmer/syntax": ">= 0.86.0",
"@glint/template": ">= 1.3.0",
"webpack": "5.92.0"
"webpack": ">= 5.92.0"
},
"peerDependenciesMeta": {
"@glint/template": {
Expand Down
5 changes: 1 addition & 4 deletions packages/ember-repl/addon/src/compile/formats/gjs/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { importSync } from '@embroider/macros';

import babelPluginEmberTemplateCompilation from 'babel-plugin-ember-template-compilation';
import * as compiler from 'ember-template-compiler';

import { nameFor } from '../../utils.ts';
import { evalSnippet } from './eval.ts';
Expand Down Expand Up @@ -68,8 +67,6 @@ async function transpile({ code: input, name }: Info) {

import type { Babel } from './babel.ts';

const compiler = importSync('ember-source/dist/ember-template-compiler.js');

let processor: any;
let fetchingPromise: Promise<any>;

Expand Down
10 changes: 4 additions & 6 deletions packages/ember-repl/addon/src/compile/formats/hbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@
// import { precompileJSON } from '@glimmer/compiler';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// These things are pre-bundled in the old system.
// ember-template-compiler defines them in AMD/requirejs
import { precompileJSON } from '@glimmer/compiler';
import { getTemplateLocals } from '@glimmer/syntax';
import { setComponentTemplate } from '@ember/component';
import templateOnlyComponent from '@ember/component/template-only';
import { array, concat, fn, get, hash } from '@ember/helper';
import { on } from '@ember/modifier';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { createTemplateFactory } from '@ember/template-factory';
import { importSync } from '@embroider/macros';

import { nameFor } from '../utils.ts';

import type { CompileResult } from '../types.ts';
import type { ComponentLike } from '@glint/template';

// These things are pre-bundled in the old system.
// ember-template-compiler defines them in AMD/requirejs
const { precompileJSON } = importSync('@glimmer/compiler') as any;
const { getTemplateLocals } = importSync('@glimmer/syntax') as any;

/**
* compile a template with an empty scope
* to use components, helpers, etc, you will need to compile with JS
Expand Down
5 changes: 0 additions & 5 deletions packages/ember-repl/test-app/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ module.exports = function (defaults) {
},
});

// Adds:
// - ember-template-compiler
// - @glimmer/syntax
app.import('vendor/ember/ember-template-compiler.js');

const { maybeEmbroider } = require('@embroider/test-setup');

return maybeEmbroider(app, {
Expand Down
10 changes: 5 additions & 5 deletions packages/ember-repl/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"@babel/plugin-proposal-decorators": "^7.23.9",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^3.2.1",
"@ember/test-helpers": "^3.3.1",
"@ember/test-waiters": "^3.1.0",
"@embroider/broccoli-side-watch": "0.0.2-unstable.ba9fd29",
"@embroider/compat": "3.5.5",
"@embroider/compat": "3.6.0",
"@embroider/core": "3.4.14",
"@embroider/test-setup": "4.0.0",
"@embroider/webpack": "4.0.4",
Expand All @@ -60,7 +60,7 @@
"@typescript-eslint/parser": "^7.9.0",
"concurrently": "^8.2.2",
"ember-auto-import": "^2.7.2",
"ember-cli": "~5.9.0",
"ember-cli": "~5.10.0",
"ember-cli-app-version": "^7.0.0",
"ember-cli-babel": "^8.2.0",
"ember-cli-dependency-checker": "^3.3.2",
Expand All @@ -71,7 +71,7 @@
"ember-page-title": "^8.2.1",
"ember-qunit": "^8.0.2",
"ember-resolver": "^12.0.1",
"ember-source": ">= 5.9.0",
"ember-source": ">= 5.10.2",
"ember-source-channel-url": "^3.0.0",
"ember-template-imports": "^4.1.1",
"ember-template-lint": "^6.0.0",
Expand All @@ -90,7 +90,7 @@
"qunit-dom": "3.2.0",
"typescript": "^5.4.5",
"unified": "^10.1.2",
"webpack": "5.92.0"
"webpack": ">= 5.92.0"
},
"engines": {
"node": ">= v16",
Expand Down
Loading

0 comments on commit ba4b8b0

Please sign in to comment.