data icon indicating copy to clipboard operation
data copied to clipboard

[5.3.4+] `polyfillUUID` isn't anymore working when there was added over `@embroider/macros` option

Open mkszepp opened this issue 1 year ago • 1 comments

Starting with ember-data 5.3.4+ we are seeing a lot of randomUUID errors.

L.randomUUID is not a function. (In 'L.randomUUID()', 'L.randomUUID' is undefined)

In our app we are using this code part (since ember 4.6)

let app = new EmberApp(defaults, {
  '@embroider/macros': {
      setConfig: {
        '@ember-data/store': {
          polyfillUUID: true,
        },
      },
    },
});

Now i have discovered, that this was changes in #9265 to:

let app = new EmberApp(defaults, {
  emberData: {
    polyfillUUID: true
  },
});

I didn't found this braking change in changelogs of v5.3.4. Its nice to simplify this config, because a lot of apps didn't configured correctly, but for our apps this change was braking as we havn't seen a changelog for that one.

In additional also inside the app there is still documented the old way (which isn't anymore working).

https://github.com/emberjs/data/blob/3ec0359017d321d43d914f4fffda51c0672f58b5/packages/-ember-data/README.md?plain=1#L144-L152

https://github.com/emberjs/data/blob/3ec0359017d321d43d914f4fffda51c0672f58b5/packages/-ember-data/src/index.ts#L111-L119

mkszepp avatar Jul 10 '24 08:07 mkszepp

thanks, I think we should just remove the old docs where they got forgotten as we no longer use macros configs but macros global configs instead in order to support v2 addons

runspired avatar Jul 10 '24 16:07 runspired