Closed renovate[bot] closed 11 months ago
Path | Size |
---|---|
fixture: base | 381.53 KB (0%) |
fixture: lazy | 386.28 KB (0%) |
fixture: tracing | 401.72 KB (0%) |
fixture: lazy+tracing | 406.43 KB (0%) |
@pi0 I suppose "Only merge plain objects (#β111)" is considered a bugfix but maybe you are interested in knowing that it breaks testing here.
The code is roughly:
const config = await import(`${dir}/fixture/${fixture ? fixture + '/' : ''}nuxt.config.cjs`)
const result = defu(override, config)
and those are logged objects:
override: {
sentry: {
dsn: 'http://acacaeaccacacacabcaacdacdacadaca@localhost:58160/000001'
}
},
config: [Object: null prototype] [Module] {
rootDir: [Getter],
telemetry: [Getter],
dev: [Getter],
render: [Getter],
modules: [Getter],
sentry: [Getter],
publicRuntimeConfig: [Getter],
default: {
rootDir: '/usr/local/workspace/nuxt/sentry-module/test/fixture/lazy',
telemetry: false,
dev: false,
render: [Object],
modules: [Array],
sentry: [Object],
publicRuntimeConfig: [Object]
}
},
result: {
sentry: {
dsn: 'http://acacaeaccacacacabcaacdacdacadaca@localhost:58160/000001'
}
}
So the object returned from async import is strangely not a POD and it fails. Not sure if that's normal for async import
or it's because of running within jest
but I guess it's an interesting case where this bug fix is a breaking change.
I'm adding a workaround for this but I wonder whether this apparent fix should be adjusted to work in this case...
I'm gonna do:
// Returned object has "Module" type which defu ignores because it's not plain object.
// Copy properties to the new object so that the object is not ignored.
const config = Object.assign({}, await import(`${dir}/fixture/${fixture ? fixture + '/' : ''}nuxt.config.cjs`))
This PR contains the following updates:
6.1.2
->6.1.3
Release Notes
unjs/defu (defu)
### [`v6.1.3`](https://togithub.com/unjs/defu/blob/HEAD/CHANGELOG.md#v613) [Compare Source](https://togithub.com/unjs/defu/compare/v6.1.2...v6.1.3) [compare changes](https://togithub.com/unjs/defu/compare/v6.1.2...v6.1.3) ##### π©Ή Fixes - Only merge plain objects ([#111](https://togithub.com/unjs/defu/pull/111)) ##### π Documentation - Update badges ([581dd92](https://togithub.com/unjs/defu/commit/581dd92)) - Fix typo ([#96](https://togithub.com/unjs/defu/pull/96)) - Fix the result of the array merging ([#99](https://togithub.com/unjs/defu/pull/99)) - Fix typo ([#107](https://togithub.com/unjs/defu/pull/107)) ##### π¦ Build - Backward compatible cjs entry ([#110](https://togithub.com/unjs/defu/pull/110)) ##### π‘ Chore - Update dependencies ([63d0e8e](https://togithub.com/unjs/defu/commit/63d0e8e)) - Enable ts strict mode ([82d68c7](https://togithub.com/unjs/defu/commit/82d68c7)) - Fix tests ([59d0f6a](https://togithub.com/unjs/defu/commit/59d0f6a)) ##### π¨ Styles - Format with prettier v3 ([32650f1](https://togithub.com/unjs/defu/commit/32650f1)) ##### β€οΈ Contributors - Pooya Parsa ([@pi0](http://github.com/pi0)) - Abdul Al-HasanyConfiguration
π Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.