Skip to content

Commit aa0a34a

Browse files
feat: Improve config handling for polyfillUUID (emberjs#9265)
* feat: Improve config handling for polyfillUUID * add polyfillUUID config for graph addon * remove: duplicate addon-main.js in packages/graph
1 parent f6ae038 commit aa0a34a

File tree

14 files changed

+15
-99
lines changed

14 files changed

+15
-99
lines changed

README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,8 @@ activate this polyfill:
125125

126126
```ts
127127
let app = new EmberApp(defaults, {
128-
'@embroider/macros': {
129-
setConfig: {
130-
'@ember-data/store': {
131-
polyfillUUID: true,
132-
},
133-
},
128+
emberData: {
129+
polyfillUUID: true
134130
},
135131
});
136132
```

packages/adapter/addon-main.js

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858

5959
// copy configs forward
6060
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
61+
ownConfig.polyfillUUID = hostOptions.polyfillUUID ?? false;
6162
ownConfig.compatWith = hostOptions.compatWith || null;
6263
ownConfig.debug = debugOptions;
6364
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});

packages/core-types/addon-main.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858

5959
// copy configs forward
6060
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
61+
ownConfig.polyfillUUID = hostOptions.polyfillUUID ?? false;
6162
ownConfig.compatWith = hostOptions.compatWith || null;
6263
ownConfig.debug = debugOptions;
6364
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});

packages/graph/addon-main.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858

5959
// copy configs forward
6060
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
61+
ownConfig.polyfillUUID = hostOptions.polyfillUUID ?? false;
6162
ownConfig.compatWith = hostOptions.compatWith || null;
6263
ownConfig.debug = debugOptions;
6364
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});

packages/graph/addon-main.js

-93
This file was deleted.

packages/json-api/addon-main.js

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858

5959
// copy configs forward
6060
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
61+
ownConfig.polyfillUUID = hostOptions.polyfillUUID ?? false;
6162
ownConfig.compatWith = hostOptions.compatWith || null;
6263
ownConfig.debug = debugOptions;
6364
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});

packages/legacy-compat/addon-main.js

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858

5959
// copy configs forward
6060
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
61+
ownConfig.polyfillUUID = hostOptions.polyfillUUID ?? false;
6162
ownConfig.compatWith = hostOptions.compatWith || null;
6263
ownConfig.debug = debugOptions;
6364
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});

packages/model/addon-main.js

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858

5959
// copy configs forward
6060
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
61+
ownConfig.polyfillUUID = hostOptions.polyfillUUID ?? false;
6162
ownConfig.compatWith = hostOptions.compatWith || null;
6263
ownConfig.debug = debugOptions;
6364
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});

packages/private-build-infra/src/addon-build-config-for-data-package.js

+2
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ function addonBuildConfigForDataPackage(pkg) {
118118
let options = (app.options = app.options || {});
119119
options.emberData = options.emberData || {};
120120
options.emberData.debug = options.emberData.debug || {};
121+
options.emberData.polyfillUUID = options.emberData.polyfillUUID ?? false;
121122
const hostOptions = options.emberData;
122123
const debugOptions = Object.assign(
123124
{
@@ -157,6 +158,7 @@ function addonBuildConfigForDataPackage(pkg) {
157158

158159
// copy configs forward
159160
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
161+
ownConfig.polyfillUUID = options.emberData.polyfillUUID;
160162
ownConfig.compatWith = options.emberData.compatWith || null;
161163
ownConfig.debug = debugOptions;
162164
ownConfig.deprecations = Object.assign(

packages/request/addon-main.js

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858

5959
// copy configs forward
6060
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
61+
ownConfig.polyfillUUID = hostOptions.polyfillUUID ?? false;
6162
ownConfig.compatWith = hostOptions.compatWith || null;
6263
ownConfig.debug = debugOptions;
6364
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});

packages/schema-record/addon-main.js

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858

5959
// copy configs forward
6060
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
61+
ownConfig.polyfillUUID = hostOptions.polyfillUUID ?? false;
6162
ownConfig.compatWith = hostOptions.compatWith || null;
6263
ownConfig.debug = debugOptions;
6364
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});

packages/serializer/addon-main.js

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858

5959
// copy configs forward
6060
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
61+
ownConfig.polyfillUUID = hostOptions.polyfillUUID ?? false;
6162
ownConfig.compatWith = hostOptions.compatWith || null;
6263
ownConfig.debug = debugOptions;
6364
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});

packages/store/addon-main.js

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858

5959
// copy configs forward
6060
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
61+
ownConfig.polyfillUUID = hostOptions.polyfillUUID ?? false;
6162
ownConfig.compatWith = hostOptions.compatWith || null;
6263
ownConfig.debug = debugOptions;
6364
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});

packages/tracking/addon-main.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858

5959
// copy configs forward
6060
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
61+
ownConfig.polyfillUUID = hostOptions.polyfillUUID ?? false;
6162
ownConfig.compatWith = hostOptions.compatWith || null;
6263
ownConfig.debug = debugOptions;
6364
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});

0 commit comments

Comments
 (0)