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

Update to glimmer-scoped-css 0.7.0 #1721

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"overrides": {
"@types/eslint": "8.4.1",
"@embroider/util": "1.13.1",
"@embroider/util": "1.13.2",
"@glimmer/tracking>@glimmer/validator": "0.84.3",
"jsesc": "^3.0.0",
"ember-modifier": "^4.1.0",
Expand Down Expand Up @@ -63,7 +63,7 @@
"ember-cli-htmlbars": "^6.3.0",
"ember-resources": "^6.5.1",
"ember-source": "~5.4.0",
"ember-template-imports": "^4.1.1",
"ember-template-imports": "^4.1.3",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.4.0",
"eslint-plugin-import": "^2.26.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/boxel-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"dependencies": {
"@ember/test-waiters": "^3.0.2",
"@embroider/addon-shim": "^1.8.9",
"@embroider/addon-shim": "^1.9.0",
"@glint/template": "1.3.0",
"typescript": "~5.1.6"
},
Expand All @@ -44,19 +44,19 @@
"@babel/plugin-transform-class-properties": "^7.22.5",
"@babel/plugin-transform-class-static-block": "^7.22.11",
"@babel/plugin-transform-typescript": "^7.22.15",
"@babel/runtime": "^7.22.11",
"@babel/runtime": "^7.24.4",
"@lucide/lab": "^0.1.2",
"@tabler/icons": "^3.19.0",
"@embroider/addon-dev": "^5.0.0",
"@embroider/macros": "^1.16.5",
"@embroider/addon-dev": "^7.0.0",
"@embroider/macros": "^1.16.9",
"@rollup/plugin-babel": "^6.0.4",
"@tsconfig/ember": "3.0.1",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"babel-plugin-ember-template-compilation": "^2.3.0",
"concurrently": "^8.0.1",
"ember-source": "~5.4.0",
"ember-template-imports": "^4.1.1",
"ember-template-imports": "^4.1.3",
"ember-template-lint": "^5.11.2",
"ember-template-lint-plugin-prettier": "^5.0.0",
"eslint": "^8.56.0",
Expand Down
22 changes: 11 additions & 11 deletions packages/boxel-icons/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,6 @@ export default {
// package names.
addon.dependencies(),

// This babel config should *not* apply presets or compile away ES modules.
// It exists only to provide development niceties for you, like automatic
// template colocation.
//
// By default, this will load the actual babel config from the file
// babel.config.json.
babel({
babelHelpers: 'bundled',
extensions: ['.js', '.gjs', '.ts', '.gts'],
}),

// Ensure that standalone .hbs files are properly integrated as Javascript.
addon.hbs(),

Expand All @@ -54,6 +43,17 @@ export default {
{ src: '../LICENSE.md', dest: '.' },
],
}),

// This babel config should *not* apply presets or compile away ES modules.
// It exists only to provide development niceties for you, like automatic
// template colocation.
//
// By default, this will load the actual babel config from the file
// babel.config.json.
babel({
babelHelpers: 'bundled',
extensions: ['.js', '.gjs', '.ts', '.gts'],
}),
],

