@embroider/macros 1.20.1 → 1.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/package.json +3 -3
- package/src/addon/runtime.js +18 -1
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embroider/macros",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Standardized build-time macros for ember apps.",
|
|
6
6
|
"keywords": [
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"@types/node": "^22.9.3",
|
|
50
50
|
"@types/resolve": "^1.20.0",
|
|
51
51
|
"@types/semver": "^7.3.6",
|
|
52
|
-
"babel-plugin-ember-template-compilation": "^3.
|
|
52
|
+
"babel-plugin-ember-template-compilation": "^3.1.0",
|
|
53
53
|
"code-equality-assertions": "^1.0.1",
|
|
54
54
|
"scenario-tester": "^3.0.1",
|
|
55
55
|
"typescript": "^5.4.5",
|
|
56
56
|
"vitest": "^3.2.4",
|
|
57
|
-
"@embroider/core": "4.4.
|
|
57
|
+
"@embroider/core": "4.4.7",
|
|
58
58
|
"@embroider/test-support": "0.36.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
package/src/addon/runtime.js
CHANGED
|
@@ -55,7 +55,24 @@ export function setTesting(isTesting) {
|
|
|
55
55
|
runtimeConfig.global['@embroider/macros'].isTesting = Boolean(isTesting);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
// Welcome intrepid developer!
|
|
59
|
+
//
|
|
60
|
+
// While this data is "global", this is a private variable.
|
|
61
|
+
//
|
|
62
|
+
// do not build features based off of its contents,
|
|
63
|
+
// or assume it will have the same name in future releases.
|
|
64
|
+
const runtimeConfig = globalThis.__embroider_macros__runtime_config__ ||= {};
|
|
65
|
+
|
|
66
|
+
runtimeConfig.packages ||= {};
|
|
67
|
+
runtimeConfig.global ||= {};
|
|
68
|
+
|
|
69
|
+
// In the off chance there are duplicate copies of @embroider/macros in the dep graph
|
|
70
|
+
// (due to the package manager messing up)
|
|
71
|
+
// Let's try to merge them together via the above global well known variable
|
|
72
|
+
const localConfig = initializeRuntimeMacrosConfig();
|
|
73
|
+
|
|
74
|
+
Object.assign(runtimeConfig.packages, localConfig.packages);
|
|
75
|
+
Object.assign(runtimeConfig.global, localConfig.global);
|
|
59
76
|
|
|
60
77
|
// this exists to be targeted by our babel plugin
|
|
61
78
|
function initializeRuntimeMacrosConfig() {
|