Not able to understand the difference between the node versions which is resulting the difference between asserts

When i run the below statements using different node versions I see a difference in the assert outcome.
I am using v10.15.1 where the assert passes. But the same code in v14.18.1 throws error.

const assert = require('assert')
var err = new Error('some error');
var d = [{
    'error':[err]
}]
var expected = [{
    'error':[{}]
}]
assert.deepEqual(d,expected)

Error is as below:

    assert.js:118
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:

[
  {
    error: [
      Error: some error
          at Object.<anonymous> (/Users/username/Desktop/repos/temp_files/test.js:2:11)
          at Module._compile (internal/modules/cjs/loader.js:1085:14)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
          at Module.load (internal/modules/cjs/loader.js:950:32)
          at Function.Module._load (internal/modules/cjs/loader.js:790:12)
          at Function.executeUserEntryPoint [as r...

should loosely deep-equal

[
  {
    error: [
      []
    ]
  }
]
    at Object.<anonymous> (/Users/username/Desktop/repos/temp_files/test.js:9:8)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: [
    {
      error: [
        Error: some error
            at Object.<anonymous> (/Users/username/Desktop/repos/temp_files/test.js:2:11)
            at Module._compile (internal/modules/cjs/loader.js:1085:14)
            at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
            at Module.load (internal/modules/cjs/loader.js:950:32)
            at Function.Module._load (internal/modules/cjs/loader.js:790:12)
            at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
            at internal/main/run_main_module.js:17:47
      ]
    }
  ],
  expected: [ { error: [ [] ] } ],
  operator: 'deepEqual'
}

I referred to the documentation for both the version but didn’t find it useful.

v10

v14

I understand of course that the error object is empty in one but not in the other. But cannot find the reason why v10 ignores it and what changed later because of which the error is now caught