Skip to content

Commit 66e8841

Browse files
committed
Fix some edge-cases with classic builds
1. Re-export all of the plugins from locations in `ember-template-compiler/lib/plugins` to support the AMD compat entrypoints. I prioritized avoiding changes to the `amd-compat-entrypoints` file over absolutely minimizing the amount of duplication in `ember-template-compiler`. The implementations themselves are still not duplicated, but if we create new files in `@ember/template-compiler`, this may have implications for `ember-template-compiler`. 2. Fix a problem where `export import` in the barrel file wasn't playing nice with some piece of updated infrastructure. 3. Rename some of the exposed exports to include `-internal` in their module name.
1 parent bf0a914 commit 66e8841

23 files changed

+149
-8
lines changed

package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,29 @@
292292
"@ember/runloop/index.js": "ember-source/@ember/runloop/index.js",
293293
"@ember/service/index.js": "ember-source/@ember/service/index.js",
294294
"@ember/template-compilation/index.js": "ember-source/@ember/template-compilation/index.js",
295+
"@ember/template-compiler/-internal-primitives.js": "ember-source/@ember/template-compiler/-internal-primitives.js",
296+
"@ember/template-compiler/index.js": "ember-source/@ember/template-compiler/index.js",
297+
"@ember/template-compiler/lib/-internal/primitives.js": "ember-source/@ember/template-compiler/lib/-internal/primitives.js",
298+
"@ember/template-compiler/lib/compile-options.js": "ember-source/@ember/template-compiler/lib/compile-options.js",
299+
"@ember/template-compiler/lib/dasherize-component-name.js": "ember-source/@ember/template-compiler/lib/dasherize-component-name.js",
300+
"@ember/template-compiler/lib/plugins/assert-against-attrs.js": "ember-source/@ember/template-compiler/lib/plugins/assert-against-attrs.js",
301+
"@ember/template-compiler/lib/plugins/assert-against-named-outlets.js": "ember-source/@ember/template-compiler/lib/plugins/assert-against-named-outlets.js",
302+
"@ember/template-compiler/lib/plugins/assert-input-helper-without-block.js": "ember-source/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.js",
303+
"@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.js": "ember-source/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.js",
304+
"@ember/template-compiler/lib/plugins/index.js": "ember-source/@ember/template-compiler/lib/plugins/index.js",
305+
"@ember/template-compiler/lib/plugins/transform-action-syntax.js": "ember-source/@ember/template-compiler/lib/plugins/transform-action-syntax.js",
306+
"@ember/template-compiler/lib/plugins/transform-each-in-into-each.js": "ember-source/@ember/template-compiler/lib/plugins/transform-each-in-into-each.js",
307+
"@ember/template-compiler/lib/plugins/transform-each-track-array.js": "ember-source/@ember/template-compiler/lib/plugins/transform-each-track-array.js",
308+
"@ember/template-compiler/lib/plugins/transform-in-element.js": "ember-source/@ember/template-compiler/lib/plugins/transform-in-element.js",
309+
"@ember/template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js": "ember-source/@ember/template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js",
310+
"@ember/template-compiler/lib/plugins/transform-resolutions.js": "ember-source/@ember/template-compiler/lib/plugins/transform-resolutions.js",
311+
"@ember/template-compiler/lib/plugins/transform-wrap-mount-and-outlet.js": "ember-source/@ember/template-compiler/lib/plugins/transform-wrap-mount-and-outlet.js",
312+
"@ember/template-compiler/lib/plugins/utils.js": "ember-source/@ember/template-compiler/lib/plugins/utils.js",
313+
"@ember/template-compiler/lib/public-api.js": "ember-source/@ember/template-compiler/lib/public-api.js",
314+
"@ember/template-compiler/lib/runtime.js": "ember-source/@ember/template-compiler/lib/runtime.js",
315+
"@ember/template-compiler/lib/system/calculate-location-display.js": "ember-source/@ember/template-compiler/lib/system/calculate-location-display.js",
316+
"@ember/template-compiler/lib/template.js": "ember-source/@ember/template-compiler/lib/template.js",
317+
"@ember/template-compiler/runtime.js": "ember-source/@ember/template-compiler/runtime.js",
295318
"@ember/template-factory/index.js": "ember-source/@ember/template-factory/index.js",
296319
"@ember/template/index.js": "ember-source/@ember/template/index.js",
297320
"@ember/test/adapter.js": "ember-source/@ember/test/adapter.js",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './lib/-internal/primitives';

packages/@ember/template-compiler/lib/primitives.ts renamed to packages/@ember/template-compiler/lib/-internal/primitives.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ export {
22
RESOLUTION_MODE_TRANSFORMS,
33
STRICT_MODE_TRANSFORMS,
44
STRICT_MODE_KEYWORDS,
5-
} from './plugins';
5+
INTERNAL_PLUGINS,
6+
} from '../plugins';

packages/@ember/template-compiler/lib/plugins/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ import TransformQuotedBindingsIntoJustBindings from './transform-quoted-bindings
1010
import TransformResolutions from './transform-resolutions';
1111
import TransformWrapMountAndOutlet from './transform-wrap-mount-and-outlet';
1212

13+
export const INTERNAL_PLUGINS = {
14+
AssertAgainstAttrs,
15+
AssertAgainstNamedOutlets,
16+
AssertInputHelperWithoutBlock,
17+
AssertReservedNamedArguments,
18+
TransformActionSyntax,
19+
TransformEachInIntoEach,
20+
TransformEachTrackArray,
21+
TransformInElement,
22+
TransformQuotedBindingsIntoJustBindings,
23+
TransformResolutions,
24+
TransformWrapMountAndOutlet,
25+
} as const;
26+
1327
// order of plugins is important
1428
export const RESOLUTION_MODE_TRANSFORMS = Object.freeze([
1529
TransformQuotedBindingsIntoJustBindings,

packages/@ember/template-compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"exports": {
55
".": "./index.ts",
66
"./runtime": "./runtime.ts",
7-
"./primitives": "./primitives.ts",
7+
"./-internal-primitives": "./-internal-primitives.ts",
88
"./types": "./lib/types.ts"
99
},
1010
"dependencies": {

packages/@ember/template-compiler/primitives.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { INTERNAL_PLUGINS } from '@ember/template-compiler/-internal-primitives';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { INTERNAL_PLUGINS } from '@ember/template-compiler/-internal-primitives';
2+
3+
export default INTERNAL_PLUGINS.AssertAgainstAttrs;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { INTERNAL_PLUGINS } from '@ember/template-compiler/-internal-primitives';
2+
3+
export default INTERNAL_PLUGINS.AssertAgainstNamedOutlets;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { INTERNAL_PLUGINS } from '@ember/template-compiler/-internal-primitives';
2+
3+
export default INTERNAL_PLUGINS.AssertInputHelperWithoutBlock;

0 commit comments

Comments
 (0)