onLog(level, log, handler) {
Expand Down
14 changes: 7 additions & 7 deletions packages/boxel-motion/addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"dependencies": {
"@ember/string": "^3.1.1",
"@embroider/addon-shim": "^1.8.9",
"@embroider/addon-shim": "^1.9.0",
"@glimmer/component": "^1.1.2",
"@glint/template": "1.3.0",
"ember-auto-import": "^2.7.2",
Expand All @@ -56,22 +56,22 @@
"@babel/plugin-transform-class-properties": "^7.22.5",
"@babel/plugin-transform-class-static-block": "^7.22.11",
"@babel/plugin-transform-typescript": "^7.22.15",
"@babel/runtime": "^7.22.11",
"@embroider/addon-dev": "^5.0.0",
"@embroider/macros": "^1.16.5",
"@babel/runtime": "^7.24.4",
"@embroider/addon-dev": "^7.0.0",
"@embroider/macros": "^1.16.9",
"@rollup/plugin-babel": "^6.0.4",
"@tsconfig/ember": "3.0.1",
"@glint/core": "1.3.0",
"@glint/environment-ember-template-imports": "1.3.0",
"@types/htmlbars-inline-precompile": "^3.0.3",
"@types/qunit": "^2.11.3",
"@types/qunit": "^2.19.10",
"@types/rsvp": "^4.0.9",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"babel-plugin-ember-template-compilation": "^2.2.1",
"babel-plugin-ember-template-compilation": "^2.3.0",
"concurrently": "^8.0.1",
"ember-source": "~5.4.0",
"ember-template-imports": "^4.1.1",
"ember-template-imports": "^4.1.3",
"ember-template-lint": "^5.11.2",
"ember-template-lint-plugin-prettier": "^5.0.0",
"eslint": "^8.56.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/boxel-motion/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^3.2.0",
"@embroider/compat": "^3.5.5",
"@embroider/core": "^3.4.14",
"@embroider/macros": "^1.16.5",
"@embroider/compat": "^3.6.5",
"@embroider/core": "^3.4.19",
"@embroider/macros": "^1.16.9",
"@embroider/test-setup": "^4.0.0",
"@embroider/webpack": "^4.0.4",
"@embroider/webpack": "^4.0.8",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@glint/core": "1.3.0",
Expand Down Expand Up @@ -78,7 +78,7 @@
"ember-resources": "^6.5.1",
"ember-source": "^5.4.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-imports": "^4.1.1",
"ember-template-imports": "^4.1.3",
"ember-template-lint": "^5.11.2",
"ember-try": "^2.0.0",
"eslint": "^8.52.0",
Expand All @@ -87,7 +87,7 @@
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-qunit": "^8.0.1",
"glimmer-scoped-css": "^0.6.0",
"glimmer-scoped-css": "^0.7.0",
"loader.js": "^4.7.0",
"normalize.css": "8.0.1",
"prettier": "^3.0.3",
Expand Down
4 changes: 4 additions & 0 deletions packages/boxel-ui/addon/babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"transforms": ["glimmer-scoped-css/ast-transform"]
}
],
[
"module:decorator-transforms",
{ "runtime": { "import": "decorator-transforms/runtime" } }
],
["@babel/plugin-proposal-decorators", { "version": "legacy" }],
"@babel/plugin-transform-class-properties"
]
Expand Down
14 changes: 7 additions & 7 deletions packages/boxel-ui/addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@cardstack/boxel-icons": "workspace:*",
"@ember/string": "^3.1.1",
"@ember/test-waiters": "^3.0.2",
"@embroider/addon-shim": "^1.8.9",
"@embroider/addon-shim": "^1.9.0",
"@floating-ui/dom": "^1.6.3",
"@glint/template": "1.3.0",
"awesome-phonenumber": "^7.2.0",
Expand Down Expand Up @@ -72,27 +72,27 @@
"@babel/plugin-transform-class-properties": "^7.22.5",
"@babel/plugin-transform-class-static-block": "^7.22.11",
"@babel/plugin-transform-typescript": "^7.22.15",
"@babel/runtime": "^7.22.11",
"@embroider/addon-dev": "^5.0.0",
"@embroider/macros": "^1.16.5",
"@babel/runtime": "^7.24.4",
"@embroider/addon-dev": "7.1.2-unstable.a4178fb",
"@embroider/macros": "^1.16.9",
"@rollup/plugin-babel": "^6.0.4",
"@tsconfig/ember": "3.0.1",
"@types/lodash": "^4.14.182",
"@types/pluralize": "^0.0.30",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"babel-plugin-ember-template-compilation": "^2.2.1",
"babel-plugin-ember-template-compilation": "^2.3.0",
"concurrently": "^8.0.1",
"ember-concurrency": "^4.0.1",
"ember-template-imports": "^4.1.1",
"ember-template-imports": "^4.1.3",
"ember-template-lint": "^5.11.2",
"ember-template-lint-plugin-prettier": "^5.0.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-ember": "^11.4.2",
"eslint-plugin-n": "^15.6.0",
"eslint-plugin-prettier": "^5.0.0",
"glimmer-scoped-css": "^0.6.0",
"glimmer-scoped-css": "^0.7.0",
"prettier": "^2.8.7",
"prettier-plugin-ember-template-tag": "^1.1.0",
"rollup": "^4.18.1",
Expand Down
42 changes: 26 additions & 16 deletions packages/boxel-ui/addon/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export default {
output: addon.output(),

plugins: [
scopedCSS('src'),

// These are the modules that users should be able to import from your
// addon. Anything not listed here may get optimized away.
addon.publicEntrypoints([
Expand All @@ -34,38 +36,46 @@ export default {
// package names.
addon.dependencies(),

// This babel config should *not* apply presets or compile away ES modules.
// It exists only to provide development niceties for you, like automatic
// template colocation.
//
// By default, this will load the actual babel config from the file
// babel.config.json.
babel({
babelHelpers: 'bundled',
extensions: ['.js', '.gjs', '.ts', '.gts'],
}),

// Ensure that standalone .hbs files are properly integrated as Javascript.
addon.hbs(),

// Ensure that .gjs files are properly integrated as Javascript
addon.gjs(),

// addons are allowed to contain imports of .css files, which we want rollup
// to leave alone and keep in the published output.
addon.keepAssets(['styles/*', '**/*.webp']),
// css is importable for side-effect
addon.keepAssets(['**/*.css']),

// these asset types are imported for their URLs
addon.keepAssets(
['**/*.otf', '**/*.png', '**/*.webp', '**/*.woff2'],
'default',
),

// Remove leftover build artifacts when starting a new build.
addon.clean({ runOnce: true }),

// Copy Readme and License into published package
// Copy files into published package
copy({
targets: [
{ src: '../README.md', dest: '.' },
{ src: '../LICENSE.md', dest: '.' },
{ src: './src/styles/*.{css,woff2,otf}', dest: './dist/styles' },
],
// this makes it late enough that the `clean()` hook above doesn't remove
// our copied files
hook: 'generateBundle',
}),

// This babel config should *not* apply presets or compile away ES modules.
// It exists only to provide development niceties for you, like automatic
// template colocation.
//
// By default, this will load the actual babel config from the file
// babel.config.json.
babel({
babelHelpers: 'bundled',
extensions: ['.js', '.gjs', '.ts', '.gts'],
}),
scopedCSS('src'),
],

onLog(level, log, handler) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { LoadingIndicator } from '@cardstack/boxel-ui/components';
import { fn, hash } from '@ember/helper';
import { on } from '@ember/modifier';
import { action } from '@ember/object';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';

import { and, eq } from '../../helpers/truth-helpers.ts';
import LoadingIndicator from '../loading-indicator/index.gts';

const isFastBoot = typeof (globalThis as any).FastBoot !== 'undefined';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cssVar } from '@cardstack/boxel-ui/helpers';
import { fn } from '@ember/helper';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
Expand All @@ -9,6 +8,7 @@ import {
} from 'ember-freestyle/decorators/css-variable';
import { get } from 'lodash';

import cssVar from '../../helpers/css-var.ts';
import Pill from '../pill/index.gts';
import DndKanbanBoard, { DndColumn } from './index.gts';

Expand Down
4 changes: 2 additions & 2 deletions packages/boxel-ui/addon/src/components/input/usage.gts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fn } from '@ember/helper';
import { array, fn } from '@ember/helper';
import { on } from '@ember/modifier';
import { action } from '@ember/object';
import Component from '@glimmer/component';
Expand Down Expand Up @@ -171,7 +171,7 @@ export default class InputUsage extends Component {
@name='variant'
@description='Optional larger size'
@onInput={{fn (mut this.variant)}}
@options={{Array 'default' 'large'}}
@options={{array 'default' 'large'}}
@value={{this.variant}}
@defaultValue={{this.variant}}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DayComponent from 'ember-power-calendar/components/days';
import NavComponent from 'ember-power-calendar/components/nav';
import type DayComponent from 'ember-power-calendar/components/days';
import type NavComponent from 'ember-power-calendar/components/nav';

declare module 'ember-power-calendar/components/power-calendar-range' {
interface PowerCalendarRangeDefaultBlock {
Expand Down
12 changes: 6 additions & 6 deletions packages/boxel-ui/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^3.2.0",
"@embroider/compat": "^3.5.5",
"@embroider/core": "^3.4.14",
"@embroider/macros": "^1.16.5",
"@embroider/compat": "^3.6.5",
"@embroider/core": "^3.4.19",
"@embroider/macros": "^1.16.9",
"@embroider/test-setup": "^4.0.0",
"@embroider/webpack": "^4.0.4",
"@embroider/webpack": "^4.0.8",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@glint/core": "1.3.0",
"@glint/environment-ember-template-imports": "1.3.0",
"@glint/template": "1.3.0",
"@types/htmlbars-inline-precompile": "^3.0.3",
"@types/qunit": "^2.11.3",
"@types/qunit": "^2.19.10",
"@types/rsvp": "^4.0.9",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
Expand Down Expand Up @@ -79,7 +79,7 @@
"ember-resources": "^6.5.1",
"ember-source": "^5.4.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-imports": "^4.1.1",
"ember-template-imports": "^4.1.3",
"ember-template-lint": "^5.11.2",
"ember-try": "^2.0.0",
"eslint": "^8.52.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/host/app/lib/externals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as emberModifier from '@ember/modifier';
import * as emberObject from '@ember/object';
import * as emberObjectInternals from '@ember/object/internals';
import * as emberTemplate from '@ember/template';
import * as emberTemplateCompilation from '@ember/template-compilation';
import * as emberTemplateFactory from '@ember/template-factory';
import * as glimmerComponent from '@glimmer/component';
import * as glimmerTracking from '@glimmer/tracking';
Expand Down Expand Up @@ -50,6 +51,10 @@ export function shimExternals(virtualNetwork: VirtualNetwork) {
emberComponentTemplateOnly,
);
virtualNetwork.shimModule('ember-css-url', cssUrl);
virtualNetwork.shimModule(
'@ember/template-compilation',
emberTemplateCompilation,
);
virtualNetwork.shimModule('@ember/template-factory', emberTemplateFactory);
virtualNetwork.shimModule('@ember/template', emberTemplate);
virtualNetwork.shimModule('@glimmer/tracking', glimmerTracking);
Expand Down
Loading
Loading