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

To ember 3 28 #150

Merged
merged 5 commits into from
Jun 9, 2021
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
4 changes: 2 additions & 2 deletions frontend/app/services/-compile/babel/cjs.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getTemplateLocals } from '@glimmer/syntax';
import { precompileTemplate } from '@ember/template-compilation';

import * as Babel from '@babel/standalone';
import HTMLBars, { preprocessEmbeddedTemplates } from 'babel-plugin-htmlbars-inline-precompile';
import { precompile as precompileTemplate } from 'ember-template-compiler';

import { evalSnippet } from './cjs-eval';

Expand Down Expand Up @@ -44,7 +44,7 @@ async function compileGJS({ code: input, name }: Info) {
{
precompile: precompileTemplate,
// this needs to be true until Ember 3.27+
ensureModuleApiPolyfill: true,
ensureModuleApiPolyfill: false,
modules: {
'ember-template-imports': {
export: 'hbs',
Expand Down
8 changes: 7 additions & 1 deletion frontend/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ module.exports = function (defaults) {

let app = new EmberApp(defaults, config);

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

const { Webpack } = require('@embroider/webpack');
Expand All @@ -65,7 +68,10 @@ module.exports = function (defaults) {
],
...(MAXIMUM_STATIC
? {
staticAddonTrees: true,
// Temporarily disabled until
// https://github.com/emberjs/ember.js/issues/19568
// is resolved
// staticAddonTrees: true,
staticAddonTestSupportTrees: true,
staticHelpers: true,
staticComponents: true,
Expand Down
8 changes: 3 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
"@embroider/webpack": "^0.41.0",
"@fortawesome/ember-fontawesome": "github:NullVoxPopuli/ember-fontawesome#support-3-20-and-3-24",
"@fortawesome/free-brands-svg-icons": "^5.15.3",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/free-regular-svg-icons": "^5.15.3",
"@glimmer/runtime": "^0.79.3",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@nullvoxpopuli/eslint-configs": "1.3.2",
"@tailwindcss/jit": "^0.1.18",
"@tailwindcss/typography": "^0.4.1",
Expand Down Expand Up @@ -83,7 +82,7 @@
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.7.1",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-postcss": "^7.0.1",
"ember-cli-postcss": "github:jeffjewiss/ember-cli-postcss#remove-library-register",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-cli-typescript": "^4.1.0",
Expand All @@ -94,7 +93,7 @@
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.2",
"ember-source": "3.26.1",
"ember-source": "3.28.0-beta.4",
"ember-template-lint": "^3.4.2",
"eslint": "^7.28.0",
"execa": "^5.1.1",
Expand Down Expand Up @@ -129,7 +128,6 @@
"@babel/standalone": "^7.14.4",
"@glimmer/compiler": "0.79.3",
"@glimmer/component": "^1.0.4",
"@glimmer/syntax": "^0.79.3",
"@glimmer/tracking": "^1.0.4",
"@nullvoxpopuli/horizon-theme": "*",
"@nullvoxpopuli/limber-codemirror": "*",
Expand Down
3 changes: 3 additions & 0 deletions frontend/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ type LazyTrackedArgs = {
named?: Record<string, unknown>;
}

// provided by vendor/ember/ember-template-compiler.js (somehow)
declare module 'ember-template-compiler';

declare module '@sentry/ember';
declare module 'babel-plugin-htmlbars-inline-precompile';
declare module '@babel/plugin-proposal-decorators';
Expand Down
5 changes: 5 additions & 0 deletions frontend/types/overrides.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ declare module '@ember/component' {
export function setComponentTemplate(factory: TemplateFactory, obj: object): object;
}


// provided by vendor/ember/ember-template-compiler.js (somehow)
declare module '@glimmer/syntax' {
export function getTemplateLocals(): unknown;
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"packages/*",
"tests"
],
"resolutions": {
"tracked-maps-and-sets": "github:NullVoxPopuli/tracked-maps-and-sets#resolve-global-ember-issue",
"tracked-built-ins": "github:pzuraq/tracked-built-ins#master"
},
"scripts": {
"predeploy": "yarn build && yarn workspace limber build",
"build": "npm-run-all --aggregate-output --parallel 'build:*'",
Expand All @@ -17,7 +21,7 @@
"start:prod": "MINIFY=false yarn start --environment=production",
"_": "_",
"__": "_ https://github.com/webpack/loader-utils/issues/179",
"postinstall": "rm -rf node_modules/@types/loader-utils"
"postinstall": "rm -rf node_modules/@types/loader-utils && ( cd node_modules/tracked-maps-and-sets && yarn && yarn build )"
},
"volta": {
"node": "14.17.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/transpilation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dependencies": {
"@babel/standalone": "^7.14.4",
"babel-plugin-htmlbars-inline-precompile": "^5.3.0",
"ember-source": "^3.26.1",
"ember-source": "3.28.0-beta.4",
"path-browserify": "^1.0.1"
},
"devDependencies": {
Expand Down
Loading