Since n8n v1.0.5 the behaviour of the Code node changed when using $(‘node’).all() function.
In case you want to return the items of a previous node which returned new items without the pairedItem field, the second Code node returns the full item object, including the json and pairedItem fields. See the workflows below.
To be completely honest with you I was not expecting this change either and our migration guide didn’t mention it either. So I too am a bit unsure about whether this is intended or a bug
I’ll see if I can get some clarification on this internally and will get back to you once I know more.
So the good news is that the team is able to reliably reproduce this. It’s also very much unexpected. There is no root cause/fix yet, but I’ll provide an update once I hear more.